diff --git a/compiler/rustc_borrowck/src/places_conflict.rs b/compiler/rustc_borrowck/src/places_conflict.rs index 60676ac6b8644..d83269013c143 100644 --- a/compiler/rustc_borrowck/src/places_conflict.rs +++ b/compiler/rustc_borrowck/src/places_conflict.rs @@ -286,7 +286,8 @@ fn place_components_conflict<'tcx>( // Given that the bases of `elem1` and `elem2` are always either equal // or disjoint (and have the same type!), return the overlap situation -// between `elem1` and `elem2`. +// between `elem1` and `elem2` +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn place_projection_conflict<'tcx>( tcx: TyCtxt<'tcx>, body: &Body<'tcx>, diff --git a/compiler/rustc_borrowck/src/universal_regions.rs b/compiler/rustc_borrowck/src/universal_regions.rs index e96c6c7c56f9b..49e0d04fc9e3b 100644 --- a/compiler/rustc_borrowck/src/universal_regions.rs +++ b/compiler/rustc_borrowck/src/universal_regions.rs @@ -369,6 +369,7 @@ impl<'tcx> UniversalRegions<'tcx> { /// that this region imposes on others. The methods in this file /// handle the part about dumping the inference context internal /// state. + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub(crate) fn annotate(&self, tcx: TyCtxt<'tcx>, err: &mut Diag<'_, ()>) { match self.defining_ty { DefiningTy::Closure(def_id, args) => { diff --git a/compiler/rustc_builtin_macros/src/autodiff.rs b/compiler/rustc_builtin_macros/src/autodiff.rs index afa393a545cd4..5a2134fe34103 100644 --- a/compiler/rustc_builtin_macros/src/autodiff.rs +++ b/compiler/rustc_builtin_macros/src/autodiff.rs @@ -501,6 +501,7 @@ mod llvm_enzyme { // ``` // std::intrinsics::autodiff(source as fn(..) -> .., diff, (args)) // ``` + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn call_autodiff( ecx: &ExtCtxt<'_>, primal: Ident, diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs index 33ffe4cc4e9c8..1be2a7ce9baa6 100644 --- a/compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs +++ b/compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs @@ -25,6 +25,7 @@ pub(crate) struct UnwindContext { } impl UnwindContext { + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub(crate) fn new(module: &mut dyn Module, pic_eh_frame: bool) -> Self { let endian = match module.isa().endianness() { Endianness::Little => RunTimeEndian::Little, diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/llvm_x86.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/llvm_x86.rs index 61f48fa977435..f136b773bdd16 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/llvm_x86.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/llvm_x86.rs @@ -7,6 +7,7 @@ use crate::inline_asm::{CInlineAsmOperand, codegen_inline_asm_inner}; use crate::intrinsics::*; use crate::prelude::*; +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub(super) fn codegen_x86_llvm_intrinsic_call<'tcx>( fx: &mut FunctionCx<'_, '_, 'tcx>, intrinsic: &str, diff --git a/compiler/rustc_codegen_cranelift/src/value_and_place.rs b/compiler/rustc_codegen_cranelift/src/value_and_place.rs index 5b76a4cb97793..436ef122a358c 100644 --- a/compiler/rustc_codegen_cranelift/src/value_and_place.rs +++ b/compiler/rustc_codegen_cranelift/src/value_and_place.rs @@ -180,6 +180,7 @@ impl<'tcx> CValue<'tcx> { } } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub(crate) fn value_field( self, fx: &mut FunctionCx<'_, '_, 'tcx>, @@ -520,6 +521,7 @@ impl<'tcx> CPlace<'tcx> { self.write_cvalue_maybe_transmute(fx, from, "write_cvalue_transmute"); } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn write_cvalue_maybe_transmute( self, fx: &mut FunctionCx<'_, '_, 'tcx>, diff --git a/compiler/rustc_codegen_gcc/src/builder.rs b/compiler/rustc_codegen_gcc/src/builder.rs index 1d6d77604411c..e5a9e3776b9ca 100644 --- a/compiler/rustc_codegen_gcc/src/builder.rs +++ b/compiler/rustc_codegen_gcc/src/builder.rs @@ -943,6 +943,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { .get_address(self.location) } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn scalable_alloca(&mut self, _elt: u64, _align: Align, _element_ty: Ty<'_>) -> RValue<'gcc> { todo!() } diff --git a/compiler/rustc_codegen_gcc/src/type_of.rs b/compiler/rustc_codegen_gcc/src/type_of.rs index 5b198eeaf0182..08b0d58e11c5a 100644 --- a/compiler/rustc_codegen_gcc/src/type_of.rs +++ b/compiler/rustc_codegen_gcc/src/type_of.rs @@ -56,6 +56,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { } } +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn uncached_gcc_type<'gcc, 'tcx>( cx: &CodegenCx<'gcc, 'tcx>, layout: TyAndLayout<'tcx>, @@ -177,6 +178,7 @@ pub trait LayoutGccExt<'tcx> { } impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> { + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn is_gcc_immediate(&self) -> bool { match self.backend_repr { BackendRepr::Scalar(_) | BackendRepr::SimdVector { .. } => true, diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index de340057d0e81..38f95dd928dd5 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -829,6 +829,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> { /// at that type. Return `true` if the type is indeed primitive. /// /// Note that not all of these have `FieldsShape::Primitive`, e.g. wide references. + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn try_visit_primitive( &mut self, value: &PlaceTy<'tcx, M::Provenance>, diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index 98e097ac40026..240b3323c3e9d 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -1934,6 +1934,7 @@ impl InvocationCollectorNode for ast::Pat { _ => unreachable!(), } } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn as_target(&self) -> Target { todo!(); } diff --git a/compiler/rustc_hir_typeck/src/cast.rs b/compiler/rustc_hir_typeck/src/cast.rs index eaa87f1d4cbc6..07c9a9aab5ddd 100644 --- a/compiler/rustc_hir_typeck/src/cast.rs +++ b/compiler/rustc_hir_typeck/src/cast.rs @@ -86,6 +86,7 @@ enum PointerKind<'tcx> { impl<'a, 'tcx> FnCtxt<'a, 'tcx> { /// Returns the kind of unsize information of t, or None /// if t is unknown. + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn pointer_kind( &self, t: Ty<'tcx>, diff --git a/compiler/rustc_hir_typeck/src/closure.rs b/compiler/rustc_hir_typeck/src/closure.rs index 1a9c2a21c7ef3..971ec54ab941f 100644 --- a/compiler/rustc_hir_typeck/src/closure.rs +++ b/compiler/rustc_hir_typeck/src/closure.rs @@ -45,6 +45,7 @@ struct ClosureSignatures<'tcx> { impl<'a, 'tcx> FnCtxt<'a, 'tcx> { #[instrument(skip(self, closure), level = "debug")] + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub(crate) fn check_expr_closure( &self, closure: &hir::Closure<'tcx>, diff --git a/compiler/rustc_hir_typeck/src/errors.rs b/compiler/rustc_hir_typeck/src/errors.rs index 6eef156846972..789811286a44d 100644 --- a/compiler/rustc_hir_typeck/src/errors.rs +++ b/compiler/rustc_hir_typeck/src/errors.rs @@ -1384,3 +1384,7 @@ pub(crate) struct ProjectOnNonPinProjectType { )] pub sugg_span: Option, } + +#[derive(Diagnostic)] +#[diag("`todo!()` macro used")] +pub(crate) struct TodoMacroUse; diff --git a/compiler/rustc_hir_typeck/src/expr.rs b/compiler/rustc_hir_typeck/src/expr.rs index 184c0d5a53d16..a92116841ab10 100644 --- a/compiler/rustc_hir_typeck/src/expr.rs +++ b/compiler/rustc_hir_typeck/src/expr.rs @@ -322,7 +322,25 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { if self.try_structurally_resolve_type(expr.span, ty).is_never() && self.tcx.expr_guaranteed_to_constitute_read_for_never(expr) { - self.diverges.set(self.diverges.get() | Diverges::always(expr.span)); + // We only check expansion for calls, because `todo!()` either expands to + // a call to `::core::panicking::panic` or `::core::panicking::panic_fmt` + let diverges = if let ExprKind::Call(..) = expr.kind + && self.tcx.is_locally_expanded_by(expr.span, sym::todo_macro) + { + self.tcx.emit_node_span_lint( + rustc_lint::builtin::TODO_MACRO_CALLS, // ignore-tidy-todo + expr.hir_id, + expr.span, + crate::errors::TodoMacroUse, + ); + // We don't trigger `unreachable_code` for `todo!()` within this crate's code + // that diverges to avoid flooding the user with warnings while they are still + // working on their code. + Diverges::WarnedAlways + } else { + Diverges::always(expr.span) + }; + self.diverges.set(self.diverges.get() | diverges); } // Record the type, which applies it effects. diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 22843f664b59c..a69a258de9659 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -111,6 +111,7 @@ declare_lint_pass! { TEST_UNSTABLE_LINT, TEXT_DIRECTION_CODEPOINT_IN_COMMENT, TEXT_DIRECTION_CODEPOINT_IN_LITERAL, + TODO_MACRO_CALLS, // ignore-tidy-todo TRIVIAL_CASTS, TRIVIAL_NUMERIC_CASTS, TYVAR_BEHIND_RAW_POINTER, @@ -832,6 +833,28 @@ declare_lint! { report_in_external_macro } +declare_lint! { + /// The `todos` lint detects calls of the `todo!()` macro. + /// + /// ### Example + /// + /// ```rust,no_run + /// todo!(); + /// ``` + /// + /// {{produces}} + /// + /// ### Explanation + /// + /// This macro is ignored during checking for unreachable code, as it is + /// meant for a stand in for code yet to be produced. It is considered + /// bad form to leave it in production code. + /* ignore-tidy-todo */ pub TODO_MACRO_CALLS, + Warn, + "detects `todo!()` macro calls", + report_in_external_macro +} + declare_lint! { /// The `unreachable_patterns` lint detects unreachable patterns. /// diff --git a/compiler/rustc_middle/src/mir/terminator.rs b/compiler/rustc_middle/src/mir/terminator.rs index 7931c80bed6c1..a5fe403a4d67a 100644 --- a/compiler/rustc_middle/src/mir/terminator.rs +++ b/compiler/rustc_middle/src/mir/terminator.rs @@ -335,6 +335,7 @@ impl AssertKind { /// Note that we deliberately show more details here than we do at runtime, such as the actual /// numbers that overflowed -- it is much easier to do so here than at runtime. impl fmt::Display for AssertKind { + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { use AssertKind::*; diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index a81697cc96dbb..33a48d7764204 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -44,7 +44,7 @@ use rustc_session::config::CrateType; use rustc_session::cstore::{CrateStoreDyn, Untracked}; use rustc_session::lint::Lint; use rustc_span::def_id::{CRATE_DEF_ID, DefPathHash, StableCrateId}; -use rustc_span::{DUMMY_SP, Ident, Span, Symbol, kw}; +use rustc_span::{DUMMY_SP, ExpnData, Ident, Span, Symbol, SyntaxContext, kw}; use rustc_type_ir::TyKind::*; pub use rustc_type_ir::lift::Lift; use rustc_type_ir::{CollectAndApply, TypeFlags, WithCachedTypeInfo, elaborate, search_graph}; @@ -1345,6 +1345,44 @@ impl<'tcx> TyCtxt<'tcx> { None => Err(VarError::NotPresent), } } + + /// Returns whether this context was expanded by the macro with the given name where + /// the macro call is local in the current crate. + pub fn is_locally_expanded_by(self, span: Span, mac: Symbol) -> bool { + let source_map = self.sess.source_map(); + let mut ctxt = span.ctxt(); + let Some(mac_def_id) = self.get_diagnostic_item(mac) else { + // do not have a def id to search for, so no match is possible + return false; + }; + // first, find the `todo!` call site + let todo_ctxt = loop { + if ctxt.is_root() { + return false; + } + let data = ctxt.outer_expn_data(); + if let Some(def_id) = data.macro_def_id + && mac_def_id == def_id + { + break ctxt; + } + ctxt = data.call_site.ctxt(); + }; + // get the crate of the root context + let crate_num = |data: &ExpnData| source_map.lookup_source_file(data.call_site.lo()).cnum; + let root_source_crate_num = crate_num(&SyntaxContext::root().outer_expn_data()); + // check that all expansions between the `todo!()` call and the root context + // are in the same file as the root context + let mut ctxt = todo_ctxt; + while !ctxt.is_root() { + let data = ctxt.outer_expn_data(); + if crate_num(&data) != root_source_crate_num { + return false; + } + ctxt = data.call_site.ctxt(); + } + true + } } impl<'tcx> TyCtxtAt<'tcx> { diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 0d047b348d9e1..aa382f0742b3c 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1704,6 +1704,7 @@ impl<'tcx> Ty<'tcx> { /// Returns the type of metadata for (potentially wide) pointers to this type, /// or the struct tail if the metadata type cannot be determined. + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub fn ptr_metadata_ty_or_tail( self, tcx: TyCtxt<'tcx>, diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index d0cbdff366dfa..a40df35ab7de4 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -1270,6 +1270,7 @@ impl<'tcx> Ty<'tcx> { /// /// Returning true means the type is known to be `!AsyncDrop`. Returning /// `false` means nothing -- could be `AsyncDrop`, might not be. + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn is_trivially_not_async_drop(self) -> bool { match self.kind() { ty::Int(_) diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs index 055d124386cf9..fcdddb551dc33 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -601,6 +601,7 @@ impl<'tcx> Map<'tcx> { } #[tracing::instrument(level = "trace", skip(self, tcx, body), ret)] + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub fn register_place( &mut self, tcx: TyCtxt<'tcx>, diff --git a/compiler/rustc_next_trait_solver/src/canonical/canonicalizer.rs b/compiler/rustc_next_trait_solver/src/canonical/canonicalizer.rs index ce2be24adc586..e4aeec9207fdb 100644 --- a/compiler/rustc_next_trait_solver/src/canonical/canonicalizer.rs +++ b/compiler/rustc_next_trait_solver/src/canonical/canonicalizer.rs @@ -488,6 +488,7 @@ impl, I: Interner> TypeFolder for Canonicaliz } } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn fold_const(&mut self, c: I::Const) -> I::Const { if !c.flags().intersects(NEEDS_CANONICAL) { return c; diff --git a/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs b/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs index 4b1e4b2de571d..ad58c41314008 100644 --- a/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs @@ -265,6 +265,7 @@ where }) } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn consider_builtin_fn_ptr_trait_candidate( _ecx: &mut EvalCtxt<'_, D>, _goal: Goal, @@ -316,6 +317,7 @@ where ) } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn consider_builtin_async_fn_trait_candidates( _ecx: &mut EvalCtxt<'_, D>, _goal: Goal, @@ -352,6 +354,7 @@ where unreachable!("Future is not const") } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn consider_builtin_iterator_candidate( _ecx: &mut EvalCtxt<'_, D>, _goal: Goal, diff --git a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs index 13f2ad8f82eba..3488105375efe 100644 --- a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs @@ -616,6 +616,7 @@ where panic!("`Tuple` does not have an associated type: {:?}", goal); } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn consider_builtin_pointee_candidate( ecx: &mut EvalCtxt<'_, D>, goal: Goal, @@ -871,6 +872,7 @@ where panic!("`Unsize` does not have an associated type: {:?}", goal); } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn consider_builtin_discriminant_kind_candidate( ecx: &mut EvalCtxt<'_, D>, goal: Goal, diff --git a/compiler/rustc_public/src/unstable/convert/stable/mir.rs b/compiler/rustc_public/src/unstable/convert/stable/mir.rs index d25751c81f3f5..8f27a68db651d 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/mir.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/mir.rs @@ -188,6 +188,8 @@ impl<'tcx> Stable<'tcx> for mir::StatementKind<'tcx> { impl<'tcx> Stable<'tcx> for mir::Rvalue<'tcx> { type T = crate::mir::Rvalue; + + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn stable<'cx>( &self, tables: &mut Tables<'cx, BridgeTys>, @@ -413,6 +415,8 @@ impl<'tcx> Stable<'tcx> for mir::Place<'tcx> { impl<'tcx> Stable<'tcx> for mir::PlaceElem<'tcx> { type T = crate::mir::ProjectionElem; + + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn stable<'cx>( &self, tables: &mut Tables<'cx, BridgeTys>, @@ -700,6 +704,8 @@ impl<'tcx> Stable<'tcx> for mir::Terminator<'tcx> { impl<'tcx> Stable<'tcx> for mir::TerminatorKind<'tcx> { type T = crate::mir::TerminatorKind; + + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn stable<'cx>( &self, tables: &mut Tables<'cx, BridgeTys>, diff --git a/compiler/rustc_public/src/unstable/convert/stable/ty.rs b/compiler/rustc_public/src/unstable/convert/stable/ty.rs index 31cc6bd46959e..4525d95547894 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/ty.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/ty.rs @@ -390,6 +390,7 @@ impl<'tcx> Stable<'tcx> for Ty<'tcx> { impl<'tcx> Stable<'tcx> for ty::TyKind<'tcx> { type T = crate::ty::TyKind; + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn stable<'cx>( &self, tables: &mut Tables<'cx, BridgeTys>, @@ -475,6 +476,7 @@ impl<'tcx> Stable<'tcx> for ty::TyKind<'tcx> { impl<'tcx> Stable<'tcx> for ty::Pattern<'tcx> { type T = crate::ty::Pattern; + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn stable<'cx>( &self, tables: &mut Tables<'cx, BridgeTys>, @@ -720,6 +722,7 @@ impl<'tcx> Stable<'tcx> for ty::PredicateKind<'tcx> { impl<'tcx> Stable<'tcx> for ty::ClauseKind<'tcx> { type T = crate::ty::ClauseKind; + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn stable<'cx>( &self, tables: &mut Tables<'cx, BridgeTys>, diff --git a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs index 26979c24bdb68..5ab539a680de7 100644 --- a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs +++ b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs @@ -319,6 +319,7 @@ fn encode_region<'tcx>(region: Region<'tcx>, dict: &mut FxHashMap, /// Encodes a ty:Ty using the Itanium C++ ABI with vendor extended type qualifiers and types for /// Rust types that are not used at the FFI boundary. #[instrument(level = "trace", skip(tcx, dict))] +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub(crate) fn encode_ty<'tcx>( tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 53e2527057bc2..d4a9ca9c8bf49 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -2023,6 +2023,7 @@ symbols! { tmm_reg, to_string, to_vec, + todo_macro, tool_attributes, tool_lints, trace_macros, diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index eff8cbef99541..fd8bacdd0e416 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -433,6 +433,7 @@ impl<'tcx> Printer<'tcx> for V0SymbolMangler<'tcx> { Ok(()) } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn print_type(&mut self, ty: Ty<'tcx>) -> Result<(), PrintError> { // Basic types, never cached (single-character). let basic_type = match ty.kind() { diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs index 72d3ba9629f4d..56d38aca64b38 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -886,6 +886,7 @@ fn assemble_candidates_from_predicates<'cx, 'tcx>( } } +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] #[instrument(level = "debug", skip(selcx, obligation, candidate_set))] fn assemble_candidates_from_impls<'cx, 'tcx>( selcx: &mut SelectionContext<'cx, 'tcx>, diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs index 49e0bdde37870..06243d1f9a20e 100644 --- a/compiler/rustc_ty_utils/src/consts.rs +++ b/compiler/rustc_ty_utils/src/consts.rs @@ -32,6 +32,7 @@ fn check_unop(op: mir::UnOp) -> bool { } } +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn recurse_build<'tcx>( tcx: TyCtxt<'tcx>, body: &thir::Thir<'tcx>, diff --git a/library/core/src/hash/mod.rs b/library/core/src/hash/mod.rs index eea6118571204..53ea134724d1e 100644 --- a/library/core/src/hash/mod.rs +++ b/library/core/src/hash/mod.rs @@ -451,7 +451,7 @@ pub trait Hasher { /// ``` /// #![feature(hasher_prefixfree_extras)] /// # // Stubs to make the `impl` below pass the compiler - /// # #![allow(non_local_definitions)] + /// # #![allow(non_local_definitions, todo_macro_calls)] /// # struct MyCollection(Option); /// # impl MyCollection { /// # fn len(&self) -> usize { todo!() } diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index 33397e56b86c5..79da4147a2551 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -810,7 +810,10 @@ macro_rules! unimplemented { /// an intent of implementing the functionality later and the message is "not yet /// implemented", `unimplemented!` makes no such claims. Its message is "not implemented". /// -/// Also, some IDEs will mark `todo!`s. +/// Also, some IDEs will mark `todo!`s. Furthermore, the `unreachable_code` lint will +/// not warn on code that is unreachable because of a `todo!()` to reduce unhelpful +/// messages. The code will however still be marked as unreachable, which may have an +/// effect on type and lifetime checks. /// /// # Panics /// @@ -843,6 +846,7 @@ macro_rules! unimplemented { /// # } /// struct MyStruct; /// +/// # #[allow(todo_macro_calls)] /// impl Foo for MyStruct { /// fn bar(&self) -> u8 { /// 1 + 1 diff --git a/library/core/src/ops/try_trait.rs b/library/core/src/ops/try_trait.rs index 34000f6d6b218..070062b53ca0c 100644 --- a/library/core/src/ops/try_trait.rs +++ b/library/core/src/ops/try_trait.rs @@ -43,6 +43,7 @@ use crate::ops::ControlFlow; /// ``` /// # #![feature(try_trait_v2)] /// # use std::ops::Try; +/// # #[allow(todo_macro_calls)] /// fn simple_try_fold_1>( /// iter: impl Iterator, /// mut accum: A, @@ -57,6 +58,7 @@ use crate::ops::ControlFlow; /// ``` /// # #![feature(try_trait_v2)] /// # use std::ops::{ControlFlow, Try}; +/// # #[allow(todo_macro_calls)] /// fn simple_try_fold_2>( /// iter: impl Iterator, /// mut accum: A, diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs index e6c6f7d766c02..c3fdfd620c959 100644 --- a/library/std/src/io/error.rs +++ b/library/std/src/io/error.rs @@ -912,6 +912,7 @@ impl Error { /// /// impl fmt::Display for E { /// // ... + /// # #[allow(todo_macro_calls)] /// # fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { /// # todo!() /// # } diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index 1451b6db8095d..8c5669768c13c 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -38,6 +38,7 @@ use crate::formats::item_type::ItemType; /// /// The returned value is `None` if the definition could not be inlined, /// and `Some` of a vector of items if it was successfully expanded. +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub(crate) fn try_inline( cx: &mut DocContext<'_>, res: Res, @@ -770,6 +771,7 @@ fn build_static(cx: &mut DocContext<'_>, did: DefId, mutable: bool) -> clean::St } } +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn build_macro( tcx: TyCtxt<'_>, def_id: DefId, diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index d6dae29c932e0..abf5e455894e3 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2761,6 +2761,7 @@ fn add_without_unwanted_attributes<'hir>( } } +#[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn clean_maybe_renamed_item<'tcx>( cx: &mut DocContext<'tcx>, item: &hir::Item<'tcx>, diff --git a/src/librustdoc/formats/item_type.rs b/src/librustdoc/formats/item_type.rs index eb3492e4625be..68cdcbeff2403 100644 --- a/src/librustdoc/formats/item_type.rs +++ b/src/librustdoc/formats/item_type.rs @@ -150,6 +150,7 @@ impl<'a> From<&'a clean::Item> for ItemType { } impl ItemType { + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] pub(crate) fn from_def_id(def_id: DefId, tcx: TyCtxt<'_>) -> Self { let def_kind = tcx.def_kind(def_id); match def_kind { diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 5d1f4778f1c52..fd4324da33239 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -555,6 +555,7 @@ impl FromClean for TraitBoundModifier { } impl FromClean for Type { + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn from_clean(ty: &clean::Type, renderer: &JsonRenderer<'_>) -> Self { use clean::Type::{ Array, BareFunction, BorrowedRef, Generic, ImplTrait, Infer, Primitive, QPath, diff --git a/src/tools/clippy/clippy_utils/src/hir_utils.rs b/src/tools/clippy/clippy_utils/src/hir_utils.rs index a4d8fd20e4d3f..bd3114b2b8e3d 100644 --- a/src/tools/clippy/clippy_utils/src/hir_utils.rs +++ b/src/tools/clippy/clippy_utils/src/hir_utils.rs @@ -19,7 +19,7 @@ use rustc_hir::{ use rustc_lexer::{FrontmatterAllowed, TokenKind, tokenize}; use rustc_lint::LateContext; use rustc_middle::ty::TypeckResults; -use rustc_span::{BytePos, ExpnKind, MacroKind, Symbol, SyntaxContext}; +use rustc_span::{BytePos, ExpnKind, MacroKind, sym as rsym, Symbol, SyntaxContext}; use std::hash::{Hash, Hasher}; use std::ops::Range; use std::slice; @@ -454,7 +454,7 @@ impl HirEqInterExpr<'_, '_, '_> { macro_backtrace(expr.span).last().is_some_and(|macro_call| { matches!( self.inner.cx.tcx.get_diagnostic_name(macro_call.def_id), - Some(sym::todo_macro | sym::unimplemented_macro) + Some(rsym::todo_macro | sym::unimplemented_macro) ) }) } diff --git a/src/tools/clippy/clippy_utils/src/macros.rs b/src/tools/clippy/clippy_utils/src/macros.rs index 4162595ffe810..698151abfd42d 100644 --- a/src/tools/clippy/clippy_utils/src/macros.rs +++ b/src/tools/clippy/clippy_utils/src/macros.rs @@ -13,6 +13,7 @@ use rustc_lint::{LateContext, LintContext}; use rustc_span::def_id::DefId; use rustc_span::hygiene::{self, MacroKind, SyntaxContext}; use rustc_span::{BytePos, ExpnData, ExpnId, ExpnKind, Span, SpanData, Symbol}; +use rustc_span::sym as rsym; use std::ops::ControlFlow; const FORMAT_MACRO_DIAG_ITEMS: &[Symbol] = &[ @@ -30,7 +31,7 @@ const FORMAT_MACRO_DIAG_ITEMS: &[Symbol] = &[ sym::print_macro, sym::println_macro, sym::std_panic_macro, - sym::todo_macro, + rsym::todo_macro, sym::unimplemented_macro, sym::write_macro, sym::writeln_macro, diff --git a/src/tools/clippy/clippy_utils/src/sym.rs b/src/tools/clippy/clippy_utils/src/sym.rs index 7d579d85d8087..a2aad958db58f 100644 --- a/src/tools/clippy/clippy_utils/src/sym.rs +++ b/src/tools/clippy/clippy_utils/src/sym.rs @@ -606,7 +606,6 @@ generate! { to_path_buf, to_string_method, to_uppercase, - todo_macro, tokio, trim, trim_end, diff --git a/src/tools/clippy/clippy_utils/src/usage.rs b/src/tools/clippy/clippy_utils/src/usage.rs index 4a1d24024915b..cbdeeee043777 100644 --- a/src/tools/clippy/clippy_utils/src/usage.rs +++ b/src/tools/clippy/clippy_utils/src/usage.rs @@ -11,6 +11,7 @@ use rustc_lint::LateContext; use rustc_middle::hir::nested_filter; use rustc_middle::mir::FakeReadCause; use rustc_middle::ty; +use rustc_span::sym as rsym; /// Returns a set of mutated local variable IDs, or `None` if mutations could not be determined. pub fn mutated_variables<'tcx>(expr: &'tcx Expr<'_>, cx: &LateContext<'tcx>) -> Option { @@ -146,7 +147,7 @@ impl<'tcx> Visitor<'tcx> for BindingUsageFinder<'_, 'tcx> { pub fn is_todo_unimplemented_macro(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { root_macro_call_first_node(cx, expr) .and_then(|macro_call| cx.tcx.get_diagnostic_name(macro_call.def_id)) - .is_some_and(|macro_name| matches!(macro_name, sym::todo_macro | sym::unimplemented_macro)) + .is_some_and(|macro_name| matches!(macro_name, rsym::todo_macro | sym::unimplemented_macro)) } /// Checks if the given expression is a stub, i.e., a `todo!()` or `unimplemented!()` expression, diff --git a/src/tools/miri/tests/pass/box-custom-alloc-aliasing.rs b/src/tools/miri/tests/pass/box-custom-alloc-aliasing.rs index 633291182839f..26d84c934699e 100644 --- a/src/tools/miri/tests/pass/box-custom-alloc-aliasing.rs +++ b/src/tools/miri/tests/pass/box-custom-alloc-aliasing.rs @@ -1,6 +1,7 @@ //! Regression test for : //! If `Box` has a local allocator, then it can't be `noalias` as the allocator //! may want to access allocator state based on the data pointer. +#![allow(todo_macro_calls)] //@revisions: stack tree //@[tree]compile-flags: -Zmiri-tree-borrows diff --git a/tests/crashes/135470.rs b/tests/crashes/135470.rs index efa017b5457cf..63025df7a5a2c 100644 --- a/tests/crashes/135470.rs +++ b/tests/crashes/135470.rs @@ -1,6 +1,7 @@ //@ known-bug: #135470 //@ compile-flags: -Copt-level=0 //@ edition: 2021 +#![allow(todo_macro_calls)] use std::future::Future; trait Access { diff --git a/tests/incremental/track-deps-in-new-solver.rs b/tests/incremental/track-deps-in-new-solver.rs index 51cd6b89e37e5..9f015d3843c62 100644 --- a/tests/incremental/track-deps-in-new-solver.rs +++ b/tests/incremental/track-deps-in-new-solver.rs @@ -3,7 +3,7 @@ //@ compile-flags: -Znext-solver //@ check-pass -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] pub trait Future { type Error; diff --git a/tests/ui-fulldeps/internal-lints/find_attr.rs b/tests/ui-fulldeps/internal-lints/find_attr.rs index 90b9b96ba54ef..3b40f8dd4f555 100644 --- a/tests/ui-fulldeps/internal-lints/find_attr.rs +++ b/tests/ui-fulldeps/internal-lints/find_attr.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Z unstable-options //@ ignore-stage1 +#![allow(todo_macro_calls)] #![feature(rustc_private)] #![deny(rustc::bad_use_of_find_attr)] diff --git a/tests/ui-fulldeps/internal-lints/find_attr.stderr b/tests/ui-fulldeps/internal-lints/find_attr.stderr index 8cb1003b0aa1e..3edd143369325 100644 --- a/tests/ui-fulldeps/internal-lints/find_attr.stderr +++ b/tests/ui-fulldeps/internal-lints/find_attr.stderr @@ -1,5 +1,5 @@ error: use of `AttributeKind` in `find_attr!(...)` invocation - --> $DIR/find_attr.rs:14:23 + --> $DIR/find_attr.rs:15:23 | LL | find_attr!(attrs, AttributeKind::Inline(..)); | ^^^^^^^^^^^^^ @@ -7,13 +7,13 @@ LL | find_attr!(attrs, AttributeKind::Inline(..)); = note: `find_attr!(...)` already imports `AttributeKind::*` = help: remove `AttributeKind` note: the lint level is defined here - --> $DIR/find_attr.rs:5:9 + --> $DIR/find_attr.rs:6:9 | LL | #![deny(rustc::bad_use_of_find_attr)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of `AttributeKind` in `find_attr!(...)` invocation - --> $DIR/find_attr.rs:16:23 + --> $DIR/find_attr.rs:17:23 | LL | find_attr!(attrs, AttributeKind::Inline{..} | AttributeKind::Deprecated {..}); | ^^^^^^^^^^^^^ @@ -22,7 +22,7 @@ LL | find_attr!(attrs, AttributeKind::Inline{..} | AttributeKind::Deprecated = help: remove `AttributeKind` error: use of `AttributeKind` in `find_attr!(...)` invocation - --> $DIR/find_attr.rs:16:51 + --> $DIR/find_attr.rs:17:51 | LL | find_attr!(attrs, AttributeKind::Inline{..} | AttributeKind::Deprecated {..}); | ^^^^^^^^^^^^^ @@ -31,7 +31,7 @@ LL | find_attr!(attrs, AttributeKind::Inline{..} | AttributeKind::Deprecated = help: remove `AttributeKind` error: use of `AttributeKind` in `find_attr!(...)` invocation - --> $DIR/find_attr.rs:20:23 + --> $DIR/find_attr.rs:21:23 | LL | find_attr!(attrs, AttributeKind::Inline(..) => todo!()); | ^^^^^^^^^^^^^ @@ -40,7 +40,7 @@ LL | find_attr!(attrs, AttributeKind::Inline(..) => todo!()); = help: remove `AttributeKind` error: use of `AttributeKind` in `find_attr!(...)` invocation - --> $DIR/find_attr.rs:22:23 + --> $DIR/find_attr.rs:23:23 | LL | find_attr!(attrs, AttributeKind::Inline(..) if true => todo!()); | ^^^^^^^^^^^^^ @@ -49,13 +49,13 @@ LL | find_attr!(attrs, AttributeKind::Inline(..) if true => todo!()); = help: remove `AttributeKind` error: unreachable pattern - --> $DIR/find_attr.rs:25:5 + --> $DIR/find_attr.rs:26:5 | LL | find_attr!(attrs, wildcard); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this | note: multiple earlier patterns match some of the same values - --> $DIR/find_attr.rs:25:5 + --> $DIR/find_attr.rs:26:5 | LL | find_attr!(attrs, wildcard); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -64,7 +64,7 @@ LL | find_attr!(attrs, wildcard); | matches some of the same values | collectively making this unreachable note: the lint level is defined here - --> $DIR/find_attr.rs:25:5 + --> $DIR/find_attr.rs:26:5 | LL | find_attr!(attrs, wildcard); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui-fulldeps/rustc_public/check_abi.rs b/tests/ui-fulldeps/rustc_public/check_abi.rs index d823e76b93cd0..4074e617ee796 100644 --- a/tests/ui-fulldeps/rustc_public/check_abi.rs +++ b/tests/ui-fulldeps/rustc_public/check_abi.rs @@ -186,7 +186,7 @@ fn generate_input(path: &str) -> std::io::Result<()> { file, r#" #![feature(c_variadic)] - #![allow(unused_variables)] + #![allow(unused_variables, todo_macro_calls)] use std::num::NonZero; diff --git a/tests/ui-fulldeps/rustc_public/check_attribute.rs b/tests/ui-fulldeps/rustc_public/check_attribute.rs index 393ff4c63c5ad..9e993e4394b49 100644 --- a/tests/ui-fulldeps/rustc_public/check_attribute.rs +++ b/tests/ui-fulldeps/rustc_public/check_attribute.rs @@ -76,7 +76,7 @@ fn generate_input(path: &str) -> std::io::Result<()> { #[inline] #[deprecated(since = "5.2.0")] fn builtins_fn() {{ - #![allow(unused_variables)] + #![allow(unused_variables, todo_macro_calls)] let x = (); let y = (); diff --git a/tests/ui-fulldeps/rustc_public/check_crate_defs.rs b/tests/ui-fulldeps/rustc_public/check_crate_defs.rs index 2b6a2ff8199ce..28ea64b8f1577 100644 --- a/tests/ui-fulldeps/rustc_public/check_crate_defs.rs +++ b/tests/ui-fulldeps/rustc_public/check_crate_defs.rs @@ -101,7 +101,7 @@ fn generate_input(path: &str) -> std::io::Result<()> { write!( file, r#" - #![allow(dead_code, unused_variables)] + #![allow(dead_code, unused_variables, todo_macro_calls)] static PRIVATE_STATIC: u8 = 0; fn top_level() -> &'static str {{ "hello" diff --git a/tests/ui/abi/simd-abi-checks-avx.rs b/tests/ui/abi/simd-abi-checks-avx.rs index c68ba2fb5f890..67d94026785c4 100644 --- a/tests/ui/abi/simd-abi-checks-avx.rs +++ b/tests/ui/abi/simd-abi-checks-avx.rs @@ -4,7 +4,7 @@ //@ ignore-parallel-frontend post-monomorphization errors #![feature(portable_simd)] #![feature(simd_ffi)] -#![allow(improper_ctypes_definitions)] +#![allow(improper_ctypes_definitions, todo_macro_calls)] use std::arch::x86_64::*; diff --git a/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs b/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs index 7d21307e1b2d9..becea62db148b 100644 --- a/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs +++ b/tests/ui/abi/unsized-args-in-c-abi-issues-94223-115845.rs @@ -1,5 +1,5 @@ //@ check-pass -#![allow(improper_ctypes_definitions)] +#![allow(improper_ctypes_definitions, todo_macro_calls)] #![feature(unsized_fn_params)] #![crate_type = "lib"] diff --git a/tests/ui/argument-suggestions/issue-96638.rs b/tests/ui/argument-suggestions/issue-96638.rs index 5e720f174c240..d2d7aec8482f2 100644 --- a/tests/ui/argument-suggestions/issue-96638.rs +++ b/tests/ui/argument-suggestions/issue-96638.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] fn f(_: usize, _: &usize, _: usize) {} fn arg() -> T { todo!() } diff --git a/tests/ui/argument-suggestions/issue-96638.stderr b/tests/ui/argument-suggestions/issue-96638.stderr index 288a6853d0591..6aff032ea0e73 100644 --- a/tests/ui/argument-suggestions/issue-96638.stderr +++ b/tests/ui/argument-suggestions/issue-96638.stderr @@ -1,5 +1,5 @@ error[E0061]: this function takes 3 arguments but 2 arguments were supplied - --> $DIR/issue-96638.rs:8:5 + --> $DIR/issue-96638.rs:9:5 | LL | f(&x, ""); | ^ -- -- expected `usize`, found `&str` @@ -7,7 +7,7 @@ LL | f(&x, ""); | argument #1 of type `usize` is missing | note: function defined here - --> $DIR/issue-96638.rs:1:4 + --> $DIR/issue-96638.rs:2:4 | LL | fn f(_: usize, _: &usize, _: usize) {} | ^ -------- -------- diff --git a/tests/ui/associated-item/missing-associated_item_or_field_def_ids.rs b/tests/ui/associated-item/missing-associated_item_or_field_def_ids.rs index 029ce7d0e7e49..b79cef94fb94b 100644 --- a/tests/ui/associated-item/missing-associated_item_or_field_def_ids.rs +++ b/tests/ui/associated-item/missing-associated_item_or_field_def_ids.rs @@ -1,4 +1,5 @@ // Regression test for . +#![allow(todo_macro_calls)] fn main() -> dyn Iterator + ?Iterator::advance_by(usize) { //~^ ERROR expected trait, found associated function `Iterator::advance_by` diff --git a/tests/ui/associated-item/missing-associated_item_or_field_def_ids.stderr b/tests/ui/associated-item/missing-associated_item_or_field_def_ids.stderr index ffe0b14a030d3..c9881501d83df 100644 --- a/tests/ui/associated-item/missing-associated_item_or_field_def_ids.stderr +++ b/tests/ui/associated-item/missing-associated_item_or_field_def_ids.stderr @@ -1,11 +1,11 @@ error[E0404]: expected trait, found associated function `Iterator::advance_by` - --> $DIR/missing-associated_item_or_field_def_ids.rs:3:30 + --> $DIR/missing-associated_item_or_field_def_ids.rs:4:30 | LL | fn main() -> dyn Iterator + ?Iterator::advance_by(usize) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a trait error: relaxed bounds are not permitted in trait object types - --> $DIR/missing-associated_item_or_field_def_ids.rs:3:29 + --> $DIR/missing-associated_item_or_field_def_ids.rs:4:29 | LL | fn main() -> dyn Iterator + ?Iterator::advance_by(usize) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/return-type-notation/rendering.fixed b/tests/ui/associated-type-bounds/return-type-notation/rendering.fixed index 72c174a0ca020..7c8c7e45e41b7 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/rendering.fixed +++ b/tests/ui/associated-type-bounds/return-type-notation/rendering.fixed @@ -1,6 +1,6 @@ //@ run-rustfix -#![allow(unused)] +#![allow(unused, todo_macro_uses)] #![feature(return_type_notation)] trait Foo { diff --git a/tests/ui/associated-type-bounds/return-type-notation/rendering.rs b/tests/ui/associated-type-bounds/return-type-notation/rendering.rs index 4c9948d4c0604..c65e67753b486 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/rendering.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/rendering.rs @@ -1,6 +1,6 @@ //@ run-rustfix -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![feature(return_type_notation)] trait Foo { diff --git a/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.next.stderr b/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.next.stderr index 30eccc3a72d51..9baf1e6c84a86 100644 --- a/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.next.stderr +++ b/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.next.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `Self: Eq<::Assoc>` is not satisfied - --> $DIR/always-applicable-impls-shadowed-in-trait-def.rs:13:17 + --> $DIR/always-applicable-impls-shadowed-in-trait-def.rs:14:17 | LL | fn foo() -> IsEqual { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq<::Assoc>` is not implemented for `Self` | note: required by a bound in `IsEqual` - --> $DIR/always-applicable-impls-shadowed-in-trait-def.rs:9:19 + --> $DIR/always-applicable-impls-shadowed-in-trait-def.rs:10:19 | LL | struct IsEqual, U>(T, U); | ^^^^^ required by this bound in `IsEqual` diff --git a/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.old.stderr b/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.old.stderr index 30eccc3a72d51..9baf1e6c84a86 100644 --- a/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.old.stderr +++ b/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.old.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `Self: Eq<::Assoc>` is not satisfied - --> $DIR/always-applicable-impls-shadowed-in-trait-def.rs:13:17 + --> $DIR/always-applicable-impls-shadowed-in-trait-def.rs:14:17 | LL | fn foo() -> IsEqual { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq<::Assoc>` is not implemented for `Self` | note: required by a bound in `IsEqual` - --> $DIR/always-applicable-impls-shadowed-in-trait-def.rs:9:19 + --> $DIR/always-applicable-impls-shadowed-in-trait-def.rs:10:19 | LL | struct IsEqual, U>(T, U); | ^^^^^ required by this bound in `IsEqual` diff --git a/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.rs b/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.rs index 2f8abb6a70d86..918ed448d133e 100644 --- a/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.rs +++ b/tests/ui/associated-types/always-applicable-impls-shadowed-in-trait-def.rs @@ -1,5 +1,6 @@ //@ revisions: old next //@[next] compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // Testing that even if there's an always applicable blanket impl, the trait // definition cannot use that impl to normalize its own associated types. diff --git a/tests/ui/associated-types/normalization-debruijn-1.rs b/tests/ui/associated-types/normalization-debruijn-1.rs index ced2d193e69e6..4729c5b5d3b04 100644 --- a/tests/ui/associated-types/normalization-debruijn-1.rs +++ b/tests/ui/associated-types/normalization-debruijn-1.rs @@ -1,5 +1,6 @@ //@ build-pass //@ edition:2018 +#![allow(todo_macro_calls)] // Regression test to ensure we handle debruijn indices correctly in projection // normalization under binders. Found in crater run for #85499 diff --git a/tests/ui/associated-types/suggest-assoc-type-from-bounds.rs b/tests/ui/associated-types/suggest-assoc-type-from-bounds.rs index 8b349f325cd73..7d24a9b98c62c 100644 --- a/tests/ui/associated-types/suggest-assoc-type-from-bounds.rs +++ b/tests/ui/associated-types/suggest-assoc-type-from-bounds.rs @@ -1,3 +1,5 @@ +#![allow(todo_macro_calls)] + pub trait Trait { type Assoc; } diff --git a/tests/ui/associated-types/suggest-assoc-type-from-bounds.stderr b/tests/ui/associated-types/suggest-assoc-type-from-bounds.stderr index b5ce2d91ca4d2..099d2e85954f4 100644 --- a/tests/ui/associated-types/suggest-assoc-type-from-bounds.stderr +++ b/tests/ui/associated-types/suggest-assoc-type-from-bounds.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `Assoc` in this scope - --> $DIR/suggest-assoc-type-from-bounds.rs:6:12 + --> $DIR/suggest-assoc-type-from-bounds.rs:8:12 | LL | let _: Assoc = todo!(); | ^^^^^ @@ -12,7 +12,7 @@ LL | let _: >::Assoc = todo!(); | +++++++++++++++++++ error[E0425]: cannot find type `A` in this scope - --> $DIR/suggest-assoc-type-from-bounds.rs:20:12 + --> $DIR/suggest-assoc-type-from-bounds.rs:22:12 | LL | let _: A = todo!(); | ^ @@ -29,7 +29,7 @@ LL | fn g<'a, T: ::Foo<'a> + inner::Foo<'a>, A>() { | +++ error[E0425]: cannot find type `Assoc` in this scope - --> $DIR/suggest-assoc-type-from-bounds.rs:32:12 + --> $DIR/suggest-assoc-type-from-bounds.rs:34:12 | LL | let _: Assoc = todo!(); | ^^^^^ @@ -42,7 +42,7 @@ LL | let _: ::Assoc = todo!(); | +++++++++++++++ error[E0425]: cannot find type `Assoc` in this scope - --> $DIR/suggest-assoc-type-from-bounds.rs:40:12 + --> $DIR/suggest-assoc-type-from-bounds.rs:42:12 | LL | let _: Assoc = todo!(); | ^^^^^ @@ -54,7 +54,7 @@ LL + let _: T::Assoc<'_> = todo!(); | error[E0425]: cannot find type `Assoc` in this scope - --> $DIR/suggest-assoc-type-from-bounds.rs:47:20 + --> $DIR/suggest-assoc-type-from-bounds.rs:49:20 | LL | let _: Assoc = todo!(); | ^^^^^ @@ -65,7 +65,7 @@ LL | let _: U::Assoc = todo!(); | +++ error[E0425]: cannot find type `Assoc` in this scope - --> $DIR/suggest-assoc-type-from-bounds.rs:58:20 + --> $DIR/suggest-assoc-type-from-bounds.rs:60:20 | LL | let _: Assoc = todo!(); | ^^^^^ not found in this scope diff --git a/tests/ui/async-await/async-closures/async-future-out-must-be-sized.rs b/tests/ui/async-await/async-closures/async-future-out-must-be-sized.rs index e5d70e30eb5f6..14859cd381723 100644 --- a/tests/ui/async-await/async-closures/async-future-out-must-be-sized.rs +++ b/tests/ui/async-await/async-closures/async-future-out-must-be-sized.rs @@ -1,4 +1,5 @@ //@ edition: 2021 +#![allow(todo_macro_calls)] // Ensure that the output of a `fn` pointer that implements `AsyncFn*` is `Sized`, // like other built-in impls of an fn pointer, like `Fn*`. diff --git a/tests/ui/async-await/async-closures/async-future-out-must-be-sized.stderr b/tests/ui/async-await/async-closures/async-future-out-must-be-sized.stderr index f993247d8b90a..ccea0d1a93620 100644 --- a/tests/ui/async-await/async-closures/async-future-out-must-be-sized.stderr +++ b/tests/ui/async-await/async-closures/async-future-out-must-be-sized.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `dyn Future` cannot be known at compilation time - --> $DIR/async-future-out-must-be-sized.rs:17:17 + --> $DIR/async-future-out-must-be-sized.rs:18:17 | LL | is_async_fn(foo()); | ----------- ^^^^^ doesn't have a size known at compile-time @@ -8,20 +8,20 @@ LL | is_async_fn(foo()); | = help: the trait `Sized` is not implemented for `dyn Future` note: required by a bound in `is_async_fn` - --> $DIR/async-future-out-must-be-sized.rs:12:30 + --> $DIR/async-future-out-must-be-sized.rs:13:30 | LL | async fn is_async_fn(f: impl AsyncFn()) { | ^^^^^^^^^ required by this bound in `is_async_fn` error[E0277]: the size for values of type `dyn Future` cannot be known at compilation time - --> $DIR/async-future-out-must-be-sized.rs:17:5 + --> $DIR/async-future-out-must-be-sized.rs:18:5 | LL | is_async_fn(foo()); | ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `dyn Future` note: required by a bound in `is_async_fn` - --> $DIR/async-future-out-must-be-sized.rs:12:30 + --> $DIR/async-future-out-must-be-sized.rs:13:30 | LL | async fn is_async_fn(f: impl AsyncFn()) { | ^^^^^^^^^ required by this bound in `is_async_fn` diff --git a/tests/ui/async-await/async-closures/fn-exception-target-features.rs b/tests/ui/async-await/async-closures/fn-exception-target-features.rs index 66cc413977032..c5845292783c6 100644 --- a/tests/ui/async-await/async-closures/fn-exception-target-features.rs +++ b/tests/ui/async-await/async-closures/fn-exception-target-features.rs @@ -1,5 +1,6 @@ //@ edition: 2021 //@ only-x86_64 +#![allow(todo_macro_calls)] use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/async-closures/kind-due-to-arg-with-box-wrap.rs b/tests/ui/async-await/async-closures/kind-due-to-arg-with-box-wrap.rs index 650fb10d94be0..af944e0efb66d 100644 --- a/tests/ui/async-await/async-closures/kind-due-to-arg-with-box-wrap.rs +++ b/tests/ui/async-await/async-closures/kind-due-to-arg-with-box-wrap.rs @@ -1,4 +1,5 @@ //@ edition: 2024 +#![allow(todo_macro_calls)] // Regression test for . diff --git a/tests/ui/async-await/async-closures/kind-due-to-arg-with-box-wrap.stderr b/tests/ui/async-await/async-closures/kind-due-to-arg-with-box-wrap.stderr index e79f95c197b63..7fd78f6e462c7 100644 --- a/tests/ui/async-await/async-closures/kind-due-to-arg-with-box-wrap.stderr +++ b/tests/ui/async-await/async-closures/kind-due-to-arg-with-box-wrap.stderr @@ -1,5 +1,5 @@ error[E0525]: expected a closure that implements the `AsyncFn` trait, but this closure only implements `AsyncFnMut` - --> $DIR/kind-due-to-arg-with-box-wrap.rs:13:32 + --> $DIR/kind-due-to-arg-with-box-wrap.rs:14:32 | LL | takes_asyncfn(Box::new(async || self.an_async_fn().await)); | ------------- ---------^^^^^^^^-------------------------- @@ -9,9 +9,9 @@ LL | takes_asyncfn(Box::new(async || self.an_async_fn().await)); | | the requirement to implement `AsyncFn` derives from here | required by a bound introduced by this call | - = note: required for `Box<{async closure@$DIR/kind-due-to-arg-with-box-wrap.rs:13:32: 13:40}>` to implement `AsyncFn()` + = note: required for `Box<{async closure@$DIR/kind-due-to-arg-with-box-wrap.rs:14:32: 14:40}>` to implement `AsyncFn()` note: required by a bound in `takes_asyncfn` - --> $DIR/kind-due-to-arg-with-box-wrap.rs:18:32 + --> $DIR/kind-due-to-arg-with-box-wrap.rs:19:32 | LL | async fn takes_asyncfn(_: impl AsyncFn()) { | ^^^^^^^^^ required by this bound in `takes_asyncfn` diff --git a/tests/ui/async-await/async-closures/moro-example.rs b/tests/ui/async-await/async-closures/moro-example.rs index 502b3e1bbf8cb..c8d74e91ee046 100644 --- a/tests/ui/async-await/async-closures/moro-example.rs +++ b/tests/ui/async-await/async-closures/moro-example.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition: 2021 +#![allow(todo_macro_calls)] use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/async-drop/live-dead-storage3.rs b/tests/ui/async-await/async-drop/live-dead-storage3.rs index d9fba5759f73d..e99d7b9b44ea5 100644 --- a/tests/ui/async-await/async-drop/live-dead-storage3.rs +++ b/tests/ui/async-await/async-drop/live-dead-storage3.rs @@ -4,7 +4,7 @@ //@ check-pass #![feature(async_drop)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] type BoxFuture = std::pin::Pin>>; fn main() {} diff --git a/tests/ui/async-await/async-is-unwindsafe.rs b/tests/ui/async-await/async-is-unwindsafe.rs index 53009b6e7410f..4c2689594364e 100644 --- a/tests/ui/async-await/async-is-unwindsafe.rs +++ b/tests/ui/async-await/async-is-unwindsafe.rs @@ -1,4 +1,5 @@ //@ edition:2018 +#![allow(todo_macro_calls)] fn is_unwindsafe(_: impl std::panic::UnwindSafe) {} diff --git a/tests/ui/async-await/async-is-unwindsafe.stderr b/tests/ui/async-await/async-is-unwindsafe.stderr index 9323ce25b77fc..94756f5224612 100644 --- a/tests/ui/async-await/async-is-unwindsafe.stderr +++ b/tests/ui/async-await/async-is-unwindsafe.stderr @@ -1,8 +1,8 @@ error[E0277]: the type `&mut Context<'_>` may not be safely transferred across an unwind boundary - --> $DIR/async-is-unwindsafe.rs:12:5 + --> $DIR/async-is-unwindsafe.rs:13:5 | LL | is_unwindsafe(async { - | ^ ----- within this `{async block@$DIR/async-is-unwindsafe.rs:12:19: 12:24}` + | ^ ----- within this `{async block@$DIR/async-is-unwindsafe.rs:13:19: 13:24}` | _____| | | LL | | @@ -13,10 +13,10 @@ LL | | drop(cx_ref); LL | | }); | |______^ `&mut Context<'_>` may not be safely transferred across an unwind boundary | - = help: within `{async block@$DIR/async-is-unwindsafe.rs:12:19: 12:24}`, the trait `UnwindSafe` is not implemented for `&mut Context<'_>` + = help: within `{async block@$DIR/async-is-unwindsafe.rs:13:19: 13:24}`, the trait `UnwindSafe` is not implemented for `&mut Context<'_>` = note: `UnwindSafe` is implemented for `&Context<'_>`, but not for `&mut Context<'_>` note: future does not implement `UnwindSafe` as this value is used across an await - --> $DIR/async-is-unwindsafe.rs:25:18 + --> $DIR/async-is-unwindsafe.rs:26:18 | LL | let cx_ref = &mut cx; | ------ has type `&mut Context<'_>` which does not implement `UnwindSafe` @@ -24,7 +24,7 @@ LL | LL | async {}.await; // this needs an inner await point | ^^^^^ await occurs here, with `cx_ref` maybe used later note: required by a bound in `is_unwindsafe` - --> $DIR/async-is-unwindsafe.rs:3:26 + --> $DIR/async-is-unwindsafe.rs:4:26 | LL | fn is_unwindsafe(_: impl std::panic::UnwindSafe) {} | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_unwindsafe` diff --git a/tests/ui/async-await/clone-suggestion.fixed b/tests/ui/async-await/clone-suggestion.fixed index 3a0abc8426334..827b395dd08d7 100644 --- a/tests/ui/async-await/clone-suggestion.fixed +++ b/tests/ui/async-await/clone-suggestion.fixed @@ -1,7 +1,7 @@ //@ edition: 2021 //@ run-rustfix -#![allow(unused)] +#![allow(unused, todo_macro_uses)] use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/clone-suggestion.rs b/tests/ui/async-await/clone-suggestion.rs index cde4222ffe39b..76dca206e8a4a 100644 --- a/tests/ui/async-await/clone-suggestion.rs +++ b/tests/ui/async-await/clone-suggestion.rs @@ -1,7 +1,7 @@ //@ edition: 2021 //@ run-rustfix -#![allow(unused)] +#![allow(unused, todo_macro_calls)] use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.no_assumptions.stderr b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.no_assumptions.stderr index d5560bf892032..9aa5e0170c907 100644 --- a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.no_assumptions.stderr +++ b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.no_assumptions.stderr @@ -1,5 +1,5 @@ error: implementation of `FnOnce` is not general enough - --> $DIR/drop-tracking-unresolved-typeck-results.rs:102:5 + --> $DIR/drop-tracking-unresolved-typeck-results.rs:103:5 | LL | / send(async { LL | | Next(&Buffered(Map(Empty(PhantomData), ready::<&()>), FuturesOrdered(PhantomData), 0)).await @@ -10,7 +10,7 @@ LL | | }); = note: ...but it actually implements `FnOnce<(&(),)>` error: implementation of `FnOnce` is not general enough - --> $DIR/drop-tracking-unresolved-typeck-results.rs:102:5 + --> $DIR/drop-tracking-unresolved-typeck-results.rs:103:5 | LL | / send(async { LL | | Next(&Buffered(Map(Empty(PhantomData), ready::<&()>), FuturesOrdered(PhantomData), 0)).await diff --git a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs index 16f929331cb4c..736cc72f0b0fe 100644 --- a/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs +++ b/tests/ui/async-await/drop-tracking-unresolved-typeck-results.rs @@ -4,6 +4,7 @@ //@[assumptions] compile-flags: -Zhigher-ranked-assumptions //@[assumptions] check-pass //@[no_assumptions] known-bug: #110338 +#![allow(todo_macro_calls)] use std::future::*; use std::marker::PhantomData; diff --git a/tests/ui/async-await/field-in-sync.rs b/tests/ui/async-await/field-in-sync.rs index 586980c6e2be6..8fb5329f3c04e 100644 --- a/tests/ui/async-await/field-in-sync.rs +++ b/tests/ui/async-await/field-in-sync.rs @@ -1,4 +1,5 @@ //@ edition: 2021 +#![allow(todo_macro_calls)] struct S { field: (), diff --git a/tests/ui/async-await/field-in-sync.stderr b/tests/ui/async-await/field-in-sync.stderr index 7be30339c275b..c9c351f780a56 100644 --- a/tests/ui/async-await/field-in-sync.stderr +++ b/tests/ui/async-await/field-in-sync.stderr @@ -1,11 +1,11 @@ error[E0609]: no field `field` on type `impl Future` - --> $DIR/field-in-sync.rs:10:11 + --> $DIR/field-in-sync.rs:11:11 | LL | foo().field; | ^^^^^ field not available in `impl Future`, but it is available in its `Output` | note: this implements `Future` and its output type has the field, but the future cannot be awaited in a synchronous function - --> $DIR/field-in-sync.rs:10:5 + --> $DIR/field-in-sync.rs:11:5 | LL | fn main() -> Result<(), ()> { | --------------------------- this is not `async` diff --git a/tests/ui/async-await/higher-ranked-auto-trait-16.assumptions.stderr b/tests/ui/async-await/higher-ranked-auto-trait-16.assumptions.stderr index 412c31b1bd843..e8ef1175e279d 100644 --- a/tests/ui/async-await/higher-ranked-auto-trait-16.assumptions.stderr +++ b/tests/ui/async-await/higher-ranked-auto-trait-16.assumptions.stderr @@ -1,23 +1,23 @@ error: implementation of `AsyncFnOnce` is not general enough - --> $DIR/higher-ranked-auto-trait-16.rs:18:5 + --> $DIR/higher-ranked-auto-trait-16.rs:19:5 | LL | / assert_send(async { LL | | commit_if_ok(&mut ctxt, async |_| todo!()).await; LL | | }); | |______^ implementation of `AsyncFnOnce` is not general enough | - = note: `{async closure@$DIR/higher-ranked-auto-trait-16.rs:19:33: 19:42}` must implement `AsyncFnOnce<(&mut Ctxt<'1>,)>`, for any two lifetimes `'0` and `'1`... + = note: `{async closure@$DIR/higher-ranked-auto-trait-16.rs:20:33: 20:42}` must implement `AsyncFnOnce<(&mut Ctxt<'1>,)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `AsyncFnOnce<(&mut Ctxt<'_>,)>` error: implementation of `AsyncFnOnce` is not general enough - --> $DIR/higher-ranked-auto-trait-16.rs:18:5 + --> $DIR/higher-ranked-auto-trait-16.rs:19:5 | LL | / assert_send(async { LL | | commit_if_ok(&mut ctxt, async |_| todo!()).await; LL | | }); | |______^ implementation of `AsyncFnOnce` is not general enough | - = note: `{async closure@$DIR/higher-ranked-auto-trait-16.rs:19:33: 19:42}` must implement `AsyncFnOnce<(&mut Ctxt<'1>,)>`, for any two lifetimes `'0` and `'1`... + = note: `{async closure@$DIR/higher-ranked-auto-trait-16.rs:20:33: 20:42}` must implement `AsyncFnOnce<(&mut Ctxt<'1>,)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `AsyncFnOnce<(&mut Ctxt<'_>,)>` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/async-await/higher-ranked-auto-trait-16.no_assumptions.stderr b/tests/ui/async-await/higher-ranked-auto-trait-16.no_assumptions.stderr index 412c31b1bd843..e8ef1175e279d 100644 --- a/tests/ui/async-await/higher-ranked-auto-trait-16.no_assumptions.stderr +++ b/tests/ui/async-await/higher-ranked-auto-trait-16.no_assumptions.stderr @@ -1,23 +1,23 @@ error: implementation of `AsyncFnOnce` is not general enough - --> $DIR/higher-ranked-auto-trait-16.rs:18:5 + --> $DIR/higher-ranked-auto-trait-16.rs:19:5 | LL | / assert_send(async { LL | | commit_if_ok(&mut ctxt, async |_| todo!()).await; LL | | }); | |______^ implementation of `AsyncFnOnce` is not general enough | - = note: `{async closure@$DIR/higher-ranked-auto-trait-16.rs:19:33: 19:42}` must implement `AsyncFnOnce<(&mut Ctxt<'1>,)>`, for any two lifetimes `'0` and `'1`... + = note: `{async closure@$DIR/higher-ranked-auto-trait-16.rs:20:33: 20:42}` must implement `AsyncFnOnce<(&mut Ctxt<'1>,)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `AsyncFnOnce<(&mut Ctxt<'_>,)>` error: implementation of `AsyncFnOnce` is not general enough - --> $DIR/higher-ranked-auto-trait-16.rs:18:5 + --> $DIR/higher-ranked-auto-trait-16.rs:19:5 | LL | / assert_send(async { LL | | commit_if_ok(&mut ctxt, async |_| todo!()).await; LL | | }); | |______^ implementation of `AsyncFnOnce` is not general enough | - = note: `{async closure@$DIR/higher-ranked-auto-trait-16.rs:19:33: 19:42}` must implement `AsyncFnOnce<(&mut Ctxt<'1>,)>`, for any two lifetimes `'0` and `'1`... + = note: `{async closure@$DIR/higher-ranked-auto-trait-16.rs:20:33: 20:42}` must implement `AsyncFnOnce<(&mut Ctxt<'1>,)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `AsyncFnOnce<(&mut Ctxt<'_>,)>` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` diff --git a/tests/ui/async-await/higher-ranked-auto-trait-16.rs b/tests/ui/async-await/higher-ranked-auto-trait-16.rs index 2b206f0a4c573..1e007564d8951 100644 --- a/tests/ui/async-await/higher-ranked-auto-trait-16.rs +++ b/tests/ui/async-await/higher-ranked-auto-trait-16.rs @@ -4,6 +4,7 @@ //@[assumptions] compile-flags: -Zhigher-ranked-assumptions //@[assumptions] known-bug: unknown //@[no_assumptions] known-bug: #110338 +#![allow(todo_macro_calls)] fn assert_send(_: T) {} diff --git a/tests/ui/async-await/higher-ranked-auto-trait-17.no_assumptions.stderr b/tests/ui/async-await/higher-ranked-auto-trait-17.no_assumptions.stderr index 152900ca1ae9e..fd912e6ec6701 100644 --- a/tests/ui/async-await/higher-ranked-auto-trait-17.no_assumptions.stderr +++ b/tests/ui/async-await/higher-ranked-auto-trait-17.no_assumptions.stderr @@ -1,5 +1,5 @@ error: implementation of `FnOnce` is not general enough - --> $DIR/higher-ranked-auto-trait-17.rs:12:5 + --> $DIR/higher-ranked-auto-trait-17.rs:13:5 | LL | / async move { LL | | let iter = Adaptor::new(a.iter().map(|_: &()| {})); @@ -12,7 +12,7 @@ LL | | } = note: ...but it actually implements `FnOnce<(&(),)>` error: implementation of `FnOnce` is not general enough - --> $DIR/higher-ranked-auto-trait-17.rs:12:5 + --> $DIR/higher-ranked-auto-trait-17.rs:13:5 | LL | / async move { LL | | let iter = Adaptor::new(a.iter().map(|_: &()| {})); diff --git a/tests/ui/async-await/higher-ranked-auto-trait-17.rs b/tests/ui/async-await/higher-ranked-auto-trait-17.rs index 152432466c005..f7e7925fa04ca 100644 --- a/tests/ui/async-await/higher-ranked-auto-trait-17.rs +++ b/tests/ui/async-await/higher-ranked-auto-trait-17.rs @@ -4,6 +4,7 @@ //@[assumptions] compile-flags: -Zhigher-ranked-assumptions //@[assumptions] check-pass //@[no_assumptions] known-bug: #110338 +#![allow(todo_macro_calls)] // Using `impl Future` instead of `async to ensure that the Future is Send. // diff --git a/tests/ui/async-await/higher-ranked-auto-trait-9.no_assumptions.stderr b/tests/ui/async-await/higher-ranked-auto-trait-9.no_assumptions.stderr index 809cbcf0cad13..0dc7c6a4af651 100644 --- a/tests/ui/async-await/higher-ranked-auto-trait-9.no_assumptions.stderr +++ b/tests/ui/async-await/higher-ranked-auto-trait-9.no_assumptions.stderr @@ -1,5 +1,5 @@ error: implementation of `Debug` is not general enough - --> $DIR/higher-ranked-auto-trait-9.rs:43:50 + --> $DIR/higher-ranked-auto-trait-9.rs:44:50 | LL | let fut: &(dyn Future + Send) = &fut as _; | ^^^^^^^^^ implementation of `Debug` is not general enough diff --git a/tests/ui/async-await/higher-ranked-auto-trait-9.rs b/tests/ui/async-await/higher-ranked-auto-trait-9.rs index 66edbf23f2b21..3590d2bc8aaa1 100644 --- a/tests/ui/async-await/higher-ranked-auto-trait-9.rs +++ b/tests/ui/async-await/higher-ranked-auto-trait-9.rs @@ -4,6 +4,7 @@ //@[assumptions] compile-flags: -Zhigher-ranked-assumptions //@[assumptions] check-pass //@[no_assumptions] known-bug: #110338 +#![allow(todo_macro_calls)] use std::any::Any; use std::fmt; diff --git a/tests/ui/async-await/in-trait/cycle-if-impl-doesnt-apply.rs b/tests/ui/async-await/in-trait/cycle-if-impl-doesnt-apply.rs index 54992c986558c..8ffc527e3333f 100644 --- a/tests/ui/async-await/in-trait/cycle-if-impl-doesnt-apply.rs +++ b/tests/ui/async-await/in-trait/cycle-if-impl-doesnt-apply.rs @@ -3,6 +3,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ edition: 2024 +#![allow(todo_macro_calls)] // Regression test for . // Avoid unnecessarily computing the RPITIT type of the first impl when checking the WF of the diff --git a/tests/ui/async-await/in-trait/dyn-compatibility.rs b/tests/ui/async-await/in-trait/dyn-compatibility.rs index c1b1ec797846b..7feb33f198dbf 100644 --- a/tests/ui/async-await/in-trait/dyn-compatibility.rs +++ b/tests/ui/async-await/in-trait/dyn-compatibility.rs @@ -1,4 +1,5 @@ //@ edition:2021 +#![allow(todo_macro_calls)] trait Foo { diff --git a/tests/ui/async-await/in-trait/dyn-compatibility.stderr b/tests/ui/async-await/in-trait/dyn-compatibility.stderr index f0c5dc5347882..6dcfe867ffc96 100644 --- a/tests/ui/async-await/in-trait/dyn-compatibility.stderr +++ b/tests/ui/async-await/in-trait/dyn-compatibility.stderr @@ -1,12 +1,12 @@ error[E0038]: the trait `Foo` is not dyn compatible - --> $DIR/dyn-compatibility.rs:9:17 + --> $DIR/dyn-compatibility.rs:10:17 | LL | let x: &dyn Foo = todo!(); | ^^^ `Foo` is not dyn compatible | note: for a trait to be dyn compatible it needs to allow building a vtable for more information, visit - --> $DIR/dyn-compatibility.rs:5:14 + --> $DIR/dyn-compatibility.rs:6:14 | LL | trait Foo { | --- this trait is not dyn compatible... diff --git a/tests/ui/async-await/in-trait/issue-104678.rs b/tests/ui/async-await/in-trait/issue-104678.rs index e64315157b2d9..682e2f8ccd480 100644 --- a/tests/ui/async-await/in-trait/issue-104678.rs +++ b/tests/ui/async-await/in-trait/issue-104678.rs @@ -1,5 +1,6 @@ //@ edition:2021 //@ check-pass +#![allow(todo_macro_calls)] use std::future::Future; pub trait Pool { diff --git a/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs b/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs index 5fa82163a314b..db5754417dcc8 100644 --- a/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs +++ b/tests/ui/async-await/in-trait/returning-possibly-unsized-self.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition:2021 +#![allow(todo_macro_calls)] #![deny(opaque_hidden_inferred_bound)] diff --git a/tests/ui/async-await/inference_var_self_argument.rs b/tests/ui/async-await/inference_var_self_argument.rs index d03f2b5c50bff..4d0d85ae7a7a9 100644 --- a/tests/ui/async-await/inference_var_self_argument.rs +++ b/tests/ui/async-await/inference_var_self_argument.rs @@ -1,5 +1,6 @@ //! This is a regression test for an ICE. //@ edition: 2021 +#![allow(todo_macro_calls)] trait Foo { async fn foo(self: &dyn Foo) { diff --git a/tests/ui/async-await/inference_var_self_argument.stderr b/tests/ui/async-await/inference_var_self_argument.stderr index c4240a095e685..80f7baabe509e 100644 --- a/tests/ui/async-await/inference_var_self_argument.stderr +++ b/tests/ui/async-await/inference_var_self_argument.stderr @@ -1,5 +1,5 @@ error[E0307]: invalid `self` parameter type: `&dyn Foo` - --> $DIR/inference_var_self_argument.rs:5:24 + --> $DIR/inference_var_self_argument.rs:6:24 | LL | async fn foo(self: &dyn Foo) { | ^^^^^^^^ @@ -8,14 +8,14 @@ LL | async fn foo(self: &dyn Foo) { = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0038]: the trait `Foo` is not dyn compatible - --> $DIR/inference_var_self_argument.rs:5:33 + --> $DIR/inference_var_self_argument.rs:6:33 | LL | async fn foo(self: &dyn Foo) { | ^ `Foo` is not dyn compatible | note: for a trait to be dyn compatible it needs to allow building a vtable for more information, visit - --> $DIR/inference_var_self_argument.rs:5:14 + --> $DIR/inference_var_self_argument.rs:6:14 | LL | trait Foo { | --- this trait is not dyn compatible... diff --git a/tests/ui/async-await/interior-with-const-generic-expr.rs b/tests/ui/async-await/interior-with-const-generic-expr.rs index 22e1cea223812..e642849105b13 100644 --- a/tests/ui/async-await/interior-with-const-generic-expr.rs +++ b/tests/ui/async-await/interior-with-const-generic-expr.rs @@ -1,7 +1,7 @@ //@ edition:2018 //@ run-pass -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] #![feature(generic_const_exprs)] #![allow(unused)] diff --git a/tests/ui/async-await/issue-105501.rs b/tests/ui/async-await/issue-105501.rs index 30a08abeb498b..f3f7a6fd3f697 100644 --- a/tests/ui/async-await/issue-105501.rs +++ b/tests/ui/async-await/issue-105501.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition:2018 +#![allow(todo_macro_calls)] // This is a regression test for https://github.com/rust-lang/rust/issues/105501. // It was minified from the published `msf-ice:0.2.1` crate which failed in a crater run. diff --git a/tests/ui/async-await/issue-98634.rs b/tests/ui/async-await/issue-98634.rs index 3bfc2bf8a7ca7..daaa0226348a5 100644 --- a/tests/ui/async-await/issue-98634.rs +++ b/tests/ui/async-await/issue-98634.rs @@ -1,4 +1,5 @@ //@ edition: 2021 +#![allow(todo_macro_calls)] use std::{ future::Future, diff --git a/tests/ui/async-await/issue-98634.stderr b/tests/ui/async-await/issue-98634.stderr index e0739ae3a9b87..cf7bffcaab155 100644 --- a/tests/ui/async-await/issue-98634.stderr +++ b/tests/ui/async-await/issue-98634.stderr @@ -1,35 +1,35 @@ error[E0271]: expected `callback` to return `Pin>>`, but it returns `impl Future` - --> $DIR/issue-98634.rs:45:23 + --> $DIR/issue-98634.rs:46:23 | LL | StructAsync { callback }.await; | ^^^^^^^^ expected `Pin>>`, found future | note: required by a bound in `StructAsync` - --> $DIR/issue-98634.rs:9:35 + --> $DIR/issue-98634.rs:10:35 | LL | pub struct StructAsync Pin>>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync` error[E0271]: expected `callback` to return `Pin>>`, but it returns `impl Future` - --> $DIR/issue-98634.rs:45:9 + --> $DIR/issue-98634.rs:46:9 | LL | StructAsync { callback }.await; | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin>>`, found future | note: required by a bound in `StructAsync` - --> $DIR/issue-98634.rs:9:35 + --> $DIR/issue-98634.rs:10:35 | LL | pub struct StructAsync Pin>>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync` error[E0271]: expected `callback` to return `Pin>>`, but it returns `impl Future` - --> $DIR/issue-98634.rs:45:34 + --> $DIR/issue-98634.rs:46:34 | LL | StructAsync { callback }.await; | ^^^^^ expected `Pin>>`, found future | note: required by a bound in `StructAsync` - --> $DIR/issue-98634.rs:9:35 + --> $DIR/issue-98634.rs:10:35 | LL | pub struct StructAsync Pin>>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync` diff --git a/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs b/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs index fdbeb4f3c8758..689ab3098339c 100644 --- a/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs +++ b/tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.rs @@ -1,5 +1,6 @@ //@ edition:2021 //@ check-pass +#![allow(todo_macro_calls)] #![feature(return_type_notation)] diff --git a/tests/ui/async-await/try-in-sync.rs b/tests/ui/async-await/try-in-sync.rs index 81d72c3fb9a2a..2158d7a69a0bb 100644 --- a/tests/ui/async-await/try-in-sync.rs +++ b/tests/ui/async-await/try-in-sync.rs @@ -1,4 +1,5 @@ //@ edition: 2021 +#![allow(todo_macro_calls)] async fn foo() -> Result<(), ()> { todo!() } diff --git a/tests/ui/async-await/try-in-sync.stderr b/tests/ui/async-await/try-in-sync.stderr index 0957339a4dc58..750fbdc95dcd0 100644 --- a/tests/ui/async-await/try-in-sync.stderr +++ b/tests/ui/async-await/try-in-sync.stderr @@ -1,12 +1,12 @@ error[E0277]: the `?` operator can only be applied to values that implement `Try` - --> $DIR/try-in-sync.rs:6:5 + --> $DIR/try-in-sync.rs:7:5 | LL | foo()?; | ^^^^^^ the `?` operator cannot be applied to type `impl Future>` | = help: the nightly-only, unstable trait `Try` is not implemented for `impl Future>` note: this implements `Future` and its output type supports `?`, but the future cannot be awaited in a synchronous function - --> $DIR/try-in-sync.rs:6:10 + --> $DIR/try-in-sync.rs:7:10 | LL | fn main() -> Result<(), ()> { | --------------------------- this is not `async` diff --git a/tests/ui/async-await/type-parameter-send.rs b/tests/ui/async-await/type-parameter-send.rs index 8ca0555e09637..6d4d95c557757 100644 --- a/tests/ui/async-await/type-parameter-send.rs +++ b/tests/ui/async-await/type-parameter-send.rs @@ -1,6 +1,7 @@ //@ check-pass //@ compile-flags: --crate-type lib //@ edition:2018 +#![allow(todo_macro_calls)] fn assert_send(_: F) {} diff --git a/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.rs b/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.rs index d8034d57e8d56..9680a0aeb1fcf 100644 --- a/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.rs +++ b/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] use std::ops::Deref; use std::rc::Rc; diff --git a/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr b/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr index bad799b2550b9..2fef7a87f61fa 100644 --- a/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr +++ b/tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed for `Value>` - --> $DIR/deref-ambiguity-becomes-nonambiguous.rs:31:9 + --> $DIR/deref-ambiguity-becomes-nonambiguous.rs:32:9 | LL | let var_fn = Value::wrap(); | ^^^^^^ diff --git a/tests/ui/borrowck/issue-103624.rs b/tests/ui/borrowck/issue-103624.rs index 9196789ec6332..c663f96d860c9 100644 --- a/tests/ui/borrowck/issue-103624.rs +++ b/tests/ui/borrowck/issue-103624.rs @@ -1,4 +1,5 @@ //@ edition:2021 +#![allow(todo_macro_calls)] struct StructA { b: StructB, diff --git a/tests/ui/borrowck/issue-103624.stderr b/tests/ui/borrowck/issue-103624.stderr index bd6c1c44bfb36..d83c2dd7671a1 100644 --- a/tests/ui/borrowck/issue-103624.stderr +++ b/tests/ui/borrowck/issue-103624.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of `self.b`, as `self` is a captured variable in an `Fn` closure - --> $DIR/issue-103624.rs:16:13 + --> $DIR/issue-103624.rs:17:13 | LL | async fn foo(&self) { | ----- @@ -14,12 +14,12 @@ LL | self.b; | ^^^^^^ `self.b` is moved here | help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but `FnOnce` closures may consume them only once - --> $DIR/issue-103624.rs:7:36 + --> $DIR/issue-103624.rs:8:36 | LL | async fn spawn_blocking(f: impl (Fn() -> T) + Send + Sync + 'static) -> T { | ^^^^^^^^^^^ note: if `StructB` implemented `Clone`, you could clone the value - --> $DIR/issue-103624.rs:23:1 + --> $DIR/issue-103624.rs:24:1 | LL | self.b; | ------ you could clone this value @@ -28,7 +28,7 @@ LL | struct StructB {} | ^^^^^^^^^^^^^^ consider implementing `Clone` for this type error[E0521]: borrowed data escapes outside of method - --> $DIR/issue-103624.rs:14:9 + --> $DIR/issue-103624.rs:15:9 | LL | async fn foo(&self) { | ----- diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs index ebffa237f9643..e117d1950f089 100644 --- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs +++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs @@ -1,5 +1,6 @@ // Regression test for #82126. Checks that mismatched lifetimes and types are // properly handled. +#![allow(todo_macro_calls)] //@ edition:2018 diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr index e9efc932ea8a5..cbba0860312b0 100644 --- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr +++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr @@ -1,5 +1,5 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied - --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 + --> $DIR/issue-82126-mismatched-subst-and-hir.rs:17:59 | LL | async fn buy_lock(coroutine: &Mutex) -> LockedMarket<'_> { | ^^^^^^^^^^^^---- help: remove the unnecessary generics @@ -7,19 +7,19 @@ LL | async fn buy_lock(coroutine: &Mutex) -> LockedMarket<'_> | expected 0 lifetime arguments | note: struct defined here, with 0 lifetime parameters - --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8 + --> $DIR/issue-82126-mismatched-subst-and-hir.rs:25:8 | LL | struct LockedMarket(T); | ^^^^^^^^^^^^ error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied - --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 + --> $DIR/issue-82126-mismatched-subst-and-hir.rs:17:59 | LL | async fn buy_lock(coroutine: &Mutex) -> LockedMarket<'_> { | ^^^^^^^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `T` - --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8 + --> $DIR/issue-82126-mismatched-subst-and-hir.rs:25:8 | LL | struct LockedMarket(T); | ^^^^^^^^^^^^ - @@ -29,7 +29,7 @@ LL | async fn buy_lock(coroutine: &Mutex) -> LockedMarket<'_, | +++ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied - --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 + --> $DIR/issue-82126-mismatched-subst-and-hir.rs:17:59 | LL | async fn buy_lock(coroutine: &Mutex) -> LockedMarket<'_> { | ^^^^^^^^^^^^---- help: remove the unnecessary generics @@ -37,20 +37,20 @@ LL | async fn buy_lock(coroutine: &Mutex) -> LockedMarket<'_> | expected 0 lifetime arguments | note: struct defined here, with 0 lifetime parameters - --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8 + --> $DIR/issue-82126-mismatched-subst-and-hir.rs:25:8 | LL | struct LockedMarket(T); | ^^^^^^^^^^^^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied - --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 + --> $DIR/issue-82126-mismatched-subst-and-hir.rs:17:59 | LL | async fn buy_lock(coroutine: &Mutex) -> LockedMarket<'_> { | ^^^^^^^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `T` - --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8 + --> $DIR/issue-82126-mismatched-subst-and-hir.rs:25:8 | LL | struct LockedMarket(T); | ^^^^^^^^^^^^ - diff --git a/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.rs b/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.rs index f11eb65614a65..e9a05b33cf10c 100644 --- a/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.rs +++ b/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.rs @@ -3,6 +3,7 @@ // find such methods, it still tries to add suggestions // which then fails an assertion later because there was // no suggestions to make. +#![allow(todo_macro_calls)] fn main() { diff --git a/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr b/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr index 0860f0c3afdfc..33a2deb053890 100644 --- a/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr +++ b/tests/ui/borrowck/issue-83309-ice-immut-in-for-loop.stderr @@ -1,5 +1,5 @@ error[E0594]: cannot assign to `*v`, which is behind a `&` reference - --> $DIR/issue-83309-ice-immut-in-for-loop.rs:11:9 + --> $DIR/issue-83309-ice-immut-in-for-loop.rs:12:9 | LL | for v in Query.iter_mut() { | ---------------- this iterator yields `&` references diff --git a/tests/ui/borrowck/issue-91206.rs b/tests/ui/borrowck/issue-91206.rs index 4f876853610ea..9946066024e78 100644 --- a/tests/ui/borrowck/issue-91206.rs +++ b/tests/ui/borrowck/issue-91206.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct TestClient; impl TestClient { diff --git a/tests/ui/borrowck/issue-91206.stderr b/tests/ui/borrowck/issue-91206.stderr index ebd9ace34bcdd..4a910277f6430 100644 --- a/tests/ui/borrowck/issue-91206.stderr +++ b/tests/ui/borrowck/issue-91206.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow `*inner` as mutable, as it is behind a `&` reference - --> $DIR/issue-91206.rs:13:5 + --> $DIR/issue-91206.rs:14:5 | LL | inner.clear(); | ^^^^^ `inner` is a `&` reference, so it cannot be borrowed as mutable diff --git a/tests/ui/borrowck/static-trait-bound-lost.rs b/tests/ui/borrowck/static-trait-bound-lost.rs index 0288acea0f604..b71487c771102 100644 --- a/tests/ui/borrowck/static-trait-bound-lost.rs +++ b/tests/ui/borrowck/static-trait-bound-lost.rs @@ -2,6 +2,7 @@ // The underlying problem is that the 'static bound is lost for a type parameter that is // threaded deeply enough, causing an error. // The bug was first observed in exr-1.4.1/src/image/read/mod.rs:124:5 during perf test. +#![allow(todo_macro_calls)] //@ check-pass diff --git a/tests/ui/borrowck/suggest-local-var-double-mut.rs b/tests/ui/borrowck/suggest-local-var-double-mut.rs index d5996ba68be53..288278cc77ed0 100644 --- a/tests/ui/borrowck/suggest-local-var-double-mut.rs +++ b/tests/ui/borrowck/suggest-local-var-double-mut.rs @@ -1,4 +1,5 @@ // See issue #77834. +#![allow(todo_macro_calls)] #![crate_type = "lib"] diff --git a/tests/ui/borrowck/suggest-local-var-double-mut.stderr b/tests/ui/borrowck/suggest-local-var-double-mut.stderr index 8bec0788f022b..98dc63d5cf54d 100644 --- a/tests/ui/borrowck/suggest-local-var-double-mut.stderr +++ b/tests/ui/borrowck/suggest-local-var-double-mut.stderr @@ -1,5 +1,5 @@ error[E0499]: cannot borrow `*self` as mutable more than once at a time - --> $DIR/suggest-local-var-double-mut.rs:12:22 + --> $DIR/suggest-local-var-double-mut.rs:13:22 | LL | self.foo(self.bar()); | ---- --- ^^^^ second mutable borrow occurs here @@ -8,18 +8,18 @@ LL | self.foo(self.bar()); | first mutable borrow occurs here | help: try adding a local storing this argument... - --> $DIR/suggest-local-var-double-mut.rs:12:22 + --> $DIR/suggest-local-var-double-mut.rs:13:22 | LL | self.foo(self.bar()); | ^^^^^^^^^^ help: ...and then using that local as the argument to this call - --> $DIR/suggest-local-var-double-mut.rs:12:13 + --> $DIR/suggest-local-var-double-mut.rs:13:13 | LL | self.foo(self.bar()); | ^^^^^^^^^^^^^^^^^^^^ error[E0499]: cannot borrow `*self` as mutable more than once at a time - --> $DIR/suggest-local-var-double-mut.rs:24:39 + --> $DIR/suggest-local-var-double-mut.rs:25:39 | LL | Self::foo(self, Self::bar(self)); | --------- ---- ^^^^ second mutable borrow occurs here @@ -28,12 +28,12 @@ LL | Self::foo(self, Self::bar(self)); | first borrow later used by call | help: try adding a local storing this argument... - --> $DIR/suggest-local-var-double-mut.rs:24:29 + --> $DIR/suggest-local-var-double-mut.rs:25:29 | LL | Self::foo(self, Self::bar(self)); | ^^^^^^^^^^^^^^^ help: ...and then using that local as the argument to this call - --> $DIR/suggest-local-var-double-mut.rs:24:13 + --> $DIR/suggest-local-var-double-mut.rs:25:13 | LL | Self::foo(self, Self::bar(self)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/borrowck/suggest-local-var-imm-and-mut.rs b/tests/ui/borrowck/suggest-local-var-imm-and-mut.rs index bf167ba79f311..f7888eb22ca66 100644 --- a/tests/ui/borrowck/suggest-local-var-imm-and-mut.rs +++ b/tests/ui/borrowck/suggest-local-var-imm-and-mut.rs @@ -1,4 +1,5 @@ // See issue #77834. +#![allow(todo_macro_calls)] #![crate_type = "lib"] diff --git a/tests/ui/borrowck/suggest-local-var-imm-and-mut.stderr b/tests/ui/borrowck/suggest-local-var-imm-and-mut.stderr index 1ef643e21424d..a038eae0dd444 100644 --- a/tests/ui/borrowck/suggest-local-var-imm-and-mut.stderr +++ b/tests/ui/borrowck/suggest-local-var-imm-and-mut.stderr @@ -1,5 +1,5 @@ error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable - --> $DIR/suggest-local-var-imm-and-mut.rs:12:22 + --> $DIR/suggest-local-var-imm-and-mut.rs:13:22 | LL | self.foo(self.bar()); | ---- --- ^^^^^^^^^^ mutable borrow occurs here @@ -8,7 +8,7 @@ LL | self.foo(self.bar()); | immutable borrow occurs here error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable - --> $DIR/suggest-local-var-imm-and-mut.rs:24:29 + --> $DIR/suggest-local-var-imm-and-mut.rs:25:29 | LL | Self::foo(self, Self::bar(self)); | --------- ---- ^^^^^^^^^^^^^^^ mutable borrow occurs here diff --git a/tests/ui/box/large-allocator-ice.rs b/tests/ui/box/large-allocator-ice.rs index d5c7069cfb951..487b2d3a7cd0e 100644 --- a/tests/ui/box/large-allocator-ice.rs +++ b/tests/ui/box/large-allocator-ice.rs @@ -1,6 +1,6 @@ //@ build-pass #![feature(allocator_api)] -#![allow(unused_must_use)] +#![allow(unused_must_use, todo_macro_calls)] use std::alloc::Allocator; diff --git a/tests/ui/cast/cast-as-bool.rs b/tests/ui/cast/cast-as-bool.rs index fa9664e572c03..ab88c0670d02d 100644 --- a/tests/ui/cast/cast-as-bool.rs +++ b/tests/ui/cast/cast-as-bool.rs @@ -1,4 +1,5 @@ //@ dont-require-annotations: SUGGESTION +#![allow(todo_macro_calls)] fn main() { let u = 5 as bool; //~ ERROR cannot cast `i32` as `bool` diff --git a/tests/ui/cast/cast-as-bool.stderr b/tests/ui/cast/cast-as-bool.stderr index 25377ebebe2b2..4f547fef1dfe0 100644 --- a/tests/ui/cast/cast-as-bool.stderr +++ b/tests/ui/cast/cast-as-bool.stderr @@ -1,5 +1,5 @@ error[E0054]: cannot cast `i32` as `bool` - --> $DIR/cast-as-bool.rs:4:13 + --> $DIR/cast-as-bool.rs:5:13 | LL | let u = 5 as bool; | ^^^^^^^^^ @@ -11,7 +11,7 @@ LL + let u = 5 != 0; | error[E0054]: cannot cast `i32` as `bool` - --> $DIR/cast-as-bool.rs:8:13 + --> $DIR/cast-as-bool.rs:9:13 | LL | let t = (1 + 2) as bool; | ^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ LL + let t = (1 + 2) != 0; | error[E0054]: cannot cast `u32` as `bool` - --> $DIR/cast-as-bool.rs:12:13 + --> $DIR/cast-as-bool.rs:13:13 | LL | let _ = 5_u32 as bool; | ^^^^^^^^^^^^^ @@ -35,7 +35,7 @@ LL + let _ = 5_u32 != 0; | error[E0054]: cannot cast `f64` as `bool` - --> $DIR/cast-as-bool.rs:15:13 + --> $DIR/cast-as-bool.rs:16:13 | LL | let _ = 64.0_f64 as bool; | ^^^^^^^^^^^^^^^^ @@ -47,43 +47,43 @@ LL + let _ = 64.0_f64 != 0; | error[E0054]: cannot cast `IntEnum` as `bool` - --> $DIR/cast-as-bool.rs:26:13 + --> $DIR/cast-as-bool.rs:27:13 | LL | let _ = IntEnum::One as bool; | ^^^^^^^^^^^^^^^^^^^^ unsupported cast error[E0054]: cannot cast `fn(u8) -> String {uwu}` as `bool` - --> $DIR/cast-as-bool.rs:35:13 + --> $DIR/cast-as-bool.rs:36:13 | LL | let _ = uwu as bool; | ^^^^^^^^^^^ unsupported cast error[E0054]: cannot cast `unsafe fn() {owo}` as `bool` - --> $DIR/cast-as-bool.rs:37:13 + --> $DIR/cast-as-bool.rs:38:13 | LL | let _ = owo as bool; | ^^^^^^^^^^^ unsupported cast error[E0054]: cannot cast `fn(u8) -> String` as `bool` - --> $DIR/cast-as-bool.rs:40:13 + --> $DIR/cast-as-bool.rs:41:13 | LL | let _ = uwu as fn(u8) -> String as bool; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported cast error[E0054]: cannot cast `char` as `bool` - --> $DIR/cast-as-bool.rs:42:13 + --> $DIR/cast-as-bool.rs:43:13 | LL | let _ = 'x' as bool; | ^^^^^^^^^^^ unsupported cast error[E0054]: cannot cast `*const ()` as `bool` - --> $DIR/cast-as-bool.rs:46:13 + --> $DIR/cast-as-bool.rs:47:13 | LL | let _ = ptr as bool; | ^^^^^^^^^^^ unsupported cast error[E0606]: casting `&'static str` as `bool` is invalid - --> $DIR/cast-as-bool.rs:48:13 + --> $DIR/cast-as-bool.rs:49:13 | LL | let v = "hello" as bool; | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs b/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs index f47d70b52f200..70f0513a56a08 100644 --- a/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs +++ b/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.rs @@ -1,6 +1,6 @@ //@ edition:2021 - //@ aux-build:match_non_exhaustive_lib.rs +#![allow(todo_macro_calls)] /* The error message for non-exhaustive matches on non-local enums * marked as non-exhaustive should mention the fact that the enum diff --git a/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs b/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs index 64fd2f01a5d6f..4fb0b812e25f2 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/issue-90024-adt-correct-subst.rs @@ -1,6 +1,7 @@ // Test that rustc doesn't ICE as in #90024. //@ check-pass // edition=2018 +#![allow(todo_macro_calls)] #![warn(rust_2021_incompatible_closure_captures)] diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs index ded9b2355e49b..edbb693993c53 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs @@ -1,5 +1,6 @@ //@ edition:2021 //@ check-pass +#![allow(todo_macro_calls)] use std::collections::HashMap; use std::future::Future; diff --git a/tests/ui/closures/multiple-fn-bounds.rs b/tests/ui/closures/multiple-fn-bounds.rs index 6bb4098e2bbe5..9c1d451dd770c 100644 --- a/tests/ui/closures/multiple-fn-bounds.rs +++ b/tests/ui/closures/multiple-fn-bounds.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] fn foo bool + Fn(char) -> bool>(f: F) { //~^ NOTE required by a bound in `foo` //~| NOTE required by this bound in `foo` diff --git a/tests/ui/closures/multiple-fn-bounds.stderr b/tests/ui/closures/multiple-fn-bounds.stderr index c99cbac01faf8..97790a8f6efac 100644 --- a/tests/ui/closures/multiple-fn-bounds.stderr +++ b/tests/ui/closures/multiple-fn-bounds.stderr @@ -1,5 +1,5 @@ error[E0631]: type mismatch in closure arguments - --> $DIR/multiple-fn-bounds.rs:10:5 + --> $DIR/multiple-fn-bounds.rs:11:5 | LL | foo(move |x| v); | ^^^^--------^^^ @@ -10,12 +10,12 @@ LL | foo(move |x| v); = note: expected closure signature `fn(_) -> _` found closure signature `fn(&_) -> _` note: closure inferred to have a different signature due to this bound - --> $DIR/multiple-fn-bounds.rs:1:11 + --> $DIR/multiple-fn-bounds.rs:2:11 | LL | fn foo bool + Fn(char) -> bool>(f: F) { | ^^^^^^^^^^^^^^^^^ note: required by a bound in `foo` - --> $DIR/multiple-fn-bounds.rs:1:31 + --> $DIR/multiple-fn-bounds.rs:2:31 | LL | fn foo bool + Fn(char) -> bool>(f: F) { | ^^^^^^^^^^^^^^^^ required by this bound in `foo` diff --git a/tests/ui/compare-method/bad-self-type.rs b/tests/ui/compare-method/bad-self-type.rs index f42a9e49abdff..27662c75e825a 100644 --- a/tests/ui/compare-method/bad-self-type.rs +++ b/tests/ui/compare-method/bad-self-type.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] use std::future::Future; use std::task::{Context, Poll}; diff --git a/tests/ui/compare-method/bad-self-type.stderr b/tests/ui/compare-method/bad-self-type.stderr index bc1587883a352..1b7b051f5cd12 100644 --- a/tests/ui/compare-method/bad-self-type.stderr +++ b/tests/ui/compare-method/bad-self-type.stderr @@ -1,5 +1,5 @@ error[E0053]: method `poll` has an incompatible type for trait - --> $DIR/bad-self-type.rs:10:13 + --> $DIR/bad-self-type.rs:11:13 | LL | fn poll(self, _: &mut Context<'_>) -> Poll<()> { | ^^^^ expected `Pin<&mut MyFuture>`, found `MyFuture` @@ -12,13 +12,13 @@ LL | fn poll(self: Pin<&mut MyFuture>, _: &mut Context<'_>) -> Poll<()> { | ++++++++++++++++++++ error[E0053]: method `foo` has an incompatible type for trait - --> $DIR/bad-self-type.rs:22:18 + --> $DIR/bad-self-type.rs:23:18 | LL | fn foo(self: Box) {} | ^^^^^^^^^ expected `MyFuture`, found `Box` | note: type in trait - --> $DIR/bad-self-type.rs:17:12 + --> $DIR/bad-self-type.rs:18:12 | LL | fn foo(self); | ^^^^ @@ -31,13 +31,13 @@ LL + fn foo(self) {} | error[E0053]: method `bar` has an incompatible type for trait - --> $DIR/bad-self-type.rs:24:17 + --> $DIR/bad-self-type.rs:25:17 | LL | fn bar(self) {} | ^ expected `Option<()>`, found `()` | note: type in trait - --> $DIR/bad-self-type.rs:18:21 + --> $DIR/bad-self-type.rs:19:21 | LL | fn bar(self) -> Option<()>; | ^^^^^^^^^^ diff --git a/tests/ui/const-generics/arg-in-pat-2.rs b/tests/ui/const-generics/arg-in-pat-2.rs index f40437c9e78f2..d603aafdf33c2 100644 --- a/tests/ui/const-generics/arg-in-pat-2.rs +++ b/tests/ui/const-generics/arg-in-pat-2.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] enum Generic { Variant, } diff --git a/tests/ui/const-generics/arg-in-pat-3.rs b/tests/ui/const-generics/arg-in-pat-3.rs index 28bac3c016839..4d74c4cb73f55 100644 --- a/tests/ui/const-generics/arg-in-pat-3.rs +++ b/tests/ui/const-generics/arg-in-pat-3.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] struct Foo; fn bindingp() { diff --git a/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs b/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs index 2e070329a4936..6a5886625714c 100644 --- a/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs +++ b/tests/ui/const-generics/backcompat/trait-resolution-breakage.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] trait Trait { const ASSOC_CONST: usize = 0; diff --git a/tests/ui/const-generics/backcompat/unevaluated-consts.rs b/tests/ui/const-generics/backcompat/unevaluated-consts.rs index ec9f35e051306..6a6c892f6fb75 100644 --- a/tests/ui/const-generics/backcompat/unevaluated-consts.rs +++ b/tests/ui/const-generics/backcompat/unevaluated-consts.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] // If we allow the parent generics here without using lazy normalization // this results in a cycle error. diff --git a/tests/ui/const-generics/bad-subst-const-kind.rs b/tests/ui/const-generics/bad-subst-const-kind.rs index cc2ff9b8dea07..802b6e1d29bfc 100644 --- a/tests/ui/const-generics/bad-subst-const-kind.rs +++ b/tests/ui/const-generics/bad-subst-const-kind.rs @@ -1,4 +1,5 @@ //@ incremental +#![allow(todo_macro_calls)] #![crate_type = "lib"] trait Q { diff --git a/tests/ui/const-generics/bad-subst-const-kind.stderr b/tests/ui/const-generics/bad-subst-const-kind.stderr index b360526964255..7c6af1f6c0bf4 100644 --- a/tests/ui/const-generics/bad-subst-const-kind.stderr +++ b/tests/ui/const-generics/bad-subst-const-kind.stderr @@ -1,5 +1,5 @@ error: the constant `N` is not of type `usize` - --> $DIR/bad-subst-const-kind.rs:8:26 + --> $DIR/bad-subst-const-kind.rs:9:26 | LL | impl Q for [u8; N] { | ^^^^^^^ expected `usize`, found `u64` @@ -7,13 +7,13 @@ LL | impl Q for [u8; N] { = note: the length of array `[u8; N]` must be type `usize` error: the constant `13` is not of type `u64` - --> $DIR/bad-subst-const-kind.rs:13:24 + --> $DIR/bad-subst-const-kind.rs:14:24 | LL | pub fn test() -> [u8; <[u8; 13] as Q>::ASSOC] { | ^^^^^^^^ expected `u64`, found `usize` | note: required for `[u8; 13]` to implement `Q` - --> $DIR/bad-subst-const-kind.rs:8:20 + --> $DIR/bad-subst-const-kind.rs:9:20 | LL | impl Q for [u8; N] { | ------------ ^ ^^^^^^^ diff --git a/tests/ui/const-generics/defaults/generic-expr-default.rs b/tests/ui/const-generics/defaults/generic-expr-default.rs index 8fe43feb78ac8..7873a1d1ce6a8 100644 --- a/tests/ui/const-generics/defaults/generic-expr-default.rs +++ b/tests/ui/const-generics/defaults/generic-expr-default.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] pub struct Foo; pub fn needs_evaluatable_bound() -> Foo { diff --git a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs index 108a630ec70cb..eeb0c1e6d75bc 100644 --- a/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs +++ b/tests/ui/const-generics/generic_const_exprs/assoc_const_unification/const_equate_assoc_consts.rs @@ -1,6 +1,6 @@ //@ check-pass #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] trait Trait { const ASSOC: usize; diff --git a/tests/ui/const-generics/generic_const_exprs/auxiliary/cross-crate-2.rs b/tests/ui/const-generics/generic_const_exprs/auxiliary/cross-crate-2.rs index a8bda14f4bd81..422d26f99b48c 100644 --- a/tests/ui/const-generics/generic_const_exprs/auxiliary/cross-crate-2.rs +++ b/tests/ui/const-generics/generic_const_exprs/auxiliary/cross-crate-2.rs @@ -1,4 +1,4 @@ -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] #![feature(generic_const_exprs)] pub struct Foo; diff --git a/tests/ui/const-generics/generic_const_exprs/failed-to-normalize-ice-issue-88421.rs b/tests/ui/const-generics/generic_const_exprs/failed-to-normalize-ice-issue-88421.rs index 3d41eeeff45cd..844f98ef90f5c 100644 --- a/tests/ui/const-generics/generic_const_exprs/failed-to-normalize-ice-issue-88421.rs +++ b/tests/ui/const-generics/generic_const_exprs/failed-to-normalize-ice-issue-88421.rs @@ -2,7 +2,7 @@ // issue: rust-lang/rust#88421 #![feature(adt_const_params)] #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] use std::ops::Index; diff --git a/tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs b/tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs index 1675374970294..dcf9869895449 100644 --- a/tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs +++ b/tests/ui/const-generics/generic_const_exprs/from-sig-fail.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] fn test() -> [u8; N - 1] { //~^ ERROR overflow diff --git a/tests/ui/const-generics/generic_const_exprs/issue-76595.rs b/tests/ui/const-generics/generic_const_exprs/issue-76595.rs index 10247ce6bcafd..68365743df0a8 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-76595.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-76595.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] struct Bool; diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs index 99decb368e1d0..687c4e79bc641 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs @@ -1,6 +1,6 @@ //@ check-fail -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] #![feature(generic_const_exprs)] use std::fmt::Debug; diff --git a/tests/ui/const-generics/generic_const_exprs/simple_fail.rs b/tests/ui/const-generics/generic_const_exprs/simple_fail.rs index e89b5707fe2f0..0188d22ea7b77 100644 --- a/tests/ui/const-generics/generic_const_exprs/simple_fail.rs +++ b/tests/ui/const-generics/generic_const_exprs/simple_fail.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] type Arr = [u8; N - 1]; //~^ ERROR overflow diff --git a/tests/ui/const-generics/generic_const_exprs/unused_expr.rs b/tests/ui/const-generics/generic_const_exprs/unused_expr.rs index c1bf19e0f8d43..52c452f2d953b 100644 --- a/tests/ui/const-generics/generic_const_exprs/unused_expr.rs +++ b/tests/ui/const-generics/generic_const_exprs/unused_expr.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] fn add() -> [u8; { N + 1; 5 }] { //~^ ERROR overly complex generic constant diff --git a/tests/ui/const-generics/infer/one-param-uninferred.rs b/tests/ui/const-generics/infer/one-param-uninferred.rs index d6018650f533d..69b3bb64175a7 100644 --- a/tests/ui/const-generics/infer/one-param-uninferred.rs +++ b/tests/ui/const-generics/infer/one-param-uninferred.rs @@ -1,4 +1,5 @@ // Test that we emit an error if we cannot properly infer a constant. +#![allow(todo_macro_calls)] fn foo() -> [u8; N] { todo!() } diff --git a/tests/ui/const-generics/infer/one-param-uninferred.stderr b/tests/ui/const-generics/infer/one-param-uninferred.stderr index f3aa7973e67d1..657381133815f 100644 --- a/tests/ui/const-generics/infer/one-param-uninferred.stderr +++ b/tests/ui/const-generics/infer/one-param-uninferred.stderr @@ -1,11 +1,11 @@ error[E0284]: type annotations needed - --> $DIR/one-param-uninferred.rs:9:23 + --> $DIR/one-param-uninferred.rs:10:23 | LL | let _: [u8; 17] = foo(); | ^^^ cannot infer the value of the const parameter `M` declared on the function `foo` | note: required by a const generic parameter in `foo` - --> $DIR/one-param-uninferred.rs:2:24 + --> $DIR/one-param-uninferred.rs:3:24 | LL | fn foo() -> [u8; N] { | ^^^^^^^^^^^^^^ required by this const generic parameter in `foo` diff --git a/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.rs b/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.rs index 2e6b0223656a7..ded8e4390b854 100644 --- a/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.rs +++ b/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] fn ty_param() -> [u8; std::mem::size_of::()] { //~^ ERROR generic parameters may not be used in const operations todo!() diff --git a/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr b/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr index e58c894a27034..9a83a475cef90 100644 --- a/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr +++ b/tests/ui/const-generics/issues/issue-76701-ty-param-in-const.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/issue-76701-ty-param-in-const.rs:1:46 + --> $DIR/issue-76701-ty-param-in-const.rs:2:46 | LL | fn ty_param() -> [u8; std::mem::size_of::()] { | ^ cannot perform const operation using `T` @@ -8,7 +8,7 @@ LL | fn ty_param() -> [u8; std::mem::size_of::()] { = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/issue-76701-ty-param-in-const.rs:6:42 + --> $DIR/issue-76701-ty-param-in-const.rs:7:42 | LL | fn const_param() -> [u8; N + 1] { | ^ cannot perform const operation using `N` diff --git a/tests/ui/const-generics/issues/issue-83249.rs b/tests/ui/const-generics/issues/issue-83249.rs index 65148c55ee541..cb5dd16b56317 100644 --- a/tests/ui/const-generics/issues/issue-83249.rs +++ b/tests/ui/const-generics/issues/issue-83249.rs @@ -1,4 +1,4 @@ -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] #![feature(generic_const_exprs)] trait Foo { diff --git a/tests/ui/const-generics/issues/issue-83466.rs b/tests/ui/const-generics/issues/issue-83466.rs index 73c9301011d58..0b3970a7b0e37 100644 --- a/tests/ui/const-generics/issues/issue-83466.rs +++ b/tests/ui/const-generics/issues/issue-83466.rs @@ -1,5 +1,6 @@ // regression test for #83466- tests that generic arg mismatch errors between // consts and types are not suppressed when there are explicit late bound lifetimes +#![allow(todo_macro_calls)] struct S; impl S { diff --git a/tests/ui/const-generics/issues/issue-83466.stderr b/tests/ui/const-generics/issues/issue-83466.stderr index 5a0f5cbd131be..769dfda15aad3 100644 --- a/tests/ui/const-generics/issues/issue-83466.stderr +++ b/tests/ui/const-generics/issues/issue-83466.stderr @@ -1,5 +1,5 @@ warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - --> $DIR/issue-83466.rs:11:14 + --> $DIR/issue-83466.rs:12:14 | LL | fn func<'a, U>(self) -> U { | -- the late bound lifetime parameter is introduced here @@ -12,7 +12,7 @@ LL | S.func::<'a, 10_u32>() = note: `#[warn(late_bound_lifetime_arguments)]` (part of `#[warn(future_incompatible)]`) on by default error[E0747]: constant provided when a type was expected - --> $DIR/issue-83466.rs:11:18 + --> $DIR/issue-83466.rs:12:18 | LL | S.func::<'a, 10_u32>() | ^^^^^^ diff --git a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs index a5d7042dbf165..c115f5d6858ee 100644 --- a/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs +++ b/tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs @@ -2,7 +2,7 @@ // see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] trait MyTrait {} diff --git a/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs b/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs index d7df9c22afd69..3f1b5295953f9 100644 --- a/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs +++ b/tests/ui/const-generics/mgca/ambiguous-assoc-const.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(min_generic_const_args)] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/mgca/ambiguous-assoc-const.stderr b/tests/ui/const-generics/mgca/ambiguous-assoc-const.stderr index 11c63bdbcf4be..fab1063e42eca 100644 --- a/tests/ui/const-generics/mgca/ambiguous-assoc-const.stderr +++ b/tests/ui/const-generics/mgca/ambiguous-assoc-const.stderr @@ -1,5 +1,5 @@ error[E0223]: ambiguous associated constant - --> $DIR/ambiguous-assoc-const.rs:10:20 + --> $DIR/ambiguous-assoc-const.rs:11:20 | LL | fn foo() -> Blah<{ Tr::N }> { | ^^^^^ diff --git a/tests/ui/const-generics/mgca/explicit_anon_consts.rs b/tests/ui/const-generics/mgca/explicit_anon_consts.rs index 2b9909b43dfbb..18d8b847a89cd 100644 --- a/tests/ui/const-generics/mgca/explicit_anon_consts.rs +++ b/tests/ui/const-generics/mgca/explicit_anon_consts.rs @@ -1,5 +1,6 @@ #![feature(generic_const_items, min_generic_const_args)] #![expect(incomplete_features)] +#![allow(todo_macro_calls)] // library crates exercise weirder code paths around // DefIds which were created for const args. #![crate_type = "lib"] diff --git a/tests/ui/const-generics/mgca/explicit_anon_consts.stderr b/tests/ui/const-generics/mgca/explicit_anon_consts.stderr index f634ec1cf12e4..c30e340ab34b0 100644 --- a/tests/ui/const-generics/mgca/explicit_anon_consts.stderr +++ b/tests/ui/const-generics/mgca/explicit_anon_consts.stderr @@ -1,41 +1,41 @@ error: complex const arguments must be placed inside of a `const` block - --> $DIR/explicit_anon_consts.rs:13:35 + --> $DIR/explicit_anon_consts.rs:14:35 | LL | type Adt4 = Foo<{ 1 + 1 }>; | ^^^^^ error: complex const arguments must be placed inside of a `const` block - --> $DIR/explicit_anon_consts.rs:21:34 + --> $DIR/explicit_anon_consts.rs:22:34 | LL | type Arr4 = [(); 1 + 1]; | ^^^^^ error: complex const arguments must be placed inside of a `const` block - --> $DIR/explicit_anon_consts.rs:30:19 + --> $DIR/explicit_anon_consts.rs:31:19 | LL | let _4 = [(); 1 + 1]; | ^^^^^ error: complex const arguments must be placed inside of a `const` block - --> $DIR/explicit_anon_consts.rs:45:45 + --> $DIR/explicit_anon_consts.rs:46:45 | LL | type const ITEM4: usize = { 1 + 1 }; | ^^^^^ error: complex const arguments must be placed inside of a `const` block - --> $DIR/explicit_anon_consts.rs:62:25 + --> $DIR/explicit_anon_consts.rs:63:25 | LL | T4: Trait, | ^^^^^ error: complex const arguments must be placed inside of a `const` block - --> $DIR/explicit_anon_consts.rs:71:52 + --> $DIR/explicit_anon_consts.rs:72:52 | LL | struct Default4; | ^^^^^ error: generic parameters may not be used in const operations - --> $DIR/explicit_anon_consts.rs:42:51 + --> $DIR/explicit_anon_consts.rs:43:51 | LL | type const ITEM3: usize = const { N }; | ^ @@ -43,7 +43,7 @@ LL | type const ITEM3: usize = const { N }; = help: add `#![feature(generic_const_args)]` to allow generic expressions as the RHS of const items error: generic parameters may not be used in const operations - --> $DIR/explicit_anon_consts.rs:60:31 + --> $DIR/explicit_anon_consts.rs:61:31 | LL | T3: Trait, | ^ @@ -51,7 +51,7 @@ LL | T3: Trait, = help: add `#![feature(generic_const_args)]` to allow generic expressions as the RHS of const items error: generic parameters may not be used in const operations - --> $DIR/explicit_anon_consts.rs:69:58 + --> $DIR/explicit_anon_consts.rs:70:58 | LL | struct Default3; | ^ @@ -59,7 +59,7 @@ LL | struct Default3; = help: add `#![feature(generic_const_args)]` to allow generic expressions as the RHS of const items error: generic parameters may not be used in const operations - --> $DIR/explicit_anon_consts.rs:28:27 + --> $DIR/explicit_anon_consts.rs:29:27 | LL | let _3 = [(); const { N }]; | ^ @@ -67,7 +67,7 @@ LL | let _3 = [(); const { N }]; = help: add `#![feature(generic_const_args)]` to allow generic expressions as the RHS of const items error: generic parameters may not be used in const operations - --> $DIR/explicit_anon_consts.rs:33:26 + --> $DIR/explicit_anon_consts.rs:34:26 | LL | let _6: [(); const { N }] = todo!(); | ^ @@ -75,7 +75,7 @@ LL | let _6: [(); const { N }] = todo!(); = help: add `#![feature(generic_const_args)]` to allow generic expressions as the RHS of const items error: generic parameters may not be used in const operations - --> $DIR/explicit_anon_consts.rs:11:41 + --> $DIR/explicit_anon_consts.rs:12:41 | LL | type Adt3 = Foo; | ^ @@ -83,7 +83,7 @@ LL | type Adt3 = Foo; = help: add `#![feature(generic_const_args)]` to allow generic expressions as the RHS of const items error: generic parameters may not be used in const operations - --> $DIR/explicit_anon_consts.rs:19:42 + --> $DIR/explicit_anon_consts.rs:20:42 | LL | type Arr3 = [(); const { N }]; | ^ diff --git a/tests/ui/const-generics/mgca/inherent-const-gating.rs b/tests/ui/const-generics/mgca/inherent-const-gating.rs index c39b8e6f7f64a..143fedfd155e2 100644 --- a/tests/ui/const-generics/mgca/inherent-const-gating.rs +++ b/tests/ui/const-generics/mgca/inherent-const-gating.rs @@ -1,5 +1,5 @@ #![feature(min_generic_const_args)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] struct S; diff --git a/tests/ui/const-generics/mgca/selftyalias-containing-param.rs b/tests/ui/const-generics/mgca/selftyalias-containing-param.rs index 5ab39799078fa..2e48ece9ff102 100644 --- a/tests/ui/const-generics/mgca/selftyalias-containing-param.rs +++ b/tests/ui/const-generics/mgca/selftyalias-containing-param.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(min_generic_const_args)] #![expect(incomplete_features)] diff --git a/tests/ui/const-generics/mgca/selftyalias-containing-param.stderr b/tests/ui/const-generics/mgca/selftyalias-containing-param.stderr index cf5974fd83df9..39599aaeea506 100644 --- a/tests/ui/const-generics/mgca/selftyalias-containing-param.stderr +++ b/tests/ui/const-generics/mgca/selftyalias-containing-param.stderr @@ -1,11 +1,11 @@ error: generic `Self` types are currently not permitted in anonymous constants - --> $DIR/selftyalias-containing-param.rs:7:37 + --> $DIR/selftyalias-containing-param.rs:8:37 | LL | fn foo() -> [(); const { let _: Self = loop {}; 1 }] { | ^^^^ | note: not a concrete type - --> $DIR/selftyalias-containing-param.rs:6:22 + --> $DIR/selftyalias-containing-param.rs:7:22 | LL | impl S { | ^^^^ diff --git a/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.rs b/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.rs index 9ef619365a08c..643ed62c24528 100644 --- a/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.rs +++ b/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] trait Foo { fn t1() -> [u8; std::mem::size_of::()]; //~ERROR generic parameters } diff --git a/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr b/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr index e9216fc12a22a..fc07ebb891101 100644 --- a/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr +++ b/tests/ui/const-generics/min_const_generics/self-ty-in-const-1.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/self-ty-in-const-1.rs:2:41 + --> $DIR/self-ty-in-const-1.rs:3:41 | LL | fn t1() -> [u8; std::mem::size_of::()]; | ^^^^ cannot perform const operation using `Self` @@ -8,13 +8,13 @@ LL | fn t1() -> [u8; std::mem::size_of::()]; = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions error: generic `Self` types are currently not permitted in anonymous constants - --> $DIR/self-ty-in-const-1.rs:12:41 + --> $DIR/self-ty-in-const-1.rs:13:41 | LL | fn t3() -> [u8; std::mem::size_of::()] {} | ^^^^ | note: not a concrete type - --> $DIR/self-ty-in-const-1.rs:11:9 + --> $DIR/self-ty-in-const-1.rs:12:9 | LL | impl Bar { | ^^^^^^ diff --git a/tests/ui/const-generics/occurs-check/bind-param.rs b/tests/ui/const-generics/occurs-check/bind-param.rs index 56ddccf219c72..8ca87179267bc 100644 --- a/tests/ui/const-generics/occurs-check/bind-param.rs +++ b/tests/ui/const-generics/occurs-check/bind-param.rs @@ -1,6 +1,6 @@ //@ build-pass #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] // This test does not use any "unevaluated" consts, so it should compile just fine. diff --git a/tests/ui/const-generics/occurs-check/unify-fixpoint.rs b/tests/ui/const-generics/occurs-check/unify-fixpoint.rs index 950757efbd42d..ab8e32b369381 100644 --- a/tests/ui/const-generics/occurs-check/unify-fixpoint.rs +++ b/tests/ui/const-generics/occurs-check/unify-fixpoint.rs @@ -1,6 +1,7 @@ // -Zunstable-options added as test for ICE #97725 (left == right)` // left: `Binder(<[u8; _] as std::default::Default>, [])`, // right: `Binder(<[u8; 4] as std::default::Default>, []) +#![allow(todo_macro_calls)] //@ compile-flags: -Zunstable-options //@ check-pass diff --git a/tests/ui/const-generics/occurs-check/unify-n-nplusone.rs b/tests/ui/const-generics/occurs-check/unify-n-nplusone.rs index c6324bca124cd..fc6bc8b60f970 100644 --- a/tests/ui/const-generics/occurs-check/unify-n-nplusone.rs +++ b/tests/ui/const-generics/occurs-check/unify-n-nplusone.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] // This test would tries to unify `N` with `N + 1` which must fail the occurs check. diff --git a/tests/ui/const-generics/occurs-check/unused-substs-3.rs b/tests/ui/const-generics/occurs-check/unused-substs-3.rs index dfb051192e2f3..d808cb7f35b98 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-3.rs +++ b/tests/ui/const-generics/occurs-check/unused-substs-3.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] // The goal is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(?1t)` subst. // diff --git a/tests/ui/const-generics/occurs-check/unused-substs-4.rs b/tests/ui/const-generics/occurs-check/unused-substs-4.rs index 03c2f54861b43..20d83c702da05 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-4.rs +++ b/tests/ui/const-generics/occurs-check/unused-substs-4.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] fn bind(value: [u8; N]) -> [u8; 3 + 4] { todo!() diff --git a/tests/ui/const-generics/occurs-check/unused-substs-5.rs b/tests/ui/const-generics/occurs-check/unused-substs-5.rs index 383ab4cd8c928..8eacb21f959d5 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-5.rs +++ b/tests/ui/const-generics/occurs-check/unused-substs-5.rs @@ -1,5 +1,5 @@ #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] // `N + 1` also depends on `T` here even if it doesn't use it. fn q(_: T) -> [u8; N + 1] { diff --git a/tests/ui/const-generics/try_unify_ignore_lifetimes.rs b/tests/ui/const-generics/try_unify_ignore_lifetimes.rs index 2cd6fb53c4a02..ecb526f4e01be 100644 --- a/tests/ui/const-generics/try_unify_ignore_lifetimes.rs +++ b/tests/ui/const-generics/try_unify_ignore_lifetimes.rs @@ -1,6 +1,6 @@ //@ check-pass #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] struct Num; diff --git a/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs b/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs index 885869bdab328..d6677473c3548 100644 --- a/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs +++ b/tests/ui/consts/const-eval/issue-84957-const-str-as-bytes.rs @@ -1,4 +1,5 @@ //@ build-pass +#![allow(todo_macro_calls)] trait Foo {} diff --git a/tests/ui/consts/const-eval/issue-85907.rs b/tests/ui/consts/const-eval/issue-85907.rs index a5a961658c76c..118508887843c 100644 --- a/tests/ui/consts/const-eval/issue-85907.rs +++ b/tests/ui/consts/const-eval/issue-85907.rs @@ -1,4 +1,5 @@ //@ edition:2015..2021 +#![allow(todo_macro_calls)] const fn hey() -> usize { panic!(123); //~ ERROR argument to `panic!()` in a const context must have type `&str` } diff --git a/tests/ui/consts/const-eval/issue-85907.stderr b/tests/ui/consts/const-eval/issue-85907.stderr index 70eae7309a634..a37708f6aad78 100644 --- a/tests/ui/consts/const-eval/issue-85907.stderr +++ b/tests/ui/consts/const-eval/issue-85907.stderr @@ -1,5 +1,5 @@ error: argument to `panic!()` in a const context must have type `&str` - --> $DIR/issue-85907.rs:3:5 + --> $DIR/issue-85907.rs:4:5 | LL | panic!(123); | ^^^^^^^^^^^ diff --git a/tests/ui/consts/dont-ctfe-unsized-initializer.rs b/tests/ui/consts/dont-ctfe-unsized-initializer.rs index cca38b760dcc8..028cf5f7907c5 100644 --- a/tests/ui/consts/dont-ctfe-unsized-initializer.rs +++ b/tests/ui/consts/dont-ctfe-unsized-initializer.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] static S: str = todo!(); //~^ ERROR the size for values of type `str` cannot be known at compilation time diff --git a/tests/ui/consts/dont-ctfe-unsized-initializer.stderr b/tests/ui/consts/dont-ctfe-unsized-initializer.stderr index 5b0a0166f3112..440ecf22a8f34 100644 --- a/tests/ui/consts/dont-ctfe-unsized-initializer.stderr +++ b/tests/ui/consts/dont-ctfe-unsized-initializer.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `str` cannot be known at compilation time - --> $DIR/dont-ctfe-unsized-initializer.rs:1:1 + --> $DIR/dont-ctfe-unsized-initializer.rs:2:1 | LL | static S: str = todo!(); | ^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -8,7 +8,7 @@ LL | static S: str = todo!(); = note: statics and constants must have a statically known size error[E0277]: the size for values of type `str` cannot be known at compilation time - --> $DIR/dont-ctfe-unsized-initializer.rs:4:10 + --> $DIR/dont-ctfe-unsized-initializer.rs:5:10 | LL | const C: str = todo!(); | ^^^ doesn't have a size known at compile-time diff --git a/tests/ui/consts/ice-zst-static-access.rs b/tests/ui/consts/ice-zst-static-access.rs index 2a4343e3eba8a..259fa5184b0f0 100644 --- a/tests/ui/consts/ice-zst-static-access.rs +++ b/tests/ui/consts/ice-zst-static-access.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] // This is a regression test for ICEs from // https://github.com/rust-lang/rust/issues/71612 diff --git a/tests/ui/consts/issue-89088.rs b/tests/ui/consts/issue-89088.rs index f6dbf8f012502..5c814543c31eb 100644 --- a/tests/ui/consts/issue-89088.rs +++ b/tests/ui/consts/issue-89088.rs @@ -1,4 +1,5 @@ // Regression test for the ICE described in #89088. +#![allow(todo_macro_calls)] use std::borrow::Cow; diff --git a/tests/ui/consts/issue-89088.stderr b/tests/ui/consts/issue-89088.stderr index 586158375ecc8..a099b67e05182 100644 --- a/tests/ui/consts/issue-89088.stderr +++ b/tests/ui/consts/issue-89088.stderr @@ -1,5 +1,5 @@ error: constant of non-structural type `Cow<'_, str>` in a pattern - --> $DIR/issue-89088.rs:16:9 + --> $DIR/issue-89088.rs:17:9 | LL | const FOO: &A = &A::Field(Cow::Borrowed("foo")); | ------------- constant defined here diff --git a/tests/ui/coroutine/layout-error.rs b/tests/ui/coroutine/layout-error.rs index 7f6714542c1bc..721958973399e 100644 --- a/tests/ui/coroutine/layout-error.rs +++ b/tests/ui/coroutine/layout-error.rs @@ -2,6 +2,7 @@ // doesn't ICE. Regression test for #80998. // //@ edition:2018 +#![allow(todo_macro_calls)] #![feature(type_alias_impl_trait)] use std::future::Future; diff --git a/tests/ui/coroutine/layout-error.stderr b/tests/ui/coroutine/layout-error.stderr index f3b3843de898c..5bf7139c99b1a 100644 --- a/tests/ui/coroutine/layout-error.stderr +++ b/tests/ui/coroutine/layout-error.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `Foo` in this scope - --> $DIR/layout-error.rs:27:17 + --> $DIR/layout-error.rs:28:17 | LL | let a = Foo; | ^^^ not found in this scope diff --git a/tests/ui/coroutine/stalled-coroutine-obligations.rs b/tests/ui/coroutine/stalled-coroutine-obligations.rs index 89af3c9a583c2..78530c2ebef0f 100644 --- a/tests/ui/coroutine/stalled-coroutine-obligations.rs +++ b/tests/ui/coroutine/stalled-coroutine-obligations.rs @@ -1,4 +1,5 @@ //@ edition: 2021 +#![allow(todo_macro_calls)] // Regression tests for #137916 and #138274 // We now check stalled coroutine obligations eagerly at the start of `mir_borrowck`. diff --git a/tests/ui/coroutine/stalled-coroutine-obligations.stderr b/tests/ui/coroutine/stalled-coroutine-obligations.stderr index cbf395dd6cfb3..7eea74cecd3ed 100644 --- a/tests/ui/coroutine/stalled-coroutine-obligations.stderr +++ b/tests/ui/coroutine/stalled-coroutine-obligations.stderr @@ -1,5 +1,5 @@ error: future cannot be sent between threads safely - --> $DIR/stalled-coroutine-obligations.rs:9:5 + --> $DIR/stalled-coroutine-obligations.rs:10:5 | LL | / Box::new(async { LL | | @@ -9,32 +9,32 @@ LL | | async {}.await LL | | }) | |______^ future created by async block is not `Send` | - = help: within `{async block@$DIR/stalled-coroutine-obligations.rs:9:14: 9:19}`, the trait `Send` is not implemented for `*const ()` + = help: within `{async block@$DIR/stalled-coroutine-obligations.rs:10:14: 10:19}`, the trait `Send` is not implemented for `*const ()` note: future is not `Send` as this value is used across an await - --> $DIR/stalled-coroutine-obligations.rs:13:18 + --> $DIR/stalled-coroutine-obligations.rs:14:18 | LL | let non_send = null::<()>(); | -------- has type `*const ()` which is not `Send` LL | &non_send; LL | async {}.await | ^^^^^ await occurs here, with `non_send` maybe used later - = note: required for the cast from `Box<{async block@$DIR/stalled-coroutine-obligations.rs:9:14: 9:19}>` to `Box` + = note: required for the cast from `Box<{async block@$DIR/stalled-coroutine-obligations.rs:10:14: 10:19}>` to `Box` error: future cannot be sent between threads safely - --> $DIR/stalled-coroutine-obligations.rs:27:32 + --> $DIR/stalled-coroutine-obligations.rs:28:32 | LL | let _: Box = Box::new(fut); | ^^^^^^^^^^^^^ future created by async block is not `Send` | = help: the trait `Send` is not implemented for `dyn Trait` note: future is not `Send` as this value is used across an await - --> $DIR/stalled-coroutine-obligations.rs:25:22 + --> $DIR/stalled-coroutine-obligations.rs:26:22 | LL | let _x = foo(); | -- has type `Box` which is not `Send` LL | async {}.await; | ^^^^^ await occurs here, with `_x` maybe used later - = note: required for the cast from `Box<{async block@$DIR/stalled-coroutine-obligations.rs:23:19: 23:24}>` to `Box` + = note: required for the cast from `Box<{async block@$DIR/stalled-coroutine-obligations.rs:24:19: 24:24}>` to `Box` error: aborting due to 2 previous errors diff --git a/tests/ui/coroutine/witness-ignore-fake-reads.rs b/tests/ui/coroutine/witness-ignore-fake-reads.rs index 9764b00422d60..341523133f874 100644 --- a/tests/ui/coroutine/witness-ignore-fake-reads.rs +++ b/tests/ui/coroutine/witness-ignore-fake-reads.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition: 2021 +#![allow(todo_macro_calls)] // regression test for #117059 struct SendNotSync(*const ()); diff --git a/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs b/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs index ac857ff34a4d7..afa20d63f32e6 100644 --- a/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs +++ b/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs @@ -1,6 +1,7 @@ //@ build-pass //@ compile-flags: -Cdebuginfo=2 // fixes issue #94725 +#![allow(todo_macro_calls)] #![feature(allocator_api)] diff --git a/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs b/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs index e082a172e3517..3cdea83d6924f 100644 --- a/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs +++ b/tests/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Cdebuginfo=2 // fixes issue #94149 -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] pub fn main() { let _ = Foo::::new(); diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.current.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.current.stderr index 46dd21ceb00a0..ad2f6e5e2ef7a 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.current.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.current.stderr @@ -1,12 +1,12 @@ error[E0277]: the trait bound `&str: AsExpression` is not satisfied - --> $DIR/as_expression.rs:56:15 + --> $DIR/as_expression.rs:57:15 | LL | SelectInt.check("bar"); | ^^^^^ the trait `AsExpression` is not implemented for `&str` | help: the trait `AsExpression` is not implemented for `&str` but trait `AsExpression` is implemented for it - --> $DIR/as_expression.rs:40:1 + --> $DIR/as_expression.rs:41:1 | LL | impl AsExpression for &'_ str { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.next.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.next.stderr index 445aeb469476b..736b72e428d3b 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.next.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.next.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `&str: AsExpression` is not satisfied - --> $DIR/as_expression.rs:56:21 + --> $DIR/as_expression.rs:57:21 | LL | SelectInt.check("bar"); | ----- ^^^^^ the trait `AsExpression` is not implemented for `&str` @@ -8,13 +8,13 @@ LL | SelectInt.check("bar"); | help: the trait `AsExpression` is not implemented for `&str` but trait `AsExpression` is implemented for it - --> $DIR/as_expression.rs:40:1 + --> $DIR/as_expression.rs:41:1 | LL | impl AsExpression for &'_ str { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for that trait implementation, expected `Text`, found `Integer` note: required by a bound in `Foo::check` - --> $DIR/as_expression.rs:47:12 + --> $DIR/as_expression.rs:48:12 | LL | fn check(&self, _: T) -> ::SqlType>>::Expression | ----- required by a bound in this associated function @@ -23,14 +23,14 @@ LL | T: AsExpression, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo::check` error[E0277]: the trait bound `&str: AsExpression` is not satisfied - --> $DIR/as_expression.rs:56:5 + --> $DIR/as_expression.rs:57:5 | LL | SelectInt.check("bar"); | ^^^^^^^^^^^^^^^^^^^^^^ the trait `AsExpression` is not implemented for `&str` | help: the trait `AsExpression` is not implemented for `&str` but trait `AsExpression` is implemented for it - --> $DIR/as_expression.rs:40:1 + --> $DIR/as_expression.rs:41:1 | LL | impl AsExpression for &'_ str { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs b/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs index 86f39e43484e7..b50403b84ddab 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs +++ b/tests/ui/diagnostic_namespace/do_not_recommend/as_expression.rs @@ -2,6 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ reference: attributes.diagnostic.do_not_recommend.intro +#![allow(todo_macro_calls)] pub trait Expression { type SqlType; diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.rs b/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.rs index 44a84f40d44be..9e3a6688e3bfa 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.rs @@ -1,6 +1,7 @@ //@ reference: attributes.diagnostic.on_unimplemented.intro //@ reference: attributes.diagnostic.on_unimplemented.keys //@ dont-require-annotations: NOTE +#![allow(todo_macro_calls)] #[diagnostic::on_unimplemented(message = "my message", label = "my label", note = "my note")] pub trait ProviderLt {} diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.stderr index 1ba2c2e222dd0..afe4dd4c3b16d 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/custom-on-unimplemented-diagnostic.stderr @@ -1,5 +1,5 @@ error[E0599]: my message - --> $DIR/custom-on-unimplemented-diagnostic.rs:19:7 + --> $DIR/custom-on-unimplemented-diagnostic.rs:20:7 | LL | struct B; | -------- method `request` not found for this struct because it doesn't satisfy `B: ProviderExt` or `B: ProviderLt` @@ -8,7 +8,7 @@ LL | B.request(); | ^^^^^^^ my label | note: trait bound `B: ProviderLt` was not satisfied - --> $DIR/custom-on-unimplemented-diagnostic.rs:14:18 + --> $DIR/custom-on-unimplemented-diagnostic.rs:15:18 | LL | impl ProviderExt for T {} | ^^^^^^^^^^ ----------- - @@ -16,13 +16,13 @@ LL | impl ProviderExt for T {} | unsatisfied trait bound introduced here = note: my note note: the trait `ProviderLt` must be implemented - --> $DIR/custom-on-unimplemented-diagnostic.rs:6:1 + --> $DIR/custom-on-unimplemented-diagnostic.rs:7:1 | LL | pub trait ProviderLt {} | ^^^^^^^^^^^^^^^^^^^^ = help: items from traits can only be used if the trait is implemented and in scope note: `ProviderExt` defines an item `request`, perhaps you need to implement it - --> $DIR/custom-on-unimplemented-diagnostic.rs:8:1 + --> $DIR/custom-on-unimplemented-diagnostic.rs:9:1 | LL | pub trait ProviderExt { | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/drop/lint-tail-expr-drop-order.rs b/tests/ui/drop/lint-tail-expr-drop-order.rs index 55a2d1d3b7543..0f0ac350e638d 100644 --- a/tests/ui/drop/lint-tail-expr-drop-order.rs +++ b/tests/ui/drop/lint-tail-expr-drop-order.rs @@ -4,7 +4,7 @@ //@ edition: 2021 #![deny(tail_expr_drop_order)] //~ NOTE: the lint level is defined here -#![allow(dropping_copy_types)] +#![allow(dropping_copy_types, todo_macro_calls)] struct LoudDropper; impl Drop for LoudDropper { diff --git a/tests/ui/drop/tail_expr_drop_order-on-coroutine-unwind.rs b/tests/ui/drop/tail_expr_drop_order-on-coroutine-unwind.rs index 5b9c24978b4c9..a94375ee69ec1 100644 --- a/tests/ui/drop/tail_expr_drop_order-on-coroutine-unwind.rs +++ b/tests/ui/drop/tail_expr_drop_order-on-coroutine-unwind.rs @@ -1,4 +1,5 @@ //@ edition: 2021 +#![allow(todo_macro_calls)] // Make sure we don't ICE when emitting the "lint" drop statement // used for tail_expr_drop_order. diff --git a/tests/ui/drop/tail_expr_drop_order-on-coroutine-unwind.stderr b/tests/ui/drop/tail_expr_drop_order-on-coroutine-unwind.stderr index f89d1d3c2ceb7..b3946d61f9e8f 100644 --- a/tests/ui/drop/tail_expr_drop_order-on-coroutine-unwind.stderr +++ b/tests/ui/drop/tail_expr_drop_order-on-coroutine-unwind.stderr @@ -1,5 +1,5 @@ error: relative drop order changing in Rust 2024 - --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:19:15 + --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:20:15 | LL | match func().await { | ^^^^^^^----- @@ -23,17 +23,17 @@ LL | } | - now the temporary value is dropped here, before the local variables in the block or statement | note: `#2` invokes this custom destructor - --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:9:1 + --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:10:1 | LL | impl std::ops::Drop for Drop { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `#1` invokes this custom destructor - --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:9:1 + --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:10:1 | LL | impl std::ops::Drop for Drop { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `e` invokes this custom destructor - --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:9:1 + --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:10:1 | LL | impl std::ops::Drop for Drop { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -41,7 +41,7 @@ LL | impl std::ops::Drop for Drop { = warning: this changes meaning in Rust 2024 = note: for more information, see note: the lint level is defined here - --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:6:9 + --> $DIR/tail_expr_drop_order-on-coroutine-unwind.rs:7:9 | LL | #![deny(tail_expr_drop_order)] | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/drop/tail_expr_drop_order-on-thread-local.rs b/tests/ui/drop/tail_expr_drop_order-on-thread-local.rs index e38175fd1b653..40e959cf984dd 100644 --- a/tests/ui/drop/tail_expr_drop_order-on-thread-local.rs +++ b/tests/ui/drop/tail_expr_drop_order-on-thread-local.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] #![feature(thread_local)] #![deny(tail_expr_drop_order)] diff --git a/tests/ui/dropck/coroutine-liveness-1.rs b/tests/ui/dropck/coroutine-liveness-1.rs index aa9f68a1b49f4..6535ed381744e 100644 --- a/tests/ui/dropck/coroutine-liveness-1.rs +++ b/tests/ui/dropck/coroutine-liveness-1.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition: 2021 +#![allow(todo_macro_calls)] // regression test for #116242. use std::future; diff --git a/tests/ui/dropck/coroutine-liveness-2.rs b/tests/ui/dropck/coroutine-liveness-2.rs index 3ef1400a41e6a..c8a6055684de7 100644 --- a/tests/ui/dropck/coroutine-liveness-2.rs +++ b/tests/ui/dropck/coroutine-liveness-2.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition: 2021 +#![allow(todo_macro_calls)] // regression test found while working on #117134. use std::future; diff --git a/tests/ui/dropck/dropck-after-failed-type-lowering.rs b/tests/ui/dropck/dropck-after-failed-type-lowering.rs index ee55e0dcaa491..9586295da99a6 100644 --- a/tests/ui/dropck/dropck-after-failed-type-lowering.rs +++ b/tests/ui/dropck/dropck-after-failed-type-lowering.rs @@ -1,4 +1,5 @@ // Regression test for #137329 +#![allow(todo_macro_calls)] trait B { type C<'a>; diff --git a/tests/ui/dropck/dropck-after-failed-type-lowering.stderr b/tests/ui/dropck/dropck-after-failed-type-lowering.stderr index 0922d2e4340e8..601226d284ef3 100644 --- a/tests/ui/dropck/dropck-after-failed-type-lowering.stderr +++ b/tests/ui/dropck/dropck-after-failed-type-lowering.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `B::C` - --> $DIR/dropck-after-failed-type-lowering.rs:11:25 + --> $DIR/dropck-after-failed-type-lowering.rs:12:25 | LL | h: Option<::C>, | ^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/dropck-after-failed-type-lowering.rs:4:10 + --> $DIR/dropck-after-failed-type-lowering.rs:5:10 | LL | type C<'a>; | ^ -- @@ -15,7 +15,7 @@ LL | h: Option<::C<'a>>, | ++++ error[E0277]: the trait bound `G: B` is not satisfied - --> $DIR/dropck-after-failed-type-lowering.rs:11:8 + --> $DIR/dropck-after-failed-type-lowering.rs:12:8 | LL | h: Option<::C>, | ^^^^^^^^^^^^^^^^^^^ the trait `B` is not implemented for `G` @@ -26,7 +26,7 @@ LL | struct F { | +++ error[E0277]: the trait bound `E: B` is not satisfied - --> $DIR/dropck-after-failed-type-lowering.rs:5:18 + --> $DIR/dropck-after-failed-type-lowering.rs:6:18 | LL | fn d() -> F { | ^^^^ the trait `B` is not implemented for `E` diff --git a/tests/ui/dropck/dropck-only-error-gat.rs b/tests/ui/dropck/dropck-only-error-gat.rs index dadcf76a43f35..c46620af6b7a7 100644 --- a/tests/ui/dropck/dropck-only-error-gat.rs +++ b/tests/ui/dropck/dropck-only-error-gat.rs @@ -1,6 +1,7 @@ // Test that we don't ICE for a typeck error that only shows up in dropck // Version that uses a generic associated type // Regression test for #91985 +#![allow(todo_macro_calls)] pub trait Trait1 { type Associated: Ord; diff --git a/tests/ui/dropck/dropck-only-error-gat.stderr b/tests/ui/dropck/dropck-only-error-gat.stderr index 53982c0826a74..6514b326aca09 100644 --- a/tests/ui/dropck/dropck-only-error-gat.stderr +++ b/tests/ui/dropck/dropck-only-error-gat.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `::Associated: Clone` is not satisfied - --> $DIR/dropck-only-error-gat.rs:37:21 + --> $DIR/dropck-only-error-gat.rs:38:21 | LL | pub fn new() -> Self { | ^^^^ the trait `Clone` is not implemented for `::Associated` | note: required by a bound in `GatTrait::Gat` - --> $DIR/dropck-only-error-gat.rs:14:17 + --> $DIR/dropck-only-error-gat.rs:15:17 | LL | type Gat; | ^^^^^ required by this bound in `GatTrait::Gat` diff --git a/tests/ui/dst/issue-113447.rs b/tests/ui/dst/issue-113447.rs index 75156a117e996..6f0bdafd75494 100644 --- a/tests/ui/dst/issue-113447.rs +++ b/tests/ui/dst/issue-113447.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] pub struct Bytes; impl Bytes { diff --git a/tests/ui/dst/issue-113447.stderr b/tests/ui/dst/issue-113447.stderr index 4d0ed33a643a8..8b0c0ff7b4700 100644 --- a/tests/ui/dst/issue-113447.stderr +++ b/tests/ui/dst/issue-113447.stderr @@ -1,5 +1,5 @@ error[E0277]: can't compare `&[u8; 1]` with `[{integer}; 1]` - --> $DIR/issue-113447.rs:22:20 + --> $DIR/issue-113447.rs:23:20 | LL | let _ = &[0u8] == [0xAA]; | ^^ no implementation for `&[u8; 1] == [{integer}; 1]` diff --git a/tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs b/tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs index d3c3963a673d5..9503a5dc64d42 100644 --- a/tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs +++ b/tests/ui/dyn-compatibility/elaborated-predicates-ordering.rs @@ -1,5 +1,6 @@ //@ check-pass // issue: rust-lang/rust#102933 +#![allow(todo_macro_calls)] use std::future::Future; diff --git a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs index ac3c2aadf2907..f07b618a85087 100644 --- a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs +++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.rs @@ -3,6 +3,7 @@ // other dyn-compatibility *hard errors* to be suppressed, because we currently // only emit one dyn-compatibility error per trait... // issue: rust-lang/rust#102762 +#![allow(todo_macro_calls)] use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr index 867a719e2ebfd..cf9dba545d843 100644 --- a/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr +++ b/tests/ui/dyn-compatibility/undispatchable-receiver-and-wc-references-Self.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `Fetcher` is not dyn compatible - --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:19:21 + --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:20:21 | LL | fn get<'a>(self: &'a Box) -> Pin> + 'a>> | ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self` @@ -9,7 +9,7 @@ LL | fn fetcher() -> Box { | note: for a trait to be dyn compatible it needs to allow building a vtable for more information, visit - --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22 + --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:12:22 | LL | pub trait Fetcher: Send + Sync { | ------- this trait is not dyn compatible... @@ -17,7 +17,7 @@ LL | fn get<'a>(self: &'a Box) -> Pin> | ^^^^^^^^^^^^^ ...because method `get`'s `self` parameter cannot be dispatched on error[E0038]: the trait `Fetcher` is not dyn compatible - --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:25:19 + --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:26:19 | LL | fn get<'a>(self: &'a Box) -> Pin> + 'a>> | ------------- help: consider changing method `get`'s `self` parameter to be `&self`: `&Self` @@ -27,7 +27,7 @@ LL | let fetcher = fetcher(); | note: for a trait to be dyn compatible it needs to allow building a vtable for more information, visit - --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:11:22 + --> $DIR/undispatchable-receiver-and-wc-references-Self.rs:12:22 | LL | pub trait Fetcher: Send + Sync { | ------- this trait is not dyn compatible... diff --git a/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs b/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs index 65b56b327565a..4e62f110d9281 100644 --- a/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs +++ b/tests/ui/dyn-keyword/dyn-2018-edition-lint.rs @@ -1,4 +1,5 @@ //@ edition:2018 +#![allow(todo_macro_calls)] #[deny(bare_trait_objects)] fn function(x: &SomeTrait, y: Box) { diff --git a/tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr b/tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr index b034c5dac16ad..f76f359f74a78 100644 --- a/tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr +++ b/tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr @@ -1,5 +1,5 @@ error: trait objects without an explicit `dyn` are deprecated - --> $DIR/dyn-2018-edition-lint.rs:4:17 + --> $DIR/dyn-2018-edition-lint.rs:5:17 | LL | fn function(x: &SomeTrait, y: Box) { | ^^^^^^^^^ @@ -7,7 +7,7 @@ LL | fn function(x: &SomeTrait, y: Box) { = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see note: the lint level is defined here - --> $DIR/dyn-2018-edition-lint.rs:2:8 + --> $DIR/dyn-2018-edition-lint.rs:3:8 | LL | #[deny(bare_trait_objects)] | ^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | fn function(x: &dyn SomeTrait, y: Box) { | +++ error: trait objects without an explicit `dyn` are deprecated - --> $DIR/dyn-2018-edition-lint.rs:4:35 + --> $DIR/dyn-2018-edition-lint.rs:5:35 | LL | fn function(x: &SomeTrait, y: Box) { | ^^^^^^^^^ @@ -30,7 +30,7 @@ LL | fn function(x: &SomeTrait, y: Box) { | +++ error: trait objects without an explicit `dyn` are deprecated - --> $DIR/dyn-2018-edition-lint.rs:9:14 + --> $DIR/dyn-2018-edition-lint.rs:10:14 | LL | let _x: &SomeTrait = todo!(); | ^^^^^^^^^ diff --git a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs index cc23c2c5055db..87d810fc0d5d2 100644 --- a/tests/ui/dyn-keyword/dyn-2021-edition-error.rs +++ b/tests/ui/dyn-keyword/dyn-2021-edition-error.rs @@ -1,4 +1,5 @@ //@ edition:2021 +#![allow(todo_macro_calls)] fn function(x: &SomeTrait, y: Box) { //~^ ERROR expected a type, found a trait diff --git a/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr b/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr index b1d6385bde99e..480cee8a48e45 100644 --- a/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr +++ b/tests/ui/dyn-keyword/dyn-2021-edition-error.stderr @@ -1,5 +1,5 @@ error[E0782]: expected a type, found a trait - --> $DIR/dyn-2021-edition-error.rs:3:17 + --> $DIR/dyn-2021-edition-error.rs:4:17 | LL | fn function(x: &SomeTrait, y: Box) { | ^^^^^^^^^ @@ -19,7 +19,7 @@ LL | fn function(x: &dyn SomeTrait, y: Box) { | +++ error[E0782]: expected a type, found a trait - --> $DIR/dyn-2021-edition-error.rs:3:35 + --> $DIR/dyn-2021-edition-error.rs:4:35 | LL | fn function(x: &SomeTrait, y: Box) { | ^^^^^^^^^ @@ -30,7 +30,7 @@ LL | fn function(x: &SomeTrait, y: Box) { | +++ error[E0782]: expected a type, found a trait - --> $DIR/dyn-2021-edition-error.rs:12:24 + --> $DIR/dyn-2021-edition-error.rs:13:24 | LL | fn foo() -> *const SomeTrait; | ^^^^^^^^^ @@ -41,7 +41,7 @@ LL | fn foo() -> *const dyn SomeTrait; | +++ error[E0782]: expected a type, found a trait - --> $DIR/dyn-2021-edition-error.rs:6:14 + --> $DIR/dyn-2021-edition-error.rs:7:14 | LL | let _x: &SomeTrait = todo!(); | ^^^^^^^^^ diff --git a/tests/ui/explicit-tail-calls/ret-ty-modulo-anonymization.rs b/tests/ui/explicit-tail-calls/ret-ty-modulo-anonymization.rs index 0cd4e204278ac..2e8b2e528c162 100644 --- a/tests/ui/explicit-tail-calls/ret-ty-modulo-anonymization.rs +++ b/tests/ui/explicit-tail-calls/ret-ty-modulo-anonymization.rs @@ -1,4 +1,5 @@ // Ensure that we anonymize the output of a function for tail call signature compatibility. +#![allow(todo_macro_calls)] //@ check-pass diff --git a/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.rs b/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.rs index cb265aa7f25b8..a715e9139381b 100644 --- a/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.rs +++ b/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![crate_type = "lib"] #[cfg(overflow_checks)] //~ ERROR `cfg(overflow_checks)` is experimental diff --git a/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr b/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr index d5c0cd5927a89..87a6370d7260d 100644 --- a/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr @@ -1,5 +1,5 @@ error[E0658]: `cfg(overflow_checks)` is experimental and subject to change - --> $DIR/feature-gate-cfg_overflow_checks.rs:3:7 + --> $DIR/feature-gate-cfg_overflow_checks.rs:4:7 | LL | #[cfg(overflow_checks)] | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/feature-gates/feature-gate-global-registration.rs b/tests/ui/feature-gates/feature-gate-global-registration.rs index 6ac3671209033..e07da16a3caa5 100644 --- a/tests/ui/feature-gates/feature-gate-global-registration.rs +++ b/tests/ui/feature-gates/feature-gate-global-registration.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] todo!(); //~ ERROR fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-global-registration.stderr b/tests/ui/feature-gates/feature-gate-global-registration.stderr index 5da1721d99dd7..48bbe89655532 100644 --- a/tests/ui/feature-gates/feature-gate-global-registration.stderr +++ b/tests/ui/feature-gates/feature-gate-global-registration.stderr @@ -1,5 +1,5 @@ error: expected one of `!` or `::`, found `(` - --> $DIR/feature-gate-global-registration.rs:1:1 + --> $DIR/feature-gate-global-registration.rs:2:1 | LL | todo!(); | ^^^^^^^ diff --git a/tests/ui/fn/fn_def_opaque_coercion.rs b/tests/ui/fn/fn_def_opaque_coercion.rs index 8235878c59d7a..85fcfa5ac78f3 100644 --- a/tests/ui/fn/fn_def_opaque_coercion.rs +++ b/tests/ui/fn/fn_def_opaque_coercion.rs @@ -1,5 +1,6 @@ //! Test that coercing between function items of the same function, //! but with different generic args works. +#![allow(todo_macro_calls)] //@check-pass diff --git a/tests/ui/fn/fn_def_opaque_coercion_to_fn_ptr.rs b/tests/ui/fn/fn_def_opaque_coercion_to_fn_ptr.rs index e090b7039b8d7..1246d466bfc9f 100644 --- a/tests/ui/fn/fn_def_opaque_coercion_to_fn_ptr.rs +++ b/tests/ui/fn/fn_def_opaque_coercion_to_fn_ptr.rs @@ -1,5 +1,6 @@ //! Test that coercing between function items of different functions works, //! as long as their signatures match. The resulting value is a function pointer. +#![allow(todo_macro_calls)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/fn/fn_def_opaque_coercion_to_fn_ptr.stderr b/tests/ui/fn/fn_def_opaque_coercion_to_fn_ptr.stderr index 4a0991d0eb3cb..372683a3cc476 100644 --- a/tests/ui/fn/fn_def_opaque_coercion_to_fn_ptr.stderr +++ b/tests/ui/fn/fn_def_opaque_coercion_to_fn_ptr.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/fn_def_opaque_coercion_to_fn_ptr.rs:19:9 + --> $DIR/fn_def_opaque_coercion_to_fn_ptr.rs:20:9 | LL | type F = impl Sized; | ---------- the expected opaque type @@ -13,7 +13,7 @@ LL | x = foo::<()>; found fn item `fn(()) -> () {foo::<()>}` error[E0308]: mismatched types - --> $DIR/fn_def_opaque_coercion_to_fn_ptr.rs:29:9 + --> $DIR/fn_def_opaque_coercion_to_fn_ptr.rs:30:9 | LL | fn foo(t: T) -> T { | -------------------- function `foo` defined here diff --git a/tests/ui/function-pointer/issue-102289.rs b/tests/ui/function-pointer/issue-102289.rs index 54e76189ec65a..6ea3c3d9baef4 100644 --- a/tests/ui/function-pointer/issue-102289.rs +++ b/tests/ui/function-pointer/issue-102289.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] pub(crate) trait Parser: Sized { type Output; diff --git a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr index d6294efbd2803..0cd58728bc867 100644 --- a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr +++ b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.next.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/ambig-hr-projection-issue-93340.rs:16:5 + --> $DIR/ambig-hr-projection-issue-93340.rs:17:5 | LL | cmp_eq | ^^^^^^ cannot infer type of the type parameter `A` declared on the function `cmp_eq` diff --git a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr index 58ed71fad4a66..5c339e9f97e8f 100644 --- a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr +++ b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.old.stderr @@ -1,12 +1,12 @@ error[E0283]: type annotations needed - --> $DIR/ambig-hr-projection-issue-93340.rs:16:5 + --> $DIR/ambig-hr-projection-issue-93340.rs:17:5 | LL | cmp_eq | ^^^^^^ cannot infer type of the type parameter `A` declared on the function `cmp_eq` | = note: the type must implement `Scalar` note: required by a bound in `cmp_eq` - --> $DIR/ambig-hr-projection-issue-93340.rs:10:22 + --> $DIR/ambig-hr-projection-issue-93340.rs:11:22 | LL | fn cmp_eq<'a, 'b, A: Scalar, B: Scalar, O: Scalar>(a: A::RefType<'a>, b: B::RefType<'b>) -> O { | ^^^^^^ required by this bound in `cmp_eq` diff --git a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs index acfebad38db0c..47ea7ae7619b0 100644 --- a/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs +++ b/tests/ui/generic-associated-types/ambig-hr-projection-issue-93340.rs @@ -1,6 +1,7 @@ //@ revisions: old next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver +#![allow(todo_macro_calls)] pub trait Scalar: 'static { type RefType<'a>: ScalarRef<'a>; } diff --git a/tests/ui/generic-associated-types/elided-in-expr-position.rs b/tests/ui/generic-associated-types/elided-in-expr-position.rs index e40093305c403..516182ec3290c 100644 --- a/tests/ui/generic-associated-types/elided-in-expr-position.rs +++ b/tests/ui/generic-associated-types/elided-in-expr-position.rs @@ -1,4 +1,4 @@ -#![allow(unused)] +#![allow(unused, todo_macro_calls)] pub trait Trait { type Assoc<'a> where Self: 'a; diff --git a/tests/ui/generic-associated-types/equality-bound.rs b/tests/ui/generic-associated-types/equality-bound.rs index c136a6d4bdf2e..593241ba6402e 100644 --- a/tests/ui/generic-associated-types/equality-bound.rs +++ b/tests/ui/generic-associated-types/equality-bound.rs @@ -1,3 +1,5 @@ +#![allow(todo_macro_calls)] + fn sum>(i: I) -> i32 where I::Item = i32 { //~^ ERROR equality constraints are not yet supported in `where` clauses panic!() diff --git a/tests/ui/generic-associated-types/equality-bound.stderr b/tests/ui/generic-associated-types/equality-bound.stderr index 0ceb5e329ab3a..e9f8cd8a5a540 100644 --- a/tests/ui/generic-associated-types/equality-bound.stderr +++ b/tests/ui/generic-associated-types/equality-bound.stderr @@ -1,5 +1,5 @@ error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:1:51 + --> $DIR/equality-bound.rs:3:51 | LL | fn sum>(i: I) -> i32 where I::Item = i32 { | ^^^^^^^^^^^^^ not supported @@ -12,7 +12,7 @@ LL + fn sum>(i: I) -> i32 { | error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:5:41 + --> $DIR/equality-bound.rs:7:41 | LL | fn sum2(i: I) -> i32 where I::Item = i32 { | ^^^^^^^^^^^^^ not supported @@ -25,7 +25,7 @@ LL + fn sum2>(i: I) -> i32 { | error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:9:41 + --> $DIR/equality-bound.rs:11:41 | LL | fn sum3(i: J) -> i32 where I::Item = i32 { | ^^^^^^^^^^^^^ not supported @@ -33,7 +33,7 @@ LL | fn sum3(i: J) -> i32 where I::Item = i32 { = note: see issue #20041 for more information error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:20:58 + --> $DIR/equality-bound.rs:22:58 | LL | fn from_iter(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A, | ^^^^^^^^^^^^^^^^^^^^^^ not supported @@ -46,7 +46,7 @@ LL + fn from_iter(_: T) -> Self where T: IntoIterator, | error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:31:58 + --> $DIR/equality-bound.rs:33:58 | LL | fn from_iter(_: T) -> Self where T: IntoIterator, T::Item = A, | ^^^^^^^^^^^ not supported @@ -59,7 +59,7 @@ LL + fn from_iter(_: T) -> Self where T: IntoIterator, | error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:42:55 + --> $DIR/equality-bound.rs:44:55 | LL | fn from_iter(_: T) -> Self where IntoIterator::Item = A, | ^^^^^^^^^^^^^^^^^^^^^^ not supported @@ -72,7 +72,7 @@ LL + fn from_iter>(_: T) -> Self | error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:53:55 + --> $DIR/equality-bound.rs:55:55 | LL | fn from_iter(_: T) -> Self where T::Item = A, | ^^^^^^^^^^^ not supported @@ -85,7 +85,7 @@ LL + fn from_iter>(_: T) -> Self | error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:64:41 + --> $DIR/equality-bound.rs:66:41 | LL | fn from_iter(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator, | ^^^^^^^^^^^^^^^^^^^^^^ not supported @@ -98,7 +98,7 @@ LL + fn from_iter(_: T) -> Self where T: IntoIterator, | error: equality constraints are not yet supported in `where` clauses - --> $DIR/equality-bound.rs:75:41 + --> $DIR/equality-bound.rs:77:41 | LL | fn from_iter(_: T) -> Self where T::Item = A, T: IntoIterator, | ^^^^^^^^^^^ not supported @@ -111,7 +111,7 @@ LL + fn from_iter(_: T) -> Self where T: IntoIterator, | error[E0425]: cannot find type `A` in this scope - --> $DIR/equality-bound.rs:20:79 + --> $DIR/equality-bound.rs:22:79 | LL | fn from_iter(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A, | ^ @@ -126,7 +126,7 @@ LL + fn from_iter(_: T) -> Self where T: IntoIterator, IntoIterator::Item | error[E0425]: cannot find type `A` in this scope - --> $DIR/equality-bound.rs:31:68 + --> $DIR/equality-bound.rs:33:68 | LL | fn from_iter(_: T) -> Self where T: IntoIterator, T::Item = A, | ^ @@ -141,7 +141,7 @@ LL + fn from_iter(_: T) -> Self where T: IntoIterator, T::Item = K, | error[E0425]: cannot find type `A` in this scope - --> $DIR/equality-bound.rs:42:76 + --> $DIR/equality-bound.rs:44:76 | LL | fn from_iter(_: T) -> Self where IntoIterator::Item = A, | ^ @@ -156,7 +156,7 @@ LL + fn from_iter(_: T) -> Self where IntoIterator::Item = | error[E0425]: cannot find type `A` in this scope - --> $DIR/equality-bound.rs:53:65 + --> $DIR/equality-bound.rs:55:65 | LL | struct K {} | -------- similarly named struct `K` defined here @@ -171,7 +171,7 @@ LL + fn from_iter(_: T) -> Self where T::Item = K, | error[E0425]: cannot find type `A` in this scope - --> $DIR/equality-bound.rs:64:62 + --> $DIR/equality-bound.rs:66:62 | LL | struct K {} | -------- similarly named struct `K` defined here @@ -186,7 +186,7 @@ LL + fn from_iter(_: T) -> Self where IntoIterator::Item = K, T: IntoIter | error[E0425]: cannot find type `A` in this scope - --> $DIR/equality-bound.rs:75:51 + --> $DIR/equality-bound.rs:77:51 | LL | struct K {} | -------- similarly named struct `K` defined here @@ -201,7 +201,7 @@ LL + fn from_iter(_: T) -> Self where T::Item = K, T: IntoIterator, | error[E0433]: cannot find type `I` in this scope - --> $DIR/equality-bound.rs:9:41 + --> $DIR/equality-bound.rs:11:41 | LL | fn sum3(i: J) -> i32 where I::Item = i32 { | ^ use of undeclared type `I` diff --git a/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs b/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs index ec6dfb87f61bf..cf772e611dce4 100644 --- a/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs +++ b/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] use std::ops::Deref; trait PointerFamily { diff --git a/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr b/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr index 674e28829073f..22ad107af1981 100644 --- a/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr +++ b/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr @@ -1,12 +1,12 @@ error[E0277]: the size for values of type `(dyn Deref + 'static)` cannot be known at compilation time - --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:10:23 + --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:11:23 | LL | type Pointer = dyn Deref; | ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `(dyn Deref + 'static)` note: required by a bound in `PointerFamily::Pointer` - --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:4:5 + --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:5:5 | LL | type Pointer: Deref; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `PointerFamily::Pointer` @@ -16,7 +16,7 @@ LL | type Pointer: Deref + ?Sized; | ++++++++ error[E0599]: the variant, associated function, or constant `new` exists for enum `Node`, but its trait bounds were not satisfied - --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:31:35 + --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:32:35 | LL | enum Node { | ------------------------------ variant, associated function, or constant `new` not found for this enum @@ -25,7 +25,7 @@ LL | let mut list = RcNode::::new(); | ^^^ variant, associated function, or constant cannot be called on `Node` due to unsatisfied trait bounds | note: trait bound `(dyn Deref> + 'static): Sized` was not satisfied - --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:23:29 + --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:24:29 | LL | impl Node | ---------- diff --git a/tests/ui/generic-associated-types/issue-74684-1.rs b/tests/ui/generic-associated-types/issue-74684-1.rs index e9ec80074f896..5439d1ac34248 100644 --- a/tests/ui/generic-associated-types/issue-74684-1.rs +++ b/tests/ui/generic-associated-types/issue-74684-1.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] trait Fun { type F<'a>: ?Sized; diff --git a/tests/ui/generic-associated-types/issue-74684-1.stderr b/tests/ui/generic-associated-types/issue-74684-1.stderr index 4bc13d7b2894d..93bca3dfd3ca3 100644 --- a/tests/ui/generic-associated-types/issue-74684-1.stderr +++ b/tests/ui/generic-associated-types/issue-74684-1.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/issue-74684-1.rs:13:26 + --> $DIR/issue-74684-1.rs:14:26 | LL | fn bug<'a, T: ?Sized + Fun = [u8]>>(_ : Box) -> &'static T::F<'a> { | -- lifetime `'a` defined here diff --git a/tests/ui/generic-associated-types/issue-74684-2.rs b/tests/ui/generic-associated-types/issue-74684-2.rs index 96cdb01be3b60..4c27d37692fb9 100644 --- a/tests/ui/generic-associated-types/issue-74684-2.rs +++ b/tests/ui/generic-associated-types/issue-74684-2.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] trait Fun { type F<'a>: ?Sized; diff --git a/tests/ui/generic-associated-types/issue-74684-2.stderr b/tests/ui/generic-associated-types/issue-74684-2.stderr index d39513ec523af..7b72a9b3e787a 100644 --- a/tests/ui/generic-associated-types/issue-74684-2.stderr +++ b/tests/ui/generic-associated-types/issue-74684-2.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving `<{integer} as Fun>::F<'_> == [u8]` - --> $DIR/issue-74684-2.rs:21:9 + --> $DIR/issue-74684-2.rs:22:9 | LL | bug(Box::new(x)); | --- ^^^^^^^^^^^ type mismatch resolving `<{integer} as Fun>::F<'_> == [u8]` @@ -7,18 +7,18 @@ LL | bug(Box::new(x)); | required by a bound introduced by this call | note: expected this to be `[u8]` - --> $DIR/issue-74684-2.rs:8:18 + --> $DIR/issue-74684-2.rs:9:18 | LL | type F<'a> = i32; | ^^^ note: required by a bound in `bug` - --> $DIR/issue-74684-2.rs:11:28 + --> $DIR/issue-74684-2.rs:12:28 | LL | fn bug<'a, T: ?Sized + Fun = [u8]>>(t: Box) -> &'static T::F<'a> { | ^^^^^^^^^^^^ required by this bound in `bug` error[E0597]: `a` does not live long enough - --> $DIR/issue-74684-2.rs:13:25 + --> $DIR/issue-74684-2.rs:14:25 | LL | fn bug<'a, T: ?Sized + Fun = [u8]>>(t: Box) -> &'static T::F<'a> { | -- lifetime `'a` defined here diff --git a/tests/ui/generic-associated-types/issue-79636-1.rs b/tests/ui/generic-associated-types/issue-79636-1.rs index 3357afb9d4dce..b3452e9fa56c1 100644 --- a/tests/ui/generic-associated-types/issue-79636-1.rs +++ b/tests/ui/generic-associated-types/issue-79636-1.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] trait Monad { type Unwrapped; type Wrapped; diff --git a/tests/ui/generic-associated-types/issue-79636-1.stderr b/tests/ui/generic-associated-types/issue-79636-1.stderr index c31064dec6296..b677ccac956a5 100644 --- a/tests/ui/generic-associated-types/issue-79636-1.stderr +++ b/tests/ui/generic-associated-types/issue-79636-1.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `Monad::Wrapped` - --> $DIR/issue-79636-1.rs:14:34 + --> $DIR/issue-79636-1.rs:15:34 | LL | MInner: Monad>, | ^^^^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `B` - --> $DIR/issue-79636-1.rs:3:10 + --> $DIR/issue-79636-1.rs:4:10 | LL | type Wrapped; | ^^^^^^^ - @@ -15,7 +15,7 @@ LL | MInner: Monad = MOuter::Wrapped>, | +++ error[E0277]: the size for values of type `Self` cannot be known at compilation time - --> $DIR/issue-79636-1.rs:5:19 + --> $DIR/issue-79636-1.rs:6:19 | LL | fn bind(self, f: F) -> Self::Wrapped { | ^^^^ doesn't have a size known at compile-time @@ -31,7 +31,7 @@ LL | fn bind(&self, f: F) -> Self::Wrapped { | + error[E0277]: the trait bound `Option>: Monad` is not satisfied - --> $DIR/issue-79636-1.rs:21:21 + --> $DIR/issue-79636-1.rs:22:21 | LL | assert_eq!(join(Some(Some(true))), Some(true)); | ---- ^^^^^^^^^^^^^^^^ the trait `Monad` is not implemented for `Option>` @@ -39,12 +39,12 @@ LL | assert_eq!(join(Some(Some(true))), Some(true)); | required by a bound introduced by this call | help: this trait has no implementations, consider adding one - --> $DIR/issue-79636-1.rs:1:1 + --> $DIR/issue-79636-1.rs:2:1 | LL | trait Monad { | ^^^^^^^^^^^ note: required by a bound in `join` - --> $DIR/issue-79636-1.rs:13:13 + --> $DIR/issue-79636-1.rs:14:13 | LL | fn join(outer: MOuter) -> MOuter::Wrapped | ---- required by a bound in this function diff --git a/tests/ui/generic-associated-types/issue-80433-reduced.rs b/tests/ui/generic-associated-types/issue-80433-reduced.rs index db169c8be0ad6..13a668b93462e 100644 --- a/tests/ui/generic-associated-types/issue-80433-reduced.rs +++ b/tests/ui/generic-associated-types/issue-80433-reduced.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] struct E {} diff --git a/tests/ui/generic-associated-types/issue-86787.rs b/tests/ui/generic-associated-types/issue-86787.rs index 43c193b91d05f..3e5989d247d2f 100644 --- a/tests/ui/generic-associated-types/issue-86787.rs +++ b/tests/ui/generic-associated-types/issue-86787.rs @@ -1,4 +1,5 @@ //@ check-fail +#![allow(todo_macro_calls)] enum Either { Left(L), diff --git a/tests/ui/generic-associated-types/issue-86787.stderr b/tests/ui/generic-associated-types/issue-86787.stderr index 00795abbd05d4..ec10d675d2ec2 100644 --- a/tests/ui/generic-associated-types/issue-86787.stderr +++ b/tests/ui/generic-associated-types/issue-86787.stderr @@ -1,5 +1,5 @@ error: missing required bound on `TRef` - --> $DIR/issue-86787.rs:10:5 + --> $DIR/issue-86787.rs:11:5 | LL | type TRef<'a>; | ^^^^^^^^^^^^^- @@ -10,7 +10,7 @@ LL | type TRef<'a>; = note: we are soliciting feedback, see issue #87479 for more information error[E0276]: impl has stricter requirements than trait - --> $DIR/issue-86787.rs:25:37 + --> $DIR/issue-86787.rs:26:37 | LL | type TRef<'a>; | ------------- definition of `TRef` from trait @@ -19,7 +19,7 @@ LL | ::T: 'a, | ^^ impl has extra requirement `::T: 'a` error[E0276]: impl has stricter requirements than trait - --> $DIR/issue-86787.rs:26:38 + --> $DIR/issue-86787.rs:27:38 | LL | type TRef<'a>; | ------------- definition of `TRef` from trait diff --git a/tests/ui/generic-associated-types/issue-88287.rs b/tests/ui/generic-associated-types/issue-88287.rs index ce0b9827d1103..cab38f3395c2f 100644 --- a/tests/ui/generic-associated-types/issue-88287.rs +++ b/tests/ui/generic-associated-types/issue-88287.rs @@ -1,4 +1,5 @@ //@ edition:2018 +#![allow(todo_macro_calls)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/generic-associated-types/issue-88287.stderr b/tests/ui/generic-associated-types/issue-88287.stderr index 71cd6677e63fb..fc37ccb300cb8 100644 --- a/tests/ui/generic-associated-types/issue-88287.stderr +++ b/tests/ui/generic-associated-types/issue-88287.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `A` cannot be known at compilation time - --> $DIR/issue-88287.rs:35:9 + --> $DIR/issue-88287.rs:36:9 | LL | type SearchFutureTy<'f, A, B: 'f> | - this type parameter needs to be `Sized` @@ -8,7 +8,7 @@ LL | async move { todo!() } | ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | note: required by an implicit `Sized` bound in `>` - --> $DIR/issue-88287.rs:24:6 + --> $DIR/issue-88287.rs:25:6 | LL | impl SearchableResourceExt for T | ^ required by the implicit `Sized` requirement on this type parameter in `>` diff --git a/tests/ui/generic-associated-types/rigid-hr-projection-issue-93340.rs b/tests/ui/generic-associated-types/rigid-hr-projection-issue-93340.rs index b55ca845cd3f2..5940ba943b436 100644 --- a/tests/ui/generic-associated-types/rigid-hr-projection-issue-93340.rs +++ b/tests/ui/generic-associated-types/rigid-hr-projection-issue-93340.rs @@ -1,6 +1,7 @@ //@ revisions: old next //@[next] compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] pub trait Scalar: 'static { type RefType<'a>: ScalarRef<'a>; diff --git a/tests/ui/generic-const-items/user_type_annotations_pattern.rs b/tests/ui/generic-const-items/user_type_annotations_pattern.rs index aa3846df2bca2..7fa64e2c4709b 100644 --- a/tests/ui/generic-const-items/user_type_annotations_pattern.rs +++ b/tests/ui/generic-const-items/user_type_annotations_pattern.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(generic_const_items)] #![expect(incomplete_features)] diff --git a/tests/ui/generic-const-items/user_type_annotations_pattern.stderr b/tests/ui/generic-const-items/user_type_annotations_pattern.stderr index e15be275d2976..b24dcd3d4a131 100644 --- a/tests/ui/generic-const-items/user_type_annotations_pattern.stderr +++ b/tests/ui/generic-const-items/user_type_annotations_pattern.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/user_type_annotations_pattern.rs:8:9 + --> $DIR/user_type_annotations_pattern.rs:9:9 | LL | fn bar<'a>() { | -- lifetime `'a` defined here diff --git a/tests/ui/higher-ranked/trait-bounds/issue-102899.rs b/tests/ui/higher-ranked/trait-bounds/issue-102899.rs index 77d4d0179b1ba..a262380465394 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-102899.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-102899.rs @@ -1,6 +1,7 @@ //@ check-pass //@ revisions: old next //@[next] compile-flags: -Znext-solver +#![allow(todo_macro_calls)] pub trait BufferTrait<'buffer> { type Subset<'channel> diff --git a/tests/ui/higher-ranked/trait-bounds/issue-88446.rs b/tests/ui/higher-ranked/trait-bounds/issue-88446.rs index 8e42465b929a4..2f57d91547a36 100644 --- a/tests/ui/higher-ranked/trait-bounds/issue-88446.rs +++ b/tests/ui/higher-ranked/trait-bounds/issue-88446.rs @@ -2,6 +2,7 @@ //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver +#![allow(todo_macro_calls)] trait Yokeable<'a> { type Output: 'a; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs index 7e78138a75b97..64e3e29522f12 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-80706.rs @@ -1,5 +1,6 @@ //@ build-pass //@ edition:2018 +#![allow(todo_macro_calls)] type BoxFuture = std::pin::Pin>>; diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr index 723dd097f9b97..48dbeb70938d3 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.next.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed for `>::Out<_>` - --> $DIR/norm-before-method-resolution-opaque-type.rs:25:9 + --> $DIR/norm-before-method-resolution-opaque-type.rs:26:9 | LL | let x = *x; | ^ diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr index d8b94fd4f7d1b..cc4087c028e08 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.old.stderr @@ -1,5 +1,5 @@ error[E0507]: cannot move out of `*x` which is behind a shared reference - --> $DIR/norm-before-method-resolution-opaque-type.rs:25:13 + --> $DIR/norm-before-method-resolution-opaque-type.rs:26:13 | LL | let x = *x; | ^^ move occurs because `*x` has type `>::Out`, which does not implement the `Copy` trait diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs index 55e99171ea633..ffb4412b7faad 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs @@ -1,5 +1,6 @@ //@ revisions: old next //@[next] compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // In the next solver, the opaque was previously defined by using the where-bound when checking // whether the alias is `Sized`, constraining the opaque. Instead, the alias-bound is now used, diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs index f0e13a74b2c88..91283d6526a95 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] // We normalize and check bounds before we resolve the generics // of the function (which we know because of the return type). diff --git a/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.next.stderr b/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.next.stderr index 31d74d1c022a1..19a7b127d6ca7 100644 --- a/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.next.stderr +++ b/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.next.stderr @@ -1,5 +1,5 @@ error[E0284]: type annotations needed: cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc normalizes-to >::Assoc` - --> $DIR/rigid-equate-projections-in-higher-ranked-fn-signature.rs:27:50 + --> $DIR/rigid-equate-projections-in-higher-ranked-fn-signature.rs:28:50 | LL | let _: for<'a> fn(<_ as Trait<'a>>::Assoc) = foo::(); | ^^^^^^^^^^ cannot satisfy `for<'a> <_ as Trait<'a>>::Assoc normalizes-to >::Assoc` diff --git a/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs b/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs index 10dbc2a4a825c..a633d8d156b5b 100644 --- a/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs +++ b/tests/ui/higher-ranked/trait-bounds/rigid-equate-projections-in-higher-ranked-fn-signature.rs @@ -3,6 +3,7 @@ //@[next] compile-flags: -Znext-solver //@[next] check-fail //@ ignore-compare-mode-next-solver (explicit revisions) +#![allow(todo_macro_calls)] /// This triggers an ICE with (and without) `--emit metadata` using the old /// trait solver: diff --git a/tests/ui/impl-trait/autoderef.rs b/tests/ui/impl-trait/autoderef.rs index 7802f725d6faa..8b683e5b1c413 100644 --- a/tests/ui/impl-trait/autoderef.rs +++ b/tests/ui/impl-trait/autoderef.rs @@ -2,6 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] use std::path::Path; use std::ffi::OsStr; diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed index d8eceeff67888..83f3397964dd7 100644 --- a/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed +++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.fixed @@ -1,6 +1,6 @@ //@ run-rustfix -#![allow(dead_code)] +#![allow(dead_code, todo_macro_uses)] struct S(T); struct S2; diff --git a/tests/ui/impl-trait/extra-impl-in-trait-impl.rs b/tests/ui/impl-trait/extra-impl-in-trait-impl.rs index c2e511c0d055b..09416edd33dc7 100644 --- a/tests/ui/impl-trait/extra-impl-in-trait-impl.rs +++ b/tests/ui/impl-trait/extra-impl-in-trait-impl.rs @@ -1,6 +1,6 @@ //@ run-rustfix -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] struct S(T); struct S2; diff --git a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs index e75cfc88ef45c..5b88347da5618 100644 --- a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs +++ b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.rs @@ -1,6 +1,7 @@ //@ edition:2015 //@ check-pass // issue: 114664 +#![allow(todo_macro_calls)] fn ice() -> impl AsRef { //~^ WARN trait objects without an explicit `dyn` are deprecated diff --git a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr index 447f236def350..b2538dba2685c 100644 --- a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr +++ b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr @@ -1,5 +1,5 @@ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/fresh-lifetime-from-bare-trait-obj-114664.rs:5:24 + --> $DIR/fresh-lifetime-from-bare-trait-obj-114664.rs:6:24 | LL | fn ice() -> impl AsRef { | ^^^^^^^ @@ -13,7 +13,7 @@ LL | fn ice() -> impl AsRef { | +++ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/fresh-lifetime-from-bare-trait-obj-114664.rs:5:24 + --> $DIR/fresh-lifetime-from-bare-trait-obj-114664.rs:6:24 | LL | fn ice() -> impl AsRef { | ^^^^^^^ diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs index a419f3a2acf1c..09561c78f98da 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs @@ -2,7 +2,7 @@ //@[pre2021] edition:2015..2021 //@[edition2021] edition:2021 -#![allow(warnings)] +#![allow(warnings, todo_macro_calls)] fn ice() -> impl AsRef { //[pre2021]~^ ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277] diff --git a/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs b/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs index 869d44d9e3b76..45084b7fdc8a0 100644 --- a/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs +++ b/tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs @@ -1,6 +1,7 @@ //@ check-pass //@ edition: 2021 // issue: 113796 +#![allow(todo_macro_calls)] trait AsyncLendingIterator { diff --git a/tests/ui/impl-trait/in-trait/cycle-if-impl-doesnt-apply.rs b/tests/ui/impl-trait/in-trait/cycle-if-impl-doesnt-apply.rs index 72e08ed350426..5da7108bf9ca3 100644 --- a/tests/ui/impl-trait/in-trait/cycle-if-impl-doesnt-apply.rs +++ b/tests/ui/impl-trait/in-trait/cycle-if-impl-doesnt-apply.rs @@ -3,6 +3,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ edition: 2024 +#![allow(todo_macro_calls)] // Regression test for . // Avoid unnecessarily computing the RPITIT type of the first impl when checking the WF of the diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs b/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs index 5b891170a4f10..f3d440800ab36 100644 --- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs +++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs @@ -1,4 +1,5 @@ //@ aux-build: rpitit.rs +#![allow(todo_macro_calls)] extern crate rpitit; diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr index 68ac765a3c1e5..3d3c966a439a4 100644 --- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr +++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr @@ -1,5 +1,5 @@ error[E0038]: the trait `Foo` is not dyn compatible - --> $DIR/foreign-dyn-error.rs:6:17 + --> $DIR/foreign-dyn-error.rs:7:17 | LL | let _: &dyn rpitit::Foo = todo!(); | ^^^^^^^^^^^ `Foo` is not dyn compatible diff --git a/tests/ui/impl-trait/in-trait/refine-err.rs b/tests/ui/impl-trait/in-trait/refine-err.rs index 7518cee97c444..4795b46c72245 100644 --- a/tests/ui/impl-trait/in-trait/refine-err.rs +++ b/tests/ui/impl-trait/in-trait/refine-err.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![deny(refining_impl_trait)] trait FromRow { diff --git a/tests/ui/impl-trait/in-trait/refine-err.stderr b/tests/ui/impl-trait/in-trait/refine-err.stderr index d667b1209dd03..479e86a18bdb4 100644 --- a/tests/ui/impl-trait/in-trait/refine-err.stderr +++ b/tests/ui/impl-trait/in-trait/refine-err.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `T` in this scope - --> $DIR/refine-err.rs:4:38 + --> $DIR/refine-err.rs:5:38 | LL | fn prepare(self) -> impl Fn() -> T; | ^ not found in this scope diff --git a/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed b/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed index 6764ab002a9d6..642f23e77f0cc 100644 --- a/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed +++ b/tests/ui/impl-trait/in-trait/suggest-missing-item.fixed @@ -1,7 +1,7 @@ //@ edition:2021 //@ run-rustfix -#![allow(dead_code)] +#![allow(dead_code, todo_macro_uses)] trait Trait { #[allow(async_fn_in_trait)] async fn foo(); diff --git a/tests/ui/impl-trait/in-trait/suggest-missing-item.rs b/tests/ui/impl-trait/in-trait/suggest-missing-item.rs index 99a8bfe79fd28..cffb04ace68b8 100644 --- a/tests/ui/impl-trait/in-trait/suggest-missing-item.rs +++ b/tests/ui/impl-trait/in-trait/suggest-missing-item.rs @@ -1,7 +1,7 @@ //@ edition:2021 //@ run-rustfix -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] trait Trait { #[allow(async_fn_in_trait)] async fn foo(); diff --git a/tests/ui/impl-trait/issues/issue-100075.rs b/tests/ui/impl-trait/issues/issue-100075.rs index ea30abb4855f3..f5198d2a7410f 100644 --- a/tests/ui/impl-trait/issues/issue-100075.rs +++ b/tests/ui/impl-trait/issues/issue-100075.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] trait Marker {} impl Marker for T {} diff --git a/tests/ui/impl-trait/issues/issue-100075.stderr b/tests/ui/impl-trait/issues/issue-100075.stderr index bca2874b2b4b1..234d01d6a9245 100644 --- a/tests/ui/impl-trait/issues/issue-100075.stderr +++ b/tests/ui/impl-trait/issues/issue-100075.stderr @@ -1,5 +1,5 @@ error[E0720]: cannot resolve opaque type - --> $DIR/issue-100075.rs:13:37 + --> $DIR/issue-100075.rs:14:37 | LL | fn _g(t: &'static T) -> &'static impl Marker { | ^^^^^^^^^^^ diff --git a/tests/ui/impl-trait/issues/issue-103181-1.current.stderr b/tests/ui/impl-trait/issues/issue-103181-1.current.stderr index c15b7e04c2614..e55115bf1bd9c 100644 --- a/tests/ui/impl-trait/issues/issue-103181-1.current.stderr +++ b/tests/ui/impl-trait/issues/issue-103181-1.current.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `Error` - --> $DIR/issue-103181-1.rs:12:5 + --> $DIR/issue-103181-1.rs:13:5 | LL | type Error; | ---------- `Error` from trait diff --git a/tests/ui/impl-trait/issues/issue-103181-1.next.stderr b/tests/ui/impl-trait/issues/issue-103181-1.next.stderr index c15b7e04c2614..e55115bf1bd9c 100644 --- a/tests/ui/impl-trait/issues/issue-103181-1.next.stderr +++ b/tests/ui/impl-trait/issues/issue-103181-1.next.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `Error` - --> $DIR/issue-103181-1.rs:12:5 + --> $DIR/issue-103181-1.rs:13:5 | LL | type Error; | ---------- `Error` from trait diff --git a/tests/ui/impl-trait/issues/issue-103181-1.rs b/tests/ui/impl-trait/issues/issue-103181-1.rs index fd8b72c1c756f..cb5b99294e6b4 100644 --- a/tests/ui/impl-trait/issues/issue-103181-1.rs +++ b/tests/ui/impl-trait/issues/issue-103181-1.rs @@ -2,6 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ edition:2021 +#![allow(todo_macro_calls)] mod hyper { use std::{fmt::Debug, future::Future, marker::PhantomData, pin::Pin, task::Poll}; diff --git a/tests/ui/impl-trait/issues/issue-87295.rs b/tests/ui/impl-trait/issues/issue-87295.rs index d8d1b462ca3b6..8e247b6878667 100644 --- a/tests/ui/impl-trait/issues/issue-87295.rs +++ b/tests/ui/impl-trait/issues/issue-87295.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] trait Trait { type Output; } diff --git a/tests/ui/impl-trait/issues/issue-87295.stderr b/tests/ui/impl-trait/issues/issue-87295.stderr index 31f3b2f5bf28e..7fe746277bcf4 100644 --- a/tests/ui/impl-trait/issues/issue-87295.stderr +++ b/tests/ui/impl-trait/issues/issue-87295.stderr @@ -1,5 +1,5 @@ error[E0562]: `impl Trait` is not allowed in the type of variable bindings - --> $DIR/issue-87295.rs:16:31 + --> $DIR/issue-87295.rs:17:31 | LL | let _do_not_waste: Struct> = Struct::new(()); | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/impl-trait/method/method-resolution.rs b/tests/ui/impl-trait/method/method-resolution.rs index 60fbacd86462b..931a00eab695b 100644 --- a/tests/ui/impl-trait/method/method-resolution.rs +++ b/tests/ui/impl-trait/method/method-resolution.rs @@ -1,5 +1,6 @@ //! Since there is only one possible `bar` method, we invoke it and subsequently //! constrain `foo`'s RPIT to `u32`. +#![allow(todo_macro_calls)] //@ revisions: current next //@[next] compile-flags: -Znext-solver diff --git a/tests/ui/impl-trait/method/method-resolution3.current.stderr b/tests/ui/impl-trait/method/method-resolution3.current.stderr index 87dd862ef8f4f..5a51252011890 100644 --- a/tests/ui/impl-trait/method/method-resolution3.current.stderr +++ b/tests/ui/impl-trait/method/method-resolution3.current.stderr @@ -1,16 +1,16 @@ error[E0034]: multiple applicable items in scope - --> $DIR/method-resolution3.rs:21:11 + --> $DIR/method-resolution3.rs:22:11 | LL | x.bar(); | ^^^ multiple `bar` found | note: candidate #1 is defined in an impl for the type `Bar` - --> $DIR/method-resolution3.rs:15:5 + --> $DIR/method-resolution3.rs:16:5 | LL | fn bar(self) {} | ^^^^^^^^^^^^ note: candidate #2 is defined in an impl for the type `Bar` - --> $DIR/method-resolution3.rs:11:5 + --> $DIR/method-resolution3.rs:12:5 | LL | fn bar(self) {} | ^^^^^^^^^^^^ diff --git a/tests/ui/impl-trait/method/method-resolution3.next.stderr b/tests/ui/impl-trait/method/method-resolution3.next.stderr index 87dd862ef8f4f..5a51252011890 100644 --- a/tests/ui/impl-trait/method/method-resolution3.next.stderr +++ b/tests/ui/impl-trait/method/method-resolution3.next.stderr @@ -1,16 +1,16 @@ error[E0034]: multiple applicable items in scope - --> $DIR/method-resolution3.rs:21:11 + --> $DIR/method-resolution3.rs:22:11 | LL | x.bar(); | ^^^ multiple `bar` found | note: candidate #1 is defined in an impl for the type `Bar` - --> $DIR/method-resolution3.rs:15:5 + --> $DIR/method-resolution3.rs:16:5 | LL | fn bar(self) {} | ^^^^^^^^^^^^ note: candidate #2 is defined in an impl for the type `Bar` - --> $DIR/method-resolution3.rs:11:5 + --> $DIR/method-resolution3.rs:12:5 | LL | fn bar(self) {} | ^^^^^^^^^^^^ diff --git a/tests/ui/impl-trait/method/method-resolution3.rs b/tests/ui/impl-trait/method/method-resolution3.rs index 8c47ef4fc75c7..812be7852892e 100644 --- a/tests/ui/impl-trait/method/method-resolution3.rs +++ b/tests/ui/impl-trait/method/method-resolution3.rs @@ -1,6 +1,7 @@ //! Check that we consider `Bar` to successfully unify //! with both `Bar` and `Bar` (in isolation), so we bail //! out with ambiguity. +#![allow(todo_macro_calls)] //@ revisions: current next //@[next] compile-flags: -Znext-solver diff --git a/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.current.stderr b/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.current.stderr index c54c1bba028cb..3673c86878cc6 100644 --- a/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.current.stderr +++ b/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.current.stderr @@ -1,5 +1,5 @@ error[E0369]: cannot add `{integer}` to `impl Sized` - --> $DIR/ambiguous-ops.rs:17:15 + --> $DIR/ambiguous-ops.rs:18:15 | LL | add() + 1 | ----- ^ - {integer} @@ -7,7 +7,7 @@ LL | add() + 1 | impl Sized error[E0368]: binary assignment operation `*=` cannot be applied to type `impl Sized` - --> $DIR/ambiguous-ops.rs:31:9 + --> $DIR/ambiguous-ops.rs:32:9 | LL | temp *= 2; | ----^^^^^ @@ -15,26 +15,26 @@ LL | temp *= 2; | cannot use `*=` on type `impl Sized` error[E0614]: type `DerefWrapper` cannot be dereferenced - --> $DIR/ambiguous-ops.rs:57:22 + --> $DIR/ambiguous-ops.rs:58:22 | LL | let _rarw = &*explicit_deref(); | ^^^^^^^^^^^^^^^^^ can't be dereferenced error[E0614]: type `DerefWrapper` cannot be dereferenced - --> $DIR/ambiguous-ops.rs:69:9 + --> $DIR/ambiguous-ops.rs:70:9 | LL | *explicit_deref_mut() = 1; | ^^^^^^^^^^^^^^^^^^^^^ can't be dereferenced error[E0277]: the type `impl Sized` cannot be indexed by `_` - --> $DIR/ambiguous-ops.rs:94:18 + --> $DIR/ambiguous-ops.rs:95:18 | LL | let _y = explicit_index()[0]; | ^^^^^^^^^^^^^^^^ `impl Sized` cannot be indexed by `_` | = help: the trait `Index<_>` is not implemented for `impl Sized` note: required for `IndexWrapper` to implement `Index<_>` - --> $DIR/ambiguous-ops.rs:81:22 + --> $DIR/ambiguous-ops.rs:82:22 | LL | impl, U> Index for IndexWrapper { | -------- ^^^^^^^^ ^^^^^^^^^^^^^^^ @@ -42,14 +42,14 @@ LL | impl, U> Index for IndexWrapper { | unsatisfied trait bound introduced here error[E0277]: the type `impl Sized` cannot be indexed by `_` - --> $DIR/ambiguous-ops.rs:106:9 + --> $DIR/ambiguous-ops.rs:107:9 | LL | explicit_index_mut()[0] = 1; | ^^^^^^^^^^^^^^^^^^^^ `impl Sized` cannot be indexed by `_` | = help: the trait `Index<_>` is not implemented for `impl Sized` note: required for `IndexWrapper` to implement `Index<_>` - --> $DIR/ambiguous-ops.rs:81:22 + --> $DIR/ambiguous-ops.rs:82:22 | LL | impl, U> Index for IndexWrapper { | -------- ^^^^^^^^ ^^^^^^^^^^^^^^^ diff --git a/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.rs b/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.rs index 0aa5715339dc2..aaa81c834e128 100644 --- a/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.rs +++ b/tests/ui/impl-trait/non-defining-uses/ambiguous-ops.rs @@ -2,6 +2,7 @@ //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] check-pass +#![allow(todo_macro_calls)] // Make sure we support non-call operations for opaque types even if // its not part of its item bounds. diff --git a/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket-2.next.stderr b/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket-2.next.stderr index 86ac1bdad0416..274abc2e6d840 100644 --- a/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket-2.next.stderr +++ b/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket-2.next.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/avoid-inference-constraints-from-blanket-2.rs:27:18 + --> $DIR/avoid-inference-constraints-from-blanket-2.rs:28:18 | LL | let _: u32 = x; | --- ^ expected `u32`, found `u64` diff --git a/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket-2.rs b/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket-2.rs index b4f853de4aad3..07da305951d9b 100644 --- a/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket-2.rs +++ b/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket-2.rs @@ -2,6 +2,7 @@ //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@[current] check-pass +#![allow(todo_macro_calls)] // Regression test for trait-system-refactor-initiative#205. Avoid // constraining other impl arguments when applying blanket impls. diff --git a/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket.rs b/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket.rs index bb3acfde5bc87..2531945f86487 100644 --- a/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket.rs +++ b/tests/ui/impl-trait/non-defining-uses/avoid-inference-constraints-from-blanket.rs @@ -2,6 +2,7 @@ //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass +#![allow(todo_macro_calls)] // Regression test for trait-system-refactor-initiative#205. Avoid constraining // the opaque type when applying blanket impls. diff --git a/tests/ui/impl-trait/non-defining-uses/multiple-opaques-ambig.rs b/tests/ui/impl-trait/non-defining-uses/multiple-opaques-ambig.rs index e7aaf6fa135a9..fbe8efd1e7864 100644 --- a/tests/ui/impl-trait/non-defining-uses/multiple-opaques-ambig.rs +++ b/tests/ui/impl-trait/non-defining-uses/multiple-opaques-ambig.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass -#![allow(unconditional_recursion)] +#![allow(unconditional_recursion, todo_macro_calls)] // Regression test for trait-system-refactor-initiative#182. If multiple // opaque types result in different item bounds, do not apply them. diff --git a/tests/ui/impl-trait/non-defining-uses/multiple-opaques-ok.rs b/tests/ui/impl-trait/non-defining-uses/multiple-opaques-ok.rs index d91efe181e354..2959fd4767b49 100644 --- a/tests/ui/impl-trait/non-defining-uses/multiple-opaques-ok.rs +++ b/tests/ui/impl-trait/non-defining-uses/multiple-opaques-ok.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass -#![allow(unconditional_recursion)] +#![allow(unconditional_recursion, todo_macro_calls)] // Regression test for trait-system-refactor-initiative#18, making sure // we support being sub unified with more than 1 opaque type. diff --git a/tests/ui/impl-trait/non-defining-uses/no-rigid-alias.rs b/tests/ui/impl-trait/non-defining-uses/no-rigid-alias.rs index fca5db3e20f88..70ab1d3dff349 100644 --- a/tests/ui/impl-trait/non-defining-uses/no-rigid-alias.rs +++ b/tests/ui/impl-trait/non-defining-uses/no-rigid-alias.rs @@ -1,7 +1,7 @@ //@ compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass -#![allow(unconditional_recursion)] +#![allow(unconditional_recursion, todo_macro_calls)] // Test for trait-system-refactor-initiative#182 making sure // that we don't incorrectly normalize to rigid aliases if the diff --git a/tests/ui/impl-trait/non-defining-uses/use-item-bound.rs b/tests/ui/impl-trait/non-defining-uses/use-item-bound.rs index 36dcbacbe6fdf..b4d266b555136 100644 --- a/tests/ui/impl-trait/non-defining-uses/use-item-bound.rs +++ b/tests/ui/impl-trait/non-defining-uses/use-item-bound.rs @@ -2,7 +2,7 @@ //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass -#![allow(unconditional_recursion)] +#![allow(unconditional_recursion, todo_macro_calls)] // Regression test for trait-system-refactor-initiative#182. trait Id { diff --git a/tests/ui/impl-trait/opaque-used-in-extraneous-argument.rs b/tests/ui/impl-trait/opaque-used-in-extraneous-argument.rs index 8d4855c101c7c..ac46ba94cc3e5 100644 --- a/tests/ui/impl-trait/opaque-used-in-extraneous-argument.rs +++ b/tests/ui/impl-trait/opaque-used-in-extraneous-argument.rs @@ -1,6 +1,7 @@ //! This is a regression test to avoid an ICE in diagnostics code. //! A typo in the compiler used to get the DefId of FnOnce, and //! use it where an associated item was expected. +#![allow(todo_macro_calls)] fn frob() -> impl Fn + '_ {} //~^ ERROR missing lifetime specifier diff --git a/tests/ui/impl-trait/opaque-used-in-extraneous-argument.stderr b/tests/ui/impl-trait/opaque-used-in-extraneous-argument.stderr index ffa58f4faeeee..87686979d7e06 100644 --- a/tests/ui/impl-trait/opaque-used-in-extraneous-argument.stderr +++ b/tests/ui/impl-trait/opaque-used-in-extraneous-argument.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/opaque-used-in-extraneous-argument.rs:5:39 + --> $DIR/opaque-used-in-extraneous-argument.rs:6:39 | LL | fn frob() -> impl Fn + '_ {} | ^^ expected named lifetime parameter @@ -12,7 +12,7 @@ LL + fn frob() -> impl Fn + 'static {} | error[E0425]: cannot find type `P` in this scope - --> $DIR/opaque-used-in-extraneous-argument.rs:5:22 + --> $DIR/opaque-used-in-extraneous-argument.rs:6:22 | LL | fn frob() -> impl Fn + '_ {} | ^ not found in this scope @@ -23,7 +23,7 @@ LL | fn frob

() -> impl Fn + '_ {} | +++ error[E0425]: cannot find type `T` in this scope - --> $DIR/opaque-used-in-extraneous-argument.rs:5:34 + --> $DIR/opaque-used-in-extraneous-argument.rs:6:34 | LL | fn frob() -> impl Fn + '_ {} | ^ not found in this scope @@ -34,7 +34,7 @@ LL | fn frob() -> impl Fn + '_ {} | +++ error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change - --> $DIR/opaque-used-in-extraneous-argument.rs:5:19 + --> $DIR/opaque-used-in-extraneous-argument.rs:6:19 | LL | fn frob() -> impl Fn + '_ {} | ^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(P) -> T` @@ -44,7 +44,7 @@ LL | fn frob() -> impl Fn + '_ {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change - --> $DIR/opaque-used-in-extraneous-argument.rs:5:19 + --> $DIR/opaque-used-in-extraneous-argument.rs:6:19 | LL | fn frob() -> impl Fn + '_ {} | ^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(P) -> T` @@ -55,13 +55,13 @@ LL | fn frob() -> impl Fn + '_ {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0061]: this function takes 0 arguments but 1 argument was supplied - --> $DIR/opaque-used-in-extraneous-argument.rs:17:20 + --> $DIR/opaque-used-in-extraneous-argument.rs:18:20 | LL | let old_path = frob("hello"); | ^^^^ ------- unexpected argument of type `&'static str` | note: function defined here - --> $DIR/opaque-used-in-extraneous-argument.rs:5:4 + --> $DIR/opaque-used-in-extraneous-argument.rs:6:4 | LL | fn frob() -> impl Fn + '_ {} | ^^^^ @@ -72,13 +72,13 @@ LL + let old_path = frob(); | error[E0061]: this function takes 0 arguments but 1 argument was supplied - --> $DIR/opaque-used-in-extraneous-argument.rs:20:5 + --> $DIR/opaque-used-in-extraneous-argument.rs:21:5 | LL | open_parent(&old_path) | ^^^^^^^^^^^ --------- unexpected argument of type `&impl Fn<{type error}> + FnOnce<{type error}, Output = {type error}> + '_` | note: function defined here - --> $DIR/opaque-used-in-extraneous-argument.rs:12:4 + --> $DIR/opaque-used-in-extraneous-argument.rs:13:4 | LL | fn open_parent<'path>() { | ^^^^^^^^^^^ diff --git a/tests/ui/impl-trait/question_mark.rs b/tests/ui/impl-trait/question_mark.rs index d7c326b9e1c2a..85d6ed888b2a1 100644 --- a/tests/ui/impl-trait/question_mark.rs +++ b/tests/ui/impl-trait/question_mark.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] use std::fmt::Debug; diff --git a/tests/ui/impl-trait/recursive-parent-trait-method-call.rs b/tests/ui/impl-trait/recursive-parent-trait-method-call.rs index 4da9a06a4659b..38c089eb3e831 100644 --- a/tests/ui/impl-trait/recursive-parent-trait-method-call.rs +++ b/tests/ui/impl-trait/recursive-parent-trait-method-call.rs @@ -1,5 +1,6 @@ //! This test checks that we can resolve the `boxed` method call to `FutureExt`, //! because we know that the anonymous future does not implement `StreamExt`. +#![allow(todo_macro_calls)] //@ edition: 2021 //@ check-pass diff --git a/tests/ui/impl-trait/trait_upcasting.rs b/tests/ui/impl-trait/trait_upcasting.rs index ce811004fae19..3d54dd4c4428a 100644 --- a/tests/ui/impl-trait/trait_upcasting.rs +++ b/tests/ui/impl-trait/trait_upcasting.rs @@ -1,4 +1,5 @@ //! Test that we allow unsizing `Trait` to `Trait` and vice versa +#![allow(todo_macro_calls)] //@ check-pass diff --git a/tests/ui/impl-trait/trait_upcasting_reference_mismatch.rs b/tests/ui/impl-trait/trait_upcasting_reference_mismatch.rs index bed88db1accee..f470d19dd87a1 100644 --- a/tests/ui/impl-trait/trait_upcasting_reference_mismatch.rs +++ b/tests/ui/impl-trait/trait_upcasting_reference_mismatch.rs @@ -1,4 +1,5 @@ //! Show an uninformative diagnostic that we could possibly improve in the future +#![allow(todo_macro_calls)] trait Trait {} diff --git a/tests/ui/impl-trait/trait_upcasting_reference_mismatch.stderr b/tests/ui/impl-trait/trait_upcasting_reference_mismatch.stderr index 92da47b08e9f1..e527a4d3aeb86 100644 --- a/tests/ui/impl-trait/trait_upcasting_reference_mismatch.stderr +++ b/tests/ui/impl-trait/trait_upcasting_reference_mismatch.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/trait_upcasting_reference_mismatch.rs:7:35 + --> $DIR/trait_upcasting_reference_mismatch.rs:8:35 | LL | fn hello() -> &'static (dyn Trait + Send) { | ^^^^^^^^^^ cannot infer type diff --git a/tests/ui/impl-trait/unsize_adt.rs b/tests/ui/impl-trait/unsize_adt.rs index 825384b61e87a..ff8ff62bc4bca 100644 --- a/tests/ui/impl-trait/unsize_adt.rs +++ b/tests/ui/impl-trait/unsize_adt.rs @@ -1,4 +1,5 @@ //! Test that we allow unsizing `Foo<[Opaque; N]>` to `Foo<[Concrete]>`. +#![allow(todo_macro_calls)] //@check-pass diff --git a/tests/ui/impl-trait/unsize_slice.rs b/tests/ui/impl-trait/unsize_slice.rs index b0cf1c7ca6d26..7232c8f8f27ea 100644 --- a/tests/ui/impl-trait/unsize_slice.rs +++ b/tests/ui/impl-trait/unsize_slice.rs @@ -1,4 +1,5 @@ //! Test that we allow unsizing `[Opaque; N]` to `[Concrete]`. +#![allow(todo_macro_calls)] //@check-pass diff --git a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs index 48d9e290ffb55..caec4e1b23331 100644 --- a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs +++ b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] pub trait Foo { type Error: Error; diff --git a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs index 739f2081132fd..d06fd0dad267d 100644 --- a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs +++ b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-2.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] trait AsBufferView { type Device; diff --git a/tests/ui/implied-bounds/issue-100690.rs b/tests/ui/implied-bounds/issue-100690.rs index b0dbf749c4670..6db2fdc0a481c 100644 --- a/tests/ui/implied-bounds/issue-100690.rs +++ b/tests/ui/implied-bounds/issue-100690.rs @@ -1,5 +1,6 @@ // This code (probably) _should_ compile, but it currently does not because we // are not smart enough about implied bounds. +#![allow(todo_macro_calls)] use std::io; diff --git a/tests/ui/implied-bounds/issue-100690.stderr b/tests/ui/implied-bounds/issue-100690.stderr index d00895d8fc9cc..1288bdb561dc5 100644 --- a/tests/ui/implied-bounds/issue-100690.stderr +++ b/tests/ui/implied-bounds/issue-100690.stderr @@ -1,5 +1,5 @@ error[E0277]: expected a `FnOnce(&mut UIView<'_, T>)` closure, found `F` - --> $DIR/issue-100690.rs:34:23 + --> $DIR/issue-100690.rs:35:23 | LL | real_dispatch(f) | ------------- ^ expected an `FnOnce(&mut UIView<'_, T>)` closure, found `F` @@ -9,7 +9,7 @@ LL | real_dispatch(f) = note: expected a closure with signature `for<'a, 'b> fn(&'a mut UIView<'b, _>)` found a closure with signature `fn(&mut UIView<'a, _>)` note: required by a bound in `real_dispatch` - --> $DIR/issue-100690.rs:8:8 + --> $DIR/issue-100690.rs:9:8 | LL | fn real_dispatch(f: F) -> Result<(), io::Error> | ------------- required by a bound in this function diff --git a/tests/ui/implied-bounds/issue-101951.rs b/tests/ui/implied-bounds/issue-101951.rs index cbcde9834fbd6..e4a0a81d322f7 100644 --- a/tests/ui/implied-bounds/issue-101951.rs +++ b/tests/ui/implied-bounds/issue-101951.rs @@ -4,6 +4,7 @@ // inference variables when computing implied bounds. // //@ check-pass +#![allow(todo_macro_calls)] pub trait BuilderFn<'a> { type Output; } diff --git a/tests/ui/imports/import-alias-issue-121168.edition2015.stderr b/tests/ui/imports/import-alias-issue-121168.edition2015.stderr index 8dee8e5134448..60620bd53f3f6 100644 --- a/tests/ui/imports/import-alias-issue-121168.edition2015.stderr +++ b/tests/ui/imports/import-alias-issue-121168.edition2015.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `Foo` in this scope - --> $DIR/import-alias-issue-121168.rs:11:12 + --> $DIR/import-alias-issue-121168.rs:12:12 | LL | let _: Foo = todo!(); | ^^^ not found in this scope diff --git a/tests/ui/imports/import-alias-issue-121168.edition2018.stderr b/tests/ui/imports/import-alias-issue-121168.edition2018.stderr index 00b30b4c618f0..84be34ce6cba5 100644 --- a/tests/ui/imports/import-alias-issue-121168.edition2018.stderr +++ b/tests/ui/imports/import-alias-issue-121168.edition2018.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `Foo` in this scope - --> $DIR/import-alias-issue-121168.rs:11:12 + --> $DIR/import-alias-issue-121168.rs:12:12 | LL | let _: Foo = todo!(); | ^^^ not found in this scope diff --git a/tests/ui/imports/import-alias-issue-121168.edition2021.stderr b/tests/ui/imports/import-alias-issue-121168.edition2021.stderr index 00b30b4c618f0..84be34ce6cba5 100644 --- a/tests/ui/imports/import-alias-issue-121168.edition2021.stderr +++ b/tests/ui/imports/import-alias-issue-121168.edition2021.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `Foo` in this scope - --> $DIR/import-alias-issue-121168.rs:11:12 + --> $DIR/import-alias-issue-121168.rs:12:12 | LL | let _: Foo = todo!(); | ^^^ not found in this scope diff --git a/tests/ui/imports/import-alias-issue-121168.rs b/tests/ui/imports/import-alias-issue-121168.rs index 826a6765b0399..76ee67fc65629 100644 --- a/tests/ui/imports/import-alias-issue-121168.rs +++ b/tests/ui/imports/import-alias-issue-121168.rs @@ -4,6 +4,7 @@ //@ [edition2021] edition:2021 //@ compile-flags: --extern import_alias_issue_121168_extern //@ aux-build: import-alias-issue-121168-extern.rs +#![allow(todo_macro_calls)] extern crate import_alias_issue_121168_extern as nice_crate_name; diff --git a/tests/ui/inference/issue-104649.rs b/tests/ui/inference/issue-104649.rs index 4637b884d445d..fd92b0acbaa8d 100644 --- a/tests/ui/inference/issue-104649.rs +++ b/tests/ui/inference/issue-104649.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] type Result = ::std::result::Result; struct Error; diff --git a/tests/ui/inference/issue-104649.stderr b/tests/ui/inference/issue-104649.stderr index 27382e301341f..9821fa3323a31 100644 --- a/tests/ui/inference/issue-104649.stderr +++ b/tests/ui/inference/issue-104649.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed for `A, Error>>` - --> $DIR/issue-104649.rs:24:9 + --> $DIR/issue-104649.rs:25:9 | LL | let a = A(Result::Ok(Result::Ok(()))); | ^ -------------- type must be known at this point diff --git a/tests/ui/inference/issue-80409.rs b/tests/ui/inference/issue-80409.rs index 86dac3cda9199..a4d84c1349fc6 100644 --- a/tests/ui/inference/issue-80409.rs +++ b/tests/ui/inference/issue-80409.rs @@ -1,7 +1,7 @@ //@ revisions: compat no-compat //@[no-compat] compile-flags: -Zno-implied-bounds-compat -#![allow(unreachable_code, unused)] +#![allow(unreachable_code, unused, todo_macro_calls)] use std::marker::PhantomData; diff --git a/tests/ui/inference/issue-86162-1.rs b/tests/ui/inference/issue-86162-1.rs index 5a547eb38d1f9..fd161adad42b2 100644 --- a/tests/ui/inference/issue-86162-1.rs +++ b/tests/ui/inference/issue-86162-1.rs @@ -1,4 +1,5 @@ // Regression test of #86162. +#![allow(todo_macro_calls)] fn foo(x: impl Clone) {} fn gen() -> T { todo!() } diff --git a/tests/ui/inference/issue-86162-1.stderr b/tests/ui/inference/issue-86162-1.stderr index d36ea12f6f041..0d9e66cbaa57f 100644 --- a/tests/ui/inference/issue-86162-1.stderr +++ b/tests/ui/inference/issue-86162-1.stderr @@ -1,5 +1,5 @@ error[E0283]: type annotations needed - --> $DIR/issue-86162-1.rs:7:9 + --> $DIR/issue-86162-1.rs:8:9 | LL | foo(gen()); //<- Do not suggest `foo::()`! | --- ^^^ cannot infer type of the type parameter `T` declared on the function `gen` @@ -8,7 +8,7 @@ LL | foo(gen()); //<- Do not suggest `foo::()`! | = note: the type must implement `Clone` note: required by a bound in `foo` - --> $DIR/issue-86162-1.rs:3:16 + --> $DIR/issue-86162-1.rs:4:16 | LL | fn foo(x: impl Clone) {} | ^^^^^ required by this bound in `foo` diff --git a/tests/ui/inference/issue-86162-2.rs b/tests/ui/inference/issue-86162-2.rs index b8c75dd7728d2..9eef214d21778 100644 --- a/tests/ui/inference/issue-86162-2.rs +++ b/tests/ui/inference/issue-86162-2.rs @@ -1,4 +1,5 @@ // Regression test of #86162. +#![allow(todo_macro_calls)] fn gen() -> T { todo!() } diff --git a/tests/ui/inference/issue-86162-2.stderr b/tests/ui/inference/issue-86162-2.stderr index adbc585d46924..edcfbe2a5f634 100644 --- a/tests/ui/inference/issue-86162-2.stderr +++ b/tests/ui/inference/issue-86162-2.stderr @@ -1,5 +1,5 @@ error[E0283]: type annotations needed - --> $DIR/issue-86162-2.rs:12:14 + --> $DIR/issue-86162-2.rs:13:14 | LL | Foo::bar(gen()); //<- Do not suggest `Foo::bar::()`! | -------- ^^^ cannot infer type of the type parameter `T` declared on the function `gen` @@ -8,7 +8,7 @@ LL | Foo::bar(gen()); //<- Do not suggest `Foo::bar::()`! | = note: the type must implement `Clone` note: required by a bound in `Foo::bar` - --> $DIR/issue-86162-2.rs:8:20 + --> $DIR/issue-86162-2.rs:9:20 | LL | fn bar(x: impl Clone) {} | ^^^^^ required by this bound in `Foo::bar` diff --git a/tests/ui/inference/question-mark-type-inference-in-chain.rs b/tests/ui/inference/question-mark-type-inference-in-chain.rs index f3e36b7c40167..920ffda7bbaef 100644 --- a/tests/ui/inference/question-mark-type-inference-in-chain.rs +++ b/tests/ui/inference/question-mark-type-inference-in-chain.rs @@ -1,4 +1,5 @@ // #129269 +#![allow(todo_macro_calls)] use std::fmt::Display; #[derive(Debug)] diff --git a/tests/ui/inference/question-mark-type-inference-in-chain.stderr b/tests/ui/inference/question-mark-type-inference-in-chain.stderr index af8a5c8aebadc..f16e1271c4512 100644 --- a/tests/ui/inference/question-mark-type-inference-in-chain.stderr +++ b/tests/ui/inference/question-mark-type-inference-in-chain.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/question-mark-type-inference-in-chain.rs:31:9 + --> $DIR/question-mark-type-inference-in-chain.rs:32:9 | LL | let mut tags = lines.iter().map(|e| parse(e)).collect()?; | ^^^^^^^^ @@ -13,7 +13,7 @@ LL | let mut tags: Vec<_> = lines.iter().map(|e| parse(e)).collect()?; | ++++++++ error[E0283]: type annotations needed - --> $DIR/question-mark-type-inference-in-chain.rs:41:65 + --> $DIR/question-mark-type-inference-in-chain.rs:42:65 | LL | let mut tags: Vec = lines.iter().map(|e| parse(e)).collect()?; | ^^^^^^^ cannot infer type of the type parameter `B` declared on the method `collect` @@ -27,7 +27,7 @@ LL | let mut tags: Vec = lines.iter().map(|e| parse(e)).collect:: $DIR/question-mark-type-inference-in-chain.rs:53:20 + --> $DIR/question-mark-type-inference-in-chain.rs:54:20 | LL | let mut tags = lines.iter().map(|e| parse(e)).collect::>()?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `Vec>` @@ -35,7 +35,7 @@ LL | let mut tags = lines.iter().map(|e| parse(e)).collect::>()?; = help: the nightly-only, unstable trait `Try` is not implemented for `Vec>` error[E0277]: a value of type `std::result::Result, AnotherError>` cannot be built from an iterator over elements of type `std::result::Result` - --> $DIR/question-mark-type-inference-in-chain.rs:72:20 + --> $DIR/question-mark-type-inference-in-chain.rs:73:20 | LL | .collect::>>()?; | ------- ^^^^^^^^^^^^^^^^^^^^ value of type `std::result::Result, AnotherError>` cannot be built from `std::iter::Iterator>` @@ -47,7 +47,7 @@ help: the trait `FromIterator>` is not implemented --> $SRC_DIR/core/src/result.rs:LL:COL = help: for that trait implementation, expected `AnotherError`, found `Error` note: the method call chain might not have had the expected associated types - --> $DIR/question-mark-type-inference-in-chain.rs:69:10 + --> $DIR/question-mark-type-inference-in-chain.rs:70:10 | LL | let mut tags = lines | ----- this expression has type `&[&str]` diff --git a/tests/ui/inference/useless-turbofish-suggestion.rs b/tests/ui/inference/useless-turbofish-suggestion.rs index 64dbfff64c52b..47049305a04e7 100644 --- a/tests/ui/inference/useless-turbofish-suggestion.rs +++ b/tests/ui/inference/useless-turbofish-suggestion.rs @@ -10,6 +10,7 @@ struct S; impl S { + #[allow(todo_macro_calls)] fn f(self, _a: A) -> B { todo!() } diff --git a/tests/ui/inference/useless-turbofish-suggestion.stderr b/tests/ui/inference/useless-turbofish-suggestion.stderr index ccd30b415f650..032a42b53e83a 100644 --- a/tests/ui/inference/useless-turbofish-suggestion.stderr +++ b/tests/ui/inference/useless-turbofish-suggestion.stderr @@ -1,17 +1,17 @@ error[E0282]: type annotations needed - --> $DIR/useless-turbofish-suggestion.rs:19:16 + --> $DIR/useless-turbofish-suggestion.rs:20:16 | LL | S.f::(42); | ^ cannot infer type of the type parameter `B` declared on the method `f` error[E0282]: type annotations needed - --> $DIR/useless-turbofish-suggestion.rs:24:14 + --> $DIR/useless-turbofish-suggestion.rs:25:14 | LL | S.f::<_, _>(42); | ^ cannot infer type of the type parameter `B` declared on the method `f` error[E0282]: type annotations needed - --> $DIR/useless-turbofish-suggestion.rs:29:7 + --> $DIR/useless-turbofish-suggestion.rs:30:7 | LL | S.f(42); | ^ cannot infer type of the type parameter `B` declared on the method `f` diff --git a/tests/ui/inline-const/const-expr-inference.rs b/tests/ui/inline-const/const-expr-inference.rs index 99cea3204a194..3482e3379708d 100644 --- a/tests/ui/inline-const/const-expr-inference.rs +++ b/tests/ui/inline-const/const-expr-inference.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] pub fn todo() -> T { const { todo!() } diff --git a/tests/ui/iterators/collect-into-slice.rs b/tests/ui/iterators/collect-into-slice.rs index c90cfa4e90d3a..9913990f37b64 100644 --- a/tests/ui/iterators/collect-into-slice.rs +++ b/tests/ui/iterators/collect-into-slice.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] fn process_slice(data: &[i32]) { todo!() } diff --git a/tests/ui/iterators/collect-into-slice.stderr b/tests/ui/iterators/collect-into-slice.stderr index b5444a71cc177..023964ee4b233 100644 --- a/tests/ui/iterators/collect-into-slice.stderr +++ b/tests/ui/iterators/collect-into-slice.stderr @@ -1,5 +1,5 @@ error[E0277]: a slice of type `[i32]` cannot be built since `[i32]` has no definite size - --> $DIR/collect-into-slice.rs:6:31 + --> $DIR/collect-into-slice.rs:7:31 | LL | let some_generated_vec = (0..10).collect(); | ^^^^^ ------- required by a bound introduced by this call @@ -11,7 +11,7 @@ note: required by a bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL error[E0277]: the size for values of type `[i32]` cannot be known at compilation time - --> $DIR/collect-into-slice.rs:6:9 + --> $DIR/collect-into-slice.rs:7:9 | LL | let some_generated_vec = (0..10).collect(); | ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -20,7 +20,7 @@ LL | let some_generated_vec = (0..10).collect(); = note: all local variables must have a statically known size error[E0277]: the size for values of type `[i32]` cannot be known at compilation time - --> $DIR/collect-into-slice.rs:6:38 + --> $DIR/collect-into-slice.rs:7:38 | LL | let some_generated_vec = (0..10).collect(); | ^^^^^^^ doesn't have a size known at compile-time @@ -30,7 +30,7 @@ note: required by an implicit `Sized` bound in `collect` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL error[E0277]: a slice of type `&[i32]` cannot be built since we need to store the elements somewhere - --> $DIR/collect-into-slice.rs:19:31 + --> $DIR/collect-into-slice.rs:20:31 | LL | let some_generated_vec = (0..10).collect(); | ^^^^^ ------- required by a bound introduced by this call diff --git a/tests/ui/late-bound-lifetimes/cross_crate_alias.rs b/tests/ui/late-bound-lifetimes/cross_crate_alias.rs index 4c2f15d2e95f9..c109d1d26b1fa 100644 --- a/tests/ui/late-bound-lifetimes/cross_crate_alias.rs +++ b/tests/ui/late-bound-lifetimes/cross_crate_alias.rs @@ -1,5 +1,6 @@ //@ aux-build:upstream_alias.rs //@ check-pass +#![allow(todo_macro_calls)] extern crate upstream_alias; diff --git a/tests/ui/layout/invalid-unsized-const-eval.rs b/tests/ui/layout/invalid-unsized-const-eval.rs index 94fa6449e670d..e9e4a44c55379 100644 --- a/tests/ui/layout/invalid-unsized-const-eval.rs +++ b/tests/ui/layout/invalid-unsized-const-eval.rs @@ -1,4 +1,5 @@ // issue: #124182 +#![allow(todo_macro_calls)] //! This test used to trip an assertion in const eval, because `layout_of(LazyLock)` //! returned `Ok` with an unsized layout when a sized layout was expected. diff --git a/tests/ui/layout/invalid-unsized-const-eval.stderr b/tests/ui/layout/invalid-unsized-const-eval.stderr index d5a294d11f43e..a2e1fa1eb6e72 100644 --- a/tests/ui/layout/invalid-unsized-const-eval.stderr +++ b/tests/ui/layout/invalid-unsized-const-eval.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `(dyn Sync + 'static)` cannot be known at compilation time - --> $DIR/invalid-unsized-const-eval.rs:9:11 + --> $DIR/invalid-unsized-const-eval.rs:10:11 | LL | data: (dyn Sync, ()), | ^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -8,7 +8,7 @@ LL | data: (dyn Sync, ()), = note: only the last element of a tuple may have a dynamically sized type error[E0080]: the type `(dyn Sync, ())` has an unknown layout - --> $DIR/invalid-unsized-const-eval.rs:12:1 + --> $DIR/invalid-unsized-const-eval.rs:13:1 | LL | static EMPTY_SET: LazyLock = todo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `EMPTY_SET` failed here diff --git a/tests/ui/layout/malformed-unsized-type-in-union.rs b/tests/ui/layout/malformed-unsized-type-in-union.rs index e97024ce9d704..a22c2f36d319c 100644 --- a/tests/ui/layout/malformed-unsized-type-in-union.rs +++ b/tests/ui/layout/malformed-unsized-type-in-union.rs @@ -1,4 +1,5 @@ // issue: 113760 +#![allow(todo_macro_calls)] union W { s: dyn Iterator } //~^ ERROR cannot find type `Missing` in this scope diff --git a/tests/ui/layout/malformed-unsized-type-in-union.stderr b/tests/ui/layout/malformed-unsized-type-in-union.stderr index d819a2b368edb..cdd429646e5a6 100644 --- a/tests/ui/layout/malformed-unsized-type-in-union.stderr +++ b/tests/ui/layout/malformed-unsized-type-in-union.stderr @@ -1,11 +1,11 @@ error[E0425]: cannot find type `Missing` in this scope - --> $DIR/malformed-unsized-type-in-union.rs:3:34 + --> $DIR/malformed-unsized-type-in-union.rs:4:34 | LL | union W { s: dyn Iterator } | ^^^^^^^ not found in this scope error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union - --> $DIR/malformed-unsized-type-in-union.rs:3:11 + --> $DIR/malformed-unsized-type-in-union.rs:4:11 | LL | union W { s: dyn Iterator } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/let-else/let-else-temporary-lifetime.rs b/tests/ui/let-else/let-else-temporary-lifetime.rs index 7fa2f4afc315d..0ca6a900d58e0 100644 --- a/tests/ui/let-else/let-else-temporary-lifetime.rs +++ b/tests/ui/let-else/let-else-temporary-lifetime.rs @@ -1,5 +1,6 @@ //@ run-pass //@ compile-flags: -Zvalidate-mir +#![allow(todo_macro_calls)] use std::fmt::Display; use std::rc::Rc; diff --git a/tests/ui/lifetimes/fullwidth-ampersand.rs b/tests/ui/lifetimes/fullwidth-ampersand.rs index 7d8948bd844cf..8d1de8d89adc7 100644 --- a/tests/ui/lifetimes/fullwidth-ampersand.rs +++ b/tests/ui/lifetimes/fullwidth-ampersand.rs @@ -1,4 +1,5 @@ // Verify that we do not ICE when the user uses a multubyte ampersand. +#![allow(todo_macro_calls)] fn f(_: &&()) -> &() { todo!() } //~^ ERROR unknown start of token: \u{ff06} diff --git a/tests/ui/lifetimes/fullwidth-ampersand.stderr b/tests/ui/lifetimes/fullwidth-ampersand.stderr index 7fa7343620b0b..5329d7b1df1a8 100644 --- a/tests/ui/lifetimes/fullwidth-ampersand.stderr +++ b/tests/ui/lifetimes/fullwidth-ampersand.stderr @@ -1,5 +1,5 @@ error: unknown start of token: \u{ff06} - --> $DIR/fullwidth-ampersand.rs:3:10 + --> $DIR/fullwidth-ampersand.rs:4:10 | LL | fn f(_: &&()) -> &() { todo!() } | ^^ @@ -11,7 +11,7 @@ LL + fn f(_: &&()) -> &() { todo!() } | error[E0106]: missing lifetime specifier - --> $DIR/fullwidth-ampersand.rs:3:18 + --> $DIR/fullwidth-ampersand.rs:4:18 | LL | fn f(_: &&()) -> &() { todo!() } | ----- ^ expected named lifetime parameter diff --git a/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs b/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs index 81e4d3e7043bd..6477fb69a4cbe 100644 --- a/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs +++ b/tests/ui/lifetimes/late-bound-lifetime-arguments-warning-72278.rs @@ -2,7 +2,7 @@ // and https://github.com/rust-lang/rust/issues/42868 //@ run-pass -#![allow(unused)] +#![allow(unused, todo_macro_calls)] struct S; diff --git a/tests/ui/lifetimes/mismatched-lifetime-syntaxes-details/path-count.fixed b/tests/ui/lifetimes/mismatched-lifetime-syntaxes-details/path-count.fixed index 5689eed81ddea..1a737445798b0 100644 --- a/tests/ui/lifetimes/mismatched-lifetime-syntaxes-details/path-count.fixed +++ b/tests/ui/lifetimes/mismatched-lifetime-syntaxes-details/path-count.fixed @@ -1,7 +1,7 @@ //! Regression test for //@ run-rustfix #![deny(mismatched_lifetime_syntaxes)] -#![allow(unused)] +#![allow(unused, todo_macro_uses)] struct Foo<'a, 'b> { ptr1: &'a str, diff --git a/tests/ui/lifetimes/mismatched-lifetime-syntaxes-details/path-count.rs b/tests/ui/lifetimes/mismatched-lifetime-syntaxes-details/path-count.rs index 3c12600e07a5e..985ba180b4f8c 100644 --- a/tests/ui/lifetimes/mismatched-lifetime-syntaxes-details/path-count.rs +++ b/tests/ui/lifetimes/mismatched-lifetime-syntaxes-details/path-count.rs @@ -1,7 +1,7 @@ //! Regression test for //@ run-rustfix #![deny(mismatched_lifetime_syntaxes)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] struct Foo<'a, 'b> { ptr1: &'a str, diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-1.rs b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-1.rs index 3d02d1bb1bd80..2fc6a96fc3db9 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-1.rs +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-1.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct S; struct T; diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-1.stderr b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-1.stderr index 3374c76bb76b9..48ee9e7478f7c 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-1.stderr +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-1.stderr @@ -1,5 +1,5 @@ error: missing lifetime in associated type - --> $DIR/missing-lifetime-in-assoc-type-1.rs:9:17 + --> $DIR/missing-lifetime-in-assoc-type-1.rs:10:17 | LL | impl<'a> IntoIterator for &S { | ---- there is a named lifetime specified on the impl block you could use @@ -15,7 +15,7 @@ LL | type Item = &'a T; | ++ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/missing-lifetime-in-assoc-type-1.rs:4:6 + --> $DIR/missing-lifetime-in-assoc-type-1.rs:5:6 | LL | impl<'a> IntoIterator for &S { | ^^ unconstrained lifetime parameter diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-2.rs b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-2.rs index d24aaaf8b10ed..779a98f465bd0 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-2.rs +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-2.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct S; struct T; diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-2.stderr b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-2.stderr index 9d9d2bc97d901..7297bbe3c22c3 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-2.stderr +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-2.stderr @@ -1,5 +1,5 @@ error: missing lifetime in associated type - --> $DIR/missing-lifetime-in-assoc-type-2.rs:5:17 + --> $DIR/missing-lifetime-in-assoc-type-2.rs:6:17 | LL | type Item = &T; | ^ this lifetime must come from the implemented type @@ -13,7 +13,7 @@ LL ~ type Item = &'a T; | error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/missing-lifetime-in-assoc-type-2.rs:7:57 + --> $DIR/missing-lifetime-in-assoc-type-2.rs:8:57 | LL | type IntoIter = std::collections::btree_map::Values<'a, i32, T>; | ^^ undeclared lifetime diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-3.rs b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-3.rs index cf745ab97eb3a..92b585c0e41e2 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-3.rs +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-3.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct S; struct T; diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-3.stderr b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-3.stderr index b5811dc8ff279..fbcbb2db1912b 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-3.stderr +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-3.stderr @@ -1,5 +1,5 @@ error: missing lifetime in associated type - --> $DIR/missing-lifetime-in-assoc-type-3.rs:5:17 + --> $DIR/missing-lifetime-in-assoc-type-3.rs:6:17 | LL | type Item = &T; | ^ this lifetime must come from the implemented type @@ -13,7 +13,7 @@ LL ~ type Item = &'a T; | error[E0106]: missing lifetime specifier - --> $DIR/missing-lifetime-in-assoc-type-3.rs:7:56 + --> $DIR/missing-lifetime-in-assoc-type-3.rs:8:56 | LL | type IntoIter = std::collections::btree_map::Values; | ^ expected named lifetime parameter diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.rs b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.rs index 138f6d7bdf2f7..bb15e2a6cc5c3 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.rs +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct S; struct T; diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.stderr b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.stderr index a0b7ad08e8b6c..a3a97be28c78b 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.stderr +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.stderr @@ -1,5 +1,5 @@ error: missing lifetime in associated type - --> $DIR/missing-lifetime-in-assoc-type-4.rs:5:17 + --> $DIR/missing-lifetime-in-assoc-type-4.rs:6:17 | LL | type Item = &T; | ^ this lifetime must come from the implemented type @@ -13,7 +13,7 @@ LL ~ type Item = &'a T; | error[E0195]: lifetime parameters or bounds on associated type `IntoIter` do not match the trait declaration - --> $DIR/missing-lifetime-in-assoc-type-4.rs:7:18 + --> $DIR/missing-lifetime-in-assoc-type-4.rs:8:18 | LL | type IntoIter<'a> = std::collections::btree_map::Values<'a, i32, T>; | ^^^^ lifetimes do not match associated type in trait diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-5.rs b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-5.rs index 853cc6dc8e4e9..8f486726cbe2d 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-5.rs +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-5.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct S; struct T; diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-5.stderr b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-5.stderr index d58fd8995ef9c..4bdb3ff94637c 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-5.stderr +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-5.stderr @@ -1,5 +1,5 @@ error: missing lifetime in associated type - --> $DIR/missing-lifetime-in-assoc-type-5.rs:9:17 + --> $DIR/missing-lifetime-in-assoc-type-5.rs:10:17 | LL | impl<'a> IntoIterator for &'_ S { | ---- there is a named lifetime specified on the impl block you could use @@ -15,7 +15,7 @@ LL | type Item = &'a T; | ++ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/missing-lifetime-in-assoc-type-5.rs:4:6 + --> $DIR/missing-lifetime-in-assoc-type-5.rs:5:6 | LL | impl<'a> IntoIterator for &'_ S { | ^^ unconstrained lifetime parameter diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-6.rs b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-6.rs index b4fac575edb3b..648784615d4be 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-6.rs +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-6.rs @@ -1,4 +1,5 @@ //~ NOTE in the trait the associated type is declared without lifetime parameters +#![allow(todo_macro_calls)] struct S; struct T; diff --git a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-6.stderr b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-6.stderr index 6767243bf21ba..ba3044c7b252f 100644 --- a/tests/ui/lifetimes/missing-lifetime-in-assoc-type-6.stderr +++ b/tests/ui/lifetimes/missing-lifetime-in-assoc-type-6.stderr @@ -1,5 +1,5 @@ error: missing lifetime in associated type - --> $DIR/missing-lifetime-in-assoc-type-6.rs:16:17 + --> $DIR/missing-lifetime-in-assoc-type-6.rs:17:17 | LL | impl<'a> Trait for &'_ S { | ---- there is a named lifetime specified on the impl block you could use @@ -14,7 +14,7 @@ LL | type Item = &'a T; | ++ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/missing-lifetime-in-assoc-type-6.rs:11:6 + --> $DIR/missing-lifetime-in-assoc-type-6.rs:12:6 | LL | impl<'a> Trait for &'_ S { | ^^ unconstrained lifetime parameter diff --git a/tests/ui/lifetimes/noisy-follow-up-erro.rs b/tests/ui/lifetimes/noisy-follow-up-erro.rs index 47a87068d8fbf..7576f63d88a55 100644 --- a/tests/ui/lifetimes/noisy-follow-up-erro.rs +++ b/tests/ui/lifetimes/noisy-follow-up-erro.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct Foo<'c, 'd>(&'c (), &'d ()); impl<'c, 'd> Foo<'c, 'd> { diff --git a/tests/ui/lifetimes/noisy-follow-up-erro.stderr b/tests/ui/lifetimes/noisy-follow-up-erro.stderr index eb52147dba4bb..9d2f41e53e684 100644 --- a/tests/ui/lifetimes/noisy-follow-up-erro.stderr +++ b/tests/ui/lifetimes/noisy-follow-up-erro.stderr @@ -1,5 +1,5 @@ error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were supplied - --> $DIR/noisy-follow-up-erro.rs:12:30 + --> $DIR/noisy-follow-up-erro.rs:13:30 | LL | fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> { | ^^^ ---- help: remove the lifetime argument @@ -7,13 +7,13 @@ LL | fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> { | expected 2 lifetime arguments | note: struct defined here, with 2 lifetime parameters: `'c`, `'d` - --> $DIR/noisy-follow-up-erro.rs:1:8 + --> $DIR/noisy-follow-up-erro.rs:2:8 | LL | struct Foo<'c, 'd>(&'c (), &'d ()); | ^^^ -- -- error[E0621]: explicit lifetime required in the type of `foo` - --> $DIR/noisy-follow-up-erro.rs:14:9 + --> $DIR/noisy-follow-up-erro.rs:15:9 | LL | self.bar().map_err(|()| foo.acc(self))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'a` required diff --git a/tests/ui/lint/auxiliary/external_macros.rs b/tests/ui/lint/auxiliary/external_macros.rs new file mode 100644 index 0000000000000..0ef050ec2eef6 --- /dev/null +++ b/tests/ui/lint/auxiliary/external_macros.rs @@ -0,0 +1,5 @@ +#![allow(todo_macro_calls)] +#[macro_export] +macro_rules! external_todo { + {} => { todo!() }; +} diff --git a/tests/ui/lint/dead-code/issue-85071-2.rs b/tests/ui/lint/dead-code/issue-85071-2.rs index 06bbcac737397..e1a3c10e98dfa 100644 --- a/tests/ui/lint/dead-code/issue-85071-2.rs +++ b/tests/ui/lint/dead-code/issue-85071-2.rs @@ -1,6 +1,7 @@ // A slight variation of issue-85071.rs. Here, a method is called instead // of a function, and the warning is about an unreachable definition // instead of an unreachable expression. +#![allow(todo_macro_calls)] //@ check-pass diff --git a/tests/ui/lint/dead-code/issue-85071-2.stderr b/tests/ui/lint/dead-code/issue-85071-2.stderr index 5cc94e25e3a69..00147374167a8 100644 --- a/tests/ui/lint/dead-code/issue-85071-2.stderr +++ b/tests/ui/lint/dead-code/issue-85071-2.stderr @@ -1,5 +1,5 @@ warning: unreachable definition - --> $DIR/issue-85071-2.rs:18:9 + --> $DIR/issue-85071-2.rs:19:9 | LL | let x = s.f(); | ^ ----- any code following this expression is unreachable @@ -7,24 +7,24 @@ LL | let x = s.f(); | unreachable definition | note: this expression has type `Foo`, which is uninhabited - --> $DIR/issue-85071-2.rs:18:13 + --> $DIR/issue-85071-2.rs:19:13 | LL | let x = s.f(); | ^^^^^ note: the lint level is defined here - --> $DIR/issue-85071-2.rs:7:26 + --> $DIR/issue-85071-2.rs:8:26 | LL | #![warn(unused_variables,unreachable_code)] | ^^^^^^^^^^^^^^^^ warning: unused variable: `x` - --> $DIR/issue-85071-2.rs:18:9 + --> $DIR/issue-85071-2.rs:19:9 | LL | let x = s.f(); | ^ help: if this is intentional, prefix it with an underscore: `_x` | note: the lint level is defined here - --> $DIR/issue-85071-2.rs:7:9 + --> $DIR/issue-85071-2.rs:8:9 | LL | #![warn(unused_variables,unreachable_code)] | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/lint/dead-code/issue-85071.rs b/tests/ui/lint/dead-code/issue-85071.rs index 6f177905b5968..58b9f942e47f8 100644 --- a/tests/ui/lint/dead-code/issue-85071.rs +++ b/tests/ui/lint/dead-code/issue-85071.rs @@ -3,6 +3,7 @@ // variable liveness analysis was "smarter" than the reachability analysis // in this regard, which led to confusing "unused variable" warnings // without an accompanying explanatory "unreachable expression" warning. +#![allow(todo_macro_calls)] //@ check-pass diff --git a/tests/ui/lint/dead-code/issue-85071.stderr b/tests/ui/lint/dead-code/issue-85071.stderr index b95ae09385dec..e3731e8db1e58 100644 --- a/tests/ui/lint/dead-code/issue-85071.stderr +++ b/tests/ui/lint/dead-code/issue-85071.stderr @@ -1,5 +1,5 @@ warning: unreachable definition - --> $DIR/issue-85071.rs:15:9 + --> $DIR/issue-85071.rs:16:9 | LL | let x = f(); | ^ --- any code following this expression is unreachable @@ -7,24 +7,24 @@ LL | let x = f(); | unreachable definition | note: this expression has type `Foo`, which is uninhabited - --> $DIR/issue-85071.rs:15:13 + --> $DIR/issue-85071.rs:16:13 | LL | let x = f(); | ^^^ note: the lint level is defined here - --> $DIR/issue-85071.rs:9:26 + --> $DIR/issue-85071.rs:10:26 | LL | #![warn(unused_variables,unreachable_code)] | ^^^^^^^^^^^^^^^^ warning: unused variable: `x` - --> $DIR/issue-85071.rs:15:9 + --> $DIR/issue-85071.rs:16:9 | LL | let x = f(); | ^ help: if this is intentional, prefix it with an underscore: `_x` | note: the lint level is defined here - --> $DIR/issue-85071.rs:9:9 + --> $DIR/issue-85071.rs:10:9 | LL | #![warn(unused_variables,unreachable_code)] | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/lint/improper-ctypes/lint-113436-1.rs b/tests/ui/lint/improper-ctypes/lint-113436-1.rs index 1ca59c6868d6d..1c50cc7ff10c1 100644 --- a/tests/ui/lint/improper-ctypes/lint-113436-1.rs +++ b/tests/ui/lint/improper-ctypes/lint-113436-1.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![deny(improper_ctypes_definitions)] #[repr(C)] diff --git a/tests/ui/lint/improper-ctypes/lint-113436-1.stderr b/tests/ui/lint/improper-ctypes/lint-113436-1.stderr index f01dc3b6e0d1e..81a19a89ad140 100644 --- a/tests/ui/lint/improper-ctypes/lint-113436-1.stderr +++ b/tests/ui/lint/improper-ctypes/lint-113436-1.stderr @@ -1,5 +1,5 @@ error: `extern` fn uses type `NotSafe`, which is not FFI-safe - --> $DIR/lint-113436-1.rs:22:22 + --> $DIR/lint-113436-1.rs:23:22 | LL | extern "C" fn bar(x: Bar) -> Bar { | ^^^ not FFI-safe @@ -7,18 +7,18 @@ LL | extern "C" fn bar(x: Bar) -> Bar { = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct = note: this struct has unspecified layout note: the type is defined here - --> $DIR/lint-113436-1.rs:13:1 + --> $DIR/lint-113436-1.rs:14:1 | LL | struct NotSafe(u32); | ^^^^^^^^^^^^^^ note: the lint level is defined here - --> $DIR/lint-113436-1.rs:1:9 + --> $DIR/lint-113436-1.rs:2:9 | LL | #![deny(improper_ctypes_definitions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `extern` fn uses type `NotSafe`, which is not FFI-safe - --> $DIR/lint-113436-1.rs:22:30 + --> $DIR/lint-113436-1.rs:23:30 | LL | extern "C" fn bar(x: Bar) -> Bar { | ^^^ not FFI-safe @@ -26,7 +26,7 @@ LL | extern "C" fn bar(x: Bar) -> Bar { = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct = note: this struct has unspecified layout note: the type is defined here - --> $DIR/lint-113436-1.rs:13:1 + --> $DIR/lint-113436-1.rs:14:1 | LL | struct NotSafe(u32); | ^^^^^^^^^^^^^^ diff --git a/tests/ui/lint/improper-ctypes/mustpass-113436.rs b/tests/ui/lint/improper-ctypes/mustpass-113436.rs index d5acdc45f92e5..32bc84806b19d 100644 --- a/tests/ui/lint/improper-ctypes/mustpass-113436.rs +++ b/tests/ui/lint/improper-ctypes/mustpass-113436.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] #![deny(improper_ctypes_definitions)] #[repr(C)] diff --git a/tests/ui/lint/lint-missing-copy-implementations-allow.rs b/tests/ui/lint/lint-missing-copy-implementations-allow.rs index d688dfe95eeca..4f16a645ed404 100644 --- a/tests/ui/lint/lint-missing-copy-implementations-allow.rs +++ b/tests/ui/lint/lint-missing-copy-implementations-allow.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] #![deny(missing_copy_implementations)] // Don't recommend implementing Copy on something stateful like an iterator. diff --git a/tests/ui/lint/non-local-defs/auxiliary/non_local_macro.rs b/tests/ui/lint/non-local-defs/auxiliary/non_local_macro.rs index 8c0ff8adda1b9..b0343b34ebce1 100644 --- a/tests/ui/lint/non-local-defs/auxiliary/non_local_macro.rs +++ b/tests/ui/lint/non-local-defs/auxiliary/non_local_macro.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #[macro_export] macro_rules! non_local_impl { ($a:ident) => { diff --git a/tests/ui/lint/non-local-defs/exhaustive-trait.rs b/tests/ui/lint/non-local-defs/exhaustive-trait.rs index 40d2314460f86..2bdb6406e343f 100644 --- a/tests/ui/lint/non-local-defs/exhaustive-trait.rs +++ b/tests/ui/lint/non-local-defs/exhaustive-trait.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition:2021 +#![allow(todo_macro_calls)] struct Dog; diff --git a/tests/ui/lint/non-local-defs/exhaustive-trait.stderr b/tests/ui/lint/non-local-defs/exhaustive-trait.stderr index 83e46df185de2..d993245208419 100644 --- a/tests/ui/lint/non-local-defs/exhaustive-trait.stderr +++ b/tests/ui/lint/non-local-defs/exhaustive-trait.stderr @@ -1,5 +1,5 @@ warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive-trait.rs:7:5 + --> $DIR/exhaustive-trait.rs:8:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -13,7 +13,7 @@ LL | impl PartialEq<()> for Dog { = note: `#[warn(non_local_definitions)]` on by default warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive-trait.rs:14:5 + --> $DIR/exhaustive-trait.rs:15:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -27,7 +27,7 @@ LL | impl PartialEq<()> for &Dog { = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive-trait.rs:21:5 + --> $DIR/exhaustive-trait.rs:22:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -41,7 +41,7 @@ LL | impl PartialEq for () { = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive-trait.rs:28:5 + --> $DIR/exhaustive-trait.rs:29:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -55,7 +55,7 @@ LL | impl PartialEq<&Dog> for () { = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive-trait.rs:35:5 + --> $DIR/exhaustive-trait.rs:36:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -70,7 +70,7 @@ LL | impl PartialEq for &Dog { = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive-trait.rs:42:5 + --> $DIR/exhaustive-trait.rs:43:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` diff --git a/tests/ui/lint/non-local-defs/exhaustive.rs b/tests/ui/lint/non-local-defs/exhaustive.rs index 5036e427060fc..e6cdcbf6ce001 100644 --- a/tests/ui/lint/non-local-defs/exhaustive.rs +++ b/tests/ui/lint/non-local-defs/exhaustive.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition:2021 +#![allow(todo_macro_calls)] use std::fmt::Display; diff --git a/tests/ui/lint/non-local-defs/exhaustive.stderr b/tests/ui/lint/non-local-defs/exhaustive.stderr index 1e6fc910621f6..aa933ee3b33ca 100644 --- a/tests/ui/lint/non-local-defs/exhaustive.stderr +++ b/tests/ui/lint/non-local-defs/exhaustive.stderr @@ -1,5 +1,5 @@ warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:10:5 + --> $DIR/exhaustive.rs:11:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -12,7 +12,7 @@ LL | impl Test { = note: `#[warn(non_local_definitions)]` on by default warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:15:5 + --> $DIR/exhaustive.rs:16:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -26,7 +26,7 @@ LL | impl Display for Test { = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:22:5 + --> $DIR/exhaustive.rs:23:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -39,7 +39,7 @@ LL | impl dyn Trait {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:25:5 + --> $DIR/exhaustive.rs:26:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -53,7 +53,7 @@ LL | impl Trait for Vec { } = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:28:5 + --> $DIR/exhaustive.rs:29:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -67,7 +67,7 @@ LL | impl Trait for &dyn Trait {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:31:5 + --> $DIR/exhaustive.rs:32:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -81,7 +81,7 @@ LL | impl Trait for *mut Test {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:34:5 + --> $DIR/exhaustive.rs:35:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -95,7 +95,7 @@ LL | impl Trait for *mut [Test] {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:37:5 + --> $DIR/exhaustive.rs:38:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -109,7 +109,7 @@ LL | impl Trait for [Test; 8] {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:40:5 + --> $DIR/exhaustive.rs:41:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -123,7 +123,7 @@ LL | impl Trait for (Test,) {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:43:5 + --> $DIR/exhaustive.rs:44:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -137,7 +137,7 @@ LL | impl Trait for fn(Test) -> () {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:46:5 + --> $DIR/exhaustive.rs:47:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -151,7 +151,7 @@ LL | impl Trait for fn() -> Test {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:50:9 + --> $DIR/exhaustive.rs:51:9 | LL | let _a = || { | -- move the `impl` block outside of this closure `` and up 2 bodies @@ -164,7 +164,7 @@ LL | impl Trait for Test {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:67:9 + --> $DIR/exhaustive.rs:68:9 | LL | fn inside_inside() { | ------------------ move the `impl` block outside of this function `inside_inside` and up 2 bodies @@ -177,7 +177,7 @@ LL | impl Display for InsideMain { = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/exhaustive.rs:74:9 + --> $DIR/exhaustive.rs:75:9 | LL | fn inside_inside() { | ------------------ move the `impl` block outside of this function `inside_inside` and up 2 bodies diff --git a/tests/ui/lint/non-local-defs/from-local-for-global.rs b/tests/ui/lint/non-local-defs/from-local-for-global.rs index 6654fcc4f23d7..7e3d5d0013601 100644 --- a/tests/ui/lint/non-local-defs/from-local-for-global.rs +++ b/tests/ui/lint/non-local-defs/from-local-for-global.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition:2021 +#![allow(todo_macro_calls)] struct Cat; struct Wrap(T); diff --git a/tests/ui/lint/non-local-defs/from-local-for-global.stderr b/tests/ui/lint/non-local-defs/from-local-for-global.stderr index f173c054e786f..dc1f357e6548e 100644 --- a/tests/ui/lint/non-local-defs/from-local-for-global.stderr +++ b/tests/ui/lint/non-local-defs/from-local-for-global.stderr @@ -1,5 +1,5 @@ warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/from-local-for-global.rs:8:5 + --> $DIR/from-local-for-global.rs:9:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` diff --git a/tests/ui/lint/non-local-defs/generics.rs b/tests/ui/lint/non-local-defs/generics.rs index 381b3caacb6b5..781badd71a2e8 100644 --- a/tests/ui/lint/non-local-defs/generics.rs +++ b/tests/ui/lint/non-local-defs/generics.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition:2021 +#![allow(todo_macro_calls)] trait Global {} diff --git a/tests/ui/lint/non-local-defs/generics.stderr b/tests/ui/lint/non-local-defs/generics.stderr index 66769cc1e0b8a..7d64650cb9059 100644 --- a/tests/ui/lint/non-local-defs/generics.stderr +++ b/tests/ui/lint/non-local-defs/generics.stderr @@ -1,5 +1,5 @@ warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/generics.rs:9:5 + --> $DIR/generics.rs:10:5 | LL | fn main() { | --------- move the `impl` block outside of this function `main` @@ -14,7 +14,7 @@ LL | impl Global for Vec { } = note: `#[warn(non_local_definitions)]` on by default warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/generics.rs:20:5 + --> $DIR/generics.rs:21:5 | LL | fn bad() { | -------- move the `impl` block outside of this function `bad` @@ -28,7 +28,7 @@ LL | impl Uto7 for Test where Local: std::any::Any {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/generics.rs:23:5 + --> $DIR/generics.rs:24:5 | LL | fn bad() { | -------- move the `impl` block outside of this function `bad` diff --git a/tests/ui/lint/non-local-defs/local.rs b/tests/ui/lint/non-local-defs/local.rs index f7ecd68f59e90..e0856f546d853 100644 --- a/tests/ui/lint/non-local-defs/local.rs +++ b/tests/ui/lint/non-local-defs/local.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition:2021 +#![allow(todo_macro_calls)] use std::fmt::Debug; diff --git a/tests/ui/lint/non-local-defs/weird-exprs.rs b/tests/ui/lint/non-local-defs/weird-exprs.rs index 1d9cecea0c971..fe7186e672514 100644 --- a/tests/ui/lint/non-local-defs/weird-exprs.rs +++ b/tests/ui/lint/non-local-defs/weird-exprs.rs @@ -1,5 +1,6 @@ //@ check-pass //@ edition:2021 +#![allow(todo_macro_calls)] trait Uto {} struct Test; diff --git a/tests/ui/lint/non-local-defs/weird-exprs.stderr b/tests/ui/lint/non-local-defs/weird-exprs.stderr index 5b7d1a837444e..c056cb63eb254 100644 --- a/tests/ui/lint/non-local-defs/weird-exprs.stderr +++ b/tests/ui/lint/non-local-defs/weird-exprs.stderr @@ -1,5 +1,5 @@ warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/weird-exprs.rs:8:5 + --> $DIR/weird-exprs.rs:9:5 | LL | type A = [u32; { | ________________- @@ -16,7 +16,7 @@ LL | | }]; = note: `#[warn(non_local_definitions)]` on by default warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/weird-exprs.rs:16:9 + --> $DIR/weird-exprs.rs:17:9 | LL | Discr = { | _____________- @@ -32,7 +32,7 @@ LL | | } = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/weird-exprs.rs:25:9 + --> $DIR/weird-exprs.rs:26:9 | LL | let _array = [0i32; { | _________________________- @@ -50,7 +50,7 @@ LL | | }]; = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/weird-exprs.rs:34:9 + --> $DIR/weird-exprs.rs:35:9 | LL | type A = [u32; { | ____________________- @@ -66,7 +66,7 @@ LL | | }]; = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/weird-exprs.rs:41:9 + --> $DIR/weird-exprs.rs:42:9 | LL | fn a(_: [u32; { | ___________________- @@ -82,7 +82,7 @@ LL | | }]) {} = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item - --> $DIR/weird-exprs.rs:48:9 + --> $DIR/weird-exprs.rs:49:9 | LL | fn b() -> [u32; { | _____________________- diff --git a/tests/ui/lint/non-snake-case/allow-snake-case-field-destructuring-issue-89469.rs b/tests/ui/lint/non-snake-case/allow-snake-case-field-destructuring-issue-89469.rs index f691d6b5a9287..0b3f2a2aa4621 100644 --- a/tests/ui/lint/non-snake-case/allow-snake-case-field-destructuring-issue-89469.rs +++ b/tests/ui/lint/non-snake-case/allow-snake-case-field-destructuring-issue-89469.rs @@ -1,5 +1,6 @@ // Regression test for #89469, where an extra non_snake_case warning was // reported for a shorthand field binding. +#![allow(todo_macro_calls)] //@ check-pass #![deny(non_snake_case)] diff --git a/tests/ui/lint/reference_casting.rs b/tests/ui/lint/reference_casting.rs index 87fa42f94775e..a7adf36598e5a 100644 --- a/tests/ui/lint/reference_casting.rs +++ b/tests/ui/lint/reference_casting.rs @@ -1,4 +1,5 @@ //@ check-fail +#![allow(todo_macro_calls)] extern "C" { // N.B., mutability can be easily incorrect in FFI calls -- as diff --git a/tests/ui/lint/reference_casting.stderr b/tests/ui/lint/reference_casting.stderr index 4205d406b5158..31547be86f7b4 100644 --- a/tests/ui/lint/reference_casting.stderr +++ b/tests/ui/lint/reference_casting.stderr @@ -1,5 +1,5 @@ error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:17:16 + --> $DIR/reference_casting.rs:18:16 | LL | let _num = &mut *(num as *const i32 as *mut i32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | let _num = &mut *(num as *const i32 as *mut i32); = note: `#[deny(invalid_reference_casting)]` on by default error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:19:16 + --> $DIR/reference_casting.rs:20:16 | LL | let _num = &mut *(num as *const i32).cast_mut(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -16,7 +16,7 @@ LL | let _num = &mut *(num as *const i32).cast_mut(); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:21:16 + --> $DIR/reference_casting.rs:22:16 | LL | let _num = &mut *std::ptr::from_ref(num).cast_mut(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -24,7 +24,7 @@ LL | let _num = &mut *std::ptr::from_ref(num).cast_mut(); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:23:16 + --> $DIR/reference_casting.rs:24:16 | LL | let _num = &mut *std::ptr::from_ref({ num }).cast_mut(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -32,7 +32,7 @@ LL | let _num = &mut *std::ptr::from_ref({ num }).cast_mut(); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:25:16 + --> $DIR/reference_casting.rs:26:16 | LL | let _num = &mut *{ std::ptr::from_ref(num) }.cast_mut(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -40,7 +40,7 @@ LL | let _num = &mut *{ std::ptr::from_ref(num) }.cast_mut(); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:27:16 + --> $DIR/reference_casting.rs:28:16 | LL | let _num = &mut *(std::ptr::from_ref({ num }) as *mut i32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -48,7 +48,7 @@ LL | let _num = &mut *(std::ptr::from_ref({ num }) as *mut i32); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:29:16 + --> $DIR/reference_casting.rs:30:16 | LL | let _num = &mut *(num as *const i32).cast::().cast_mut(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -56,7 +56,7 @@ LL | let _num = &mut *(num as *const i32).cast::().cast_mut(); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:31:16 + --> $DIR/reference_casting.rs:32:16 | LL | let _num = &mut *(num as *const i32).cast::().cast_mut().cast_const().cast_mut(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -64,7 +64,7 @@ LL | let _num = &mut *(num as *const i32).cast::().cast_mut().cast_cons = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:33:16 + --> $DIR/reference_casting.rs:34:16 | LL | let _num = &mut *(std::ptr::from_ref(static_u8()) as *mut i8); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -72,7 +72,7 @@ LL | let _num = &mut *(std::ptr::from_ref(static_u8()) as *mut i8); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:35:16 + --> $DIR/reference_casting.rs:36:16 | LL | let _num = &mut *std::mem::transmute::<_, *mut i32>(num); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -80,7 +80,7 @@ LL | let _num = &mut *std::mem::transmute::<_, *mut i32>(num); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:37:16 + --> $DIR/reference_casting.rs:38:16 | LL | let _num = &mut *(std::mem::transmute::<_, *mut i32>(num) as *mut i32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -88,7 +88,7 @@ LL | let _num = &mut *(std::mem::transmute::<_, *mut i32>(num) as *mut i32); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:39:16 + --> $DIR/reference_casting.rs:40:16 | LL | let _num = &mut *std::cell::UnsafeCell::raw_get( | ________________^ @@ -100,7 +100,7 @@ LL | | ); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:45:16 + --> $DIR/reference_casting.rs:46:16 | LL | let deferred = num as *const i32 as *mut i32; | ----------------------------- casting happened here @@ -110,7 +110,7 @@ LL | let _num = &mut *deferred; = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:48:16 + --> $DIR/reference_casting.rs:49:16 | LL | let deferred = (std::ptr::from_ref(num) as *const i32 as *const i32).cast_mut() as *mut i32; | ---------------------------------------------------------------------------- casting happened here @@ -120,7 +120,7 @@ LL | let _num = &mut *deferred; = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:51:16 + --> $DIR/reference_casting.rs:52:16 | LL | let deferred = (std::ptr::from_ref(num) as *const i32 as *const i32).cast_mut() as *mut i32; | ---------------------------------------------------------------------------- casting happened here @@ -131,7 +131,7 @@ LL | let _num = &mut *deferred_rebind; = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:53:16 + --> $DIR/reference_casting.rs:54:16 | LL | let _num = &mut *(num as *const _ as usize as *mut i32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -139,7 +139,7 @@ LL | let _num = &mut *(num as *const _ as usize as *mut i32); = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:55:16 + --> $DIR/reference_casting.rs:56:16 | LL | let _num = &mut *(std::mem::transmute::<_, *mut _>(num as *const i32) as *mut i32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -147,7 +147,7 @@ LL | let _num = &mut *(std::mem::transmute::<_, *mut _>(num as *const i32) a = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:62:16 + --> $DIR/reference_casting.rs:63:16 | LL | let num = NUM as *const i32 as *mut i32; | ----------------------------- casting happened here @@ -158,7 +158,7 @@ LL | let _num = &mut *num; = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:66:16 + --> $DIR/reference_casting.rs:67:16 | LL | let _num = &mut *(cell as *const _ as *mut i32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -167,7 +167,7 @@ LL | let _num = &mut *(cell as *const _ as *mut i32); = note: even for types with interior mutability, the only legal way to obtain a mutable pointer from a shared reference is through `UnsafeCell::get` error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:70:9 + --> $DIR/reference_casting.rs:71:9 | LL | &mut *((this as *const _) as *mut _) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -175,7 +175,7 @@ LL | &mut *((this as *const _) as *mut _) = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:75:18 + --> $DIR/reference_casting.rs:76:18 | LL | unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *const _) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -183,7 +183,7 @@ LL | unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *con = note: for more information, visit error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:80:18 + --> $DIR/reference_casting.rs:81:18 | LL | unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *const _) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -191,7 +191,7 @@ LL | unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *con = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:90:5 + --> $DIR/reference_casting.rs:91:5 | LL | *(a as *const _ as *mut _) = String::from("Replaced"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -199,7 +199,7 @@ LL | *(a as *const _ as *mut _) = String::from("Replaced"); = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:92:5 + --> $DIR/reference_casting.rs:93:5 | LL | *(a as *const _ as *mut String) += " world"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -207,7 +207,7 @@ LL | *(a as *const _ as *mut String) += " world"; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:94:5 + --> $DIR/reference_casting.rs:95:5 | LL | *std::ptr::from_ref(num).cast_mut() += 1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -215,7 +215,7 @@ LL | *std::ptr::from_ref(num).cast_mut() += 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:96:5 + --> $DIR/reference_casting.rs:97:5 | LL | *std::ptr::from_ref({ num }).cast_mut() += 1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -223,7 +223,7 @@ LL | *std::ptr::from_ref({ num }).cast_mut() += 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:98:5 + --> $DIR/reference_casting.rs:99:5 | LL | *{ std::ptr::from_ref(num) }.cast_mut() += 1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -231,7 +231,7 @@ LL | *{ std::ptr::from_ref(num) }.cast_mut() += 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:100:5 + --> $DIR/reference_casting.rs:101:5 | LL | *(std::ptr::from_ref({ num }) as *mut i32) += 1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -239,7 +239,7 @@ LL | *(std::ptr::from_ref({ num }) as *mut i32) += 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:102:5 + --> $DIR/reference_casting.rs:103:5 | LL | *std::mem::transmute::<_, *mut i32>(num) += 1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -247,7 +247,7 @@ LL | *std::mem::transmute::<_, *mut i32>(num) += 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:104:5 + --> $DIR/reference_casting.rs:105:5 | LL | *(std::mem::transmute::<_, *mut i32>(num) as *mut i32) += 1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -255,7 +255,7 @@ LL | *(std::mem::transmute::<_, *mut i32>(num) as *mut i32) += 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:106:5 + --> $DIR/reference_casting.rs:107:5 | LL | / std::ptr::write( LL | | @@ -267,7 +267,7 @@ LL | | ); = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:111:5 + --> $DIR/reference_casting.rs:112:5 | LL | *((&std::cell::UnsafeCell::new(0)) as *const _ as *mut i32) = 5; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -276,7 +276,7 @@ LL | *((&std::cell::UnsafeCell::new(0)) as *const _ as *mut i32) = 5; = note: even for types with interior mutability, the only legal way to obtain a mutable pointer from a shared reference is through `UnsafeCell::get` error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:115:5 + --> $DIR/reference_casting.rs:116:5 | LL | let value = num as *const i32 as *mut i32; | ----------------------------- casting happened here @@ -286,7 +286,7 @@ LL | *value = 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:119:5 + --> $DIR/reference_casting.rs:120:5 | LL | let value = value as *mut i32; | ----------------- casting happened here @@ -296,7 +296,7 @@ LL | *value = 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:122:5 + --> $DIR/reference_casting.rs:123:5 | LL | let value = num as *const i32 as *mut i32; | ----------------------------- casting happened here @@ -306,7 +306,7 @@ LL | *value = 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:125:5 + --> $DIR/reference_casting.rs:126:5 | LL | let value = num as *const i32 as *mut i32; | ----------------------------- casting happened here @@ -317,7 +317,7 @@ LL | *value_rebind = 1; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:127:5 + --> $DIR/reference_casting.rs:128:5 | LL | *(num as *const i32).cast::().cast_mut() = 2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -325,7 +325,7 @@ LL | *(num as *const i32).cast::().cast_mut() = 2; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:129:5 + --> $DIR/reference_casting.rs:130:5 | LL | *(num as *const _ as usize as *mut i32) = 2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -333,7 +333,7 @@ LL | *(num as *const _ as usize as *mut i32) = 2; = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:131:5 + --> $DIR/reference_casting.rs:132:5 | LL | let value = num as *const i32 as *mut i32; | ----------------------------- casting happened here @@ -344,7 +344,7 @@ LL | std::ptr::write(value, 2); = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:133:5 + --> $DIR/reference_casting.rs:134:5 | LL | let value = num as *const i32 as *mut i32; | ----------------------------- casting happened here @@ -355,7 +355,7 @@ LL | std::ptr::write_unaligned(value, 2); = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:135:5 + --> $DIR/reference_casting.rs:136:5 | LL | let value = num as *const i32 as *mut i32; | ----------------------------- casting happened here @@ -366,7 +366,7 @@ LL | std::ptr::write_volatile(value, 2); = note: for more information, visit error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell` - --> $DIR/reference_casting.rs:139:9 + --> $DIR/reference_casting.rs:140:9 | LL | *(this as *const _ as *mut _) = a; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -374,7 +374,7 @@ LL | *(this as *const _ as *mut _) = a; = note: for more information, visit error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:161:20 + --> $DIR/reference_casting.rs:162:20 | LL | let num = &mut 3i32; | ---- backing allocation comes from here @@ -385,7 +385,7 @@ LL | let _num = &*(num as *const i32 as *const i64); = note: casting from `i32` (4 bytes) to `i64` (8 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:163:20 + --> $DIR/reference_casting.rs:164:20 | LL | let num = &mut 3i32; | ---- backing allocation comes from here @@ -396,7 +396,7 @@ LL | let _num = &mut *(num as *mut i32 as *mut i64); = note: casting from `i32` (4 bytes) to `i64` (8 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:165:20 + --> $DIR/reference_casting.rs:166:20 | LL | let num = &mut 3i32; | ---- backing allocation comes from here @@ -407,7 +407,7 @@ LL | let _num = &mut *(num as *mut i32 as *mut I64); = note: casting from `i32` (4 bytes) to `I64` (16 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:167:9 + --> $DIR/reference_casting.rs:168:9 | LL | let num = &mut 3i32; | ---- backing allocation comes from here @@ -418,7 +418,7 @@ LL | std::ptr::write(num as *mut i32 as *mut i64, 2); = note: casting from `i32` (4 bytes) to `i64` (8 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:176:20 + --> $DIR/reference_casting.rs:177:20 | LL | let num = &mut [0i32; 3]; | --------- backing allocation comes from here @@ -429,7 +429,7 @@ LL | let _num = &mut *(num as *mut _ as *mut [i64; 2]); = note: casting from `[i32; 3]` (12 bytes) to `[i64; 2]` (16 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:178:9 + --> $DIR/reference_casting.rs:179:9 | LL | let num = &mut [0i32; 3]; | --------- backing allocation comes from here @@ -440,7 +440,7 @@ LL | std::ptr::write_unaligned(num as *mut _ as *mut [i32; 4], [0, 0, 1, = note: casting from `[i32; 3]` (12 bytes) to `[i32; 4]` (16 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:188:20 + --> $DIR/reference_casting.rs:189:20 | LL | let num = &mut [0i32; 3] as &mut [i32]; | --------- backing allocation comes from here @@ -451,7 +451,7 @@ LL | let _num = &mut *(num as *mut _ as *mut i128); = note: casting from `[i32; 3]` (12 bytes) to `i128` (16 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:190:20 + --> $DIR/reference_casting.rs:191:20 | LL | let num = &mut [0i32; 3] as &mut [i32]; | --------- backing allocation comes from here @@ -462,7 +462,7 @@ LL | let _num = &mut *(num as *mut _ as *mut [i64; 4]); = note: casting from `[i32; 3]` (12 bytes) to `[i64; 4]` (32 bytes) error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell` - --> $DIR/reference_casting.rs:200:20 + --> $DIR/reference_casting.rs:201:20 | LL | let _num = &mut *(&mat3 as *const _ as *mut [[i64; 3]; 3]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -470,7 +470,7 @@ LL | let _num = &mut *(&mat3 as *const _ as *mut [[i64; 3]; 3]); = note: for more information, visit error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:200:20 + --> $DIR/reference_casting.rs:201:20 | LL | let _num = &mut *(&mat3 as *const _ as *mut [[i64; 3]; 3]); | ^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -480,7 +480,7 @@ LL | let _num = &mut *(&mat3 as *const _ as *mut [[i64; 3]; 3]); = note: casting from `Mat3` (36 bytes) to `[[i64; 3]; 3]` (72 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:203:20 + --> $DIR/reference_casting.rs:204:20 | LL | let _num = &*(&mat3 as *const _ as *mut [[i64; 3]; 3]); | ^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -490,7 +490,7 @@ LL | let _num = &*(&mat3 as *const _ as *mut [[i64; 3]; 3]); = note: casting from `Mat3` (36 bytes) to `[[i64; 3]; 3]` (72 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:212:37 + --> $DIR/reference_casting.rs:213:37 | LL | let w: *mut [u16; 2] = &mut l as *mut [u8; 2] as *mut _; | -------------------------------- @@ -503,7 +503,7 @@ LL | let w: *mut [u16] = unsafe {&mut *w}; = note: casting from `[u8; 2]` (2 bytes) to `[u16; 2]` (4 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:220:20 + --> $DIR/reference_casting.rs:221:20 | LL | let _num = &*(&num as *const i32 as *const i64); | ^^^^---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -513,7 +513,7 @@ LL | let _num = &*(&num as *const i32 as *const i64); = note: casting from `[i32; 1]` (4 bytes) to `i64` (8 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:222:20 + --> $DIR/reference_casting.rs:223:20 | LL | let _num = &*(&foo() as *const i32 as *const i64); | ^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -523,7 +523,7 @@ LL | let _num = &*(&foo() as *const i32 as *const i64); = note: casting from `[i32; 1]` (4 bytes) to `i64` (8 bytes) error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused - --> $DIR/reference_casting.rs:238:20 + --> $DIR/reference_casting.rs:239:20 | LL | let _num = &*(&num as *const i32 as *const i64); | ^^^^---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/lint/todo-nostd.rs b/tests/ui/lint/todo-nostd.rs new file mode 100644 index 0000000000000..26168ec7809e3 --- /dev/null +++ b/tests/ui/lint/todo-nostd.rs @@ -0,0 +1,13 @@ +//@ compile-flags:-C panic=abort + +#![no_std] +#![deny(todo_macro_calls)] + +#[panic_handler] +fn panic_handler(_info: &core::panic::PanicInfo) -> ! { + loop {} +} + +pub fn main() { + todo!(); //~ ERROR `todo!()` macro used +} diff --git a/tests/ui/lint/todo-nostd.stderr b/tests/ui/lint/todo-nostd.stderr new file mode 100644 index 0000000000000..adebbfc51d6a1 --- /dev/null +++ b/tests/ui/lint/todo-nostd.stderr @@ -0,0 +1,14 @@ +error: `todo!()` macro used + --> $DIR/todo-nostd.rs:12:5 + | +LL | todo!(); + | ^^^^^^^ + | +note: the lint level is defined here + --> $DIR/todo-nostd.rs:4:9 + | +LL | #![deny(todo_macro_uses)] + | ^^^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + diff --git a/tests/ui/lint/todo.rs b/tests/ui/lint/todo.rs new file mode 100644 index 0000000000000..bb47bce2439a7 --- /dev/null +++ b/tests/ui/lint/todo.rs @@ -0,0 +1,32 @@ +//@ aux-build:external_macros.rs + +#![deny(todo_macro_calls)] + +extern crate external_macros; + +use external_macros::external_todo; + +fn std_todo() { + todo!(); //~ ERROR `todo!()` macro used + todo!("whatever"); + //~^ ERROR `todo!()` macro used +} + +macro_rules! locally_expanded_todo { + {} => { + todo!("who'd have thunk?") + //~^ ERROR `todo!()` macro used + }; +} + +#[allow(todo_macro_calls)] +fn allowed_todo() { + todo!(); +} + +fn main() { + std_todo(); + locally_expanded_todo!(); + allowed_todo(); + external_todo!(); +} diff --git a/tests/ui/lint/todo.stderr b/tests/ui/lint/todo.stderr new file mode 100644 index 0000000000000..84b275f3d9ec6 --- /dev/null +++ b/tests/ui/lint/todo.stderr @@ -0,0 +1,31 @@ +error: `todo!()` macro used + --> $DIR/todo.rs:10:5 + | +LL | todo!(); + | ^^^^^^^ + | +note: the lint level is defined here + --> $DIR/todo.rs:3:9 + | +LL | #![deny(todo_macro_uses)] + | ^^^^^^^^^^^^^^^ + +error: `todo!()` macro used + --> $DIR/todo.rs:11:5 + | +LL | todo!("whatever"); + | ^^^^^^^^^^^^^^^^^ + +error: `todo!()` macro used + --> $DIR/todo.rs:17:9 + | +LL | todo!("who'd have thunk?") + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | locally_expanded_todo!(); + | ------------------------ in this macro invocation + | + = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `locally_expanded_todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 3 previous errors + diff --git a/tests/ui/lint/unused-borrows.rs b/tests/ui/lint/unused-borrows.rs index 07d783382fae8..9354db1a59251 100644 --- a/tests/ui/lint/unused-borrows.rs +++ b/tests/ui/lint/unused-borrows.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![deny(unused_must_use)] fn foo(_: i32) -> bool { todo!() } diff --git a/tests/ui/lint/unused-borrows.stderr b/tests/ui/lint/unused-borrows.stderr index d8dd2b5fddf94..afe3bac87faac 100644 --- a/tests/ui/lint/unused-borrows.stderr +++ b/tests/ui/lint/unused-borrows.stderr @@ -1,11 +1,11 @@ error: unused borrow that must be used - --> $DIR/unused-borrows.rs:6:5 + --> $DIR/unused-borrows.rs:7:5 | LL | &42; | ^^^ the borrow produces a value | note: the lint level is defined here - --> $DIR/unused-borrows.rs:1:9 + --> $DIR/unused-borrows.rs:2:9 | LL | #![deny(unused_must_use)] | ^^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | let _ = &42; | +++++++ error: unused borrow that must be used - --> $DIR/unused-borrows.rs:9:5 + --> $DIR/unused-borrows.rs:10:5 | LL | &mut foo(42); | ^^^^^^^^^^^^ the borrow produces a value @@ -26,7 +26,7 @@ LL | let _ = &mut foo(42); | +++++++ error: unused borrow that must be used - --> $DIR/unused-borrows.rs:12:5 + --> $DIR/unused-borrows.rs:13:5 | LL | &&42; | ^^^^ the borrow produces a value @@ -37,7 +37,7 @@ LL | let _ = &&42; | +++++++ error: unused borrow that must be used - --> $DIR/unused-borrows.rs:15:5 + --> $DIR/unused-borrows.rs:16:5 | LL | &&mut 42; | ^^^^^^^^ the borrow produces a value @@ -48,7 +48,7 @@ LL | let _ = &&mut 42; | +++++++ error: unused borrow that must be used - --> $DIR/unused-borrows.rs:18:5 + --> $DIR/unused-borrows.rs:19:5 | LL | &mut &42; | ^^^^^^^^ the borrow produces a value @@ -59,7 +59,7 @@ LL | let _ = &mut &42; | +++++++ error: unused borrow that must be used - --> $DIR/unused-borrows.rs:23:5 + --> $DIR/unused-borrows.rs:24:5 | LL | && foo(42); | ^^^^^^^^^^ the borrow produces a value diff --git a/tests/ui/lint/unused/lint-unused-imports-self-single.fixed b/tests/ui/lint/unused/lint-unused-imports-self-single.fixed index 361548bfdc12a..8171bb34e7ecc 100644 --- a/tests/ui/lint/unused/lint-unused-imports-self-single.fixed +++ b/tests/ui/lint/unused/lint-unused-imports-self-single.fixed @@ -1,7 +1,7 @@ //@ run-rustfix #![deny(unused_imports)] -#![allow(unreachable_code)] +#![allow(unreachable_code, todo_macro_uses)] use std::collections::{self as coll}; //~^ ERROR unused import: `HashMap` diff --git a/tests/ui/lint/unused/lint-unused-imports-self-single.rs b/tests/ui/lint/unused/lint-unused-imports-self-single.rs index d03d3822e04e7..3b31b10eb090c 100644 --- a/tests/ui/lint/unused/lint-unused-imports-self-single.rs +++ b/tests/ui/lint/unused/lint-unused-imports-self-single.rs @@ -1,7 +1,7 @@ //@ run-rustfix #![deny(unused_imports)] -#![allow(unreachable_code)] +#![allow(unreachable_code, todo_macro_calls)] use std::collections::{HashMap, self as coll}; //~^ ERROR unused import: `HashMap` diff --git a/tests/ui/lint/unused/unused-supertrait.rs b/tests/ui/lint/unused/unused-supertrait.rs index 64a8e5204579c..f1007493124c5 100644 --- a/tests/ui/lint/unused/unused-supertrait.rs +++ b/tests/ui/lint/unused/unused-supertrait.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![deny(unused_must_use)] fn it() -> impl ExactSizeIterator { diff --git a/tests/ui/lint/unused/unused-supertrait.stderr b/tests/ui/lint/unused/unused-supertrait.stderr index c7ccf30ea24e7..b0cb50948708a 100644 --- a/tests/ui/lint/unused/unused-supertrait.stderr +++ b/tests/ui/lint/unused/unused-supertrait.stderr @@ -1,12 +1,12 @@ error: unused implementer of `Iterator` that must be used - --> $DIR/unused-supertrait.rs:9:5 + --> $DIR/unused-supertrait.rs:10:5 | LL | it(); | ^^^^ | = note: iterators are lazy and do nothing unless consumed note: the lint level is defined here - --> $DIR/unused-supertrait.rs:1:9 + --> $DIR/unused-supertrait.rs:2:9 | LL | #![deny(unused_must_use)] | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/lint/unused/unused-var-in-unreachable-code.rs b/tests/ui/lint/unused/unused-var-in-unreachable-code.rs index 39c5e0315d9ce..0d0158b3aae9e 100644 --- a/tests/ui/lint/unused/unused-var-in-unreachable-code.rs +++ b/tests/ui/lint/unused/unused-var-in-unreachable-code.rs @@ -1,6 +1,6 @@ //@ check-pass -#![allow(unreachable_code)] +#![allow(unreachable_code, todo_macro_calls)] #![allow(dead_code)] #![warn(unused_variables)] diff --git a/tests/ui/liveness/liveness-upvars.rs b/tests/ui/liveness/liveness-upvars.rs index 0e198f1dea10b..c4d150b8e182d 100644 --- a/tests/ui/liveness/liveness-upvars.rs +++ b/tests/ui/liveness/liveness-upvars.rs @@ -2,7 +2,7 @@ //@ check-pass #![feature(coroutines, stmt_expr_attributes)] #![warn(unused)] -#![allow(unreachable_code)] +#![allow(unreachable_code, todo_macro_calls)] pub fn unintentional_copy_one() { let mut last = None; diff --git a/tests/ui/loop-match/invalid.rs b/tests/ui/loop-match/invalid.rs index 31712485040fc..8678cb3ab52f5 100644 --- a/tests/ui/loop-match/invalid.rs +++ b/tests/ui/loop-match/invalid.rs @@ -1,6 +1,6 @@ // Test that the correct error is emitted when `#[loop_match]` is applied to // syntax it does not support. -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] #![feature(loop_match)] #![crate_type = "lib"] diff --git a/tests/ui/lowering/no-name-for-DefPath-issue-133426.rs b/tests/ui/lowering/no-name-for-DefPath-issue-133426.rs index fc3b51b40a545..4b62363971411 100644 --- a/tests/ui/lowering/no-name-for-DefPath-issue-133426.rs +++ b/tests/ui/lowering/no-name-for-DefPath-issue-133426.rs @@ -1,7 +1,7 @@ //! Test for the crash in #133426, caused by an empty symbol being used for a //! type name. -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] #![feature(never_patterns)] fn a( diff --git a/tests/ui/lto/lto-global-allocator.rs b/tests/ui/lto/lto-global-allocator.rs index 6e5ed94847561..6b5a160fe7cfd 100644 --- a/tests/ui/lto/lto-global-allocator.rs +++ b/tests/ui/lto/lto-global-allocator.rs @@ -3,6 +3,7 @@ //@ no-prefer-dynamic //@ needs-crate-type: cdylib //@ ignore-backends: gcc +#![allow(todo_macro_calls)] use std::alloc::{GlobalAlloc, Layout}; diff --git a/tests/ui/macros/cfg_select.rs b/tests/ui/macros/cfg_select.rs index 113cff38a3a93..ae98b8c167ce9 100644 --- a/tests/ui/macros/cfg_select.rs +++ b/tests/ui/macros/cfg_select.rs @@ -1,5 +1,6 @@ #![crate_type = "lib"] #![warn(unreachable_cfg_select_predicates)] // Unused warnings are disabled by default in UI tests. +#![allow(todo_macro_calls)] fn print() { println!(cfg_select! { diff --git a/tests/ui/macros/cfg_select.stderr b/tests/ui/macros/cfg_select.stderr index d2803964e00c2..14bed00d1ea16 100644 --- a/tests/ui/macros/cfg_select.stderr +++ b/tests/ui/macros/cfg_select.stderr @@ -1,5 +1,5 @@ error: none of the predicates in this `cfg_select` evaluated to true - --> $DIR/cfg_select.rs:161:1 + --> $DIR/cfg_select.rs:162:1 | LL | / cfg_select! { LL | | @@ -8,55 +8,55 @@ LL | | } | |_^ error: none of the predicates in this `cfg_select` evaluated to true - --> $DIR/cfg_select.rs:166:1 + --> $DIR/cfg_select.rs:167:1 | LL | cfg_select! {} | ^^^^^^^^^^^^^^ error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `=>` - --> $DIR/cfg_select.rs:170:5 + --> $DIR/cfg_select.rs:171:5 | LL | => {} | ^^ error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found expression - --> $DIR/cfg_select.rs:175:5 + --> $DIR/cfg_select.rs:176:5 | LL | () => {} | ^^ expressions are not allowed here error[E0539]: malformed `cfg_select` macro input - --> $DIR/cfg_select.rs:180:5 + --> $DIR/cfg_select.rs:181:5 | LL | "str" => {} | ^^^^^ expected a valid identifier here error[E0539]: malformed `cfg_select` macro input - --> $DIR/cfg_select.rs:185:5 + --> $DIR/cfg_select.rs:186:5 | LL | a::b => {} | ^^^^ expected a valid identifier here error[E0537]: invalid predicate `a` - --> $DIR/cfg_select.rs:190:5 + --> $DIR/cfg_select.rs:191:5 | LL | a() => {} | ^^^ error: expected one of `(`, `::`, `=>`, or `=`, found `+` - --> $DIR/cfg_select.rs:195:7 + --> $DIR/cfg_select.rs:196:7 | LL | a + 1 => {} | ^ expected one of `(`, `::`, `=>`, or `=` error: expected one of `(`, `::`, `=>`, or `=`, found `!` - --> $DIR/cfg_select.rs:201:8 + --> $DIR/cfg_select.rs:202:8 | LL | cfg!() => {} | ^ expected one of `(`, `::`, `=>`, or `=` warning: unreachable configuration predicate - --> $DIR/cfg_select.rs:136:5 + --> $DIR/cfg_select.rs:137:5 | LL | _ => {} | - always matches @@ -70,7 +70,7 @@ LL | #![warn(unreachable_cfg_select_predicates)] // Unused warnings are disabled | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unreachable configuration predicate - --> $DIR/cfg_select.rs:142:5 + --> $DIR/cfg_select.rs:143:5 | LL | true => {} | ---- always matches @@ -78,25 +78,25 @@ LL | _ => {} | ^ this configuration predicate is never reached warning: unreachable configuration predicate - --> $DIR/cfg_select.rs:149:5 + --> $DIR/cfg_select.rs:150:5 | LL | _ => {} | ^ this configuration predicate is never reached warning: unreachable configuration predicate - --> $DIR/cfg_select.rs:155:5 + --> $DIR/cfg_select.rs:156:5 | LL | test => {} | ^^^^ this configuration predicate is never reached warning: unreachable configuration predicate - --> $DIR/cfg_select.rs:157:5 + --> $DIR/cfg_select.rs:158:5 | LL | _ => {} | ^ this configuration predicate is never reached warning: unexpected `cfg` condition name: `a` - --> $DIR/cfg_select.rs:195:5 + --> $DIR/cfg_select.rs:196:5 | LL | a + 1 => {} | ^ help: found config with similar value: `target_feature = "a"` @@ -107,7 +107,7 @@ LL | a + 1 => {} = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `cfg` - --> $DIR/cfg_select.rs:201:5 + --> $DIR/cfg_select.rs:202:5 | LL | cfg!() => {} | ^^^ diff --git a/tests/ui/macros/concat-nested-repetition.rs b/tests/ui/macros/concat-nested-repetition.rs index ac5394ef8dcc3..34a145ec99a40 100644 --- a/tests/ui/macros/concat-nested-repetition.rs +++ b/tests/ui/macros/concat-nested-repetition.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] #![feature(macro_metavar_expr_concat)] struct A; diff --git a/tests/ui/macros/issue-78333.rs b/tests/ui/macros/issue-78333.rs index faf608bd78269..2408342d3458b 100644 --- a/tests/ui/macros/issue-78333.rs +++ b/tests/ui/macros/issue-78333.rs @@ -1,4 +1,5 @@ //@ build-pass +#![allow(todo_macro_calls)] #![no_implicit_prelude] diff --git a/tests/ui/match/match_non_exhaustive.rs b/tests/ui/match/match_non_exhaustive.rs index 25ff0942833fe..f232813291fbf 100644 --- a/tests/ui/match/match_non_exhaustive.rs +++ b/tests/ui/match/match_non_exhaustive.rs @@ -1,4 +1,5 @@ //@ aux-build:match_non_exhaustive_lib.rs +#![allow(todo_macro_calls)] /* The error message for non-exhaustive matches on non-local enums * marked as non-exhaustive should mention the fact that the enum diff --git a/tests/ui/match/match_non_exhaustive.stderr b/tests/ui/match/match_non_exhaustive.stderr index 40be39ec07747..f60575f8c9ba0 100644 --- a/tests/ui/match/match_non_exhaustive.stderr +++ b/tests/ui/match/match_non_exhaustive.stderr @@ -1,11 +1,11 @@ error[E0004]: non-exhaustive patterns: `L::B` not covered - --> $DIR/match_non_exhaustive.rs:23:11 + --> $DIR/match_non_exhaustive.rs:24:11 | LL | match l { L::A => () }; | ^ pattern `L::B` not covered | note: `L` defined here - --> $DIR/match_non_exhaustive.rs:10:6 + --> $DIR/match_non_exhaustive.rs:11:6 | LL | enum L { A, B } | ^ - not covered @@ -16,7 +16,7 @@ LL | match l { L::A => (), L::B => todo!() }; | +++++++++++++++++ error[E0004]: non-exhaustive patterns: type `E1` is non-empty - --> $DIR/match_non_exhaustive.rs:28:11 + --> $DIR/match_non_exhaustive.rs:29:11 | LL | match e1 {}; | ^^ @@ -35,7 +35,7 @@ LL ~ }; | error[E0004]: non-exhaustive patterns: `_` not covered - --> $DIR/match_non_exhaustive.rs:30:11 + --> $DIR/match_non_exhaustive.rs:31:11 | LL | match e2 { E2::A => (), E2::B => () }; | ^^ pattern `_` not covered diff --git a/tests/ui/match/privately-uninhabited-issue-137999.rs b/tests/ui/match/privately-uninhabited-issue-137999.rs index 918393a0c6acf..d120953e3c690 100644 --- a/tests/ui/match/privately-uninhabited-issue-137999.rs +++ b/tests/ui/match/privately-uninhabited-issue-137999.rs @@ -1,5 +1,6 @@ //@ edition:2024 //@ check-fail +#![allow(todo_macro_calls)] mod m { enum Void {} diff --git a/tests/ui/match/privately-uninhabited-issue-137999.stderr b/tests/ui/match/privately-uninhabited-issue-137999.stderr index 6f74a75375e32..b91ada005136c 100644 --- a/tests/ui/match/privately-uninhabited-issue-137999.stderr +++ b/tests/ui/match/privately-uninhabited-issue-137999.stderr @@ -1,5 +1,5 @@ error[E0503]: cannot use `*x` because it was mutably borrowed - --> $DIR/privately-uninhabited-issue-137999.rs:25:30 + --> $DIR/privately-uninhabited-issue-137999.rs:26:30 | LL | Test::A(a, _) => a, | - `x.0` is borrowed here @@ -11,7 +11,7 @@ LL | let _ = *r1; | --- borrow later used here error[E0503]: cannot use `*x` because it was mutably borrowed - --> $DIR/privately-uninhabited-issue-137999.rs:36:11 + --> $DIR/privately-uninhabited-issue-137999.rs:37:11 | LL | let r = &mut *x; | ------- `*x` is borrowed here diff --git a/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.rs b/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.rs index 0a6d196364f9d..6e59f5b456012 100644 --- a/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.rs +++ b/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.rs @@ -1,4 +1,5 @@ // Fix for issue: #122914 +#![allow(todo_macro_calls)] use std::future::Future; use std::pin::Pin; diff --git a/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr b/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr index 00267ce359a19..1fdc5f07ebe5b 100644 --- a/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr +++ b/tests/ui/methods/dont-ice-on-object-lookup-w-error-region.stderr @@ -1,5 +1,5 @@ error[E0261]: use of undeclared lifetime name `'missing` - --> $DIR/dont-ice-on-object-lookup-w-error-region.rs:6:20 + --> $DIR/dont-ice-on-object-lookup-w-error-region.rs:7:20 | LL | fn project(x: Pin<&'missing mut dyn Future>) { | ^^^^^^^^ undeclared lifetime diff --git a/tests/ui/methods/opaque_param_in_ufc.rs b/tests/ui/methods/opaque_param_in_ufc.rs index 3b0c8b778ffca..cf18363dec4e5 100644 --- a/tests/ui/methods/opaque_param_in_ufc.rs +++ b/tests/ui/methods/opaque_param_in_ufc.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(type_alias_impl_trait)] //@ check-pass diff --git a/tests/ui/methods/probe-error-on-infinite-deref.rs b/tests/ui/methods/probe-error-on-infinite-deref.rs index 196d026438be8..d305d1130ffd6 100644 --- a/tests/ui/methods/probe-error-on-infinite-deref.rs +++ b/tests/ui/methods/probe-error-on-infinite-deref.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Zwrite-long-types-to-disk=yes +#![allow(todo_macro_calls)] use std::ops::Deref; // Make sure that method probe error reporting doesn't get too tangled up diff --git a/tests/ui/methods/probe-error-on-infinite-deref.stderr b/tests/ui/methods/probe-error-on-infinite-deref.stderr index 6148b00116302..896315f7fbf05 100644 --- a/tests/ui/methods/probe-error-on-infinite-deref.stderr +++ b/tests/ui/methods/probe-error-on-infinite-deref.stderr @@ -1,5 +1,5 @@ error[E0055]: reached the recursion limit while auto-dereferencing `Wrap>>>>>>>>>>` - --> $DIR/probe-error-on-infinite-deref.rs:14:13 + --> $DIR/probe-error-on-infinite-deref.rs:15:13 | LL | Wrap(1).lmao(); | ^^^^ deref recursion limit reached @@ -9,7 +9,7 @@ LL | Wrap(1).lmao(); = note: consider using `--verbose` to print the full type name to the console error[E0599]: no method named `lmao` found for struct `Wrap<{integer}>` in the current scope - --> $DIR/probe-error-on-infinite-deref.rs:14:13 + --> $DIR/probe-error-on-infinite-deref.rs:15:13 | LL | struct Wrap(T); | -------------- method `lmao` not found for this struct diff --git a/tests/ui/methods/probe-overflow-due-to-sized-predicate-ordering.rs b/tests/ui/methods/probe-overflow-due-to-sized-predicate-ordering.rs index 08e15117c4b2a..b3a9786d545fb 100644 --- a/tests/ui/methods/probe-overflow-due-to-sized-predicate-ordering.rs +++ b/tests/ui/methods/probe-overflow-due-to-sized-predicate-ordering.rs @@ -1,5 +1,6 @@ //@ check-pass // Regression test due to #123279 +#![allow(todo_macro_calls)] pub trait Job: AsJob { fn run_once(&self); diff --git a/tests/ui/methods/self-type-is-sup-no-eq.rs b/tests/ui/methods/self-type-is-sup-no-eq.rs index ec28b964a0518..438cb0c6c6ef4 100644 --- a/tests/ui/methods/self-type-is-sup-no-eq.rs +++ b/tests/ui/methods/self-type-is-sup-no-eq.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] // Test that we use `sup` not `eq` during method probe, since this has an effect // on the leak check. This is (conceptually) minimized from a crater run for diff --git a/tests/ui/mir/issue-101844.rs b/tests/ui/mir/issue-101844.rs index d66d5c5ba5064..157fa77be9cce 100644 --- a/tests/ui/mir/issue-101844.rs +++ b/tests/ui/mir/issue-101844.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] pub trait FirstTrait { type Item; diff --git a/tests/ui/mir/issue-73914.rs b/tests/ui/mir/issue-73914.rs index 610622f0c31a7..d9244a6adfe3a 100644 --- a/tests/ui/mir/issue-73914.rs +++ b/tests/ui/mir/issue-73914.rs @@ -1,6 +1,7 @@ //@ build-pass //@ compile-flags:-Copt-level=0 //@ edition:2018 +#![allow(todo_macro_calls)] struct S(std::marker::PhantomData); diff --git a/tests/ui/mir/issue-80949.rs b/tests/ui/mir/issue-80949.rs index 05e8bdc84724a..caff9cc3302ac 100644 --- a/tests/ui/mir/issue-80949.rs +++ b/tests/ui/mir/issue-80949.rs @@ -1,4 +1,5 @@ //@ build-pass +#![allow(todo_macro_calls)] trait Trait { type Item; } diff --git a/tests/ui/mir/issue-99852.rs b/tests/ui/mir/issue-99852.rs index af754cf854699..77c14ca7c4c3d 100644 --- a/tests/ui/mir/issue-99852.rs +++ b/tests/ui/mir/issue-99852.rs @@ -1,6 +1,7 @@ //@ check-pass //@ compile-flags: -Z validate-mir //@ edition: 2024 +#![allow(todo_macro_calls)] fn lambda() -> U where diff --git a/tests/ui/mismatched_types/closure-ref-114180.rs b/tests/ui/mismatched_types/closure-ref-114180.rs index cdbbdd1bf441a..168e3906fa1d7 100644 --- a/tests/ui/mismatched_types/closure-ref-114180.rs +++ b/tests/ui/mismatched_types/closure-ref-114180.rs @@ -1,4 +1,5 @@ //@ check-fail +#![allow(todo_macro_calls)] fn main() { let mut v = vec![(1,)]; diff --git a/tests/ui/mismatched_types/closure-ref-114180.stderr b/tests/ui/mismatched_types/closure-ref-114180.stderr index 27649822e694f..2e83119d5f66f 100644 --- a/tests/ui/mismatched_types/closure-ref-114180.stderr +++ b/tests/ui/mismatched_types/closure-ref-114180.stderr @@ -1,5 +1,5 @@ error[E0631]: type mismatch in closure arguments - --> $DIR/closure-ref-114180.rs:6:15 + --> $DIR/closure-ref-114180.rs:7:15 | LL | let compare = |(a,), (e,)| todo!(); | ------------ found signature defined here diff --git a/tests/ui/mismatched_types/issue-74918-missing-lifetime.rs b/tests/ui/mismatched_types/issue-74918-missing-lifetime.rs index 6aa34354a7ad9..162f25ddb8913 100644 --- a/tests/ui/mismatched_types/issue-74918-missing-lifetime.rs +++ b/tests/ui/mismatched_types/issue-74918-missing-lifetime.rs @@ -1,5 +1,6 @@ // Regression test for issue #74918 // Tests that we don't ICE after emitting an error +#![allow(todo_macro_calls)] struct ChunkingIterator> { source: S, diff --git a/tests/ui/mismatched_types/issue-74918-missing-lifetime.stderr b/tests/ui/mismatched_types/issue-74918-missing-lifetime.stderr index dc21c2e3cf9bf..a8fb121c99495 100644 --- a/tests/ui/mismatched_types/issue-74918-missing-lifetime.stderr +++ b/tests/ui/mismatched_types/issue-74918-missing-lifetime.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/issue-74918-missing-lifetime.rs:9:30 + --> $DIR/issue-74918-missing-lifetime.rs:10:30 | LL | type Item = IteratorChunk; | ^ expected named lifetime parameter diff --git a/tests/ui/mismatched_types/mismatched-types-issue-126222.fixed b/tests/ui/mismatched_types/mismatched-types-issue-126222.fixed index 30fd0028f198f..3c6662d48c202 100644 --- a/tests/ui/mismatched_types/mismatched-types-issue-126222.fixed +++ b/tests/ui/mismatched_types/mismatched-types-issue-126222.fixed @@ -1,5 +1,5 @@ //@ run-rustfix -#![allow(unreachable_code, dead_code)] +#![allow(unreachable_code, dead_code, todo_macro_uses)] fn main() { fn mismatch_types1() -> i32 { diff --git a/tests/ui/mismatched_types/mismatched-types-issue-126222.rs b/tests/ui/mismatched_types/mismatched-types-issue-126222.rs index 59178702489e9..6556705bc9e39 100644 --- a/tests/ui/mismatched_types/mismatched-types-issue-126222.rs +++ b/tests/ui/mismatched_types/mismatched-types-issue-126222.rs @@ -1,5 +1,5 @@ //@ run-rustfix -#![allow(unreachable_code, dead_code)] +#![allow(unreachable_code, dead_code, todo_macro_calls)] fn main() { fn mismatch_types1() -> i32 { diff --git a/tests/ui/moves/region-var-in-moved-ty-issue-133118.rs b/tests/ui/moves/region-var-in-moved-ty-issue-133118.rs index a49370e315dd4..305c872a0a3e1 100644 --- a/tests/ui/moves/region-var-in-moved-ty-issue-133118.rs +++ b/tests/ui/moves/region-var-in-moved-ty-issue-133118.rs @@ -1,4 +1,5 @@ //! regression test for #133118 +#![allow(todo_macro_calls)] pub trait Alpha { fn y(self) -> usize; diff --git a/tests/ui/moves/region-var-in-moved-ty-issue-133118.stderr b/tests/ui/moves/region-var-in-moved-ty-issue-133118.stderr index 691625d042da7..8ba22472fab65 100644 --- a/tests/ui/moves/region-var-in-moved-ty-issue-133118.stderr +++ b/tests/ui/moves/region-var-in-moved-ty-issue-133118.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `g1` - --> $DIR/region-var-in-moved-ty-issue-133118.rs:22:15 + --> $DIR/region-var-in-moved-ty-issue-133118.rs:23:15 | LL | let g1 = beta.gamma(); | -- move occurs because `g1` has type `<&B as Beta>::Gamma`, which does not implement the `Copy` trait @@ -9,7 +9,7 @@ LL | a(g1) + a(g1) | value moved here | note: consider changing this parameter type in function `a` to borrow instead if owning the value isn't necessary - --> $DIR/region-var-in-moved-ty-issue-133118.rs:12:24 + --> $DIR/region-var-in-moved-ty-issue-133118.rs:13:24 | LL | pub fn a(_x: T) -> usize { | - ^ this parameter takes ownership of the value diff --git a/tests/ui/never_type/fallback_change/fallback-closure-wrap.e2024.stderr b/tests/ui/never_type/fallback_change/fallback-closure-wrap.e2024.stderr index b55f9c99ae507..e3d8718682fb7 100644 --- a/tests/ui/never_type/fallback_change/fallback-closure-wrap.e2024.stderr +++ b/tests/ui/never_type/fallback_change/fallback-closure-wrap.e2024.stderr @@ -1,5 +1,5 @@ -error[E0271]: expected `{closure@fallback-closure-wrap.rs:16:40}` to return `()`, but it returns `!` - --> $DIR/fallback-closure-wrap.rs:17:9 +error[E0271]: expected `{closure@fallback-closure-wrap.rs:17:40}` to return `()`, but it returns `!` + --> $DIR/fallback-closure-wrap.rs:18:9 | LL | let error = Closure::wrap(Box::new(move || { | ------- this closure @@ -8,7 +8,7 @@ LL | panic!("Can't connect to server."); | = note: expected unit type `()` found type `!` - = note: required for the cast from `Box<{closure@$DIR/fallback-closure-wrap.rs:16:40: 16:47}>` to `Box` + = note: required for the cast from `Box<{closure@$DIR/fallback-closure-wrap.rs:17:40: 17:47}>` to `Box` error: aborting due to 1 previous error diff --git a/tests/ui/never_type/fallback_change/fallback-closure-wrap.rs b/tests/ui/never_type/fallback_change/fallback-closure-wrap.rs index 51be6ac06cc21..d021ba3ce51f3 100644 --- a/tests/ui/never_type/fallback_change/fallback-closure-wrap.rs +++ b/tests/ui/never_type/fallback_change/fallback-closure-wrap.rs @@ -9,6 +9,7 @@ //@[e2024] edition: 2024 // //@[e2021] check-pass +#![allow(todo_macro_calls)] use std::marker::PhantomData; diff --git a/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr b/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr index 730e449704859..933763a93e94f 100644 --- a/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr +++ b/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr @@ -1,5 +1,5 @@ error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:10:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:11:18 | LL | unsafe { mem::zeroed() } | ^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | unsafe { mem::zeroed::<()>() } | ++++++ error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:27:13 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:28:13 | LL | core::mem::transmute(Zst) | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -28,7 +28,7 @@ LL | core::mem::transmute::<_, ()>(Zst) | +++++++++ error: never type fallback affects this union access - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:44:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:45:18 | LL | unsafe { Union { a: () }.b } | ^^^^^^^^^^^^^^^^^ @@ -38,7 +38,7 @@ LL | unsafe { Union { a: () }.b } = note: for more information, see error: never type fallback affects this raw pointer dereference - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:55:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:56:18 | LL | unsafe { *ptr::from_ref(&()).cast() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -52,7 +52,7 @@ LL | unsafe { *ptr::from_ref(&()).cast::<()>() } | ++++++ error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:76:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:77:18 | LL | unsafe { internally_create(x) } | ^^^^^^^^^^^^^^^^^^^^ @@ -66,7 +66,7 @@ LL | unsafe { internally_create::<()>(x) } | ++++++ error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:94:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:95:18 | LL | unsafe { zeroed() } | ^^^^^^^^ @@ -80,7 +80,7 @@ LL | let zeroed = mem::zeroed::<()>; | ++++++ error: never type fallback affects this `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:89:22 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:90:22 | LL | let zeroed = mem::zeroed; | ^^^^^^^^^^^ @@ -94,7 +94,7 @@ LL | let zeroed = mem::zeroed::<()>; | ++++++ error: never type fallback affects this `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:112:17 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:113:17 | LL | let f = internally_create; | ^^^^^^^^^^^^^^^^^ @@ -108,7 +108,7 @@ LL | let f = internally_create::<()>; | ++++++ error: never type fallback affects this call to an `unsafe` method - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:137:13 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:138:13 | LL | S(marker::PhantomData).create_out_of_thin_air() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -118,7 +118,7 @@ LL | S(marker::PhantomData).create_out_of_thin_air() = note: for more information, see error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:155:19 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:156:19 | LL | match send_message::<_ /* ?0 */>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -135,7 +135,7 @@ error: aborting due to 10 previous errors Future incompatibility report: Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:10:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:11:18 | LL | unsafe { mem::zeroed() } | ^^^^^^^^^^^^^ @@ -151,7 +151,7 @@ LL | unsafe { mem::zeroed::<()>() } Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:27:13 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:28:13 | LL | core::mem::transmute(Zst) | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -167,7 +167,7 @@ LL | core::mem::transmute::<_, ()>(Zst) Future breakage diagnostic: error: never type fallback affects this union access - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:44:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:45:18 | LL | unsafe { Union { a: () }.b } | ^^^^^^^^^^^^^^^^^ @@ -179,7 +179,7 @@ LL | unsafe { Union { a: () }.b } Future breakage diagnostic: error: never type fallback affects this raw pointer dereference - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:55:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:56:18 | LL | unsafe { *ptr::from_ref(&()).cast() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -195,7 +195,7 @@ LL | unsafe { *ptr::from_ref(&()).cast::<()>() } Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:76:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:77:18 | LL | unsafe { internally_create(x) } | ^^^^^^^^^^^^^^^^^^^^ @@ -211,7 +211,7 @@ LL | unsafe { internally_create::<()>(x) } Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:94:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:95:18 | LL | unsafe { zeroed() } | ^^^^^^^^ @@ -227,7 +227,7 @@ LL | let zeroed = mem::zeroed::<()>; Future breakage diagnostic: error: never type fallback affects this `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:89:22 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:90:22 | LL | let zeroed = mem::zeroed; | ^^^^^^^^^^^ @@ -243,7 +243,7 @@ LL | let zeroed = mem::zeroed::<()>; Future breakage diagnostic: error: never type fallback affects this `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:112:17 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:113:17 | LL | let f = internally_create; | ^^^^^^^^^^^^^^^^^ @@ -259,7 +259,7 @@ LL | let f = internally_create::<()>; Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` method - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:137:13 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:138:13 | LL | S(marker::PhantomData).create_out_of_thin_air() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -271,7 +271,7 @@ LL | S(marker::PhantomData).create_out_of_thin_air() Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:155:19 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:156:19 | LL | match send_message::<_ /* ?0 */>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr b/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr index 631b6dae92942..87eacdb59249e 100644 --- a/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr +++ b/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr @@ -1,5 +1,5 @@ error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:10:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:11:18 | LL | unsafe { mem::zeroed() } | ^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | unsafe { mem::zeroed::<()>() } | ++++++ error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:27:13 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:28:13 | LL | core::mem::transmute(Zst) | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -28,7 +28,7 @@ LL | core::mem::transmute::<_, ()>(Zst) | +++++++++ error: never type fallback affects this union access - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:44:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:45:18 | LL | unsafe { Union { a: () }.b } | ^^^^^^^^^^^^^^^^^ @@ -38,7 +38,7 @@ LL | unsafe { Union { a: () }.b } = note: for more information, see error: never type fallback affects this raw pointer dereference - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:55:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:56:18 | LL | unsafe { *ptr::from_ref(&()).cast() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -52,7 +52,7 @@ LL | unsafe { *ptr::from_ref(&()).cast::<()>() } | ++++++ error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:76:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:77:18 | LL | unsafe { internally_create(x) } | ^^^^^^^^^^^^^^^^^^^^ @@ -66,7 +66,7 @@ LL | unsafe { internally_create::<()>(x) } | ++++++ error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:94:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:95:18 | LL | unsafe { zeroed() } | ^^^^^^^^ @@ -80,7 +80,7 @@ LL | let zeroed = mem::zeroed::<()>; | ++++++ error: never type fallback affects this `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:89:22 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:90:22 | LL | let zeroed = mem::zeroed; | ^^^^^^^^^^^ @@ -94,7 +94,7 @@ LL | let zeroed = mem::zeroed::<()>; | ++++++ error: never type fallback affects this `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:112:17 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:113:17 | LL | let f = internally_create; | ^^^^^^^^^^^^^^^^^ @@ -108,7 +108,7 @@ LL | let f = internally_create::<()>; | ++++++ error: never type fallback affects this call to an `unsafe` method - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:137:13 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:138:13 | LL | S(marker::PhantomData).create_out_of_thin_air() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -118,7 +118,7 @@ LL | S(marker::PhantomData).create_out_of_thin_air() = note: for more information, see error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:155:19 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:156:19 | LL | match send_message::<_ /* ?0 */>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -132,7 +132,7 @@ LL | msg_send!(); = note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info) warning: the type `!` does not permit zero-initialization - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:10:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:11:18 | LL | unsafe { mem::zeroed() } | ^^^^^^^^^^^^^ this code causes undefined behavior when executed @@ -144,7 +144,7 @@ error: aborting due to 10 previous errors; 1 warning emitted Future incompatibility report: Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:10:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:11:18 | LL | unsafe { mem::zeroed() } | ^^^^^^^^^^^^^ @@ -160,7 +160,7 @@ LL | unsafe { mem::zeroed::<()>() } Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:27:13 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:28:13 | LL | core::mem::transmute(Zst) | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -176,7 +176,7 @@ LL | core::mem::transmute::<_, ()>(Zst) Future breakage diagnostic: error: never type fallback affects this union access - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:44:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:45:18 | LL | unsafe { Union { a: () }.b } | ^^^^^^^^^^^^^^^^^ @@ -188,7 +188,7 @@ LL | unsafe { Union { a: () }.b } Future breakage diagnostic: error: never type fallback affects this raw pointer dereference - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:55:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:56:18 | LL | unsafe { *ptr::from_ref(&()).cast() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -204,7 +204,7 @@ LL | unsafe { *ptr::from_ref(&()).cast::<()>() } Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:76:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:77:18 | LL | unsafe { internally_create(x) } | ^^^^^^^^^^^^^^^^^^^^ @@ -220,7 +220,7 @@ LL | unsafe { internally_create::<()>(x) } Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:94:18 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:95:18 | LL | unsafe { zeroed() } | ^^^^^^^^ @@ -236,7 +236,7 @@ LL | let zeroed = mem::zeroed::<()>; Future breakage diagnostic: error: never type fallback affects this `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:89:22 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:90:22 | LL | let zeroed = mem::zeroed; | ^^^^^^^^^^^ @@ -252,7 +252,7 @@ LL | let zeroed = mem::zeroed::<()>; Future breakage diagnostic: error: never type fallback affects this `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:112:17 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:113:17 | LL | let f = internally_create; | ^^^^^^^^^^^^^^^^^ @@ -268,7 +268,7 @@ LL | let f = internally_create::<()>; Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` method - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:137:13 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:138:13 | LL | S(marker::PhantomData).create_out_of_thin_air() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -280,7 +280,7 @@ LL | S(marker::PhantomData).create_out_of_thin_air() Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function - --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:155:19 + --> $DIR/lint-never-type-fallback-flowing-into-unsafe.rs:156:19 | LL | match send_message::<_ /* ?0 */>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.rs b/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.rs index 744fff4194cbb..891ec59ed7e0f 100644 --- a/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.rs +++ b/tests/ui/never_type/fallback_change/lint-never-type-fallback-flowing-into-unsafe.rs @@ -1,5 +1,6 @@ //@ revisions: e2015 e2024 //@[e2024] edition:2024 +#![allow(todo_macro_calls)] use std::{marker, mem, ptr}; diff --git a/tests/ui/nll/ice-106874.rs b/tests/ui/nll/ice-106874.rs index 9337eee961bfb..252bbf1afc680 100644 --- a/tests/ui/nll/ice-106874.rs +++ b/tests/ui/nll/ice-106874.rs @@ -1,5 +1,6 @@ // issue: rust-lang/rust#106874 // ICE BoundUniversalRegionError +#![allow(todo_macro_calls)] use std::marker::PhantomData; use std::rc::Rc; diff --git a/tests/ui/nll/ice-106874.stderr b/tests/ui/nll/ice-106874.stderr index 629570b602ed6..072bebc8991a3 100644 --- a/tests/ui/nll/ice-106874.stderr +++ b/tests/ui/nll/ice-106874.stderr @@ -1,5 +1,5 @@ error: implementation of `FnOnce` is not general enough - --> $DIR/ice-106874.rs:8:5 + --> $DIR/ice-106874.rs:9:5 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -8,7 +8,7 @@ LL | A(B(C::new(D::new(move |st| f(st))))) = note: ...but it actually implements `FnOnce<(&'1 mut V,)>`, for some specific lifetime `'1` error: implementation of `FnOnce` is not general enough - --> $DIR/ice-106874.rs:8:5 + --> $DIR/ice-106874.rs:9:5 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -18,13 +18,13 @@ LL | A(B(C::new(D::new(move |st| f(st))))) = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: higher-ranked subtype error - --> $DIR/ice-106874.rs:8:5 + --> $DIR/ice-106874.rs:9:5 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: higher-ranked subtype error - --> $DIR/ice-106874.rs:8:5 + --> $DIR/ice-106874.rs:9:5 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -32,7 +32,7 @@ LL | A(B(C::new(D::new(move |st| f(st))))) = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: implementation of `FnOnce` is not general enough - --> $DIR/ice-106874.rs:8:7 + --> $DIR/ice-106874.rs:9:7 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -41,7 +41,7 @@ LL | A(B(C::new(D::new(move |st| f(st))))) = note: ...but it actually implements `FnOnce<(&'2 mut V,)>`, for some specific lifetime `'2` error: implementation of `Fn` is not general enough - --> $DIR/ice-106874.rs:8:7 + --> $DIR/ice-106874.rs:9:7 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Fn` is not general enough @@ -50,7 +50,7 @@ LL | A(B(C::new(D::new(move |st| f(st))))) = note: ...but it actually implements `Fn<(&'2 mut V,)>`, for some specific lifetime `'2` error: implementation of `FnOnce` is not general enough - --> $DIR/ice-106874.rs:8:7 + --> $DIR/ice-106874.rs:9:7 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -60,7 +60,7 @@ LL | A(B(C::new(D::new(move |st| f(st))))) = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: implementation of `Fn` is not general enough - --> $DIR/ice-106874.rs:8:7 + --> $DIR/ice-106874.rs:9:7 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Fn` is not general enough @@ -70,7 +70,7 @@ LL | A(B(C::new(D::new(move |st| f(st))))) = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: implementation of `FnOnce` is not general enough - --> $DIR/ice-106874.rs:8:7 + --> $DIR/ice-106874.rs:9:7 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -80,7 +80,7 @@ LL | A(B(C::new(D::new(move |st| f(st))))) = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: implementation of `Fn` is not general enough - --> $DIR/ice-106874.rs:8:7 + --> $DIR/ice-106874.rs:9:7 | LL | A(B(C::new(D::new(move |st| f(st))))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Fn` is not general enough diff --git a/tests/ui/nll/missing-universe-cause-issue-114907.rs b/tests/ui/nll/missing-universe-cause-issue-114907.rs index a3eb5fceea999..4b8e117868347 100644 --- a/tests/ui/nll/missing-universe-cause-issue-114907.rs +++ b/tests/ui/nll/missing-universe-cause-issue-114907.rs @@ -5,6 +5,7 @@ // - the `FnOnce` bounds need an arg that is a reference // - a custom `Drop` is needed somewhere in the type that `accept` returns, to create universes // during liveness and dropck outlives computation +#![allow(todo_macro_calls)] //@ check-fail diff --git a/tests/ui/nll/missing-universe-cause-issue-114907.stderr b/tests/ui/nll/missing-universe-cause-issue-114907.stderr index c2e91edd13872..a6cbaa1ca3f1e 100644 --- a/tests/ui/nll/missing-universe-cause-issue-114907.stderr +++ b/tests/ui/nll/missing-universe-cause-issue-114907.stderr @@ -1,5 +1,5 @@ error: implementation of `FnOnce` is not general enough - --> $DIR/missing-universe-cause-issue-114907.rs:33:5 + --> $DIR/missing-universe-cause-issue-114907.rs:34:5 | LL | accept(callback); | ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -8,7 +8,7 @@ LL | accept(callback); = note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2` error: implementation of `FnOnce` is not general enough - --> $DIR/missing-universe-cause-issue-114907.rs:33:5 + --> $DIR/missing-universe-cause-issue-114907.rs:34:5 | LL | accept(callback); | ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -18,7 +18,7 @@ LL | accept(callback); = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: implementation of `FnOnce` is not general enough - --> $DIR/missing-universe-cause-issue-114907.rs:33:5 + --> $DIR/missing-universe-cause-issue-114907.rs:34:5 | LL | accept(callback); | ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -28,7 +28,7 @@ LL | accept(callback); = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: implementation of `FnOnce` is not general enough - --> $DIR/missing-universe-cause-issue-114907.rs:33:5 + --> $DIR/missing-universe-cause-issue-114907.rs:34:5 | LL | accept(callback); | ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -38,13 +38,13 @@ LL | accept(callback); = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: higher-ranked subtype error - --> $DIR/missing-universe-cause-issue-114907.rs:33:5 + --> $DIR/missing-universe-cause-issue-114907.rs:34:5 | LL | accept(callback); | ^^^^^^^^^^^^^^^^ error: higher-ranked subtype error - --> $DIR/missing-universe-cause-issue-114907.rs:33:21 + --> $DIR/missing-universe-cause-issue-114907.rs:34:21 | LL | accept(callback); | ^ diff --git a/tests/ui/nll/user-annotations/normalization-infer.rs b/tests/ui/nll/user-annotations/normalization-infer.rs index 574ae5650ff24..2d8efbba8837f 100644 --- a/tests/ui/nll/user-annotations/normalization-infer.rs +++ b/tests/ui/nll/user-annotations/normalization-infer.rs @@ -1,5 +1,6 @@ // Annnotations may contain projection types with inference variables as input. // Make sure we don't get ambiguities when normalizing them. +#![allow(todo_macro_calls)] //@ check-fail diff --git a/tests/ui/nll/user-annotations/normalization-infer.stderr b/tests/ui/nll/user-annotations/normalization-infer.stderr index 41d563a55231a..ca521afdca1d6 100644 --- a/tests/ui/nll/user-annotations/normalization-infer.stderr +++ b/tests/ui/nll/user-annotations/normalization-infer.stderr @@ -1,5 +1,5 @@ error[E0310]: the parameter type `A` may not live long enough - --> $DIR/normalization-infer.rs:11:12 + --> $DIR/normalization-infer.rs:12:12 | LL | let _: <(_,) as Tr>::Ty = a; | ^^^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ LL | fn test1(a: A, b: B, c: C) { | +++++++++ error[E0310]: the parameter type `B` may not live long enough - --> $DIR/normalization-infer.rs:12:5 + --> $DIR/normalization-infer.rs:13:5 | LL | Some::<<(_,) as Tr>::Ty>(b); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -27,7 +27,7 @@ LL | fn test1(a: A, b: B, c: C) { | +++++++++ error[E0310]: the parameter type `C` may not live long enough - --> $DIR/normalization-infer.rs:13:11 + --> $DIR/normalization-infer.rs:14:11 | LL | || -> <(_,) as Tr>::Ty { c }; | ^^^^^^^^^^^^^^^^ @@ -41,7 +41,7 @@ LL | fn test1(a: A, b: B, c: C) { | +++++++++ error[E0310]: the parameter type `D` may not live long enough - --> $DIR/normalization-infer.rs:14:6 + --> $DIR/normalization-infer.rs:15:6 | LL | |d: <(_,) as Tr>::Ty| -> D { d }; | ^ @@ -55,7 +55,7 @@ LL | fn test1(a: A, b: B, c: C) { | +++++++++ error[E0310]: the parameter type `A` may not live long enough - --> $DIR/normalization-infer.rs:28:12 + --> $DIR/normalization-infer.rs:29:12 | LL | let _: Alias<_, _> = (a, 0u8); | ^^^^^^^^^^^ @@ -69,7 +69,7 @@ LL | fn test2(a: A, b: B, c: C) { | +++++++++ error[E0310]: the parameter type `B` may not live long enough - --> $DIR/normalization-infer.rs:29:5 + --> $DIR/normalization-infer.rs:30:5 | LL | Some::>((b, 0u8)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -83,7 +83,7 @@ LL | fn test2(a: A, b: B, c: C) { | +++++++++ error[E0310]: the parameter type `C` may not live long enough - --> $DIR/normalization-infer.rs:30:11 + --> $DIR/normalization-infer.rs:31:11 | LL | || -> Alias<_, _> { (c, 0u8) }; | ^^^^^^^^^^^ @@ -97,7 +97,7 @@ LL | fn test2(a: A, b: B, c: C) { | +++++++++ error[E0716]: temporary value dropped while borrowed - --> $DIR/normalization-infer.rs:32:28 + --> $DIR/normalization-infer.rs:33:28 | LL | let _: Alias<_, _> = (&temp(), 0u8); | ----------- ^^^^^^ creates a temporary value which is freed while still in use @@ -108,7 +108,7 @@ LL | } | - temporary value is freed at the end of this statement error[E0716]: temporary value dropped while borrowed - --> $DIR/normalization-infer.rs:33:27 + --> $DIR/normalization-infer.rs:34:27 | LL | Some::>((&temp(), 0u8)); | --^^^^^^------ - temporary value is freed at the end of this statement diff --git a/tests/ui/nll/user-annotations/normalizing-user-annotation.rs b/tests/ui/nll/user-annotations/normalizing-user-annotation.rs index fa8b3bfd577d5..d39766ce0fb90 100644 --- a/tests/ui/nll/user-annotations/normalizing-user-annotation.rs +++ b/tests/ui/nll/user-annotations/normalizing-user-annotation.rs @@ -2,6 +2,7 @@ //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // Regression test for . diff --git a/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.rs b/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.rs index 2c898633b5e41..144eab791568a 100644 --- a/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.rs +++ b/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct Tuple; //~ HELP the trait `From` is not implemented for `Tuple` impl From<(u8,)> for Tuple { diff --git a/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.stderr b/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.stderr index f07db05abad6b..66bbfcdaa4c3b 100644 --- a/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.stderr +++ b/tests/ui/on-unimplemented/suggest_tuple_wrap_root_obligation.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `Tuple: From` is not satisfied - --> $DIR/suggest_tuple_wrap_root_obligation.rs:22:24 + --> $DIR/suggest_tuple_wrap_root_obligation.rs:23:24 | LL | convert_into_tuple(42_u8); | ------------------ ^^^^^ unsatisfied trait bound @@ -7,12 +7,12 @@ LL | convert_into_tuple(42_u8); | required by a bound introduced by this call | help: the trait `From` is not implemented for `Tuple` - --> $DIR/suggest_tuple_wrap_root_obligation.rs:1:1 + --> $DIR/suggest_tuple_wrap_root_obligation.rs:2:1 | LL | struct Tuple; | ^^^^^^^^^^^^ help: `Tuple` implements trait `From` - --> $DIR/suggest_tuple_wrap_root_obligation.rs:3:1 + --> $DIR/suggest_tuple_wrap_root_obligation.rs:4:1 | LL | impl From<(u8,)> for Tuple { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `From<(u8,)>` @@ -24,7 +24,7 @@ LL | impl From<(u8, u8, u8)> for Tuple { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `From<(u8, u8, u8)>` = note: required for `u8` to implement `Into` note: required by a bound in `convert_into_tuple` - --> $DIR/suggest_tuple_wrap_root_obligation.rs:19:32 + --> $DIR/suggest_tuple_wrap_root_obligation.rs:20:32 | LL | fn convert_into_tuple(_x: impl Into) {} | ^^^^^^^^^^^ required by this bound in `convert_into_tuple` diff --git a/tests/ui/panics/panic-in-message-fmt.rs b/tests/ui/panics/panic-in-message-fmt.rs index 4d539f17a0afc..8966ada75b0a3 100644 --- a/tests/ui/panics/panic-in-message-fmt.rs +++ b/tests/ui/panics/panic-in-message-fmt.rs @@ -1,4 +1,5 @@ // Checks what happens when formatting the panic message panics. +#![allow(todo_macro_calls)] //@ run-crash //@ exec-env:RUST_BACKTRACE=0 diff --git a/tests/ui/panics/panic-in-message-fmt.run.stderr b/tests/ui/panics/panic-in-message-fmt.run.stderr index 46829c33a5466..3df6c8eb5666c 100644 --- a/tests/ui/panics/panic-in-message-fmt.run.stderr +++ b/tests/ui/panics/panic-in-message-fmt.run.stderr @@ -1,3 +1,3 @@ -panicked at $DIR/panic-in-message-fmt.rs:18:9: +panicked at $DIR/panic-in-message-fmt.rs:19:9: not yet implemented thread panicked while processing panic. aborting. diff --git a/tests/ui/parallel-rustc/default-trait-shadow-cycle-issue-151358.rs b/tests/ui/parallel-rustc/default-trait-shadow-cycle-issue-151358.rs index 8bc11ce31d195..c6897005f2fdf 100644 --- a/tests/ui/parallel-rustc/default-trait-shadow-cycle-issue-151358.rs +++ b/tests/ui/parallel-rustc/default-trait-shadow-cycle-issue-151358.rs @@ -3,6 +3,7 @@ // //@ compile-flags: -Z threads=2 //@ compare-output-by-lines +#![allow(todo_macro_calls)] trait Default {} use std::num::NonZero; diff --git a/tests/ui/parallel-rustc/recursive-struct-oncelock-issue-151226.rs b/tests/ui/parallel-rustc/recursive-struct-oncelock-issue-151226.rs index 69cbd578325c5..f54c7b519c24a 100644 --- a/tests/ui/parallel-rustc/recursive-struct-oncelock-issue-151226.rs +++ b/tests/ui/parallel-rustc/recursive-struct-oncelock-issue-151226.rs @@ -2,6 +2,7 @@ // //@ compile-flags: -Z threads=2 //@ compare-output-by-lines +#![allow(todo_macro_calls)] struct A(std::sync::OnceLock); //~^ ERROR recursive type `A` has infinite size diff --git a/tests/ui/parallel-rustc/recursive-struct-oncelock-issue-151226.stderr b/tests/ui/parallel-rustc/recursive-struct-oncelock-issue-151226.stderr index 2a51ee930779c..70d23b89185af 100644 --- a/tests/ui/parallel-rustc/recursive-struct-oncelock-issue-151226.stderr +++ b/tests/ui/parallel-rustc/recursive-struct-oncelock-issue-151226.stderr @@ -1,5 +1,5 @@ error[E0072]: recursive type `A` has infinite size - --> $DIR/recursive-struct-oncelock-issue-151226.rs:6:1 + --> $DIR/recursive-struct-oncelock-issue-151226.rs:7:1 | LL | struct A(std::sync::OnceLock); | ^^^^^^^^^^^ ------------------------- recursive without indirection diff --git a/tests/ui/parallel-rustc/undefined-function-issue-120760.rs b/tests/ui/parallel-rustc/undefined-function-issue-120760.rs index 2665c30945b96..9944efcdb46f7 100644 --- a/tests/ui/parallel-rustc/undefined-function-issue-120760.rs +++ b/tests/ui/parallel-rustc/undefined-function-issue-120760.rs @@ -3,6 +3,7 @@ //@ compile-flags: -Z threads=45 //@ edition: 2021 //@ compare-output-by-lines +#![allow(todo_macro_calls)] type BoxFuture = std::pin::Pin>>; diff --git a/tests/ui/parallel-rustc/undefined-function-issue-120760.stderr b/tests/ui/parallel-rustc/undefined-function-issue-120760.stderr index 87af537221927..fd8eb2892481e 100644 --- a/tests/ui/parallel-rustc/undefined-function-issue-120760.stderr +++ b/tests/ui/parallel-rustc/undefined-function-issue-120760.stderr @@ -1,5 +1,5 @@ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/undefined-function-issue-120760.rs:20:16 + --> $DIR/undefined-function-issue-120760.rs:21:16 | LL | pub name: &'a str, | ^^ undeclared lifetime @@ -9,26 +9,26 @@ help: consider introducing lifetime `'a` here LL | pub struct User<'a, 'dep> { | +++ +error[E0560]: struct `User<'_>` has no field named `dep` + --> $DIR/undefined-function-issue-120760.rs:71:12 + | +LL | User { dep }.save().await; + | ^^^ `User<'_>` does not have this field + | + = note: available fields are: `name` + error[E0425]: cannot find function `run` in this scope - --> $DIR/undefined-function-issue-120760.rs:14:5 + --> $DIR/undefined-function-issue-120760.rs:15:5 | LL | run("dependency").await; | ^^^ not found in this scope error[E0425]: cannot find function `run` in this scope - --> $DIR/undefined-function-issue-120760.rs:61:17 + --> $DIR/undefined-function-issue-120760.rs:62:17 | LL | let _ = run("dependency").await; | ^^^ not found in this scope -error[E0560]: struct `User<'_>` has no field named `dep` - --> $DIR/undefined-function-issue-120760.rs:70:12 - | -LL | User { dep }.save().await; - | ^^^ `User<'_>` does not have this field - | - = note: available fields are: `name` - error: aborting due to 4 previous errors Some errors have detailed explanations: E0261, E0425, E0560. diff --git a/tests/ui/parser/attribute-on-empty.rs b/tests/ui/parser/attribute-on-empty.rs index 0177e6c1b59d4..cad1f4512aad3 100644 --- a/tests/ui/parser/attribute-on-empty.rs +++ b/tests/ui/parser/attribute-on-empty.rs @@ -1,5 +1,6 @@ //! Regression test for: //! +#![allow(todo_macro_calls)] struct Baz(i32); diff --git a/tests/ui/parser/attribute-on-empty.stderr b/tests/ui/parser/attribute-on-empty.stderr index 6bcbf1ceb8d1f..79cbf8eb34d6f 100644 --- a/tests/ui/parser/attribute-on-empty.stderr +++ b/tests/ui/parser/attribute-on-empty.stderr @@ -1,5 +1,5 @@ error: attributes cannot be applied here - --> $DIR/attribute-on-empty.rs:7:16 + --> $DIR/attribute-on-empty.rs:8:16 | LL | let _: Baz<#[cfg(false)]> = todo!(); | - ^^^^^^^^^^^^^ attributes are not allowed here @@ -7,43 +7,43 @@ LL | let _: Baz<#[cfg(false)]> = todo!(); | while parsing the type for `_` error: attributes cannot be applied to a function parameter's type - --> $DIR/attribute-on-empty.rs:11:14 + --> $DIR/attribute-on-empty.rs:12:14 | LL | fn f(_param: #[attr]) {} | ^^^^^^^ attributes are not allowed here error: expected type, found `)` - --> $DIR/attribute-on-empty.rs:11:21 + --> $DIR/attribute-on-empty.rs:12:21 | LL | fn f(_param: #[attr]) {} | ^ expected type error: attributes cannot be applied here - --> $DIR/attribute-on-empty.rs:15:11 + --> $DIR/attribute-on-empty.rs:16:11 | LL | fn g() -> #[attr] { 0 } | ^^^^^^^ attributes are not allowed here error: attributes cannot be applied here - --> $DIR/attribute-on-empty.rs:19:12 + --> $DIR/attribute-on-empty.rs:20:12 | LL | field: #[attr], | ^^^^^^^ attributes are not allowed here error: attributes cannot be applied here - --> $DIR/attribute-on-empty.rs:21:14 + --> $DIR/attribute-on-empty.rs:22:14 | LL | field1: (#[attr], i32), | ^^^^^^^ attributes are not allowed here error: attributes cannot be applied here - --> $DIR/attribute-on-empty.rs:25:15 + --> $DIR/attribute-on-empty.rs:26:15 | LL | type Tuple = (#[attr], String); | ^^^^^^^ attributes are not allowed here error: attributes cannot be applied here - --> $DIR/attribute-on-empty.rs:28:6 + --> $DIR/attribute-on-empty.rs:29:6 | LL | impl #[attr] {} | ^^^^^^^ attributes are not allowed here diff --git a/tests/ui/parser/eq-gt-to-gt-eq.fixed b/tests/ui/parser/eq-gt-to-gt-eq.fixed index abb328399be2a..4f67528d96982 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.fixed +++ b/tests/ui/parser/eq-gt-to-gt-eq.fixed @@ -1,6 +1,6 @@ //@ run-rustfix // Check that we try to correct `=>` to `>=` in conditions. -#![allow(unused)] +#![allow(unused, todo_macro_uses)] fn main() { let a = 0; diff --git a/tests/ui/parser/eq-gt-to-gt-eq.rs b/tests/ui/parser/eq-gt-to-gt-eq.rs index 1f57fa8328198..a96e58f2ebc3c 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.rs +++ b/tests/ui/parser/eq-gt-to-gt-eq.rs @@ -1,6 +1,6 @@ //@ run-rustfix // Check that we try to correct `=>` to `>=` in conditions. -#![allow(unused)] +#![allow(unused, todo_macro_calls)] fn main() { let a = 0; diff --git a/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.rs b/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.rs index 254e816cfc9f6..0b625be69d0f3 100644 --- a/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.rs +++ b/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] fn main() { todo!(); } diff --git a/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr b/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr index 5e4b4dd3001a5..2d1d0238899b8 100644 --- a/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr +++ b/tests/ui/parser/issues/issue-98601-delimiter-error-unexpected-close.stderr @@ -1,5 +1,5 @@ error: unexpected closing delimiter: `)` - --> $DIR/issue-98601-delimiter-error-unexpected-close.rs:5:17 + --> $DIR/issue-98601-delimiter-error-unexpected-close.rs:6:17 | LL | fn main() { | - this opening brace... diff --git a/tests/ui/pattern/byte-string-inference.rs b/tests/ui/pattern/byte-string-inference.rs index c49f599bc9bfd..0881772fe3973 100644 --- a/tests/ui/pattern/byte-string-inference.rs +++ b/tests/ui/pattern/byte-string-inference.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] fn load() -> Option { todo!() diff --git a/tests/ui/pattern/for-loop-bad-item.rs b/tests/ui/pattern/for-loop-bad-item.rs index 9a56a399b9b56..39c7539dbddbe 100644 --- a/tests/ui/pattern/for-loop-bad-item.rs +++ b/tests/ui/pattern/for-loop-bad-item.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct Qux(i32); fn bad() { diff --git a/tests/ui/pattern/for-loop-bad-item.stderr b/tests/ui/pattern/for-loop-bad-item.stderr index 67c6d6f01a17f..e9f0cf7fb2377 100644 --- a/tests/ui/pattern/for-loop-bad-item.stderr +++ b/tests/ui/pattern/for-loop-bad-item.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/for-loop-bad-item.rs:7:19 + --> $DIR/for-loop-bad-item.rs:8:19 | LL | for ((_, _), (&mut c, _)) in &mut map { | ^^^^^^ -------- this is an iterator with items of type `(&(char, char), &mut (char, char))` @@ -9,7 +9,7 @@ LL | for ((_, _), (&mut c, _)) in &mut map { = note: expected type `char` found mutable reference `&mut _` note: to declare a mutable binding use: `mut c` - --> $DIR/for-loop-bad-item.rs:7:19 + --> $DIR/for-loop-bad-item.rs:8:19 | LL | for ((_, _), (&mut c, _)) in &mut map { | ^^^^^^ @@ -20,7 +20,7 @@ LL + for ((_, _), (c, _)) in &mut map { | error[E0308]: mismatched types - --> $DIR/for-loop-bad-item.rs:14:14 + --> $DIR/for-loop-bad-item.rs:15:14 | LL | for Some(Qux(_)) | None in [Some(""), None] { | ^^^^^^ ---------------- this is an iterator with items of type `Option<&str>` diff --git a/tests/ui/pattern/self-ctor-133272.rs b/tests/ui/pattern/self-ctor-133272.rs index ad64d6b88cd91..14894b2380167 100644 --- a/tests/ui/pattern/self-ctor-133272.rs +++ b/tests/ui/pattern/self-ctor-133272.rs @@ -8,6 +8,7 @@ //! - ICE bug report: . //! - Previous PR to change `delayed_bug` -> `span_bug`: //! +#![allow(todo_macro_calls)] #![crate_type = "lib"] struct Foo; diff --git a/tests/ui/pattern/self-ctor-133272.stderr b/tests/ui/pattern/self-ctor-133272.stderr index bca55a43d9c08..fa4bd0ca1ea91 100644 --- a/tests/ui/pattern/self-ctor-133272.stderr +++ b/tests/ui/pattern/self-ctor-133272.stderr @@ -1,11 +1,11 @@ error: expected identifier, found keyword `Self` - --> $DIR/self-ctor-133272.rs:17:21 + --> $DIR/self-ctor-133272.rs:18:21 | LL | let S { ref Self } = todo!(); | ^^^^ expected identifier, found keyword error[E0422]: cannot find struct, variant or union type `S` in this scope - --> $DIR/self-ctor-133272.rs:17:13 + --> $DIR/self-ctor-133272.rs:18:13 | LL | let S { ref Self } = todo!(); | ^ not found in this scope diff --git a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed index db09fd1c0328e..02e9dd545e34a 100644 --- a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed +++ b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.fixed @@ -1,4 +1,5 @@ //@ run-rustfix +#[allow(todo_macro_uses)] fn main() { match Some(1) { //~ ERROR non-exhaustive patterns: `None` not covered diff --git a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs index 7e4b60f8ff28d..44906c80b0103 100644 --- a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs +++ b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.rs @@ -1,4 +1,5 @@ //@ run-rustfix +#[allow(todo_macro_calls)] fn main() { match Some(1) { //~ ERROR non-exhaustive patterns: `None` not covered diff --git a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr index 77d552b0cf651..eee10d483bbf2 100644 --- a/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr +++ b/tests/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: `None` not covered - --> $DIR/suggest-adding-appropriate-missing-pattern-excluding-comments.rs:4:11 + --> $DIR/suggest-adding-appropriate-missing-pattern-excluding-comments.rs:5:11 | LL | match Some(1) { | ^^^^^^^ pattern `None` not covered diff --git a/tests/ui/pin-ergonomics/sugar-no-const.rs b/tests/ui/pin-ergonomics/sugar-no-const.rs index 7270366808497..b1285e841b5ae 100644 --- a/tests/ui/pin-ergonomics/sugar-no-const.rs +++ b/tests/ui/pin-ergonomics/sugar-no-const.rs @@ -1,5 +1,5 @@ #![feature(pin_ergonomics)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] // Makes sure we don't accidentally accept `&pin Foo` without the `const` keyword. diff --git a/tests/ui/privacy/auxiliary/issue-117997.rs b/tests/ui/privacy/auxiliary/issue-117997.rs index 1ad90b1cfad8f..48a22c5c22325 100644 --- a/tests/ui/privacy/auxiliary/issue-117997.rs +++ b/tests/ui/privacy/auxiliary/issue-117997.rs @@ -1,5 +1,6 @@ //@ no-prefer-dynamic //@ compile-flags: --crate-type=rlib +#![allow(todo_macro_calls)] pub use impl_mod::TraitImplementer as Implementer; diff --git a/tests/ui/privacy/auxiliary/issue-92755.rs b/tests/ui/privacy/auxiliary/issue-92755.rs index 6f85273461af5..afc2453893c39 100644 --- a/tests/ui/privacy/auxiliary/issue-92755.rs +++ b/tests/ui/privacy/auxiliary/issue-92755.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] mod machine { pub struct A { pub b: B, diff --git a/tests/ui/privacy/projections.rs b/tests/ui/privacy/projections.rs index 0e6590de4f5b4..20466cd52c8e8 100644 --- a/tests/ui/privacy/projections.rs +++ b/tests/ui/privacy/projections.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] mod m { struct Priv; pub type Leak = Priv; //~ WARN: `Priv` is more private than the item `Leak` diff --git a/tests/ui/privacy/projections.stderr b/tests/ui/privacy/projections.stderr index addb6a075a282..37c1949ce7417 100644 --- a/tests/ui/privacy/projections.stderr +++ b/tests/ui/privacy/projections.stderr @@ -1,5 +1,5 @@ error[E0446]: private type `Priv` in public interface - --> $DIR/projections.rs:24:5 + --> $DIR/projections.rs:25:5 | LL | struct Priv; | ----------- `Priv` declared as private @@ -8,7 +8,7 @@ LL | type A = m::Leak; | ^^^^^^^^^ can't leak private type error[E0446]: private type `Priv` in public interface - --> $DIR/projections.rs:39:5 + --> $DIR/projections.rs:40:5 | LL | struct Priv; | ----------- `Priv` declared as private @@ -17,26 +17,26 @@ LL | type A = T::A; | ^^^^^^^^^^^^^^^^ can't leak private type warning: type `Priv` is more private than the item `Leak` - --> $DIR/projections.rs:3:5 + --> $DIR/projections.rs:4:5 | LL | pub type Leak = Priv; | ^^^^^^^^^^^^^ type alias `Leak` is reachable at visibility `pub(crate)` | note: but type `Priv` is only usable at visibility `pub(self)` - --> $DIR/projections.rs:2:5 + --> $DIR/projections.rs:3:5 | LL | struct Priv; | ^^^^^^^^^^^ = note: `#[warn(private_interfaces)]` on by default error: type `Priv` is private - --> $DIR/projections.rs:14:15 + --> $DIR/projections.rs:15:15 | LL | fn check() -> ::A { | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type error: type `Priv` is private - --> $DIR/projections.rs:29:39 + --> $DIR/projections.rs:30:39 | LL | fn check2() -> ::A { | _______________________________________^ @@ -46,13 +46,13 @@ LL | | } | |_^ private type error: type `Priv` is private - --> $DIR/projections.rs:24:17 + --> $DIR/projections.rs:25:17 | LL | type A = m::Leak; | ^^^^^^^ private type error: type `Priv` is private - --> $DIR/projections.rs:39:24 + --> $DIR/projections.rs:40:24 | LL | type A = T::A; | ^^^^^^^^^^^^^ private type diff --git a/tests/ui/privacy/projections2.rs b/tests/ui/privacy/projections2.rs index 1afbf6d196e58..a4282144cdee5 100644 --- a/tests/ui/privacy/projections2.rs +++ b/tests/ui/privacy/projections2.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] mod m { use super::*; struct Priv; diff --git a/tests/ui/privacy/projections2.stderr b/tests/ui/privacy/projections2.stderr index 6eae9643c5a8e..9ff1c1ad18626 100644 --- a/tests/ui/privacy/projections2.stderr +++ b/tests/ui/privacy/projections2.stderr @@ -1,18 +1,18 @@ warning: type `Priv` is more private than the item `Leak` - --> $DIR/projections2.rs:4:5 + --> $DIR/projections2.rs:5:5 | LL | pub type Leak = Priv; | ^^^^^^^^^^^^^ type alias `Leak` is reachable at visibility `pub(crate)` | note: but type `Priv` is only usable at visibility `pub(self)` - --> $DIR/projections2.rs:3:5 + --> $DIR/projections2.rs:4:5 | LL | struct Priv; | ^^^^^^^^^^^ = note: `#[warn(private_interfaces)]` on by default error[E0446]: private associated type `Trait3::A` in public interface - --> $DIR/projections2.rs:19:9 + --> $DIR/projections2.rs:20:9 | LL | type A; | ---------------- `Trait3::A` declared as private @@ -21,7 +21,7 @@ LL | type A = ::A; | ^^^^^^^^^^^^^^^^ can't leak private associated type error[E0446]: private trait `Trait3` in public interface - --> $DIR/projections2.rs:19:9 + --> $DIR/projections2.rs:20:9 | LL | trait Trait3 { | ------------ `Trait3` declared as private diff --git a/tests/ui/privacy/suggest-new-projection-ice.rs b/tests/ui/privacy/suggest-new-projection-ice.rs index 41ac27508e8ac..ec9e249787bc7 100644 --- a/tests/ui/privacy/suggest-new-projection-ice.rs +++ b/tests/ui/privacy/suggest-new-projection-ice.rs @@ -1,5 +1,6 @@ //! Regression test for . //! Ensure that we don't ICE when an associated function returns an associated type. +#![allow(todo_macro_calls)] mod m { pub trait Project { diff --git a/tests/ui/privacy/suggest-new-projection-ice.stderr b/tests/ui/privacy/suggest-new-projection-ice.stderr index 4700772096b93..429f9422e7411 100644 --- a/tests/ui/privacy/suggest-new-projection-ice.stderr +++ b/tests/ui/privacy/suggest-new-projection-ice.stderr @@ -1,5 +1,5 @@ error: cannot construct `Foo` with struct literal syntax due to private fields - --> $DIR/suggest-new-projection-ice.rs:18:13 + --> $DIR/suggest-new-projection-ice.rs:19:13 | LL | let _ = m::Foo {}; | ^^^^^^ diff --git a/tests/ui/query-system/query-cycle-printing-issue-151226.rs b/tests/ui/query-system/query-cycle-printing-issue-151226.rs index 551321619ddd0..b7af309e3e854 100644 --- a/tests/ui/query-system/query-cycle-printing-issue-151226.rs +++ b/tests/ui/query-system/query-cycle-printing-issue-151226.rs @@ -1,3 +1,5 @@ +#![allow(todo_macro_calls)] + struct A(std::sync::OnceLock); //~^ ERROR recursive type `A` has infinite size diff --git a/tests/ui/query-system/query-cycle-printing-issue-151226.stderr b/tests/ui/query-system/query-cycle-printing-issue-151226.stderr index bb05cf5f915d7..647f55fb075d7 100644 --- a/tests/ui/query-system/query-cycle-printing-issue-151226.stderr +++ b/tests/ui/query-system/query-cycle-printing-issue-151226.stderr @@ -1,5 +1,5 @@ error[E0072]: recursive type `A` has infinite size - --> $DIR/query-cycle-printing-issue-151226.rs:1:1 + --> $DIR/query-cycle-printing-issue-151226.rs:3:1 | LL | struct A(std::sync::OnceLock); | ^^^^^^^^^^^ ------------------------- recursive without indirection diff --git a/tests/ui/reachable/expr_cast.rs b/tests/ui/reachable/expr_cast.rs index aa412c99b2e9b..5878855c045eb 100644 --- a/tests/ui/reachable/expr_cast.rs +++ b/tests/ui/reachable/expr_cast.rs @@ -3,6 +3,7 @@ // // Check that we don't warn on `as` casts of never to any as unreachable. // While they *are* unreachable, sometimes they are required to appeal typeck. +#![allow(todo_macro_calls)] #![deny(unreachable_code)] fn a() { diff --git a/tests/ui/reachable/todo.rs b/tests/ui/reachable/todo.rs new file mode 100644 index 0000000000000..2945e958d9b33 --- /dev/null +++ b/tests/ui/reachable/todo.rs @@ -0,0 +1,41 @@ +//@ check-pass +//@ edition: 2018 + +#![allow(unused, todo_macro_calls)] +#![warn(unreachable_code)] + +macro_rules! later { + () => { todo!() }; +} + +fn foo() { + todo!(); + let this_is_unreachable = 1; +} + +fn bar() { + panic!("This is really unreachable"); + let really_unreachable = true; + //~^ WARNING: unreachable +} + +fn baz() -> bool { + if true { + todo!(); + false + } else if todo!() { + true + } else { + later!(); + false + } +} + +fn main() { + foo(); + bar(); + if baz() { + todo!(); + } + let this_is_reachable = 1; +} diff --git a/tests/ui/reachable/todo.stderr b/tests/ui/reachable/todo.stderr new file mode 100644 index 0000000000000..bd9b4bec356e3 --- /dev/null +++ b/tests/ui/reachable/todo.stderr @@ -0,0 +1,16 @@ +warning: unreachable statement + --> $DIR/todo.rs:18:5 + | +LL | panic!("This is really unreachable"); + | ------------------------------------ any code following this expression is unreachable +LL | let really_unreachable = true; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement + | +note: the lint level is defined here + --> $DIR/todo.rs:5:9 + | +LL | #![warn(unreachable_code)] + | ^^^^^^^^^^^^^^^^ + +warning: 1 warning emitted + diff --git a/tests/ui/regions/regions-name-undeclared.rs b/tests/ui/regions/regions-name-undeclared.rs index e4779a1853daa..0b6173a8a883d 100644 --- a/tests/ui/regions/regions-name-undeclared.rs +++ b/tests/ui/regions/regions-name-undeclared.rs @@ -1,6 +1,7 @@ //@ edition:2018 // Check that lifetime resolver enforces the lifetime name scoping // rules correctly in various scenarios. +#![allow(todo_macro_calls)] struct Foo<'a> { x: &'a isize diff --git a/tests/ui/regions/regions-name-undeclared.stderr b/tests/ui/regions/regions-name-undeclared.stderr index 06e6f4299deaf..ba5aeef94db2c 100644 --- a/tests/ui/regions/regions-name-undeclared.stderr +++ b/tests/ui/regions/regions-name-undeclared.stderr @@ -1,5 +1,5 @@ error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/regions-name-undeclared.rs:16:24 + --> $DIR/regions-name-undeclared.rs:17:24 | LL | fn m4(&self, arg: &'b isize) { } | ^^ undeclared lifetime @@ -14,7 +14,7 @@ LL | impl<'b, 'a> Foo<'a> { | +++ error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/regions-name-undeclared.rs:17:12 + --> $DIR/regions-name-undeclared.rs:18:12 | LL | fn m5(&'b self) { } | ^^ undeclared lifetime @@ -29,7 +29,7 @@ LL | impl<'b, 'a> Foo<'a> { | +++ error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/regions-name-undeclared.rs:18:27 + --> $DIR/regions-name-undeclared.rs:19:27 | LL | fn m6(&self, arg: Foo<'b>) { } | ^^ undeclared lifetime @@ -44,7 +44,7 @@ LL | impl<'b, 'a> Foo<'a> { | +++ error[E0401]: can't use generic parameters from outer item - --> $DIR/regions-name-undeclared.rs:26:22 + --> $DIR/regions-name-undeclared.rs:27:22 | LL | fn bar<'a>(x: &'a isize) { | -- lifetime parameter from outer item @@ -58,7 +58,7 @@ LL | type X<'a> = Option<&'a isize>; | ++++ error[E0401]: can't use generic parameters from outer item - --> $DIR/regions-name-undeclared.rs:28:13 + --> $DIR/regions-name-undeclared.rs:29:13 | LL | fn bar<'a>(x: &'a isize) { | -- lifetime parameter from outer item @@ -72,7 +72,7 @@ LL | enum E<'a> { | ++++ error[E0401]: can't use generic parameters from outer item - --> $DIR/regions-name-undeclared.rs:31:13 + --> $DIR/regions-name-undeclared.rs:32:13 | LL | fn bar<'a>(x: &'a isize) { | -- lifetime parameter from outer item @@ -86,7 +86,7 @@ LL | struct S<'a> { | ++++ error[E0401]: can't use generic parameters from outer item - --> $DIR/regions-name-undeclared.rs:33:14 + --> $DIR/regions-name-undeclared.rs:34:14 | LL | fn bar<'a>(x: &'a isize) { | -- lifetime parameter from outer item @@ -100,7 +100,7 @@ LL | fn f<'a>(a: &'a isize) { } | ++++ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/regions-name-undeclared.rs:41:17 + --> $DIR/regions-name-undeclared.rs:42:17 | LL | fn fn_types(a: &'a isize, | ^^ undeclared lifetime @@ -111,7 +111,7 @@ LL | fn fn_types<'a>(a: &'a isize, | ++++ error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/regions-name-undeclared.rs:43:36 + --> $DIR/regions-name-undeclared.rs:44:36 | LL | ... &'b isize, | ^^ undeclared lifetime @@ -127,7 +127,7 @@ LL | fn fn_types<'b>(a: &'a isize, | ++++ error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/regions-name-undeclared.rs:46:36 + --> $DIR/regions-name-undeclared.rs:47:36 | LL | ... &'b isize)>, | ^^ undeclared lifetime @@ -142,7 +142,7 @@ LL | fn fn_types<'b>(a: &'a isize, | ++++ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/regions-name-undeclared.rs:47:17 + --> $DIR/regions-name-undeclared.rs:48:17 | LL | c: &'a isize) | ^^ undeclared lifetime @@ -153,7 +153,7 @@ LL | fn fn_types<'a>(a: &'a isize, | ++++ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/regions-name-undeclared.rs:53:31 + --> $DIR/regions-name-undeclared.rs:54:31 | LL | async fn buggy(&self) -> &'a str { | ^^ undeclared lifetime diff --git a/tests/ui/regions/resolve-re-error-ice.rs b/tests/ui/regions/resolve-re-error-ice.rs index bf6defb9bae36..647480f970d9a 100644 --- a/tests/ui/regions/resolve-re-error-ice.rs +++ b/tests/ui/regions/resolve-re-error-ice.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] use std::collections::hash_map::{Keys, HashMap}; use std::marker::PhantomData; diff --git a/tests/ui/regions/resolve-re-error-ice.stderr b/tests/ui/regions/resolve-re-error-ice.stderr index f463a97c5bc1e..9ac37053ceb1f 100644 --- a/tests/ui/regions/resolve-re-error-ice.stderr +++ b/tests/ui/regions/resolve-re-error-ice.stderr @@ -1,33 +1,33 @@ error[E0803]: cannot infer an appropriate lifetime for lifetime parameter '_ in generic type due to conflicting requirements - --> $DIR/resolve-re-error-ice.rs:12:5 + --> $DIR/resolve-re-error-ice.rs:13:5 | LL | fn key_set(&self) -> Subject<'a, Keys, (), R> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the anonymous lifetime defined here... - --> $DIR/resolve-re-error-ice.rs:5:16 + --> $DIR/resolve-re-error-ice.rs:6:16 | LL | fn key_set(&self) -> Subject, (), R>; | ^^^^^ note: ...so that the method type is compatible with trait - --> $DIR/resolve-re-error-ice.rs:12:5 + --> $DIR/resolve-re-error-ice.rs:13:5 | LL | fn key_set(&self) -> Subject<'a, Keys, (), R> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: expected `fn(&Subject<'_, _, _, _>) -> Subject<'_, std::collections::hash_map::Keys<'_, _, _>, _, _>` found `fn(&Subject<'_, _, _, _>) -> Subject<'a, std::collections::hash_map::Keys<'_, _, _>, _, _>` note: but, the lifetime must be valid for the lifetime `'a` as defined here... - --> $DIR/resolve-re-error-ice.rs:10:6 + --> $DIR/resolve-re-error-ice.rs:11:6 | LL | impl<'a, K, V, R> MapAssertion<'a, K, V, R> for Subject<'a, HashMap, (), R> | ^^ note: ...so that the type `std::collections::hash_map::Keys<'_, K, V>` will meet its required lifetime bounds... - --> $DIR/resolve-re-error-ice.rs:12:5 + --> $DIR/resolve-re-error-ice.rs:13:5 | LL | fn key_set(&self) -> Subject<'a, Keys, (), R> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...that is required by this bound - --> $DIR/resolve-re-error-ice.rs:8:29 + --> $DIR/resolve-re-error-ice.rs:9:29 | LL | struct Subject<'a, T, V, R>(PhantomData<(&'a T, V, R)>); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/resolve/inner-attr-prelude-macro.rs b/tests/ui/resolve/inner-attr-prelude-macro.rs index 1047c908ad116..9d0e2237c45a5 100644 --- a/tests/ui/resolve/inner-attr-prelude-macro.rs +++ b/tests/ui/resolve/inner-attr-prelude-macro.rs @@ -1,6 +1,7 @@ //@ check-pass //! This test checks that macro names resolved from the libstd prelude //! still work even if there's a crate-level custom inner attribute. +#![allow(todo_macro_calls)] #![feature(custom_inner_attributes)] diff --git a/tests/ui/resolve/slice-as-slice.rs b/tests/ui/resolve/slice-as-slice.rs index 04b8042bff921..7497879ce9976 100644 --- a/tests/ui/resolve/slice-as-slice.rs +++ b/tests/ui/resolve/slice-as-slice.rs @@ -2,6 +2,7 @@ // This is a regression test for github.com/rust-lang/rust/issues/152961 // This broke when a method `as_slice` was added on slices // This pattern is used in the `rgb` crate +#![allow(todo_macro_calls)] struct Meow; diff --git a/tests/ui/resolve/slice-as-slice.stderr b/tests/ui/resolve/slice-as-slice.stderr index f22a0dd6ac58e..45096ddb581ce 100644 --- a/tests/ui/resolve/slice-as-slice.stderr +++ b/tests/ui/resolve/slice-as-slice.stderr @@ -1,5 +1,5 @@ warning: a method with this name may be added to the standard library in the future - --> $DIR/slice-as-slice.rs:19:12 + --> $DIR/slice-as-slice.rs:20:12 | LL | b(data.as_slice()); | ^^^^^^^^ diff --git a/tests/ui/resolve/underscore-bindings-disambiguators.rs b/tests/ui/resolve/underscore-bindings-disambiguators.rs index 13f0271af10ee..3a5320c902391 100644 --- a/tests/ui/resolve/underscore-bindings-disambiguators.rs +++ b/tests/ui/resolve/underscore-bindings-disambiguators.rs @@ -1,6 +1,7 @@ //@ edition:2015 // Regression test for issue #144168 where some `_` bindings were incorrectly only allowed once per // module, failing with "error[E0428]: the name `_` is defined multiple times". +#![allow(todo_macro_calls)] // This weird/complex setup is reduced from `zerocopy-0.8.25` where the issue was encountered. diff --git a/tests/ui/resolve/underscore-bindings-disambiguators.stderr b/tests/ui/resolve/underscore-bindings-disambiguators.stderr index ec1dec8fe8e28..b3b9424efd8ca 100644 --- a/tests/ui/resolve/underscore-bindings-disambiguators.stderr +++ b/tests/ui/resolve/underscore-bindings-disambiguators.stderr @@ -1,47 +1,47 @@ error[E0432]: unresolved import `X` - --> $DIR/underscore-bindings-disambiguators.rs:25:5 + --> $DIR/underscore-bindings-disambiguators.rs:26:5 | LL | use X as Y; | ^^^^^^ no `X` in the root error[E0432]: unresolved import `Z` - --> $DIR/underscore-bindings-disambiguators.rs:26:5 + --> $DIR/underscore-bindings-disambiguators.rs:27:5 | LL | use Z as W; | ^^^^^^ no `Z` in the root error[E0080]: evaluation panicked: not yet implemented - --> $DIR/underscore-bindings-disambiguators.rs:19:19 + --> $DIR/underscore-bindings-disambiguators.rs:20:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here error[E0080]: evaluation panicked: not yet implemented - --> $DIR/underscore-bindings-disambiguators.rs:20:19 + --> $DIR/underscore-bindings-disambiguators.rs:21:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here error[E0080]: evaluation panicked: not yet implemented - --> $DIR/underscore-bindings-disambiguators.rs:21:19 + --> $DIR/underscore-bindings-disambiguators.rs:22:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here error[E0080]: evaluation panicked: not yet implemented - --> $DIR/underscore-bindings-disambiguators.rs:22:19 + --> $DIR/underscore-bindings-disambiguators.rs:23:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here error[E0080]: evaluation panicked: not yet implemented - --> $DIR/underscore-bindings-disambiguators.rs:23:19 + --> $DIR/underscore-bindings-disambiguators.rs:24:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here error[E0080]: evaluation panicked: not yet implemented - --> $DIR/underscore-bindings-disambiguators.rs:28:15 + --> $DIR/underscore-bindings-disambiguators.rs:29:15 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `_` failed here diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs index d8f9b36c8be55..77ab00e49e293 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs @@ -4,7 +4,7 @@ //@ [edition2024] edition: 2024 //@ check-pass -#![allow(irrefutable_let_patterns)] +#![allow(irrefutable_let_patterns, todo_macro_calls)] struct Pd; diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs index 3e4fae2e84e76..223f4032f10c2 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs @@ -3,7 +3,7 @@ //@ edition: 2024 //@ check-pass -#![allow(irrefutable_let_patterns)] +#![allow(irrefutable_let_patterns, todo_macro_calls)] struct Pd; diff --git a/tests/ui/rust-2021/future-prelude-collision-generic.fixed b/tests/ui/rust-2021/future-prelude-collision-generic.fixed index bb852832456ab..d9b449ab77ec9 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-generic.fixed @@ -3,7 +3,7 @@ //@ edition:2018 //@ check-pass #![warn(rust_2021_prelude_collisions)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_uses)] #![allow(unused_imports)] struct Generic<'a, U>(&'a U); diff --git a/tests/ui/rust-2021/future-prelude-collision-generic.rs b/tests/ui/rust-2021/future-prelude-collision-generic.rs index bcaced88763c3..ef7fa0607cdcb 100644 --- a/tests/ui/rust-2021/future-prelude-collision-generic.rs +++ b/tests/ui/rust-2021/future-prelude-collision-generic.rs @@ -3,7 +3,7 @@ //@ edition:2018 //@ check-pass #![warn(rust_2021_prelude_collisions)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] #![allow(unused_imports)] struct Generic<'a, U>(&'a U); diff --git a/tests/ui/rust-2021/future-prelude-collision-macros.fixed b/tests/ui/rust-2021/future-prelude-collision-macros.fixed index f5a548a2501ba..b575643765495 100644 --- a/tests/ui/rust-2021/future-prelude-collision-macros.fixed +++ b/tests/ui/rust-2021/future-prelude-collision-macros.fixed @@ -2,7 +2,7 @@ //@ edition:2018 //@ check-pass #![warn(rust_2021_prelude_collisions)] -#![allow(unreachable_code)] +#![allow(unreachable_code, todo_macro_uses)] macro_rules! foo { () => {{ diff --git a/tests/ui/rust-2021/future-prelude-collision-macros.rs b/tests/ui/rust-2021/future-prelude-collision-macros.rs index 46265356f4610..f610f23cc1e40 100644 --- a/tests/ui/rust-2021/future-prelude-collision-macros.rs +++ b/tests/ui/rust-2021/future-prelude-collision-macros.rs @@ -2,7 +2,7 @@ //@ edition:2018 //@ check-pass #![warn(rust_2021_prelude_collisions)] -#![allow(unreachable_code)] +#![allow(unreachable_code, todo_macro_calls)] macro_rules! foo { () => {{ diff --git a/tests/ui/rust-2021/future-prelude-collision-unneeded.rs b/tests/ui/rust-2021/future-prelude-collision-unneeded.rs index b97dc1bc0424a..94673a43d118d 100644 --- a/tests/ui/rust-2021/future-prelude-collision-unneeded.rs +++ b/tests/ui/rust-2021/future-prelude-collision-unneeded.rs @@ -1,6 +1,6 @@ //@ edition:2018 //@ check-pass -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![deny(rust_2021_prelude_collisions)] struct S; diff --git a/tests/ui/sanitizer/cfi/can-reveal-opaques.rs b/tests/ui/sanitizer/cfi/can-reveal-opaques.rs index 310ce04c55240..017a8c4f85ac0 100644 --- a/tests/ui/sanitizer/cfi/can-reveal-opaques.rs +++ b/tests/ui/sanitizer/cfi/can-reveal-opaques.rs @@ -4,6 +4,7 @@ //@ only-x86_64-unknown-linux-gnu //@ ignore-backends: gcc //@ build-pass +#![allow(todo_macro_calls)] // See comment below for why this test exists. diff --git a/tests/ui/scalable-vectors/wellformed-arrays.rs b/tests/ui/scalable-vectors/wellformed-arrays.rs index 6a26a8595fa64..e36cc567ad540 100644 --- a/tests/ui/scalable-vectors/wellformed-arrays.rs +++ b/tests/ui/scalable-vectors/wellformed-arrays.rs @@ -1,6 +1,7 @@ //@ check-pass //@ compile-flags: --crate-type=lib //@ only-aarch64 +#![allow(todo_macro_calls)] #![feature(rustc_attrs)] #[rustc_scalable_vector(16)] diff --git a/tests/ui/self/arbitrary_self_types_dispatch_to_vtable.rs b/tests/ui/self/arbitrary_self_types_dispatch_to_vtable.rs index f9e346ea11e21..55e1dbf38a50c 100644 --- a/tests/ui/self/arbitrary_self_types_dispatch_to_vtable.rs +++ b/tests/ui/self/arbitrary_self_types_dispatch_to_vtable.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] #![feature(derive_coerce_pointee)] #![feature(arbitrary_self_types)] diff --git a/tests/ui/sized/dont-incompletely-prefer-built-in.rs b/tests/ui/sized/dont-incompletely-prefer-built-in.rs index f5bf0c8915e76..ebfc5237e698b 100644 --- a/tests/ui/sized/dont-incompletely-prefer-built-in.rs +++ b/tests/ui/sized/dont-incompletely-prefer-built-in.rs @@ -2,6 +2,7 @@ //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver +#![allow(todo_macro_calls)] struct W(T); diff --git a/tests/ui/sized/expr-type-error-plus-sized-obligation.rs b/tests/ui/sized/expr-type-error-plus-sized-obligation.rs index a96beeecab947..f8ed0d3f2e307 100644 --- a/tests/ui/sized/expr-type-error-plus-sized-obligation.rs +++ b/tests/ui/sized/expr-type-error-plus-sized-obligation.rs @@ -1,4 +1,4 @@ -#![allow(warnings)] +#![allow(warnings, todo_macro_calls)] fn issue_117846_repro() { let (a, _) = if true { diff --git a/tests/ui/sized/recursive-type-coercion-from-never.rs b/tests/ui/sized/recursive-type-coercion-from-never.rs index 7bd87ae06c5e4..d6d135c2f1bd9 100644 --- a/tests/ui/sized/recursive-type-coercion-from-never.rs +++ b/tests/ui/sized/recursive-type-coercion-from-never.rs @@ -1,5 +1,6 @@ //@ build-fail //~^ ERROR cycle detected when computing layout of `Foo<()>` +#![allow(todo_macro_calls)] // Regression test for a stack overflow: https://github.com/rust-lang/rust/issues/113197 diff --git a/tests/ui/sized/recursive-type-coercion-from-never.stderr b/tests/ui/sized/recursive-type-coercion-from-never.stderr index 7580e780dda59..4617671e04e9d 100644 --- a/tests/ui/sized/recursive-type-coercion-from-never.stderr +++ b/tests/ui/sized/recursive-type-coercion-from-never.stderr @@ -3,7 +3,7 @@ error[E0391]: cycle detected when computing layout of `Foo<()>` = note: ...which requires computing layout of `<() as A>::Assoc`... = note: ...which again requires computing layout of `Foo<()>`, completing the cycle note: cycle used when elaborating drops for `main` - --> $DIR/recursive-type-coercion-from-never.rs:14:1 + --> $DIR/recursive-type-coercion-from-never.rs:15:1 | LL | fn main() { | ^^^^^^^^^ diff --git a/tests/ui/span/issue-107353.rs b/tests/ui/span/issue-107353.rs index 6919c95058faf..e3c9b63bb905d 100644 --- a/tests/ui/span/issue-107353.rs +++ b/tests/ui/span/issue-107353.rs @@ -3,7 +3,7 @@ //@ compile-flags: --crate-type=lib //@ check-pass -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] fn a<'a, T>() -> &'a T { todo!()//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// } diff --git a/tests/ui/specialization/auxiliary/anyid-repro-125197.rs b/tests/ui/specialization/auxiliary/anyid-repro-125197.rs index c2794959740e6..4aa1a117e4840 100644 --- a/tests/ui/specialization/auxiliary/anyid-repro-125197.rs +++ b/tests/ui/specialization/auxiliary/anyid-repro-125197.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] use std::fmt::Display; use std::sync::Arc; diff --git a/tests/ui/specialization/min_specialization/issue-79224.rs b/tests/ui/specialization/min_specialization/issue-79224.rs index 15429bf60e5ab..c3267e0f14dcf 100644 --- a/tests/ui/specialization/min_specialization/issue-79224.rs +++ b/tests/ui/specialization/min_specialization/issue-79224.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(min_specialization)] use std::fmt::{self, Display}; diff --git a/tests/ui/specialization/min_specialization/issue-79224.stderr b/tests/ui/specialization/min_specialization/issue-79224.stderr index 9b6c931f90949..65fee02a3ef0f 100644 --- a/tests/ui/specialization/min_specialization/issue-79224.stderr +++ b/tests/ui/specialization/min_specialization/issue-79224.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `B: Clone` is not satisfied - --> $DIR/issue-79224.rs:30:5 + --> $DIR/issue-79224.rs:31:5 | LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B` @@ -11,7 +11,7 @@ LL | impl Display for Cow<'_, B> { | +++++++++++++++++++ error[E0277]: the trait bound `B: Clone` is not satisfied - --> $DIR/issue-79224.rs:28:29 + --> $DIR/issue-79224.rs:29:29 | LL | impl Display for Cow<'_, B> { | ^^^^^^^^^^ the trait `Clone` is not implemented for `B` @@ -23,7 +23,7 @@ LL | impl Display for Cow<'_, B> { | +++++++++++++++++++ error[E0277]: the trait bound `B: Clone` is not satisfied - --> $DIR/issue-79224.rs:30:13 + --> $DIR/issue-79224.rs:31:13 | LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ^^^^ the trait `Clone` is not implemented for `B` @@ -35,7 +35,7 @@ LL | impl Display for Cow<'_, B> { | +++++++++++++++++++ error[E0277]: the trait bound `B: Clone` is not satisfied - --> $DIR/issue-79224.rs:30:12 + --> $DIR/issue-79224.rs:31:12 | LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ^^^^^ the trait `Clone` is not implemented for `B` diff --git a/tests/ui/structs/syntax-error-not-missing-field.rs b/tests/ui/structs/syntax-error-not-missing-field.rs index f965e90360483..be22c0e4899ff 100644 --- a/tests/ui/structs/syntax-error-not-missing-field.rs +++ b/tests/ui/structs/syntax-error-not-missing-field.rs @@ -3,6 +3,7 @@ // // The stderr for this test should contain ONLY one syntax error per struct literal, // and not any errors about missing fields. +#![allow(todo_macro_calls)] struct Foo { a: isize, b: isize } diff --git a/tests/ui/structs/syntax-error-not-missing-field.stderr b/tests/ui/structs/syntax-error-not-missing-field.stderr index 40aa26490607b..c5cdb3a8e3091 100644 --- a/tests/ui/structs/syntax-error-not-missing-field.stderr +++ b/tests/ui/structs/syntax-error-not-missing-field.stderr @@ -1,5 +1,5 @@ error: expected one of `,`, `.`, `?`, `}`, or an operator, found `;` - --> $DIR/syntax-error-not-missing-field.rs:16:30 + --> $DIR/syntax-error-not-missing-field.rs:17:30 | LL | let f = Foo { a: make_a(); b: 2 }; | --- ^ @@ -9,7 +9,7 @@ LL | let f = Foo { a: make_a(); b: 2 }; | while parsing this struct error: expected one of `,`, `.`, `?`, `}`, or an operator, found `b` - --> $DIR/syntax-error-not-missing-field.rs:20:31 + --> $DIR/syntax-error-not-missing-field.rs:21:31 | LL | let f = Foo { a: make_a() b: 2 }; | --- -^ expected one of `,`, `.`, `?`, `}`, or an operator @@ -18,7 +18,7 @@ LL | let f = Foo { a: make_a() b: 2 }; | while parsing this struct error: cannot use a comma after the base struct - --> $DIR/syntax-error-not-missing-field.rs:24:32 + --> $DIR/syntax-error-not-missing-field.rs:25:32 | LL | let f = Foo { a: make_a(), ..todo!(), }; | ^^^^^^^^^ @@ -31,7 +31,7 @@ LL + let f = Foo { a: make_a(), ..todo!() }; | error: expected one of `,`, `:`, or `}`, found `(` - --> $DIR/syntax-error-not-missing-field.rs:28:25 + --> $DIR/syntax-error-not-missing-field.rs:29:25 | LL | let f = Foo { make_a(), b: 2, }; | --- ------^ expected one of `,`, `:`, or `}` @@ -45,7 +45,7 @@ LL | let f = Foo { make_a: make_a(), b: 2, }; | +++++++ error: expected `,` - --> $DIR/syntax-error-not-missing-field.rs:31:31 + --> $DIR/syntax-error-not-missing-field.rs:32:31 | LL | fn pat_wrong_separator(Foo { a; b }: Foo) { | --- ^ @@ -53,7 +53,7 @@ LL | fn pat_wrong_separator(Foo { a; b }: Foo) { | while parsing the fields for this pattern error: expected `,` - --> $DIR/syntax-error-not-missing-field.rs:35:34 + --> $DIR/syntax-error-not-missing-field.rs:36:34 | LL | fn pat_missing_separator(Foo { a b }: Foo) { | --- ^ @@ -61,7 +61,7 @@ LL | fn pat_missing_separator(Foo { a b }: Foo) { | while parsing the fields for this pattern error: expected `}`, found `,` - --> $DIR/syntax-error-not-missing-field.rs:39:39 + --> $DIR/syntax-error-not-missing-field.rs:40:39 | LL | fn pat_rest_trailing_comma(Foo { a, .., }: Foo) { | --^ @@ -71,7 +71,7 @@ LL | fn pat_rest_trailing_comma(Foo { a, .., }: Foo) { | `..` must be at the end and cannot have a trailing comma error: expected one of `,`, `.`, `?`, `}`, or an operator, found `;` - --> $DIR/syntax-error-not-missing-field.rs:43:35 + --> $DIR/syntax-error-not-missing-field.rs:44:35 | LL | let e = Bar::Baz { a: make_a(); b: 2 }; | -------- ^ @@ -81,7 +81,7 @@ LL | let e = Bar::Baz { a: make_a(); b: 2 }; | while parsing this struct error: expected one of `,`, `.`, `?`, `}`, or an operator, found `b` - --> $DIR/syntax-error-not-missing-field.rs:47:36 + --> $DIR/syntax-error-not-missing-field.rs:48:36 | LL | let e = Bar::Baz { a: make_a() b: 2 }; | -------- -^ expected one of `,`, `.`, `?`, `}`, or an operator @@ -90,7 +90,7 @@ LL | let e = Bar::Baz { a: make_a() b: 2 }; | while parsing this struct error: expected identifier, found `,` - --> $DIR/syntax-error-not-missing-field.rs:57:37 + --> $DIR/syntax-error-not-missing-field.rs:58:37 | LL | static A: MyStruct = MyStruct { ,s: TheStruct }; | -------- ^ expected identifier @@ -104,7 +104,7 @@ LL + static A: MyStruct = MyStruct { s: TheStruct }; | error: expected identifier, found `,` - --> $DIR/syntax-error-not-missing-field.rs:64:36 + --> $DIR/syntax-error-not-missing-field.rs:65:36 | LL | static A: MyStruct = MyStruct {,}; | -------- ^ expected identifier diff --git a/tests/ui/suggestions/apitit-unimplemented-method.rs b/tests/ui/suggestions/apitit-unimplemented-method.rs index c0cd709e2300a..2a3f471ad1436 100644 --- a/tests/ui/suggestions/apitit-unimplemented-method.rs +++ b/tests/ui/suggestions/apitit-unimplemented-method.rs @@ -1,4 +1,5 @@ //@ aux-build:dep.rs +#![allow(todo_macro_calls)] extern crate dep; use dep::*; diff --git a/tests/ui/suggestions/apitit-unimplemented-method.stderr b/tests/ui/suggestions/apitit-unimplemented-method.stderr index 1f2e0ea2cad94..52366f1dd1017 100644 --- a/tests/ui/suggestions/apitit-unimplemented-method.stderr +++ b/tests/ui/suggestions/apitit-unimplemented-method.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `foo`, `bar`, `baz`, `quux` - --> $DIR/apitit-unimplemented-method.rs:8:1 + --> $DIR/apitit-unimplemented-method.rs:9:1 | LL | impl Trait for Local {} | ^^^^^^^^^^^^^^^^^^^^ missing `foo`, `bar`, `baz`, `quux` in implementation diff --git a/tests/ui/suggestions/derive-clone-for-eq.fixed b/tests/ui/suggestions/derive-clone-for-eq.fixed index 17259dd687c6c..1436fd57d8543 100644 --- a/tests/ui/suggestions/derive-clone-for-eq.fixed +++ b/tests/ui/suggestions/derive-clone-for-eq.fixed @@ -1,5 +1,6 @@ //@ run-rustfix // https://github.com/rust-lang/rust/issues/79076 +#![allow(todo_macro_uses)] #[derive(Clone, Eq)] pub struct Struct(T); //~ ERROR [E0277] diff --git a/tests/ui/suggestions/derive-clone-for-eq.rs b/tests/ui/suggestions/derive-clone-for-eq.rs index 3e4331745be87..ab2f90fa61959 100644 --- a/tests/ui/suggestions/derive-clone-for-eq.rs +++ b/tests/ui/suggestions/derive-clone-for-eq.rs @@ -1,5 +1,6 @@ //@ run-rustfix // https://github.com/rust-lang/rust/issues/79076 +#![allow(todo_macro_calls)] #[derive(Clone, Eq)] pub struct Struct(T); //~ ERROR [E0277] diff --git a/tests/ui/suggestions/derive-clone-for-eq.stderr b/tests/ui/suggestions/derive-clone-for-eq.stderr index bed5ff90c1949..7a36d90311cb5 100644 --- a/tests/ui/suggestions/derive-clone-for-eq.stderr +++ b/tests/ui/suggestions/derive-clone-for-eq.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: Clone` is not satisfied - --> $DIR/derive-clone-for-eq.rs:5:12 + --> $DIR/derive-clone-for-eq.rs:6:12 | LL | #[derive(Clone, Eq)] | -- in this derive macro expansion @@ -7,7 +7,7 @@ LL | pub struct Struct(T); | ^^^^^^ the trait `Clone` is not implemented for `T` | note: required for `Struct` to implement `PartialEq` - --> $DIR/derive-clone-for-eq.rs:7:19 + --> $DIR/derive-clone-for-eq.rs:8:19 | LL | impl PartialEq for Struct | ----- ^^^^^^^^^^^^ ^^^^^^^^^ diff --git a/tests/ui/suggestions/derive-macro-missing-bounds.rs b/tests/ui/suggestions/derive-macro-missing-bounds.rs index 56c218f97ebf8..1b44fcb6e4f61 100644 --- a/tests/ui/suggestions/derive-macro-missing-bounds.rs +++ b/tests/ui/suggestions/derive-macro-missing-bounds.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] mod a { use std::fmt::{Debug, Formatter, Result}; struct Inner(T); diff --git a/tests/ui/suggestions/derive-macro-missing-bounds.stderr b/tests/ui/suggestions/derive-macro-missing-bounds.stderr index b28f39ced542d..f2cc96903c0d5 100644 --- a/tests/ui/suggestions/derive-macro-missing-bounds.stderr +++ b/tests/ui/suggestions/derive-macro-missing-bounds.stderr @@ -1,5 +1,5 @@ error[E0277]: `a::Inner` doesn't implement `Debug` - --> $DIR/derive-macro-missing-bounds.rs:12:21 + --> $DIR/derive-macro-missing-bounds.rs:13:21 | LL | #[derive(Debug)] | ----- in this derive macro expansion @@ -18,7 +18,7 @@ LL | struct Outer(Inner) where a::Inner: Debug; | ++++++++++++++++++++++++ error[E0277]: the trait bound `T: c::Trait` is not satisfied - --> $DIR/derive-macro-missing-bounds.rs:41:21 + --> $DIR/derive-macro-missing-bounds.rs:42:21 | LL | #[derive(Debug)] | ----- in this derive macro expansion @@ -26,7 +26,7 @@ LL | struct Outer(Inner); | ^^^^^^^^ the trait `c::Trait` is not implemented for `T` | note: required for `c::Inner` to implement `Debug` - --> $DIR/derive-macro-missing-bounds.rs:34:28 + --> $DIR/derive-macro-missing-bounds.rs:35:28 | LL | impl Debug for Inner { | ----- ^^^^^ ^^^^^^^^ @@ -41,7 +41,7 @@ LL | struct Outer(Inner); | ++++++++++ error[E0277]: the trait bound `T: d::Trait` is not satisfied - --> $DIR/derive-macro-missing-bounds.rs:56:21 + --> $DIR/derive-macro-missing-bounds.rs:57:21 | LL | #[derive(Debug)] | ----- in this derive macro expansion @@ -49,7 +49,7 @@ LL | struct Outer(Inner); | ^^^^^^^^ the trait `d::Trait` is not implemented for `T` | note: required for `d::Inner` to implement `Debug` - --> $DIR/derive-macro-missing-bounds.rs:49:13 + --> $DIR/derive-macro-missing-bounds.rs:50:13 | LL | impl Debug for Inner where T: Debug, T: Trait { | ^^^^^ ^^^^^^^^ ----- unsatisfied trait bound introduced here @@ -62,7 +62,7 @@ LL | struct Outer(Inner); | ++++++++++ error[E0277]: the trait bound `T: e::Trait` is not satisfied - --> $DIR/derive-macro-missing-bounds.rs:71:21 + --> $DIR/derive-macro-missing-bounds.rs:72:21 | LL | #[derive(Debug)] | ----- in this derive macro expansion @@ -70,7 +70,7 @@ LL | struct Outer(Inner); | ^^^^^^^^ the trait `e::Trait` is not implemented for `T` | note: required for `e::Inner` to implement `Debug` - --> $DIR/derive-macro-missing-bounds.rs:64:13 + --> $DIR/derive-macro-missing-bounds.rs:65:13 | LL | impl Debug for Inner where T: Debug + Trait { | ^^^^^ ^^^^^^^^ ----- unsatisfied trait bound introduced here @@ -83,7 +83,7 @@ LL | struct Outer(Inner); | ++++++++++ error[E0277]: the trait bound `T: f::Trait` is not satisfied - --> $DIR/derive-macro-missing-bounds.rs:86:21 + --> $DIR/derive-macro-missing-bounds.rs:87:21 | LL | #[derive(Debug)] | ----- in this derive macro expansion @@ -91,7 +91,7 @@ LL | struct Outer(Inner); | ^^^^^^^^ the trait `f::Trait` is not implemented for `T` | note: required for `f::Inner` to implement `Debug` - --> $DIR/derive-macro-missing-bounds.rs:79:20 + --> $DIR/derive-macro-missing-bounds.rs:80:20 | LL | impl Debug for Inner where T: Trait { | ^^^^^ ^^^^^^^^ ----- unsatisfied trait bound introduced here diff --git a/tests/ui/suggestions/field-has-method.rs b/tests/ui/suggestions/field-has-method.rs index 6e584d7833879..78a9b5f034a7f 100644 --- a/tests/ui/suggestions/field-has-method.rs +++ b/tests/ui/suggestions/field-has-method.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct Kind; struct Ty { diff --git a/tests/ui/suggestions/field-has-method.stderr b/tests/ui/suggestions/field-has-method.stderr index adcb723e4f126..b00a33b809392 100644 --- a/tests/ui/suggestions/field-has-method.stderr +++ b/tests/ui/suggestions/field-has-method.stderr @@ -1,5 +1,5 @@ error[E0599]: no method named `kind` found for struct `InferOk` in the current scope - --> $DIR/field-has-method.rs:19:15 + --> $DIR/field-has-method.rs:20:15 | LL | struct InferOk { | ----------------- method `kind` not found for this struct diff --git a/tests/ui/suggestions/issue-101623.rs b/tests/ui/suggestions/issue-101623.rs index d18a4a21f0a51..50f1885d13e5f 100644 --- a/tests/ui/suggestions/issue-101623.rs +++ b/tests/ui/suggestions/issue-101623.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] pub struct Stuff { inner: *mut (), } diff --git a/tests/ui/suggestions/issue-101623.stderr b/tests/ui/suggestions/issue-101623.stderr index 56858cdbe8a56..59894e4dae61a 100644 --- a/tests/ui/suggestions/issue-101623.stderr +++ b/tests/ui/suggestions/issue-101623.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `*mut (): Trait<'_>` is not satisfied - --> $DIR/issue-101623.rs:21:21 + --> $DIR/issue-101623.rs:22:21 | LL | Trait::do_stuff({ fun(&mut *inner) }); | --------------- ^^----------------^^ @@ -9,7 +9,7 @@ LL | Trait::do_stuff({ fun(&mut *inner) }); | help: the trait `Trait<'_>` is not implemented for `*mut ()` but it is implemented for `()` - --> $DIR/issue-101623.rs:15:1 + --> $DIR/issue-101623.rs:16:1 | LL | impl<'a> Trait<'a> for () { | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/suggestions/issue-101984.rs b/tests/ui/suggestions/issue-101984.rs index 5f7ecb77e0ed4..95cc5c26c7f5c 100644 --- a/tests/ui/suggestions/issue-101984.rs +++ b/tests/ui/suggestions/issue-101984.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] use std::marker::PhantomData; type Component = fn(&()); diff --git a/tests/ui/suggestions/issue-101984.stderr b/tests/ui/suggestions/issue-101984.stderr index c19cda20402ff..c81b4947a43f3 100644 --- a/tests/ui/suggestions/issue-101984.stderr +++ b/tests/ui/suggestions/issue-101984.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-101984.rs:21:13 + --> $DIR/issue-101984.rs:22:13 | LL | let (cmp, router) = self.router.at()?; | ^^^^^^^^^^^^^ ----------------- this expression has type `Match<&(for<'a> fn(&'a ()), Box)>` diff --git a/tests/ui/suggestions/issue-82566-2.rs b/tests/ui/suggestions/issue-82566-2.rs index 80c8034bd0adf..d5046aa371054 100644 --- a/tests/ui/suggestions/issue-82566-2.rs +++ b/tests/ui/suggestions/issue-82566-2.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct Foo1; struct Foo2; struct Foo3; diff --git a/tests/ui/suggestions/issue-82566-2.stderr b/tests/ui/suggestions/issue-82566-2.stderr index ef9a414307cc9..c0e192a5d946f 100644 --- a/tests/ui/suggestions/issue-82566-2.stderr +++ b/tests/ui/suggestions/issue-82566-2.stderr @@ -1,5 +1,5 @@ error: comparison operators cannot be chained - --> $DIR/issue-82566-2.rs:17:23 + --> $DIR/issue-82566-2.rs:18:23 | LL | fn foo1() -> [(); Foo1<10>::SUM] { | ^ ^ @@ -10,7 +10,7 @@ LL | fn foo1() -> [(); Foo1::<10>::SUM] { | ++ error: expected one of `.`, `?`, `]`, or an operator, found `,` - --> $DIR/issue-82566-2.rs:21:26 + --> $DIR/issue-82566-2.rs:22:26 | LL | fn foo2() -> [(); Foo2<10, 20>::SUM] { | ^ expected one of `.`, `?`, `]`, or an operator @@ -21,7 +21,7 @@ LL | fn foo2() -> [(); Foo2::<10, 20>::SUM] { | ++ error: expected one of `.`, `?`, `]`, or an operator, found `,` - --> $DIR/issue-82566-2.rs:26:26 + --> $DIR/issue-82566-2.rs:27:26 | LL | fn foo3() -> [(); Foo3<10, 20, 30>::SUM] { | ^ expected one of `.`, `?`, `]`, or an operator diff --git a/tests/ui/suggestions/issue-84700.rs b/tests/ui/suggestions/issue-84700.rs index a27169fdbb2d5..ddacc5b3a194a 100644 --- a/tests/ui/suggestions/issue-84700.rs +++ b/tests/ui/suggestions/issue-84700.rs @@ -1,4 +1,5 @@ // test for suggestion on fieldless enum variant +#![allow(todo_macro_calls)] #[derive(PartialEq, Debug)] enum FarmAnimal { diff --git a/tests/ui/suggestions/issue-84700.stderr b/tests/ui/suggestions/issue-84700.stderr index e68b6fb544729..215e2b5b2d33d 100644 --- a/tests/ui/suggestions/issue-84700.stderr +++ b/tests/ui/suggestions/issue-84700.stderr @@ -1,5 +1,5 @@ error[E0532]: expected tuple struct or tuple variant, found unit variant `FarmAnimal::Cow` - --> $DIR/issue-84700.rs:15:9 + --> $DIR/issue-84700.rs:16:9 | LL | Cow, | --- `FarmAnimal::Cow` defined here @@ -8,7 +8,7 @@ LL | FarmAnimal::Cow(_) => "moo".to_string(), | ^^^^^^^^^^^^^^^^^^ help: use this syntax instead: `FarmAnimal::Cow` error[E0164]: expected tuple struct or tuple variant, found struct variant `FarmAnimal::Chicken` - --> $DIR/issue-84700.rs:17:9 + --> $DIR/issue-84700.rs:18:9 | LL | FarmAnimal::Chicken(_) => "cluck, cluck!".to_string(), | ^^^^^^^^^^^^^^^^^^^^^^ not a tuple struct or tuple variant diff --git a/tests/ui/suggestions/issue-98562.rs b/tests/ui/suggestions/issue-98562.rs index 443537ba39d17..fd7168486e71a 100644 --- a/tests/ui/suggestions/issue-98562.rs +++ b/tests/ui/suggestions/issue-98562.rs @@ -1,4 +1,5 @@ //@ aux-build:extern-issue-98562.rs +#![allow(todo_macro_calls)] extern crate extern_issue_98562; use extern_issue_98562::TraitA; diff --git a/tests/ui/suggestions/issue-98562.stderr b/tests/ui/suggestions/issue-98562.stderr index 578eb284c2662..a2cf213b87487 100644 --- a/tests/ui/suggestions/issue-98562.stderr +++ b/tests/ui/suggestions/issue-98562.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `baz` - --> $DIR/issue-98562.rs:7:1 + --> $DIR/issue-98562.rs:8:1 | LL | impl TraitA for X { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `baz` in implementation diff --git a/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs b/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs index 2011d4e01205e..e941fbb44a3d9 100644 --- a/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs +++ b/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs @@ -1,4 +1,5 @@ //@ edition:2015..2021 +#![allow(todo_macro_calls)] fn main() {} fn foo(_src: &crate::Foo) -> Option { diff --git a/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.stderr b/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.stderr index a9b0931499d95..b7a592d61841d 100644 --- a/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.stderr +++ b/tests/ui/suggestions/lifetimes/explicit-lifetime-suggestion-in-proper-span-issue-121267.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Iterator` captures lifetime that does not appear in bounds - --> $DIR/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs:8:5 + --> $DIR/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs:9:5 | LL | fn bar(src: &crate::Foo) -> impl Iterator { | ------------------------- opaque type defined here @@ -8,7 +8,7 @@ LL | | LL | | .filter_map(|_| foo(src)) | |_________________________________^ | - = note: hidden type `FilterMap, {closure@$DIR/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs:10:21: 10:24}>` captures lifetime `'_` + = note: hidden type `FilterMap, {closure@$DIR/explicit-lifetime-suggestion-in-proper-span-issue-121267.rs:11:21: 11:24}>` captures lifetime `'_` error: aborting due to 1 previous error diff --git a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs index ebe7e4574ca49..06ef69cbb800f 100644 --- a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs +++ b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.rs @@ -1,4 +1,5 @@ //@ aux-build:missing-assoc-fn-applicable-suggestions.rs +#![allow(todo_macro_calls)] extern crate missing_assoc_fn_applicable_suggestions; use missing_assoc_fn_applicable_suggestions::TraitA; diff --git a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr index 3cf5c6e7b7497..0e6d257239db8 100644 --- a/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr +++ b/tests/ui/suggestions/missing-assoc-fn-applicable-suggestions.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `Type`, `bar`, `baz`, `A` - --> $DIR/missing-assoc-fn-applicable-suggestions.rs:7:1 + --> $DIR/missing-assoc-fn-applicable-suggestions.rs:8:1 | LL | impl TraitA<()> for S { | ^^^^^^^^^^^^^^^^^^^^^ missing `Type`, `bar`, `baz`, `A` in implementation diff --git a/tests/ui/suggestions/missing-trait-item.fixed b/tests/ui/suggestions/missing-trait-item.fixed index b79a7a51f07d3..6fa8e15cc0bb5 100644 --- a/tests/ui/suggestions/missing-trait-item.fixed +++ b/tests/ui/suggestions/missing-trait-item.fixed @@ -1,5 +1,5 @@ //@ run-rustfix -#![allow(dead_code)] +#![allow(dead_code, todo_macro_uses)] trait T { unsafe fn foo(a: &usize, b: &usize) -> usize; diff --git a/tests/ui/suggestions/missing-trait-item.rs b/tests/ui/suggestions/missing-trait-item.rs index 43111c01c755b..addba71dc047e 100644 --- a/tests/ui/suggestions/missing-trait-item.rs +++ b/tests/ui/suggestions/missing-trait-item.rs @@ -1,5 +1,5 @@ //@ run-rustfix -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] trait T { unsafe fn foo(a: &usize, b: &usize) -> usize; diff --git a/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.fixed b/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.fixed index 0258f868f0072..bb04ce1fa5e44 100644 --- a/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.fixed +++ b/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.fixed @@ -1,4 +1,5 @@ //@ run-rustfix +#![allow(todo_macro_uses)] // Regression test for issue #143330. // Ensure we suggest to replace only the intended coma with a bar, not all commas in the pattern. diff --git a/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.rs b/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.rs index 7d5087fa0ffae..34c390365152f 100644 --- a/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.rs +++ b/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.rs @@ -1,4 +1,5 @@ //@ run-rustfix +#![allow(todo_macro_calls)] // Regression test for issue #143330. // Ensure we suggest to replace only the intended coma with a bar, not all commas in the pattern. diff --git a/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.stderr b/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.stderr index ee75e2db1334c..cc41aa6c82dcb 100644 --- a/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.stderr +++ b/tests/ui/suggestions/only-replace-intended-coma-not-all-in-pattern.stderr @@ -1,5 +1,5 @@ error: unexpected `,` in pattern - --> $DIR/only-replace-intended-coma-not-all-in-pattern.rs:12:30 + --> $DIR/only-replace-intended-coma-not-all-in-pattern.rs:13:30 | LL | Foo { x: 2, ch: ',' }, Foo { x: 3, ch: '@' } => (), | ^ diff --git a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed index 735c09438e2df..a3daa48601a4b 100644 --- a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed +++ b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.fixed @@ -1,5 +1,5 @@ //@ run-rustfix -#![allow(unused_variables)] +#![allow(unused_variables, todo_macro_uses)] fn foo(foo: &mut usize) { todo!() diff --git a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs index 7364c59fd92e3..aa51ea1a2549a 100644 --- a/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs +++ b/tests/ui/suggestions/suggest-adding-reference-to-trait-assoc-item.rs @@ -1,5 +1,5 @@ //@ run-rustfix -#![allow(unused_variables)] +#![allow(unused_variables, todo_macro_calls)] fn foo(foo: &mut usize) { todo!() diff --git a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs index dd7e203abd7a8..2cdcb6b80bf6a 100644 --- a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs +++ b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs @@ -2,6 +2,7 @@ // when inside a `impl` statement are used two local traits. // //@ edition:2021 +#![allow(todo_macro_calls)] use std::fmt; trait LocalTraitOne { } diff --git a/tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr b/tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr index 4fda1e49911c8..ab87278a02e7d 100644 --- a/tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr +++ b/tests/ui/suggestions/suggest-blanket-impl-local-trait.stderr @@ -1,5 +1,5 @@ error[E0782]: expected a type, found a trait - --> $DIR/suggest-blanket-impl-local-trait.rs:34:24 + --> $DIR/suggest-blanket-impl-local-trait.rs:35:24 | LL | impl LocalTraitOne for fmt::Display {} | ^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL + impl LocalTraitOne for T {} | error[E0782]: expected a type, found a trait - --> $DIR/suggest-blanket-impl-local-trait.rs:40:24 + --> $DIR/suggest-blanket-impl-local-trait.rs:41:24 | LL | impl LocalTraitOne for fmt::Display + Send {} | ^^^^^^^^^^^^^^^^^^^ @@ -31,7 +31,7 @@ LL + impl LocalTraitOne for T {} | error[E0782]: expected a type, found a trait - --> $DIR/suggest-blanket-impl-local-trait.rs:13:24 + --> $DIR/suggest-blanket-impl-local-trait.rs:14:24 | LL | impl LocalTraitTwo for LocalTraitOne {} | ^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL + impl LocalTraitTwo for T {} | error[E0782]: expected a type, found a trait - --> $DIR/suggest-blanket-impl-local-trait.rs:46:29 + --> $DIR/suggest-blanket-impl-local-trait.rs:47:29 | LL | impl GenericTrait for LocalTraitOne {} | ^^^^^^^^^^^^^ @@ -63,7 +63,7 @@ LL + impl GenericTrait for T {} | error[E0782]: expected a type, found a trait - --> $DIR/suggest-blanket-impl-local-trait.rs:18:23 + --> $DIR/suggest-blanket-impl-local-trait.rs:19:23 | LL | impl fmt::Display for LocalTraitOne { | ^^^^^^^^^^^^^ @@ -74,7 +74,7 @@ LL | impl fmt::Display for dyn LocalTraitOne { | +++ error[E0782]: expected a type, found a trait - --> $DIR/suggest-blanket-impl-local-trait.rs:26:23 + --> $DIR/suggest-blanket-impl-local-trait.rs:27:23 | LL | impl fmt::Display for LocalTraitTwo + Send { | ^^^^^^^^^^^^^^^^^^^^ @@ -85,7 +85,7 @@ LL | impl fmt::Display for dyn LocalTraitTwo + Send { | +++ error[E0782]: expected a type, found a trait - --> $DIR/suggest-blanket-impl-local-trait.rs:53:35 + --> $DIR/suggest-blanket-impl-local-trait.rs:54:35 | LL | impl GenericTraitTwo for GenericTrait {} | ^^^^^^^^^^^^^^^ diff --git a/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.rs b/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.rs index b7086325d5f88..29212bddc6177 100644 --- a/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.rs +++ b/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.rs @@ -2,6 +2,7 @@ // Previously, the suggestion to add `where` clause was placed inside the derive // like `#[derive(Clone where Inner: Clone)]` // instead of `struct Outer(Inner) where Inner: Clone` +#![allow(todo_macro_calls)] #![crate_type = "lib"] diff --git a/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.stderr b/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.stderr index 577b090ce1b4f..68de09d8515d0 100644 --- a/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.stderr +++ b/tests/ui/suggestions/tuple-struct-where-clause-suggestion-91520.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `Inner: Clone` is not satisfied - --> $DIR/tuple-struct-where-clause-suggestion-91520.rs:15:17 + --> $DIR/tuple-struct-where-clause-suggestion-91520.rs:16:17 | LL | #[derive(Clone)] | ----- in this derive macro expansion diff --git a/tests/ui/trait-bounds/impl-missing-where-clause-lifetimes-from-trait.rs b/tests/ui/trait-bounds/impl-missing-where-clause-lifetimes-from-trait.rs index dcdbd02287371..9c4c1d23f072b 100644 --- a/tests/ui/trait-bounds/impl-missing-where-clause-lifetimes-from-trait.rs +++ b/tests/ui/trait-bounds/impl-missing-where-clause-lifetimes-from-trait.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] trait Trait { fn foo<'a, K>(self, _: T, _: K) where T: 'a, K: 'a; } diff --git a/tests/ui/trait-bounds/impl-missing-where-clause-lifetimes-from-trait.stderr b/tests/ui/trait-bounds/impl-missing-where-clause-lifetimes-from-trait.stderr index f8a6252f991ea..74af25d79a3c4 100644 --- a/tests/ui/trait-bounds/impl-missing-where-clause-lifetimes-from-trait.stderr +++ b/tests/ui/trait-bounds/impl-missing-where-clause-lifetimes-from-trait.stderr @@ -1,5 +1,5 @@ error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration - --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:6:11 + --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:7:11 | LL | fn foo<'a, K>(self, _: T, _: K) where T: 'a, K: 'a; | ------- -- -- this bound might be missing in the impl @@ -11,14 +11,14 @@ LL | fn foo<'a, K>(self, _: (), _: K) where { | ^^^^^^^ lifetimes do not match method in trait error[E0195]: lifetime parameters do not match the trait definition - --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:23:12 + --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:24:12 | LL | fn foo<'a>(&self, state: &'a State) -> &'a T { | ^^ | = note: lifetime parameters differ in whether they are early- or late-bound note: `'a` differs between the trait and impl - --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:14:12 + --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:15:12 | LL | trait Foo { | ------------ in this trait... @@ -37,14 +37,14 @@ LL | fn foo<'a>(&self, state: &'a State) -> &'a T { | ^^ `'a` is late-bound error[E0195]: lifetime parameters do not match the trait definition - --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:33:12 + --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:34:12 | LL | fn foo<'a: 'a>(&'a self) {} | ^^ | = note: lifetime parameters differ in whether they are early- or late-bound note: `'a` differs between the trait and impl - --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:29:12 + --> $DIR/impl-missing-where-clause-lifetimes-from-trait.rs:30:12 | LL | trait Bar { | --------- in this trait... diff --git a/tests/ui/traits/auxiliary/issue_89119_intercrate_caching.rs b/tests/ui/traits/auxiliary/issue_89119_intercrate_caching.rs index 769e897316327..8a81250b74fba 100644 --- a/tests/ui/traits/auxiliary/issue_89119_intercrate_caching.rs +++ b/tests/ui/traits/auxiliary/issue_89119_intercrate_caching.rs @@ -1,5 +1,6 @@ // This is the auxiliary crate for the regression test for issue #89119, minimized // from `zvariant-2.8.0`. +#![allow(todo_macro_calls)] use std::convert::TryFrom; use std::borrow::Cow; diff --git a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs index da533d5e321eb..e61b470c3d63e 100644 --- a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs +++ b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.rs @@ -5,6 +5,7 @@ // // Const traits aren't the only way to achieve this ICE, but it's a convenient way // to ensure the inliner is called. +#![allow(todo_macro_calls)] //@ compile-flags: -Znext-solver -Zinline-mir=yes diff --git a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr index 541a2000c2872..b375c5d02ddf0 100644 --- a/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr +++ b/tests/ui/traits/const-traits/inline-incorrect-early-bound-in-ctfe.stderr @@ -1,5 +1,5 @@ error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:19:12 + --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:20:12 | LL | fn foo(self); | - expected 0 type parameters @@ -8,13 +8,13 @@ LL | fn foo(self) { | ^ found 1 type parameter error[E0015]: cannot call non-const method `<() as Trait>::foo` in constant functions - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:26:8 + --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:27:8 | LL | ().foo(); | ^^^^^ | note: method `foo` is not const because trait `Trait` is not const - --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:13:1 + --> $DIR/inline-incorrect-early-bound-in-ctfe.rs:14:1 | LL | trait Trait { | ^^^^^^^^^^^ this trait is not const diff --git a/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.rs b/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.rs index ad313823fe40e..65cba56947606 100644 --- a/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.rs +++ b/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.rs @@ -1,6 +1,7 @@ // Regression test for #143481, where we were calling `predicates_of` on // a Crate HIR node because we were using a dummy obligation cause's body id // without checking that it was meaningful first. +#![allow(todo_macro_calls)] trait Role { type Inner; diff --git a/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.stderr b/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.stderr index 17ace03e891f2..8c6f1e109a07f 100644 --- a/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.stderr +++ b/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for struct `HandshakeCallback` - --> $DIR/ambiguity-in-dropck-err-reporting.rs:9:25 + --> $DIR/ambiguity-in-dropck-err-reporting.rs:10:25 | LL | impl Role for HandshakeCallback { | ^^^^^^^^^^^^^^^^^ expected 1 generic argument | note: struct defined here, with 1 generic parameter: `C` - --> $DIR/ambiguity-in-dropck-err-reporting.rs:8:8 + --> $DIR/ambiguity-in-dropck-err-reporting.rs:9:8 | LL | struct HandshakeCallback(C); | ^^^^^^^^^^^^^^^^^ - diff --git a/tests/ui/traits/error-reporting/leaking-vars-in-cause-code-1.rs b/tests/ui/traits/error-reporting/leaking-vars-in-cause-code-1.rs index 76a44dbe1abb2..aa54bea6ad2a6 100644 --- a/tests/ui/traits/error-reporting/leaking-vars-in-cause-code-1.rs +++ b/tests/ui/traits/error-reporting/leaking-vars-in-cause-code-1.rs @@ -9,6 +9,7 @@ // The old solver doesn't trigger ICE because regions in the predicate are replaced with // placeholders when checking generator witness. Besides, the old solver doesn't eagerly // resolves vars before canonicalizing the predicate in `predicate_must_hold_modulo_regions`. +#![allow(todo_macro_calls)] trait AsyncFn: Send + 'static { type Fut: Future + Send; diff --git a/tests/ui/traits/error-reporting/leaking-vars-in-cause-code-1.stderr b/tests/ui/traits/error-reporting/leaking-vars-in-cause-code-1.stderr index a0951863f8a5c..2c1075cc5d02a 100644 --- a/tests/ui/traits/error-reporting/leaking-vars-in-cause-code-1.stderr +++ b/tests/ui/traits/error-reporting/leaking-vars-in-cause-code-1.stderr @@ -1,5 +1,5 @@ error[E0277]: `dyn AsyncFn + Send>>>` cannot be shared between threads safely - --> $DIR/leaking-vars-in-cause-code-1.rs:32:17 + --> $DIR/leaking-vars-in-cause-code-1.rs:33:17 | LL | assert_send(cursed_fut()); | ----------- ^^^^^^^^^^^^ `dyn AsyncFn + Send>>>` cannot be shared between threads safely @@ -9,7 +9,7 @@ LL | assert_send(cursed_fut()); = help: the trait `Sync` is not implemented for `dyn AsyncFn + Send>>>` = note: required for `&dyn AsyncFn + Send>>>` to implement `Send` note: required because it's used within this `async` fn body - --> $DIR/leaking-vars-in-cause-code-1.rs:19:53 + --> $DIR/leaking-vars-in-cause-code-1.rs:20:53 | LL | async fn wrap_call(filter: &P) { | _____________________________________________________^ @@ -17,7 +17,7 @@ LL | | filter.call().await; LL | | } | |_^ note: required because it's used within this `async` fn body - --> $DIR/leaking-vars-in-cause-code-1.rs:27:23 + --> $DIR/leaking-vars-in-cause-code-1.rs:28:23 | LL | async fn cursed_fut() { | _______________________^ @@ -25,7 +25,7 @@ LL | | wrap_call(get_boxed_fn().as_ref()).await; LL | | } | |_^ note: required by a bound in `assert_send` - --> $DIR/leaking-vars-in-cause-code-1.rs:36:19 + --> $DIR/leaking-vars-in-cause-code-1.rs:37:19 | LL | fn assert_send(t: T) -> T { | ^^^^ required by this bound in `assert_send` diff --git a/tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.rs b/tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.rs index f776a6ce4c12f..c38b7a442c5d8 100644 --- a/tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.rs +++ b/tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.rs @@ -1,5 +1,6 @@ // Sets some arbitrarily large width for more consistent output (see #135288). //@ compile-flags: --diagnostic-width=120 +#![allow(todo_macro_calls)] struct Argument; struct Return; diff --git a/tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.stderr b/tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.stderr index 7151302879606..41bcb667313b2 100644 --- a/tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.stderr +++ b/tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `fn(Argument) -> Return {function}: Trait` is not satisfied - --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11 + --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:15:11 | LL | takes(function); | ----- ^^^^^^^^ the trait `Trait` is not implemented for fn item `fn(Argument) -> Return {function}` @@ -7,7 +7,7 @@ LL | takes(function); | required by a bound introduced by this call | note: required by a bound in `takes` - --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:11:18 + --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:12:18 | LL | fn takes(_: impl Trait) {} | ^^^^^ required by this bound in `takes` @@ -16,22 +16,22 @@ help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`, LL | takes(function as fn(Argument) -> Return); | +++++++++++++++++++++++++ -error[E0277]: the trait bound `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:16:11: 16:34}: Trait` is not satisfied - --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:16:11 +error[E0277]: the trait bound `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:17:11: 17:34}: Trait` is not satisfied + --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:17:11 | LL | takes(|_: Argument| -> Return { todo!() }); | ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | | | required by a bound introduced by this call | - = help: the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:16:11: 16:34}` + = help: the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:17:11: 17:34}` help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return` - --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:9:1 + --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:10:1 | LL | impl Trait for fn(Argument) -> Return {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `takes` - --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:11:18 + --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:12:18 | LL | fn takes(_: impl Trait) {} | ^^^^^ required by this bound in `takes` diff --git a/tests/ui/traits/incomplete-infer-via-sized-wc.current.stderr b/tests/ui/traits/incomplete-infer-via-sized-wc.current.stderr index f4930bf890c2b..83ec9cd2189a3 100644 --- a/tests/ui/traits/incomplete-infer-via-sized-wc.current.stderr +++ b/tests/ui/traits/incomplete-infer-via-sized-wc.current.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/incomplete-infer-via-sized-wc.rs:15:5 + --> $DIR/incomplete-infer-via-sized-wc.rs:16:5 | LL | is_sized::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `is_sized` diff --git a/tests/ui/traits/incomplete-infer-via-sized-wc.next.stderr b/tests/ui/traits/incomplete-infer-via-sized-wc.next.stderr index f4930bf890c2b..83ec9cd2189a3 100644 --- a/tests/ui/traits/incomplete-infer-via-sized-wc.next.stderr +++ b/tests/ui/traits/incomplete-infer-via-sized-wc.next.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/incomplete-infer-via-sized-wc.rs:15:5 + --> $DIR/incomplete-infer-via-sized-wc.rs:16:5 | LL | is_sized::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `is_sized` diff --git a/tests/ui/traits/incomplete-infer-via-sized-wc.rs b/tests/ui/traits/incomplete-infer-via-sized-wc.rs index 9dcddea3551d1..296ea6302ed62 100644 --- a/tests/ui/traits/incomplete-infer-via-sized-wc.rs +++ b/tests/ui/traits/incomplete-infer-via-sized-wc.rs @@ -1,6 +1,7 @@ //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // Exercises change in . diff --git a/tests/ui/traits/issue-52893.rs b/tests/ui/traits/issue-52893.rs index 58a15f702ee6f..764c285417ab9 100644 --- a/tests/ui/traits/issue-52893.rs +++ b/tests/ui/traits/issue-52893.rs @@ -1,6 +1,7 @@ //@ check-fail // // regression test for issue 52893 +#![allow(todo_macro_calls)] trait At { type AtRes; fn at(self) -> Self::AtRes; diff --git a/tests/ui/traits/issue-52893.stderr b/tests/ui/traits/issue-52893.stderr index 3c5df82fcdc87..07201472918a0 100644 --- a/tests/ui/traits/issue-52893.stderr +++ b/tests/ui/traits/issue-52893.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-52893.rs:53:22 + --> $DIR/issue-52893.rs:54:22 | LL | impl AddClass for Class

| - expected this type parameter @@ -12,14 +12,14 @@ LL | builder.push(output); = note: expected type parameter `F` found struct `Class

` help: the return type of this call is `Class

` due to the type of the argument passed - --> $DIR/issue-52893.rs:53:9 + --> $DIR/issue-52893.rs:54:9 | LL | builder.push(output); | ^^^^^^^^^^^^^------^ | | | this argument influences the return type of `push` note: method defined here - --> $DIR/issue-52893.rs:11:8 + --> $DIR/issue-52893.rs:12:8 | LL | fn push(self, other: T) -> Self::PushRes; | ^^^^ ----- diff --git a/tests/ui/traits/issue-77982.rs b/tests/ui/traits/issue-77982.rs index b2a488e18e828..c7c402e0091b3 100644 --- a/tests/ui/traits/issue-77982.rs +++ b/tests/ui/traits/issue-77982.rs @@ -1,5 +1,6 @@ //@ ignore-windows FIXME: We get an extra E0283 on Windows //@ ignore-arm extra satisfying impls +#![allow(todo_macro_calls)] use std::collections::HashMap; diff --git a/tests/ui/traits/issue-77982.stderr b/tests/ui/traits/issue-77982.stderr index b1baabc4394b0..85bad6f643c09 100644 --- a/tests/ui/traits/issue-77982.stderr +++ b/tests/ui/traits/issue-77982.stderr @@ -1,5 +1,5 @@ error[E0283]: type annotations needed - --> $DIR/issue-77982.rs:11:10 + --> $DIR/issue-77982.rs:12:10 | LL | opts.get(opt.as_ref()); | ^^^ ------------ type must be known at this point @@ -18,7 +18,7 @@ LL | opts.get::(opt.as_ref()); | +++++ error[E0283]: type annotations needed - --> $DIR/issue-77982.rs:11:10 + --> $DIR/issue-77982.rs:12:10 | LL | opts.get(opt.as_ref()); | ^^^ ------ type must be known at this point @@ -36,7 +36,7 @@ LL | opts.get::(opt.as_ref()); | +++++ error[E0283]: type annotations needed - --> $DIR/issue-77982.rs:16:59 + --> $DIR/issue-77982.rs:17:59 | LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect(); | --- ^^^^ @@ -57,13 +57,13 @@ LL + let ips: Vec<_> = (0..100_000).map(|_| u32::from(>::into | error[E0283]: type annotations needed for `Box<_>` - --> $DIR/issue-77982.rs:39:9 + --> $DIR/issue-77982.rs:40:9 | LL | let _ = ().foo(); | ^ --- type must be known at this point | note: multiple `impl`s satisfying `(): Foo<'_, _>` found - --> $DIR/issue-77982.rs:32:1 + --> $DIR/issue-77982.rs:33:1 | LL | impl Foo<'static, u32> for () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -75,13 +75,13 @@ LL | let _: Box = ().foo(); | ++++++++ error[E0283]: type annotations needed for `Box<_>` - --> $DIR/issue-77982.rs:43:9 + --> $DIR/issue-77982.rs:44:9 | LL | let _ = (&()).bar(); | ^ --- type must be known at this point | note: multiple `impl`s satisfying `&(): Bar<'_, _>` found - --> $DIR/issue-77982.rs:35:1 + --> $DIR/issue-77982.rs:36:1 | LL | impl<'a> Bar<'static, u32> for &'a () {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/issue-85360-eval-obligation-ice.rs b/tests/ui/traits/issue-85360-eval-obligation-ice.rs index f7c49049e2d33..9e0dfe9b814f2 100644 --- a/tests/ui/traits/issue-85360-eval-obligation-ice.rs +++ b/tests/ui/traits/issue-85360-eval-obligation-ice.rs @@ -1,4 +1,5 @@ //@ edition: 2021 +#![allow(todo_macro_calls)] #![feature(rustc_attrs)] diff --git a/tests/ui/traits/issue-85360-eval-obligation-ice.stderr b/tests/ui/traits/issue-85360-eval-obligation-ice.stderr index d2b00a45a4f15..9bb03cd5e2bef 100644 --- a/tests/ui/traits/issue-85360-eval-obligation-ice.stderr +++ b/tests/ui/traits/issue-85360-eval-obligation-ice.stderr @@ -1,5 +1,5 @@ error: evaluate(Binder { value: TraitPredicate(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk) - --> $DIR/issue-85360-eval-obligation-ice.rs:9:5 + --> $DIR/issue-85360-eval-obligation-ice.rs:10:5 | LL | test::>>(make()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -8,7 +8,7 @@ LL | fn test(_: T) {} | ----- predicate error: evaluate(Binder { value: TraitPredicate(> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions) - --> $DIR/issue-85360-eval-obligation-ice.rs:12:5 + --> $DIR/issue-85360-eval-obligation-ice.rs:13:5 | LL | test::>>(make()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/issue-92292.rs b/tests/ui/traits/issue-92292.rs index e1358157cfb7b..17b6b5e6dc8a8 100644 --- a/tests/ui/traits/issue-92292.rs +++ b/tests/ui/traits/issue-92292.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] use std::marker::PhantomData; diff --git a/tests/ui/traits/missing-trait-bounds/auxiliary/struct-69725.rs b/tests/ui/traits/missing-trait-bounds/auxiliary/struct-69725.rs index 13606e498ef7d..c3b3f448285be 100644 --- a/tests/ui/traits/missing-trait-bounds/auxiliary/struct-69725.rs +++ b/tests/ui/traits/missing-trait-bounds/auxiliary/struct-69725.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #[derive(Clone)] pub struct Struct(A); diff --git a/tests/ui/traits/missing-trait-bounds/derive-clone-missing-bound-69725.stderr b/tests/ui/traits/missing-trait-bounds/derive-clone-missing-bound-69725.stderr index bed40b83bc37a..09e203881328a 100644 --- a/tests/ui/traits/missing-trait-bounds/derive-clone-missing-bound-69725.stderr +++ b/tests/ui/traits/missing-trait-bounds/derive-clone-missing-bound-69725.stderr @@ -4,7 +4,7 @@ error[E0599]: the method `clone` exists for struct `struct_69725::Struct`, bu LL | let _ = Struct::::new().clone(); | ^^^^^ method cannot be called on `struct_69725::Struct` due to unsatisfied trait bounds | - ::: $DIR/auxiliary/struct-69725.rs:2:1 + ::: $DIR/auxiliary/struct-69725.rs:3:1 | LL | pub struct Struct(A); | -------------------- doesn't satisfy `struct_69725::Struct: Clone` diff --git a/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs b/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs index f45ee58fcc44d..04f2cd81b429f 100644 --- a/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs +++ b/tests/ui/traits/next-solver/alias-relate/alias_eq_dont_use_normalizes_to_if_substs_eq.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] //@ check-pass // (should not pass, should be turned into a coherence-only test) diff --git a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs index 92a0913dee284..53e35e6c6b9dd 100644 --- a/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs +++ b/tests/ui/traits/next-solver/alias-relate/tait-eq-proj-2.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] #![feature(type_alias_impl_trait)] diff --git a/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs b/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs index c813f94a90464..b65467f7a83c9 100644 --- a/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs +++ b/tests/ui/traits/next-solver/alias-relate/tait-eq-tait.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // Not exactly sure if this is the inference behavior we *want*, // but it is a side-effect of the lazy normalization of TAITs. diff --git a/tests/ui/traits/next-solver/alias-sub.rs b/tests/ui/traits/next-solver/alias-sub.rs index fb77990392bbb..6872b712c4505 100644 --- a/tests/ui/traits/next-solver/alias-sub.rs +++ b/tests/ui/traits/next-solver/alias-sub.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] trait Trait { type Assoc: Sized; diff --git a/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs b/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs index e4332ced52142..2a20669ba1702 100644 --- a/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs +++ b/tests/ui/traits/next-solver/assembly/ambig-projection-self-is-ambig.rs @@ -1,5 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] trait Reader: Default { fn read_u8_array(&self) -> Result { diff --git a/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-3.next.stderr b/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-3.next.stderr index fb96da3232965..4211371a90c1e 100644 --- a/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-3.next.stderr +++ b/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-3.next.stderr @@ -1,17 +1,17 @@ error[E0283]: type annotations needed: cannot satisfy `dyn Object<&(), &()>: Trait<&()>` - --> $DIR/ambiguity-due-to-uniquification-3.rs:28:5 + --> $DIR/ambiguity-due-to-uniquification-3.rs:29:5 | LL | impls_trait(obj, t); | ^^^^^^^^^^^^^^^^^^^ | = note: cannot satisfy `dyn Object<&(), &()>: Trait<&()>` help: the trait `Trait` is implemented for `()` - --> $DIR/ambiguity-due-to-uniquification-3.rs:17:1 + --> $DIR/ambiguity-due-to-uniquification-3.rs:18:1 | LL | impl Trait for () {} | ^^^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `impls_trait` - --> $DIR/ambiguity-due-to-uniquification-3.rs:24:19 + --> $DIR/ambiguity-due-to-uniquification-3.rs:25:19 | LL | fn impls_trait, U>(_: Inv, _: Inv) {} | ^^^^^^^^ required by this bound in `impls_trait` diff --git a/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-3.rs b/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-3.rs index 6dcd9d5bdf4dd..0d4ec0c4ec101 100644 --- a/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-3.rs +++ b/tests/ui/traits/next-solver/assembly/ambiguity-due-to-uniquification-3.rs @@ -2,6 +2,7 @@ //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@[current] check-pass +#![allow(todo_macro_calls)] // Regression test from trait-system-refactor-initiative#27. // diff --git a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs index 03d03e4a91d9d..3dd936c9df4c0 100644 --- a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs +++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // In the new solver, we are trying to select `::Item: Debug`, // which, naively can be unified with every impl of `Debug` if we're not careful. diff --git a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr index ac427c8f0cba7..c46526e821983 100644 --- a/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr +++ b/tests/ui/traits/next-solver/assembly/runaway-impl-candidate-selection.stderr @@ -1,12 +1,12 @@ error[E0283]: type annotations needed - --> $DIR/runaway-impl-candidate-selection.rs:13:22 + --> $DIR/runaway-impl-candidate-selection.rs:14:22 | LL | println!("{:?}", iter::<_>()); | ^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `iter` | = note: the type must implement `Iterator` note: required by a bound in `iter` - --> $DIR/runaway-impl-candidate-selection.rs:8:12 + --> $DIR/runaway-impl-candidate-selection.rs:9:12 | LL | fn iter() -> ::Item { | ^^^^^^^^ required by this bound in `iter` diff --git a/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs b/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs index d05def2cb757d..84ffb7720c808 100644 --- a/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs +++ b/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] trait Wf { type Assoc; diff --git a/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.stderr b/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.stderr index 72be10367dac9..cdfded33bec9a 100644 --- a/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.stderr +++ b/tests/ui/traits/next-solver/coercion/non-wf-in-coerce-pointers.stderr @@ -1,17 +1,17 @@ error[E0277]: the trait bound `(): Wf` is not satisfied - --> $DIR/non-wf-in-coerce-pointers.rs:8:8 + --> $DIR/non-wf-in-coerce-pointers.rs:9:8 | LL | f: &'static <() as Wf>::Assoc, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Wf` is not implemented for `()` | help: this trait has no implementations, consider adding one - --> $DIR/non-wf-in-coerce-pointers.rs:3:1 + --> $DIR/non-wf-in-coerce-pointers.rs:4:1 | LL | trait Wf { | ^^^^^^^^ error[E0308]: mismatched types - --> $DIR/non-wf-in-coerce-pointers.rs:14:18 + --> $DIR/non-wf-in-coerce-pointers.rs:15:18 | LL | let y: &() = x.f; | --- ^^^ types differ @@ -22,13 +22,13 @@ LL | let y: &() = x.f; found reference `&'static <() as Wf>::Assoc` error[E0277]: the trait bound `(): Wf` is not satisfied - --> $DIR/non-wf-in-coerce-pointers.rs:14:18 + --> $DIR/non-wf-in-coerce-pointers.rs:15:18 | LL | let y: &() = x.f; | ^^^ the trait `Wf` is not implemented for `()` | help: this trait has no implementations, consider adding one - --> $DIR/non-wf-in-coerce-pointers.rs:3:1 + --> $DIR/non-wf-in-coerce-pointers.rs:4:1 | LL | trait Wf { | ^^^^^^^^ diff --git a/tests/ui/traits/next-solver/coercion/unsize-coercion-recursion-limit.rs b/tests/ui/traits/next-solver/coercion/unsize-coercion-recursion-limit.rs index 42802e85cda10..fdd1f44e3548b 100644 --- a/tests/ui/traits/next-solver/coercion/unsize-coercion-recursion-limit.rs +++ b/tests/ui/traits/next-solver/coercion/unsize-coercion-recursion-limit.rs @@ -5,7 +5,7 @@ // exceeds the recursion limit and evaluates to `Certainty::Maybe`. // See https://github.com/rust-lang/rust/pull/152444. -#![allow(warnings)] +#![allow(warnings, todo_macro_calls)] struct W(T); type Four = W>>>; diff --git a/tests/ui/traits/next-solver/coercion/upcast-right-substs.rs b/tests/ui/traits/next-solver/coercion/upcast-right-substs.rs index 7a566b59b837c..fa11bf839f498 100644 --- a/tests/ui/traits/next-solver/coercion/upcast-right-substs.rs +++ b/tests/ui/traits/next-solver/coercion/upcast-right-substs.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] trait Foo: Bar + Bar {} diff --git a/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs b/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs index 473977c527c82..31ab937d315d2 100644 --- a/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs +++ b/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] trait Foo: Bar + Bar {} diff --git a/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.stderr b/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.stderr index 00ba1ef678f46..d48aa216b2fb2 100644 --- a/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.stderr +++ b/tests/ui/traits/next-solver/coercion/upcast-wrong-substs.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/upcast-wrong-substs.rs:9:30 + --> $DIR/upcast-wrong-substs.rs:10:30 | LL | let y: &dyn Bar = x; | --------------- ^ expected trait `Bar`, found trait `Foo` diff --git a/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.rs b/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.rs index 327f731d7e91b..50a33715e6b75 100644 --- a/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.rs +++ b/tests/ui/traits/next-solver/coherence/negative-coherence-bounds.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] // This test verifies that negative trait predicate cannot be satisfied from a // positive param-env candidate. diff --git a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs index f85b865952efa..4b8375f32c5f2 100644 --- a/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs +++ b/tests/ui/traits/next-solver/coherence/trait_ref_is_knowable-normalization-2.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] use std::future::{Future, IntoFuture}; use std::pin::Pin; diff --git a/tests/ui/traits/next-solver/cycles/provisional-result-done.rs b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs index 683a4fe48317a..bcdd3f78193db 100644 --- a/tests/ui/traits/next-solver/cycles/provisional-result-done.rs +++ b/tests/ui/traits/next-solver/cycles/provisional-result-done.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // This tests checks that we update results in the provisional cache when // we pop a goal from the stack. diff --git a/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.rs b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.rs index bd3dccad15280..5bd4bc3681442 100644 --- a/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.rs +++ b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] trait Mirror { type Assoc; diff --git a/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr index e4775e41ba1a5..59f23b3014e72 100644 --- a/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr +++ b/tests/ui/traits/next-solver/diagnostics/coerce-in-may-coerce.stderr @@ -1,13 +1,13 @@ error[E0308]: arguments to this function are incorrect - --> $DIR/coerce-in-may-coerce.rs:17:5 + --> $DIR/coerce-in-may-coerce.rs:18:5 | LL | arg_error((), || ()); - | ^^^^^^^^^ -- ----- expected `()`, found `{closure@$DIR/coerce-in-may-coerce.rs:17:19: 17:21}` + | ^^^^^^^^^ -- ----- expected `()`, found `{closure@$DIR/coerce-in-may-coerce.rs:18:19: 18:21}` | | | expected `::Assoc`, found `()` | note: function defined here - --> $DIR/coerce-in-may-coerce.rs:12:4 + --> $DIR/coerce-in-may-coerce.rs:13:4 | LL | fn arg_error(x: ::Assoc, y: ()) { todo!() } | ^^^^^^^^^ diff --git a/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs index 12fb3d0d9e146..c4720cf286b96 100644 --- a/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs +++ b/tests/ui/traits/next-solver/dont-coerce-infer-to-dyn.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] use std::fmt::Display; use std::rc::Rc; diff --git a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs index 2f7ea3bb09548..7538cb33a12aa 100644 --- a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs +++ b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // Test that we don't incorrectly leak unconstrained inference variables // if the projection contained an error. This caused an ICE in writeback. diff --git a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr index 67690a85d53ce..ff67a3b2cad48 100644 --- a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr +++ b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `TypeError` in this scope - --> $DIR/dont-normalize-proj-with-error.rs:17:20 + --> $DIR/dont-normalize-proj-with-error.rs:18:20 | LL | fn type_error() -> TypeError { todo!() } | ^^^^^^^^^ not found in this scope diff --git a/tests/ui/traits/next-solver/fudge-inference/fudge-inference-with-aliases-1.rs b/tests/ui/traits/next-solver/fudge-inference/fudge-inference-with-aliases-1.rs index 3189ad811df67..a77b7e097a29f 100644 --- a/tests/ui/traits/next-solver/fudge-inference/fudge-inference-with-aliases-1.rs +++ b/tests/ui/traits/next-solver/fudge-inference/fudge-inference-with-aliases-1.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // A regression test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/252. // `fn fudge_inference_if_ok` might lose relationships between ty vars so we need to normalize diff --git a/tests/ui/traits/next-solver/fudge-inference/fudge-inference-with-aliases-2.rs b/tests/ui/traits/next-solver/fudge-inference/fudge-inference-with-aliases-2.rs index 9c8e184e879a5..3c56865c38151 100644 --- a/tests/ui/traits/next-solver/fudge-inference/fudge-inference-with-aliases-2.rs +++ b/tests/ui/traits/next-solver/fudge-inference/fudge-inference-with-aliases-2.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // A regression test for https://github.com/rust-lang/trait-system-refactor-initiative/issues/252. // `fn fudge_inference_if_ok` might lose relationships between ty vars so we need to normalize diff --git a/tests/ui/traits/next-solver/generalize/equating-projection-cyclically.rs b/tests/ui/traits/next-solver/generalize/equating-projection-cyclically.rs index 317eb65745a6f..cbff87c8ff2db 100644 --- a/tests/ui/traits/next-solver/generalize/equating-projection-cyclically.rs +++ b/tests/ui/traits/next-solver/generalize/equating-projection-cyclically.rs @@ -1,5 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] trait Test { type Assoc; diff --git a/tests/ui/traits/next-solver/generalize/hr-alias-non-hr-alias-self-ty-1.rs b/tests/ui/traits/next-solver/generalize/hr-alias-non-hr-alias-self-ty-1.rs index 3be118a5b3940..403b59b310abc 100644 --- a/tests/ui/traits/next-solver/generalize/hr-alias-non-hr-alias-self-ty-1.rs +++ b/tests/ui/traits/next-solver/generalize/hr-alias-non-hr-alias-self-ty-1.rs @@ -16,7 +16,7 @@ // // cc trait-system-refactor-initiative#110 -#![allow(unused)] +#![allow(unused, todo_macro_calls)] trait HigherRanked { type Output<'a>; } diff --git a/tests/ui/traits/next-solver/generalize/hr-alias-non-hr-alias-self-ty-2.rs b/tests/ui/traits/next-solver/generalize/hr-alias-non-hr-alias-self-ty-2.rs index 560eb34a977d8..c49caa222d587 100644 --- a/tests/ui/traits/next-solver/generalize/hr-alias-non-hr-alias-self-ty-2.rs +++ b/tests/ui/traits/next-solver/generalize/hr-alias-non-hr-alias-self-ty-2.rs @@ -2,6 +2,7 @@ //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass +#![allow(todo_macro_calls)] // A minimization of an ambiguity error in `icu_provider`. // diff --git a/tests/ui/traits/next-solver/generalize/hr-alias-universe-lowering-ambiguity.rs b/tests/ui/traits/next-solver/generalize/hr-alias-universe-lowering-ambiguity.rs index 1e2ba81129dba..d39b97fc6062f 100644 --- a/tests/ui/traits/next-solver/generalize/hr-alias-universe-lowering-ambiguity.rs +++ b/tests/ui/traits/next-solver/generalize/hr-alias-universe-lowering-ambiguity.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // A regression test for a fairly subtle issue with how we // generalize aliases referencing higher-ranked regions diff --git a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs index fbf4cadc678d5..382a7b8d6fe06 100644 --- a/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs +++ b/tests/ui/traits/next-solver/generalize/occurs-check-nested-alias.rs @@ -5,7 +5,7 @@ // case 3 of https://github.com/rust-lang/trait-system-refactor-initiative/issues/8. #![crate_type = "lib"] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] trait Unnormalizable { type Assoc; } diff --git a/tests/ui/traits/next-solver/global-cache-and-parallel-frontend.rs b/tests/ui/traits/next-solver/global-cache-and-parallel-frontend.rs index ceef87d76abb6..74511ec000fe4 100644 --- a/tests/ui/traits/next-solver/global-cache-and-parallel-frontend.rs +++ b/tests/ui/traits/next-solver/global-cache-and-parallel-frontend.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Zthreads=16 +#![allow(todo_macro_calls)] // original issue: https://github.com/rust-lang/rust/issues/129112 // Previously, the "next" solver asserted that each successful solution is only obtained once. diff --git a/tests/ui/traits/next-solver/global-cache-and-parallel-frontend.stderr b/tests/ui/traits/next-solver/global-cache-and-parallel-frontend.stderr index 912286a48fafe..4f5ff5bffca39 100644 --- a/tests/ui/traits/next-solver/global-cache-and-parallel-frontend.stderr +++ b/tests/ui/traits/next-solver/global-cache-and-parallel-frontend.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: Clone` is not satisfied - --> $DIR/global-cache-and-parallel-frontend.rs:16:12 + --> $DIR/global-cache-and-parallel-frontend.rs:17:12 | LL | #[derive(Clone, Eq)] | -- in this derive macro expansion @@ -7,7 +7,7 @@ LL | pub struct Struct(T); | ^^^^^^ the trait `Clone` is not implemented for `T` | note: required for `Struct` to implement `PartialEq` - --> $DIR/global-cache-and-parallel-frontend.rs:18:19 + --> $DIR/global-cache-and-parallel-frontend.rs:19:19 | LL | impl PartialEq for Struct | ----- ^^^^^^^^^^^^ ^^^^^^^^^ diff --git a/tests/ui/traits/next-solver/non-wf-ret.rs b/tests/ui/traits/next-solver/non-wf-ret.rs index c54d61c895d23..abc1ece748872 100644 --- a/tests/ui/traits/next-solver/non-wf-ret.rs +++ b/tests/ui/traits/next-solver/non-wf-ret.rs @@ -1,5 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] use std::ops::Deref; diff --git a/tests/ui/traits/next-solver/normalization-shadowing/discard-impls-shadowed-by-env-2.rs b/tests/ui/traits/next-solver/normalization-shadowing/discard-impls-shadowed-by-env-2.rs index 20329f467db53..d88f2178835a0 100644 --- a/tests/ui/traits/next-solver/normalization-shadowing/discard-impls-shadowed-by-env-2.rs +++ b/tests/ui/traits/next-solver/normalization-shadowing/discard-impls-shadowed-by-env-2.rs @@ -3,7 +3,7 @@ //@[next] compile-flags: -Znext-solver //@ check-pass -#![allow(warnings)] +#![allow(warnings, todo_macro_calls)] trait Trait { type Assoc; } diff --git a/tests/ui/traits/next-solver/normalization-shadowing/normalizes_to_ignores_unnormalizable_candidate.rs b/tests/ui/traits/next-solver/normalization-shadowing/normalizes_to_ignores_unnormalizable_candidate.rs index e66d1c485f899..a54117ffcb121 100644 --- a/tests/ui/traits/next-solver/normalization-shadowing/normalizes_to_ignores_unnormalizable_candidate.rs +++ b/tests/ui/traits/next-solver/normalization-shadowing/normalizes_to_ignores_unnormalizable_candidate.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // Checks whether the new solver is smart enough to infer `?0 = U` when solving: // `normalizes-to( as Trait>::Assoc, u8)` diff --git a/tests/ui/traits/next-solver/normalization-shadowing/normalizes_to_ignores_unnormalizable_candidate.stderr b/tests/ui/traits/next-solver/normalization-shadowing/normalizes_to_ignores_unnormalizable_candidate.stderr index 36d281e11dd7a..002b1130ebef6 100644 --- a/tests/ui/traits/next-solver/normalization-shadowing/normalizes_to_ignores_unnormalizable_candidate.stderr +++ b/tests/ui/traits/next-solver/normalization-shadowing/normalizes_to_ignores_unnormalizable_candidate.stderr @@ -1,5 +1,5 @@ error[E0283]: type annotations needed - --> $DIR/normalizes_to_ignores_unnormalizable_candidate.rs:25:5 + --> $DIR/normalizes_to_ignores_unnormalizable_candidate.rs:26:5 | LL | foo(unconstrained()) | ^^^ --------------- type must be known at this point @@ -8,7 +8,7 @@ LL | foo(unconstrained()) | = note: cannot satisfy `Vec<_>: Trait` note: required by a bound in `foo` - --> $DIR/normalizes_to_ignores_unnormalizable_candidate.rs:14:11 + --> $DIR/normalizes_to_ignores_unnormalizable_candidate.rs:15:11 | LL | fn foo>(x: T) {} | ^^^^^^^^^^^^^^^^^ required by this bound in `foo` diff --git a/tests/ui/traits/next-solver/normalize/ambig-goal-infer-in-type-oulives.rs b/tests/ui/traits/next-solver/normalize/ambig-goal-infer-in-type-oulives.rs index 18dc34f7cc437..69d589e76b843 100644 --- a/tests/ui/traits/next-solver/normalize/ambig-goal-infer-in-type-oulives.rs +++ b/tests/ui/traits/next-solver/normalize/ambig-goal-infer-in-type-oulives.rs @@ -1,6 +1,7 @@ //@ check-pass //@ compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicitly enabled) +#![allow(todo_macro_calls)] // Regression test for an ICE when trying to bootstrap rustc // with #125343. An ambiguous goal returned a `TypeOutlives` diff --git a/tests/ui/traits/next-solver/normalize/normalize-rcvr-for-inherent.rs b/tests/ui/traits/next-solver/normalize/normalize-rcvr-for-inherent.rs index 8e6c686663577..cb160809cdc54 100644 --- a/tests/ui/traits/next-solver/normalize/normalize-rcvr-for-inherent.rs +++ b/tests/ui/traits/next-solver/normalize/normalize-rcvr-for-inherent.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // Verify that we can assemble inherent impl candidates on a possibly // unnormalized self type. diff --git a/tests/ui/traits/next-solver/normalize/skip-supertraits-in-object-candidate.rs b/tests/ui/traits/next-solver/normalize/skip-supertraits-in-object-candidate.rs index 9b13b78d024b4..01697f451711f 100644 --- a/tests/ui/traits/next-solver/normalize/skip-supertraits-in-object-candidate.rs +++ b/tests/ui/traits/next-solver/normalize/skip-supertraits-in-object-candidate.rs @@ -1,6 +1,7 @@ //@ check-pass //@ compile-flags: -Znext-solver //@ edition: 2024 +#![allow(todo_macro_calls)] // A regression test for trait-system-refactor-initiative#245. // The old solver doesn't check the supertraits of the principal trait diff --git a/tests/ui/traits/next-solver/opaques/eventually-constrained-region.rs b/tests/ui/traits/next-solver/opaques/eventually-constrained-region.rs index 997bcd6ed9b44..b92e01ec2cd2e 100644 --- a/tests/ui/traits/next-solver/opaques/eventually-constrained-region.rs +++ b/tests/ui/traits/next-solver/opaques/eventually-constrained-region.rs @@ -1,5 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // Regression test for trait-system-refactor-initiative#264. // diff --git a/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.rs b/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.rs index d8375a62bb376..cffb26e2489e4 100644 --- a/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.rs +++ b/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // Regression test for trait-system-refactor-initiative/issues/263 // Previously `method_auto_deref_steps` would also return opaque diff --git a/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.stderr b/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.stderr index c421222309a03..c526003a3a6e7 100644 --- a/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.stderr +++ b/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.stderr @@ -1,17 +1,17 @@ error[E0277]: the trait bound `u32: Trait` is not satisfied - --> $DIR/method_autoderef_constraints.rs:29:16 + --> $DIR/method_autoderef_constraints.rs:30:16 | LL | return x; | ^ the trait `Trait` is not implemented for `u32` | help: the trait `Trait` is implemented for `i32` - --> $DIR/method_autoderef_constraints.rs:16:1 + --> $DIR/method_autoderef_constraints.rs:17:1 | LL | impl Trait for i32 {} | ^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/method_autoderef_constraints.rs:34:5 + --> $DIR/method_autoderef_constraints.rs:35:5 | LL | fn foo() -> Inv { | --------------- @@ -26,13 +26,13 @@ LL | x found struct `Inv` error[E0277]: the trait bound `u32: Trait` is not satisfied - --> $DIR/method_autoderef_constraints.rs:25:1 + --> $DIR/method_autoderef_constraints.rs:26:1 | LL | fn foo() -> Inv { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `u32` | help: the trait `Trait` is implemented for `i32` - --> $DIR/method_autoderef_constraints.rs:16:1 + --> $DIR/method_autoderef_constraints.rs:17:1 | LL | impl Trait for i32 {} | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/next-solver/opaques/report-all-unexpected-hidden-errors.rs b/tests/ui/traits/next-solver/opaques/report-all-unexpected-hidden-errors.rs index 61823c1e300db..5169dcdf52189 100644 --- a/tests/ui/traits/next-solver/opaques/report-all-unexpected-hidden-errors.rs +++ b/tests/ui/traits/next-solver/opaques/report-all-unexpected-hidden-errors.rs @@ -4,6 +4,7 @@ // This is probably unimportant as we only report one error for such case in HIR typeck. #![feature(type_alias_impl_trait)] +#![allow(todo_macro_calls)] struct Invar<'a>(*mut &'a ()); diff --git a/tests/ui/traits/next-solver/opaques/report-all-unexpected-hidden-errors.stderr b/tests/ui/traits/next-solver/opaques/report-all-unexpected-hidden-errors.stderr index 28d9da3d4666d..4cd4722c4e3ff 100644 --- a/tests/ui/traits/next-solver/opaques/report-all-unexpected-hidden-errors.stderr +++ b/tests/ui/traits/next-solver/opaques/report-all-unexpected-hidden-errors.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `MultiUse` captures lifetime that does not appear in bounds - --> $DIR/report-all-unexpected-hidden-errors.rs:18:19 + --> $DIR/report-all-unexpected-hidden-errors.rs:19:19 | LL | type MultiUse = impl Sized; | ---------- opaque type defined here @@ -10,7 +10,7 @@ LL | let _ = || -> MultiUse { = note: hidden type `Invar<'_>` captures lifetime `'_` error[E0700]: hidden type for `MultiUse` captures lifetime that does not appear in bounds - --> $DIR/report-all-unexpected-hidden-errors.rs:22:19 + --> $DIR/report-all-unexpected-hidden-errors.rs:23:19 | LL | type MultiUse = impl Sized; | ---------- opaque type defined here @@ -21,7 +21,7 @@ LL | let _ = || -> MultiUse { = note: hidden type `Invar<'_>` captures lifetime `'_` error[E0700]: hidden type for `MultiUse` captures lifetime that does not appear in bounds - --> $DIR/report-all-unexpected-hidden-errors.rs:27:23 + --> $DIR/report-all-unexpected-hidden-errors.rs:28:23 | LL | type MultiUse = impl Sized; | ---------- opaque type defined here diff --git a/tests/ui/traits/next-solver/overflow-plus-ambiguity-normalizes-to-response.rs b/tests/ui/traits/next-solver/overflow-plus-ambiguity-normalizes-to-response.rs index 4b20cd11b0d41..831aa5fc38e1f 100644 --- a/tests/ui/traits/next-solver/overflow-plus-ambiguity-normalizes-to-response.rs +++ b/tests/ui/traits/next-solver/overflow-plus-ambiguity-normalizes-to-response.rs @@ -1,5 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] // Regression test for . // See comment below on `fn main`. diff --git a/tests/ui/traits/next-solver/supertrait-alias-4.rs b/tests/ui/traits/next-solver/supertrait-alias-4.rs index 919a768fcf281..920ea5efc588b 100644 --- a/tests/ui/traits/next-solver/supertrait-alias-4.rs +++ b/tests/ui/traits/next-solver/supertrait-alias-4.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // Exercises the ambiguity that comes from replacing the associated types within the bounds // that are required for a `impl Trait for dyn Trait` built-in object impl to hold. diff --git a/tests/ui/traits/next-solver/try-example.rs b/tests/ui/traits/next-solver/try-example.rs index b39bc247aab1b..63a5be0df1e97 100644 --- a/tests/ui/traits/next-solver/try-example.rs +++ b/tests/ui/traits/next-solver/try-example.rs @@ -1,5 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] use std::error::Error; diff --git a/tests/ui/traits/next-solver/typeck/resolve-before-checking-never.rs b/tests/ui/traits/next-solver/typeck/resolve-before-checking-never.rs index 6df1fd5d4ba16..b0d566006210b 100644 --- a/tests/ui/traits/next-solver/typeck/resolve-before-checking-never.rs +++ b/tests/ui/traits/next-solver/typeck/resolve-before-checking-never.rs @@ -1,5 +1,6 @@ //@ check-pass //@ compile-flags: -Znext-solver +#![allow(todo_macro_calls)] #![feature(never_type)] diff --git a/tests/ui/traits/next-solver/well-formed-in-relate.rs b/tests/ui/traits/next-solver/well-formed-in-relate.rs index eec1ddef228c4..a07fb8b651987 100644 --- a/tests/ui/traits/next-solver/well-formed-in-relate.rs +++ b/tests/ui/traits/next-solver/well-formed-in-relate.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] fn main() { let x; //~^ ERROR type annotations needed for `Map<_, _>` diff --git a/tests/ui/traits/next-solver/well-formed-in-relate.stderr b/tests/ui/traits/next-solver/well-formed-in-relate.stderr index 264ab9bebbb92..46d4a64496e8d 100644 --- a/tests/ui/traits/next-solver/well-formed-in-relate.stderr +++ b/tests/ui/traits/next-solver/well-formed-in-relate.stderr @@ -1,5 +1,5 @@ error[E0283]: type annotations needed for `Map<_, _>` - --> $DIR/well-formed-in-relate.rs:2:9 + --> $DIR/well-formed-in-relate.rs:3:9 | LL | let x; | ^ @@ -15,7 +15,7 @@ LL | x = unconstrained_map(); - impl Fn for Exclusive where F: Sync, F: Fn, Args: std::marker::Tuple; note: required by a bound in `unconstrained_map` - --> $DIR/well-formed-in-relate.rs:21:25 + --> $DIR/well-formed-in-relate.rs:22:25 | LL | fn unconstrained_map U, U>() -> as Mirror>::Assoc { todo!() } | ^^^^^^^^^ required by this bound in `unconstrained_map` diff --git a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs index e8b7139e82eaa..157054ec88734 100644 --- a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs +++ b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(non_lifetime_binders, generic_const_exprs)] fn foo() -> usize diff --git a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr index cd8bc33ec313d..d9985797ae209 100644 --- a/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr +++ b/tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr @@ -1,5 +1,5 @@ error: cannot capture late-bound type parameter in constant - --> $DIR/late-bound-in-anon-ct.rs:5:27 + --> $DIR/late-bound-in-anon-ct.rs:6:27 | LL | for [i32; { let _: T = todo!(); 0 }]:, | - ^ diff --git a/tests/ui/traits/non_lifetime_binders/on-dyn.rs b/tests/ui/traits/non_lifetime_binders/on-dyn.rs index a081974ca8e68..185257201eb07 100644 --- a/tests/ui/traits/non_lifetime_binders/on-dyn.rs +++ b/tests/ui/traits/non_lifetime_binders/on-dyn.rs @@ -1,4 +1,5 @@ // Tests to make sure that we reject polymorphic dyn trait. +#![allow(todo_macro_calls)] #![feature(non_lifetime_binders)] diff --git a/tests/ui/traits/non_lifetime_binders/on-dyn.stderr b/tests/ui/traits/non_lifetime_binders/on-dyn.stderr index 8d7cb51c034c6..1d8878f39559d 100644 --- a/tests/ui/traits/non_lifetime_binders/on-dyn.stderr +++ b/tests/ui/traits/non_lifetime_binders/on-dyn.stderr @@ -1,5 +1,5 @@ error: late-bound type parameter not allowed on trait object types - --> $DIR/on-dyn.rs:7:30 + --> $DIR/on-dyn.rs:8:30 | LL | fn foo() -> &'static dyn for Test { | ^ diff --git a/tests/ui/traits/non_lifetime_binders/on-ptr.rs b/tests/ui/traits/non_lifetime_binders/on-ptr.rs index 96c155a13f3bd..f1f4d88d299e3 100644 --- a/tests/ui/traits/non_lifetime_binders/on-ptr.rs +++ b/tests/ui/traits/non_lifetime_binders/on-ptr.rs @@ -1,4 +1,5 @@ // Tests to make sure that we reject polymorphic fn ptrs. +#![allow(todo_macro_calls)] #![feature(non_lifetime_binders)] diff --git a/tests/ui/traits/non_lifetime_binders/on-ptr.stderr b/tests/ui/traits/non_lifetime_binders/on-ptr.stderr index 680df6ddd0ae1..29c274ca76ec8 100644 --- a/tests/ui/traits/non_lifetime_binders/on-ptr.stderr +++ b/tests/ui/traits/non_lifetime_binders/on-ptr.stderr @@ -1,5 +1,5 @@ error: late-bound type parameter not allowed on function pointer types - --> $DIR/on-ptr.rs:5:17 + --> $DIR/on-ptr.rs:6:17 | LL | fn foo() -> for fn(T) { | ^ diff --git a/tests/ui/traits/normalize-conflicting-impls.rs b/tests/ui/traits/normalize-conflicting-impls.rs index 454b2fd015357..9675a76308e34 100644 --- a/tests/ui/traits/normalize-conflicting-impls.rs +++ b/tests/ui/traits/normalize-conflicting-impls.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] fn problematic_function(material_surface_element: ()) where DefaultAllocator: FiniteElementAllocator<(), Space>, diff --git a/tests/ui/traits/normalize-conflicting-impls.stderr b/tests/ui/traits/normalize-conflicting-impls.stderr index 9a66fe00c3fe4..57fef3a134ba7 100644 --- a/tests/ui/traits/normalize-conflicting-impls.stderr +++ b/tests/ui/traits/normalize-conflicting-impls.stderr @@ -1,11 +1,11 @@ error[E0220]: associated type `Value` not found for `R` - --> $DIR/normalize-conflicting-impls.rs:10:8 + --> $DIR/normalize-conflicting-impls.rs:11:8 | LL | R::Value: DimName, | ^^^^^ associated type `Value` not found error[E0119]: conflicting implementations of trait `Allocator<_, ()>` for type `DefaultAllocator` - --> $DIR/normalize-conflicting-impls.rs:14:1 + --> $DIR/normalize-conflicting-impls.rs:15:1 | LL | / impl Allocator for DefaultAllocator LL | | where diff --git a/tests/ui/traits/object/crash-due-to-projections-modulo-norm.rs b/tests/ui/traits/object/crash-due-to-projections-modulo-norm.rs index b1f7c4a600021..3d7d939a9cdd5 100644 --- a/tests/ui/traits/object/crash-due-to-projections-modulo-norm.rs +++ b/tests/ui/traits/object/crash-due-to-projections-modulo-norm.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] // Regression test for #126944. diff --git a/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs b/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs index f644728ee114a..a7ba39990c7a1 100644 --- a/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs +++ b/tests/ui/traits/solver-cycles/inductive-canonical-cycle.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] // This test checks that we're correctly dealing with inductive cycles // with canonical inference variables. diff --git a/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.rs b/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.rs index ab84527edcff9..7e5228c1aae84 100644 --- a/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.rs +++ b/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] #![warn(deref_into_dyn_supertrait)] use std::ops::Deref; diff --git a/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.stderr b/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.stderr index 6744899e9518f..4758c4fed39bf 100644 --- a/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.stderr +++ b/tests/ui/traits/trait-upcasting/deref-upcast-shadowing-lint.stderr @@ -1,5 +1,5 @@ warning: this `Deref` implementation is covered by an implicit supertrait coercion - --> $DIR/deref-upcast-shadowing-lint.rs:8:1 + --> $DIR/deref-upcast-shadowing-lint.rs:9:1 | LL | impl<'a> Deref for dyn Foo + 'a { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo` implements `Deref>` which conflicts with supertrait `Bar` @@ -8,7 +8,7 @@ LL | type Target = dyn Bar + 'a; | ----------- target type is a supertrait of `dyn Foo` | note: the lint level is defined here - --> $DIR/deref-upcast-shadowing-lint.rs:2:9 + --> $DIR/deref-upcast-shadowing-lint.rs:3:9 | LL | #![warn(deref_into_dyn_supertrait)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs index 0103aaa2ac996..8f8dd818f3265 100644 --- a/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs +++ b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] use std::ops::Deref; trait Bar {} diff --git a/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr index 45eabbc723a6b..aacc6428dfcd6 100644 --- a/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr +++ b/tests/ui/traits/trait-upcasting/inference-behavior-change-deref.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/inference-behavior-change-deref.rs:31:18 + --> $DIR/inference-behavior-change-deref.rs:32:18 | LL | let z: u32 = y; | --- ^ expected `u32`, found `i32` diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs index d33d3bfd5dc20..26103864421c3 100644 --- a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs +++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] #![warn(deref_into_dyn_supertrait)] use std::ops::Deref; diff --git a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr index 0d43563e1ab78..10f7b3f5e685e 100644 --- a/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr +++ b/tests/ui/traits/trait-upcasting/migrate-lint-deny-regions.stderr @@ -1,5 +1,5 @@ warning: this `Deref` implementation is covered by an implicit supertrait coercion - --> $DIR/migrate-lint-deny-regions.rs:9:1 + --> $DIR/migrate-lint-deny-regions.rs:10:1 | LL | impl<'a> Deref for dyn Foo<'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Foo<'_>` implements `Deref>` which conflicts with supertrait `Bar<'_>` @@ -8,7 +8,7 @@ LL | type Target = dyn Bar<'a>; | ----------- target type is a supertrait of `dyn Foo<'_>` | note: the lint level is defined here - --> $DIR/migrate-lint-deny-regions.rs:2:9 + --> $DIR/migrate-lint-deny-regions.rs:3:9 | LL | #![warn(deref_into_dyn_supertrait)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/traits/trivial-unsized-projection-2.rs b/tests/ui/traits/trivial-unsized-projection-2.rs index af4e12f6f9008..ea9742024b493 100644 --- a/tests/ui/traits/trivial-unsized-projection-2.rs +++ b/tests/ui/traits/trivial-unsized-projection-2.rs @@ -6,7 +6,7 @@ //@[good_new] check-pass #![feature(trivial_bounds)] -#![allow(trivial_bounds)] +#![allow(trivial_bounds, todo_macro_calls)] trait Bad { type Assert diff --git a/tests/ui/traits/trivial-unsized-projection.rs b/tests/ui/traits/trivial-unsized-projection.rs index 62ff25fb7ac0a..c01632270ba5d 100644 --- a/tests/ui/traits/trivial-unsized-projection.rs +++ b/tests/ui/traits/trivial-unsized-projection.rs @@ -6,7 +6,7 @@ //@[good_new] check-pass #![feature(trivial_bounds)] -#![allow(trivial_bounds)] +#![allow(trivial_bounds, todo_macro_calls)] trait Bad { type Assert diff --git a/tests/ui/traits/winnowing/global-non-global-env-1.rs b/tests/ui/traits/winnowing/global-non-global-env-1.rs index 75c184b65bf04..5c82386821ccb 100644 --- a/tests/ui/traits/winnowing/global-non-global-env-1.rs +++ b/tests/ui/traits/winnowing/global-non-global-env-1.rs @@ -2,6 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // A regression test for an edge case of candidate selection // in the old trait solver, see #132325 for more details. diff --git a/tests/ui/traits/winnowing/global-non-global-env-2.rs b/tests/ui/traits/winnowing/global-non-global-env-2.rs index 128ec2a40dab0..439ff72afe227 100644 --- a/tests/ui/traits/winnowing/global-non-global-env-2.rs +++ b/tests/ui/traits/winnowing/global-non-global-env-2.rs @@ -2,6 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // A regression test for an edge case of candidate selection // in the old trait solver, see #132325 for more details. Unlike diff --git a/tests/ui/traits/winnowing/global-non-global-env-3.rs b/tests/ui/traits/winnowing/global-non-global-env-3.rs index 7e5dbd4ba8ec8..d8a171a27e71d 100644 --- a/tests/ui/traits/winnowing/global-non-global-env-3.rs +++ b/tests/ui/traits/winnowing/global-non-global-env-3.rs @@ -2,6 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // A regression test for an edge case of candidate selection // in the old trait solver, see #132325 for more details. Unlike diff --git a/tests/ui/traits/winnowing/global-non-global-env-4.rs b/tests/ui/traits/winnowing/global-non-global-env-4.rs index 2dc082be45c5e..387550271113d 100644 --- a/tests/ui/traits/winnowing/global-non-global-env-4.rs +++ b/tests/ui/traits/winnowing/global-non-global-env-4.rs @@ -2,6 +2,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ check-pass +#![allow(todo_macro_calls)] // A regression test for an edge case of candidate selection // in the old trait solver, see #132325 for more details. Unlike diff --git a/tests/ui/try-block/try-block-unused-delims.fixed b/tests/ui/try-block/try-block-unused-delims.fixed index 4769c45d38ccd..f2ac0ebbc9969 100644 --- a/tests/ui/try-block/try-block-unused-delims.fixed +++ b/tests/ui/try-block/try-block-unused-delims.fixed @@ -1,6 +1,7 @@ //@ check-pass //@ edition: 2018 //@ run-rustfix +#![allow(todo_macro_uses)] #![feature(try_blocks)] #![warn(unused_parens, unused_braces)] diff --git a/tests/ui/try-block/try-block-unused-delims.rs b/tests/ui/try-block/try-block-unused-delims.rs index 0520d1d620f5a..3644ea787bae3 100644 --- a/tests/ui/try-block/try-block-unused-delims.rs +++ b/tests/ui/try-block/try-block-unused-delims.rs @@ -1,6 +1,7 @@ //@ check-pass //@ edition: 2018 //@ run-rustfix +#![allow(todo_macro_calls)] #![feature(try_blocks)] #![warn(unused_parens, unused_braces)] diff --git a/tests/ui/try-block/try-block-unused-delims.stderr b/tests/ui/try-block/try-block-unused-delims.stderr index 765cd9c0fc4f6..21da0a456c88d 100644 --- a/tests/ui/try-block/try-block-unused-delims.stderr +++ b/tests/ui/try-block/try-block-unused-delims.stderr @@ -1,11 +1,11 @@ warning: unnecessary parentheses around function argument - --> $DIR/try-block-unused-delims.rs:11:13 + --> $DIR/try-block-unused-delims.rs:12:13 | LL | consume((try {})); | ^ ^ | note: the lint level is defined here - --> $DIR/try-block-unused-delims.rs:6:9 + --> $DIR/try-block-unused-delims.rs:7:9 | LL | #![warn(unused_parens, unused_braces)] | ^^^^^^^^^^^^^ @@ -16,13 +16,13 @@ LL + consume(try {}); | warning: unnecessary braces around function argument - --> $DIR/try-block-unused-delims.rs:14:13 + --> $DIR/try-block-unused-delims.rs:15:13 | LL | consume({ try {} }); | ^^ ^^ | note: the lint level is defined here - --> $DIR/try-block-unused-delims.rs:6:24 + --> $DIR/try-block-unused-delims.rs:7:24 | LL | #![warn(unused_parens, unused_braces)] | ^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ LL + consume(try {}); | warning: unnecessary parentheses around `match` scrutinee expression - --> $DIR/try-block-unused-delims.rs:17:11 + --> $DIR/try-block-unused-delims.rs:18:11 | LL | match (try {}) { | ^ ^ @@ -45,7 +45,7 @@ LL + match try {} { | warning: unnecessary parentheses around `let` scrutinee expression - --> $DIR/try-block-unused-delims.rs:22:22 + --> $DIR/try-block-unused-delims.rs:23:22 | LL | if let Err(()) = (try {}) {} | ^ ^ @@ -57,7 +57,7 @@ LL + if let Err(()) = try {} {} | warning: unnecessary parentheses around `match` scrutinee expression - --> $DIR/try-block-unused-delims.rs:25:11 + --> $DIR/try-block-unused-delims.rs:26:11 | LL | match (try {}) { | ^ ^ diff --git a/tests/ui/tuple/wrong_argument_ice-3.rs b/tests/ui/tuple/wrong_argument_ice-3.rs index 96633180b57eb..21fbb8ace2492 100644 --- a/tests/ui/tuple/wrong_argument_ice-3.rs +++ b/tests/ui/tuple/wrong_argument_ice-3.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct Process; pub type Group = (Vec, Vec); diff --git a/tests/ui/tuple/wrong_argument_ice-3.stderr b/tests/ui/tuple/wrong_argument_ice-3.stderr index 78212ed1e7692..547d12206a2ec 100644 --- a/tests/ui/tuple/wrong_argument_ice-3.stderr +++ b/tests/ui/tuple/wrong_argument_ice-3.stderr @@ -1,11 +1,11 @@ error[E0061]: this method takes 1 argument but 2 arguments were supplied - --> $DIR/wrong_argument_ice-3.rs:9:16 + --> $DIR/wrong_argument_ice-3.rs:10:16 | LL | groups.push(new_group, vec![process]); | ^^^^ ------------- unexpected argument #2 of type `Vec<&Process>` | note: expected `(Vec, Vec)`, found `Vec` - --> $DIR/wrong_argument_ice-3.rs:9:21 + --> $DIR/wrong_argument_ice-3.rs:10:21 | LL | groups.push(new_group, vec![process]); | ^^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/constrain_inputs.rs b/tests/ui/type-alias-impl-trait/constrain_inputs.rs index 7f6698e641d0e..67bdabc34419b 100644 --- a/tests/ui/type-alias-impl-trait/constrain_inputs.rs +++ b/tests/ui/type-alias-impl-trait/constrain_inputs.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(type_alias_impl_trait)] mod lifetime_params { diff --git a/tests/ui/type-alias-impl-trait/constrain_inputs.stderr b/tests/ui/type-alias-impl-trait/constrain_inputs.stderr index cb299a2021edf..6ca3140d8a325 100644 --- a/tests/ui/type-alias-impl-trait/constrain_inputs.stderr +++ b/tests/ui/type-alias-impl-trait/constrain_inputs.stderr @@ -1,5 +1,5 @@ error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types - --> $DIR/constrain_inputs.rs:8:31 + --> $DIR/constrain_inputs.rs:9:31 | LL | fn execute(ty: Ty<'_>) -> &str { todo!() } | ^^^^ @@ -8,7 +8,7 @@ LL | fn execute(ty: Ty<'_>) -> &str { todo!() } = note: consider introducing a named lifetime parameter error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types - --> $DIR/constrain_inputs.rs:12:35 + --> $DIR/constrain_inputs.rs:13:35 | LL | type BadFnSig = fn(Ty<'_>) -> &str; | ^^^^ @@ -17,7 +17,7 @@ LL | type BadFnSig = fn(Ty<'_>) -> &str; = note: consider introducing a named lifetime parameter error[E0582]: binding for associated type `Output` references an anonymous lifetime, which does not appear in the trait input types - --> $DIR/constrain_inputs.rs:14:42 + --> $DIR/constrain_inputs.rs:15:42 | LL | type BadTraitRef = dyn Fn(Ty<'_>) -> &str; | ^^^^ @@ -26,7 +26,7 @@ LL | type BadTraitRef = dyn Fn(Ty<'_>) -> &str; = note: consider introducing a named lifetime parameter error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types - --> $DIR/constrain_inputs.rs:23:31 + --> $DIR/constrain_inputs.rs:24:31 | LL | fn execute(ty: Ty<'_>) -> &str { ty() } | ^^^^ @@ -35,7 +35,7 @@ LL | fn execute(ty: Ty<'_>) -> &str { ty() } = note: consider introducing a named lifetime parameter error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types - --> $DIR/constrain_inputs.rs:34:37 + --> $DIR/constrain_inputs.rs:35:37 | LL | type BadFnSig = fn(Ty<&str>) -> &str; | ^^^^ @@ -44,7 +44,7 @@ LL | type BadFnSig = fn(Ty<&str>) -> &str; = note: consider introducing a named lifetime parameter error[E0582]: binding for associated type `Output` references an anonymous lifetime, which does not appear in the trait input types - --> $DIR/constrain_inputs.rs:36:44 + --> $DIR/constrain_inputs.rs:37:44 | LL | type BadTraitRef = dyn Fn(Ty<&str>) -> &str; | ^^^^ @@ -53,27 +53,27 @@ LL | type BadTraitRef = dyn Fn(Ty<&str>) -> &str; = note: consider introducing a named lifetime parameter error: item does not constrain `lifetime_params::Ty::{opaque#0}` - --> $DIR/constrain_inputs.rs:8:8 + --> $DIR/constrain_inputs.rs:9:8 | LL | fn execute(ty: Ty<'_>) -> &str { todo!() } | ^^^^^^^ | = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]` note: this opaque type is supposed to be constrained - --> $DIR/constrain_inputs.rs:4:19 + --> $DIR/constrain_inputs.rs:5:19 | LL | type Ty<'a> = impl Sized; | ^^^^^^^^^^ error: item does not constrain `lifetime_params_2::Ty::{opaque#0}` - --> $DIR/constrain_inputs.rs:23:8 + --> $DIR/constrain_inputs.rs:24:8 | LL | fn execute(ty: Ty<'_>) -> &str { ty() } | ^^^^^^^ | = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]` note: this opaque type is supposed to be constrained - --> $DIR/constrain_inputs.rs:19:19 + --> $DIR/constrain_inputs.rs:20:19 | LL | type Ty<'a> = impl FnOnce() -> &'a str; | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.rs b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.rs index b5c2bf504ac66..f39655369fff6 100644 --- a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.rs +++ b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(type_alias_impl_trait)] type Tait = impl Sized; diff --git a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr index 78a9f6b636543..1da108c8a7f42 100644 --- a/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr +++ b/tests/ui/type-alias-impl-trait/different_defining_uses_never_type3.stderr @@ -1,11 +1,11 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses_never_type3.rs:11:13 + --> $DIR/different_defining_uses_never_type3.rs:12:13 | LL | fn two() -> Tait { Two::<()>(todo!()) } | ^^^^ expected `One`, got `Two<()>` | note: previous use here - --> $DIR/different_defining_uses_never_type3.rs:7:13 + --> $DIR/different_defining_uses_never_type3.rs:8:13 | LL | fn one() -> Tait { One } | ^^^^ diff --git a/tests/ui/type-alias-impl-trait/hidden_type_mismatch.rs b/tests/ui/type-alias-impl-trait/hidden_type_mismatch.rs index 0a8860321daa9..87de19d1199a4 100644 --- a/tests/ui/type-alias-impl-trait/hidden_type_mismatch.rs +++ b/tests/ui/type-alias-impl-trait/hidden_type_mismatch.rs @@ -4,7 +4,7 @@ //! satisfies its opaque type's bounds. #![feature(trivial_bounds, type_alias_impl_trait)] -#![allow(trivial_bounds)] +#![allow(trivial_bounds, todo_macro_calls)] mod sus { use super::*; diff --git a/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.rs b/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.rs index 075b0bd75fa53..6e80e517a88ff 100644 --- a/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.rs +++ b/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(type_alias_impl_trait)] //! This test used to ICE rust-lang/rust#124891 diff --git a/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr b/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr index 0bee0dfa9c7a3..9b82fe2be7b2d 100644 --- a/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr +++ b/tests/ui/type-alias-impl-trait/lazy_subtyping_of_opaques.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/lazy_subtyping_of_opaques.rs:12:5 + --> $DIR/lazy_subtyping_of_opaques.rs:13:5 | LL | fn reify_as_tait() -> Thunk { | ----------- expected `Thunk<_>` because of return type @@ -11,7 +11,7 @@ LL | Thunk::new(|cont| cont) found unit type `()` error[E0277]: expected a `FnOnce()` closure, found `()` - --> $DIR/lazy_subtyping_of_opaques.rs:12:23 + --> $DIR/lazy_subtyping_of_opaques.rs:13:23 | LL | Thunk::new(|cont| cont) | ^^^^ expected an `FnOnce()` closure, found `()` @@ -20,7 +20,7 @@ LL | Thunk::new(|cont| cont) = note: wrap the `()` in a closure with no arguments: `|| { /* code */ }` error[E0277]: expected a `FnOnce()` closure, found `()` - --> $DIR/lazy_subtyping_of_opaques.rs:10:23 + --> $DIR/lazy_subtyping_of_opaques.rs:11:23 | LL | fn reify_as_tait() -> Thunk { | ^^^^^^^^^^^ expected an `FnOnce()` closure, found `()` diff --git a/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs b/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs index 518417954084e..cff9a94ff8b7f 100644 --- a/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs +++ b/tests/ui/type-alias-impl-trait/nested-rpit-with-lifetimes.rs @@ -1,4 +1,5 @@ // Regression test for issue #83190, triggering an ICE in borrowck. +#![allow(todo_macro_calls)] //@ check-pass diff --git a/tests/ui/type-alias-impl-trait/type_of_a_let.rs b/tests/ui/type-alias-impl-trait/type_of_a_let.rs index 9479b1084df12..a3570dd28ba39 100644 --- a/tests/ui/type-alias-impl-trait/type_of_a_let.rs +++ b/tests/ui/type-alias-impl-trait/type_of_a_let.rs @@ -4,7 +4,7 @@ //@[next] check-pass #![feature(type_alias_impl_trait)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] use std::fmt::Debug; diff --git a/tests/ui/type/pattern_types/nested.rs b/tests/ui/type/pattern_types/nested.rs index fd950d7329148..d6c2399927e25 100644 --- a/tests/ui/type/pattern_types/nested.rs +++ b/tests/ui/type/pattern_types/nested.rs @@ -1,4 +1,5 @@ //! Check that pattern types can only have specific base types +#![allow(todo_macro_calls)] #![feature(pattern_types, const_trait_impl, pattern_type_range_trait)] #![feature(pattern_type_macro)] diff --git a/tests/ui/type/pattern_types/nested.stderr b/tests/ui/type/pattern_types/nested.stderr index cb491a78945cf..11510803671dd 100644 --- a/tests/ui/type/pattern_types/nested.stderr +++ b/tests/ui/type/pattern_types/nested.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/nested.rs:10:63 + --> $DIR/nested.rs:11:63 | LL | const BAD_NESTING: pattern_type!(pattern_type!(u32 is 1..) is 0..) = todo!(); | ------------------------- ^ expected `(u32) is 1..`, found integer @@ -10,7 +10,7 @@ LL | const BAD_NESTING: pattern_type!(pattern_type!(u32 is 1..) is 0..) = todo!( found type `{integer}` error[E0277]: `(u32) is 1..` is not a valid base type for range patterns - --> $DIR/nested.rs:10:34 + --> $DIR/nested.rs:11:34 | LL | const BAD_NESTING: pattern_type!(pattern_type!(u32 is 1..) is 0..) = todo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ only integer types and `char` are supported @@ -28,7 +28,7 @@ LL | const BAD_NESTING: pattern_type!(pattern_type!(u32 is 1..) is 0..) = todo!( and 5 others error[E0277]: `(i32) is 1..` is not a valid base type for range patterns - --> $DIR/nested.rs:15:35 + --> $DIR/nested.rs:16:35 | LL | const BAD_NESTING2: pattern_type!(pattern_type!(i32 is 1..) is ..=-1) = todo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ only integer types and `char` are supported @@ -46,13 +46,13 @@ LL | const BAD_NESTING2: pattern_type!(pattern_type!(i32 is 1..) is ..=-1) = tod and 5 others error[E0600]: cannot apply unary operator `-` to type `(i32) is 1..` - --> $DIR/nested.rs:15:67 + --> $DIR/nested.rs:16:67 | LL | const BAD_NESTING2: pattern_type!(pattern_type!(i32 is 1..) is ..=-1) = todo!(); | ^^ cannot apply unary operator `-` error[E0277]: `(i32) is 1..` is not a valid base type for range patterns - --> $DIR/nested.rs:19:35 + --> $DIR/nested.rs:20:35 | LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ only integer types and `char` are supported @@ -70,7 +70,7 @@ LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo! and 5 others error[E0308]: mismatched types - --> $DIR/nested.rs:19:66 + --> $DIR/nested.rs:20:66 | LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo!(); | ^ @@ -81,7 +81,7 @@ LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo! = note: expected pattern type `(i32) is 1..` found type `{integer}` help: the return type of this call is `{integer}` due to the type of the argument passed - --> $DIR/nested.rs:19:66 + --> $DIR/nested.rs:20:66 | LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo!(); | ^ this argument influences the return type of `RangeSub` @@ -89,7 +89,7 @@ note: method defined here --> $SRC_DIR/core/src/pat.rs:LL:COL error[E0277]: `(i32) is 1..` is not a valid base type for range patterns - --> $DIR/nested.rs:19:66 + --> $DIR/nested.rs:20:66 | LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo!(); | ^ only integer types and `char` are supported @@ -107,7 +107,7 @@ LL | const BAD_NESTING3: pattern_type!(pattern_type!(i32 is 1..) is ..0) = todo! and 5 others error[E0277]: `()` is not a valid base type for range patterns - --> $DIR/nested.rs:24:35 + --> $DIR/nested.rs:25:35 | LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | ^^ only integer types and `char` are supported @@ -125,7 +125,7 @@ LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); and 5 others error[E0308]: mismatched types - --> $DIR/nested.rs:24:43 + --> $DIR/nested.rs:25:43 | LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | ^ @@ -134,7 +134,7 @@ LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | arguments to this function are incorrect | help: the return type of this call is `{integer}` due to the type of the argument passed - --> $DIR/nested.rs:24:43 + --> $DIR/nested.rs:25:43 | LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | ^ this argument influences the return type of `RangeSub` @@ -142,7 +142,7 @@ note: method defined here --> $SRC_DIR/core/src/pat.rs:LL:COL error[E0277]: `()` is not a valid base type for range patterns - --> $DIR/nested.rs:24:43 + --> $DIR/nested.rs:25:43 | LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); | ^ only integer types and `char` are supported @@ -160,7 +160,7 @@ LL | const BAD_NESTING4: pattern_type!(() is ..0) = todo!(); and 5 others error[E0277]: `f32` is not a valid base type for range patterns - --> $DIR/nested.rs:29:49 + --> $DIR/nested.rs:30:49 | LL | const BAD_NESTING5: pattern_type!(f32 is 1.0 .. 2.0) = todo!(); | ^^^ only integer types and `char` are supported diff --git a/tests/ui/type/pattern_types/pattern_type_mismatch.rs b/tests/ui/type/pattern_types/pattern_type_mismatch.rs index 0c88f27d83686..4a8ef093aebf2 100644 --- a/tests/ui/type/pattern_types/pattern_type_mismatch.rs +++ b/tests/ui/type/pattern_types/pattern_type_mismatch.rs @@ -1,4 +1,5 @@ //! Check that pattern types patterns must be of the type of the base type +#![allow(todo_macro_calls)] #![feature(pattern_types)] #![feature(pattern_type_macro)] diff --git a/tests/ui/type/pattern_types/pattern_type_mismatch.stderr b/tests/ui/type/pattern_types/pattern_type_mismatch.stderr index 129e4b5cdc7be..771c0ae0dc9e3 100644 --- a/tests/ui/type/pattern_types/pattern_type_mismatch.stderr +++ b/tests/ui/type/pattern_types/pattern_type_mismatch.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/pattern_type_mismatch.rs:8:41 + --> $DIR/pattern_type_mismatch.rs:9:41 | LL | const BAD_NESTING4: pattern_type!(u8 is 'a'..='a') = todo!(); | -- ^^^ expected `u8`, found `char` @@ -12,7 +12,7 @@ LL | const BAD_NESTING4: pattern_type!(u8 is b'a'..='a') = todo!(); | + error[E0308]: mismatched types - --> $DIR/pattern_type_mismatch.rs:8:47 + --> $DIR/pattern_type_mismatch.rs:9:47 | LL | const BAD_NESTING4: pattern_type!(u8 is 'a'..='a') = todo!(); | -- ^^^ expected `u8`, found `char` @@ -25,7 +25,7 @@ LL | const BAD_NESTING4: pattern_type!(u8 is 'a'..=b'a') = todo!(); | + error[E0308]: mismatched types - --> $DIR/pattern_type_mismatch.rs:12:43 + --> $DIR/pattern_type_mismatch.rs:13:43 | LL | const BAD_NESTING5: pattern_type!(char is 1..=1) = todo!(); | ---- ^ expected `char`, found `u8` @@ -33,7 +33,7 @@ LL | const BAD_NESTING5: pattern_type!(char is 1..=1) = todo!(); | the pattern must match the type error[E0308]: mismatched types - --> $DIR/pattern_type_mismatch.rs:12:47 + --> $DIR/pattern_type_mismatch.rs:13:47 | LL | const BAD_NESTING5: pattern_type!(char is 1..=1) = todo!(); | ---- ^ expected `char`, found `u8` diff --git a/tests/ui/typeck/bad-index-due-to-nested.current.stderr b/tests/ui/typeck/bad-index-due-to-nested.current.stderr index dc3d998c399a9..252d2ed7a7a4d 100644 --- a/tests/ui/typeck/bad-index-due-to-nested.current.stderr +++ b/tests/ui/typeck/bad-index-due-to-nested.current.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `K: Hash` is not satisfied - --> $DIR/bad-index-due-to-nested.rs:24:5 + --> $DIR/bad-index-due-to-nested.rs:25:5 | LL | map[k] | ^^^ the trait `Hash` is not implemented for `K` | note: required for `HashMap` to implement `Index<&K>` - --> $DIR/bad-index-due-to-nested.rs:11:12 + --> $DIR/bad-index-due-to-nested.rs:12:12 | LL | impl Index<&K> for HashMap | ^^^^^^^^^ ^^^^^^^^^^^^^ @@ -18,13 +18,13 @@ LL | fn index<'a, K: std::hash::Hash, V>(map: &'a HashMap, k: K) -> &'a V | +++++++++++++++++ error[E0277]: the trait bound `V: Copy` is not satisfied - --> $DIR/bad-index-due-to-nested.rs:24:5 + --> $DIR/bad-index-due-to-nested.rs:25:5 | LL | map[k] | ^^^ the trait `Copy` is not implemented for `V` | note: required for `HashMap` to implement `Index<&K>` - --> $DIR/bad-index-due-to-nested.rs:11:12 + --> $DIR/bad-index-due-to-nested.rs:12:12 | LL | impl Index<&K> for HashMap | ^^^^^^^^^ ^^^^^^^^^^^^^ @@ -37,7 +37,7 @@ LL | fn index<'a, K, V: std::marker::Copy>(map: &'a HashMap, k: K) -> &'a | +++++++++++++++++++ error[E0308]: mismatched types - --> $DIR/bad-index-due-to-nested.rs:24:9 + --> $DIR/bad-index-due-to-nested.rs:25:9 | LL | fn index<'a, K, V>(map: &'a HashMap, k: K) -> &'a V { | - found this type parameter @@ -52,7 +52,7 @@ LL | map[&k] | + error[E0308]: mismatched types - --> $DIR/bad-index-due-to-nested.rs:24:5 + --> $DIR/bad-index-due-to-nested.rs:25:5 | LL | fn index<'a, K, V>(map: &'a HashMap, k: K) -> &'a V { | - found this type parameter ----- expected `&'a V` because of return type diff --git a/tests/ui/typeck/bad-index-due-to-nested.next.stderr b/tests/ui/typeck/bad-index-due-to-nested.next.stderr index a0b275b7852ba..b70db920140f1 100644 --- a/tests/ui/typeck/bad-index-due-to-nested.next.stderr +++ b/tests/ui/typeck/bad-index-due-to-nested.next.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `K: Hash` is not satisfied - --> $DIR/bad-index-due-to-nested.rs:24:5 + --> $DIR/bad-index-due-to-nested.rs:25:5 | LL | map[k] | ^^^ the trait `Hash` is not implemented for `K` | note: required for `HashMap` to implement `Index<&K>` - --> $DIR/bad-index-due-to-nested.rs:11:12 + --> $DIR/bad-index-due-to-nested.rs:12:12 | LL | impl Index<&K> for HashMap | ^^^^^^^^^ ^^^^^^^^^^^^^ @@ -18,13 +18,13 @@ LL | fn index<'a, K: std::hash::Hash, V>(map: &'a HashMap, k: K) -> &'a V | +++++++++++++++++ error[E0277]: the trait bound `V: Copy` is not satisfied - --> $DIR/bad-index-due-to-nested.rs:24:5 + --> $DIR/bad-index-due-to-nested.rs:25:5 | LL | map[k] | ^^^ the trait `Copy` is not implemented for `V` | note: required for `HashMap` to implement `Index<&K>` - --> $DIR/bad-index-due-to-nested.rs:11:12 + --> $DIR/bad-index-due-to-nested.rs:12:12 | LL | impl Index<&K> for HashMap | ^^^^^^^^^ ^^^^^^^^^^^^^ @@ -37,7 +37,7 @@ LL | fn index<'a, K, V: std::marker::Copy>(map: &'a HashMap, k: K) -> &'a | +++++++++++++++++++ error[E0308]: mismatched types - --> $DIR/bad-index-due-to-nested.rs:24:9 + --> $DIR/bad-index-due-to-nested.rs:25:9 | LL | fn index<'a, K, V>(map: &'a HashMap, k: K) -> &'a V { | - found this type parameter @@ -52,13 +52,13 @@ LL | map[&k] | + error[E0277]: the trait bound `K: Hash` is not satisfied - --> $DIR/bad-index-due-to-nested.rs:24:5 + --> $DIR/bad-index-due-to-nested.rs:25:5 | LL | map[k] | ^^^^^^ the trait `Hash` is not implemented for `K` | note: required for `HashMap` to implement `Index<&K>` - --> $DIR/bad-index-due-to-nested.rs:11:12 + --> $DIR/bad-index-due-to-nested.rs:12:12 | LL | impl Index<&K> for HashMap | ^^^^^^^^^ ^^^^^^^^^^^^^ diff --git a/tests/ui/typeck/bad-index-due-to-nested.rs b/tests/ui/typeck/bad-index-due-to-nested.rs index e7f385865af5f..0eecab3453aad 100644 --- a/tests/ui/typeck/bad-index-due-to-nested.rs +++ b/tests/ui/typeck/bad-index-due-to-nested.rs @@ -1,6 +1,7 @@ //@ revisions: current next //@[next] compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) +#![allow(todo_macro_calls)] use std::hash::Hash; use std::marker::PhantomData; diff --git a/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.rs b/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.rs index c8f6db7aef3e5..a80831f1fe8cd 100644 --- a/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.rs +++ b/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.rs @@ -1,4 +1,5 @@ // Test against ICE in #118111 +#![allow(todo_macro_calls)] use std::ops::Index; diff --git a/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.stderr b/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.stderr index 93c370fd893e3..f05befc303da8 100644 --- a/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.stderr +++ b/tests/ui/typeck/bad-index-modulo-higher-ranked-regions.stderr @@ -1,5 +1,5 @@ -error[E0608]: cannot index into a value of type `Map<[usize; 1], {closure@$DIR/bad-index-modulo-higher-ranked-regions.rs:23:32: 23:45}>` - --> $DIR/bad-index-modulo-higher-ranked-regions.rs:23:55 +error[E0608]: cannot index into a value of type `Map<[usize; 1], {closure@$DIR/bad-index-modulo-higher-ranked-regions.rs:24:32: 24:45}>` + --> $DIR/bad-index-modulo-higher-ranked-regions.rs:24:55 | LL | Map { inner: [0_usize], f: |_, i: usize| 1_usize }[0]; | ^^^ diff --git a/tests/ui/typeck/issue-100246.rs b/tests/ui/typeck/issue-100246.rs index e05bb2a1362a5..b57093d10e8d4 100644 --- a/tests/ui/typeck/issue-100246.rs +++ b/tests/ui/typeck/issue-100246.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![recursion_limit = "5"] // To reduce noise //expect incompatible type error when ambiguous traits are in scope diff --git a/tests/ui/typeck/issue-100246.stderr b/tests/ui/typeck/issue-100246.stderr index 86eb163b4713a..74051a36a737c 100644 --- a/tests/ui/typeck/issue-100246.stderr +++ b/tests/ui/typeck/issue-100246.stderr @@ -1,5 +1,5 @@ error[E0308]: `?` operator has incompatible types - --> $DIR/issue-100246.rs:28:24 + --> $DIR/issue-100246.rs:29:24 | LL | let other: Other = downcast()?; | ^^^^^^^^^^^ expected `Other`, found `&_` diff --git a/tests/ui/typeck/issue-80207-unsized-return.rs b/tests/ui/typeck/issue-80207-unsized-return.rs index a192db0ef3e9d..c202db98cab66 100644 --- a/tests/ui/typeck/issue-80207-unsized-return.rs +++ b/tests/ui/typeck/issue-80207-unsized-return.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] trait Foo { fn do_stuff() -> Self; diff --git a/tests/ui/typeck/issue-89275.rs b/tests/ui/typeck/issue-89275.rs index 6e4211de1857f..805b96cb3aaae 100644 --- a/tests/ui/typeck/issue-89275.rs +++ b/tests/ui/typeck/issue-89275.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![recursion_limit = "5"] // To reduce noise //expect mutability error when ambiguous traits are in scope diff --git a/tests/ui/typeck/issue-89275.stderr b/tests/ui/typeck/issue-89275.stderr index 6686d5f977e6b..b10e03d81e04c 100644 --- a/tests/ui/typeck/issue-89275.stderr +++ b/tests/ui/typeck/issue-89275.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-89275.rs:28:29 + --> $DIR/issue-89275.rs:29:29 | LL | let other: &mut Other = downcast(); | ---------- ^^^^^^^^^^ types differ in mutability diff --git a/tests/ui/typeck/suggest-method-name-with-maybe-ty-mismatch-146008.rs b/tests/ui/typeck/suggest-method-name-with-maybe-ty-mismatch-146008.rs index 671f280e81430..3f0d9c60437be 100644 --- a/tests/ui/typeck/suggest-method-name-with-maybe-ty-mismatch-146008.rs +++ b/tests/ui/typeck/suggest-method-name-with-maybe-ty-mismatch-146008.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct LlamaModel; impl LlamaModel { diff --git a/tests/ui/typeck/suggest-method-name-with-maybe-ty-mismatch-146008.stderr b/tests/ui/typeck/suggest-method-name-with-maybe-ty-mismatch-146008.stderr index 7f5dd0617b1b6..9b30a176fb9c2 100644 --- a/tests/ui/typeck/suggest-method-name-with-maybe-ty-mismatch-146008.stderr +++ b/tests/ui/typeck/suggest-method-name-with-maybe-ty-mismatch-146008.stderr @@ -1,5 +1,5 @@ error[E0615]: attempted to take value of method `chat_template` on type `LlamaModel` - --> $DIR/suggest-method-name-with-maybe-ty-mismatch-146008.rs:13:30 + --> $DIR/suggest-method-name-with-maybe-ty-mismatch-146008.rs:14:30 | LL | template_from_str(&model.chat_template); | ^^^^^^^^^^^^^ method, not a field diff --git a/tests/ui/typeck/suggestions/suggest-add-wrapper-issue-145294.rs b/tests/ui/typeck/suggestions/suggest-add-wrapper-issue-145294.rs index cfe167cf88d76..a2a07ab10270c 100644 --- a/tests/ui/typeck/suggestions/suggest-add-wrapper-issue-145294.rs +++ b/tests/ui/typeck/suggestions/suggest-add-wrapper-issue-145294.rs @@ -5,6 +5,7 @@ // the suggestion is rejected. // e.g. `Ok(Some("hi"))` is type of `Result, _>`, // where `E` is still an unresolved inference variable. +#![allow(todo_macro_calls)] fn foo() -> Result, ()> { todo!() diff --git a/tests/ui/typeck/suggestions/suggest-add-wrapper-issue-145294.stderr b/tests/ui/typeck/suggestions/suggest-add-wrapper-issue-145294.stderr index 5e4ad13221046..e8b1f3ee38364 100644 --- a/tests/ui/typeck/suggestions/suggest-add-wrapper-issue-145294.stderr +++ b/tests/ui/typeck/suggestions/suggest-add-wrapper-issue-145294.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/suggest-add-wrapper-issue-145294.rs:24:32 + --> $DIR/suggest-add-wrapper-issue-145294.rs:25:32 | LL | assert_eq!(Ok(Some("hi")), foo()); | ^^^^^ expected `Result, _>`, found `Result, ()>` @@ -8,7 +8,7 @@ LL | assert_eq!(Ok(Some("hi")), foo()); found enum `Result, ()>` error[E0308]: mismatched types - --> $DIR/suggest-add-wrapper-issue-145294.rs:25:30 + --> $DIR/suggest-add-wrapper-issue-145294.rs:26:30 | LL | assert_eq!(Bar::A("hi"), bar()); | ^^^^^ expected `Bar<&str, _>`, found `Bar` diff --git a/tests/ui/uninhabited/privately-uninhabited-mir-call.fixed b/tests/ui/uninhabited/privately-uninhabited-mir-call.fixed index 76f4251daefbf..33b3cafb3617f 100644 --- a/tests/ui/uninhabited/privately-uninhabited-mir-call.fixed +++ b/tests/ui/uninhabited/privately-uninhabited-mir-call.fixed @@ -1,7 +1,7 @@ // Verifies that MIR building for a call expression respects // privacy when checking if a call return type is uninhabited. //@ run-rustfix -#![allow(unreachable_code, unused_variables)] +#![allow(unreachable_code, unused_variables, todo_macro_uses)] pub mod widget { enum Unimplemented {} diff --git a/tests/ui/uninhabited/privately-uninhabited-mir-call.rs b/tests/ui/uninhabited/privately-uninhabited-mir-call.rs index 1eec57ae04611..8bcb74913de59 100644 --- a/tests/ui/uninhabited/privately-uninhabited-mir-call.rs +++ b/tests/ui/uninhabited/privately-uninhabited-mir-call.rs @@ -1,7 +1,7 @@ // Verifies that MIR building for a call expression respects // privacy when checking if a call return type is uninhabited. //@ run-rustfix -#![allow(unreachable_code, unused_variables)] +#![allow(unreachable_code, unused_variables, todo_macro_calls)] pub mod widget { enum Unimplemented {} diff --git a/tests/ui/unsafe/issue-87414-query-cycle.rs b/tests/ui/unsafe/issue-87414-query-cycle.rs index 067beacf302db..d27c321dfac58 100644 --- a/tests/ui/unsafe/issue-87414-query-cycle.rs +++ b/tests/ui/unsafe/issue-87414-query-cycle.rs @@ -1,4 +1,5 @@ // Regression test for #87414. +#![allow(todo_macro_calls)] //@ check-pass