From c931eff4552305e071b61d4ee03e5fb284062a39 Mon Sep 17 00:00:00 2001 From: Andre Bogus Date: Tue, 2 Dec 2025 12:04:58 +0100 Subject: [PATCH 1/3] reduce `unreachable-code` churn after `todo!()` --- .../rustc_borrowck/src/places_conflict.rs | 3 +- .../rustc_borrowck/src/universal_regions.rs | 1 + compiler/rustc_builtin_macros/src/autodiff.rs | 1 + .../src/debuginfo/unwind.rs | 1 + .../src/intrinsics/llvm_x86.rs | 1 + .../src/value_and_place.rs | 2 + compiler/rustc_codegen_gcc/src/type_of.rs | 2 + .../src/interpret/validity.rs | 1 + compiler/rustc_expand/src/expand.rs | 1 + .../src/coherence/builtin.rs | 2 +- compiler/rustc_hir_typeck/src/cast.rs | 1 + compiler/rustc_hir_typeck/src/closure.rs | 1 + compiler/rustc_hir_typeck/src/errors.rs | 4 + compiler/rustc_hir_typeck/src/expr.rs | 20 ++- compiler/rustc_lint_defs/src/builtin.rs | 23 ++++ compiler/rustc_middle/src/mir/terminator.rs | 1 + compiler/rustc_middle/src/ty/context.rs | 40 +++++- compiler/rustc_middle/src/ty/sty.rs | 1 + compiler/rustc_middle/src/ty/util.rs | 1 + .../rustc_mir_dataflow/src/value_analysis.rs | 1 + .../src/canonical/canonicalizer.rs | 1 + .../src/solve/effect_goals.rs | 3 + .../src/solve/normalizes_to/mod.rs | 2 + .../src/unstable/convert/stable/mir.rs | 6 + .../src/unstable/convert/stable/ty.rs | 3 + .../src/cfi/typeid/itanium_cxx_abi/encode.rs | 1 + compiler/rustc_span/src/symbol.rs | 1 + compiler/rustc_symbol_mangling/src/v0.rs | 1 + .../src/traits/project.rs | 1 + compiler/rustc_ty_utils/src/consts.rs | 2 + library/core/src/hash/mod.rs | 2 +- library/core/src/macros/mod.rs | 6 +- library/core/src/ops/try_trait.rs | 2 + library/std/src/io/error.rs | 1 + src/librustdoc/clean/inline.rs | 2 + src/librustdoc/clean/mod.rs | 1 + src/librustdoc/formats/item_type.rs | 1 + src/librustdoc/json/conversions.rs | 1 + .../clippy/clippy_utils/src/ast_utils/mod.rs | 2 +- .../clippy/clippy_utils/src/hir_utils.rs | 4 +- src/tools/clippy/clippy_utils/src/macros.rs | 3 +- src/tools/clippy/clippy_utils/src/sym.rs | 1 - src/tools/clippy/clippy_utils/src/usage.rs | 3 +- src/tools/miri/src/intrinsics/math.rs | 1 + .../tests/pass/box-custom-alloc-aliasing.rs | 1 + tests/crashes/135470.rs | 1 + .../issue-77708-2.rs | 2 +- tests/incremental/track-deps-in-new-solver.rs | 2 +- tests/ui-fulldeps/internal-lints/find_attr.rs | 1 + .../internal-lints/find_attr.stderr | 18 +-- tests/ui-fulldeps/rustc_public/check_abi.rs | 2 +- .../rustc_public/check_attribute.rs | 2 +- .../rustc_public/check_crate_defs.rs | 2 +- tests/ui/abi/simd-abi-checks-avx.rs | 2 +- ...sized-args-in-c-abi-issues-94223-115845.rs | 2 +- tests/ui/argument-suggestions/issue-96638.rs | 1 + .../argument-suggestions/issue-96638.stderr | 4 +- ...issing-associated_item_or_field_def_ids.rs | 1 + ...ng-associated_item_or_field_def_ids.stderr | 4 +- .../return-type-notation/rendering.fixed | 2 +- .../return-type-notation/rendering.rs | 2 +- ...le-impls-shadowed-in-trait-def.next.stderr | 4 +- ...ble-impls-shadowed-in-trait-def.old.stderr | 4 +- ...-applicable-impls-shadowed-in-trait-def.rs | 1 + .../normalization-debruijn-1.rs | 1 + .../suggest-assoc-type-from-bounds.rs | 2 + .../suggest-assoc-type-from-bounds.stderr | 12 +- .../assumptions_on_binders/alias_outlives.rs | 1 + .../alias_outlives.stderr | 4 +- ...higher_ranked_alias_outlives_assumption.rs | 1 + .../async-future-out-must-be-sized.rs | 1 + .../async-future-out-must-be-sized.stderr | 8 +- .../fn-exception-target-features.rs | 1 + .../fn-exception-target-features.stderr | 4 +- .../kind-due-to-arg-with-box-wrap.rs | 1 + .../kind-due-to-arg-with-box-wrap.stderr | 6 +- .../async-closures/moro-example.rs | 1 + .../async-drop/live-dead-storage3.rs | 2 +- tests/ui/async-await/async-is-unwindsafe.rs | 1 + .../ui/async-await/async-is-unwindsafe.stderr | 10 +- tests/ui/async-await/clone-suggestion.fixed | 2 +- tests/ui/async-await/clone-suggestion.rs | 2 +- ...olved-typeck-results.no_assumptions.stderr | 4 +- ...drop-tracking-unresolved-typeck-results.rs | 1 + tests/ui/async-await/field-in-sync.rs | 1 + tests/ui/async-await/field-in-sync.stderr | 4 +- ...er-ranked-auto-trait-16.assumptions.stderr | 8 +- ...ranked-auto-trait-16.no_assumptions.stderr | 8 +- .../higher-ranked-auto-trait-16.rs | 1 + ...ranked-auto-trait-17.no_assumptions.stderr | 4 +- .../higher-ranked-auto-trait-17.rs | 1 + ...-ranked-auto-trait-9.no_assumptions.stderr | 2 +- .../async-await/higher-ranked-auto-trait-9.rs | 1 + .../in-trait/cycle-if-impl-doesnt-apply.rs | 1 + .../async-await/in-trait/dyn-compatibility.rs | 1 + .../in-trait/dyn-compatibility.stderr | 4 +- tests/ui/async-await/in-trait/issue-104678.rs | 1 + .../returning-possibly-unsized-self.rs | 1 + .../inference_var_self_argument.rs | 1 + .../inference_var_self_argument.stderr | 6 +- .../interior-with-const-generic-expr.rs | 2 +- tests/ui/async-await/issue-105501.rs | 1 + tests/ui/async-await/issue-98634.rs | 1 + tests/ui/async-await/issue-98634.stderr | 12 +- .../rtn-implied-in-supertrait.rs | 1 + tests/ui/async-await/try-in-sync.rs | 1 + tests/ui/async-await/try-in-sync.stderr | 4 +- tests/ui/async-await/type-parameter-send.rs | 1 + .../deref-ambiguity-becomes-nonambiguous.rs | 1 + ...eref-ambiguity-becomes-nonambiguous.stderr | 2 +- tests/ui/borrowck/issue-103624.rs | 1 + tests/ui/borrowck/issue-103624.stderr | 8 +- .../issue-82126-mismatched-subst-and-hir.rs | 1 + ...ssue-82126-mismatched-subst-and-hir.stderr | 16 +-- .../issue-83309-ice-immut-in-for-loop.rs | 1 + .../issue-83309-ice-immut-in-for-loop.stderr | 2 +- tests/ui/borrowck/issue-91206.rs | 1 + tests/ui/borrowck/issue-91206.stderr | 2 +- tests/ui/borrowck/static-trait-bound-lost.rs | 1 + .../borrowck/suggest-local-var-double-mut.rs | 1 + .../suggest-local-var-double-mut.stderr | 12 +- .../borrowck/suggest-local-var-imm-and-mut.rs | 1 + .../suggest-local-var-imm-and-mut.stderr | 4 +- tests/ui/box/large-allocator-ice.rs | 2 +- tests/ui/cast/cast-as-bool.rs | 1 + tests/ui/cast/cast-as-bool.stderr | 22 ++-- .../match/non-exhaustive-match.rs | 2 +- .../issue-90024-adt-correct-subst.rs | 1 + .../run_pass/issue-88431.rs | 1 + tests/ui/closures/multiple-fn-bounds.rs | 1 + tests/ui/closures/multiple-fn-bounds.stderr | 6 +- tests/ui/compare-method/bad-self-type.rs | 1 + tests/ui/compare-method/bad-self-type.stderr | 10 +- tests/ui/const-generics/arg-in-pat-2.rs | 1 + tests/ui/const-generics/arg-in-pat-3.rs | 1 + .../backcompat/trait-resolution-breakage.rs | 1 + .../backcompat/unevaluated-consts.rs | 1 + .../ui/const-generics/bad-subst-const-kind.rs | 1 + .../bad-subst-const-kind.stderr | 6 +- .../defaults/generic-expr-default.rs | 2 +- .../const_equate_assoc_consts.rs | 2 +- .../auxiliary/cross-crate-2.rs | 2 +- .../failed-to-normalize-ice-issue-88421.rs | 2 +- .../generic_const_exprs/from-sig-fail.rs | 2 +- .../generic_const_exprs/issue-76595.rs | 2 +- .../generic_const_exprs/issue-80742.rs | 2 +- .../generic_const_exprs/simple_fail.rs | 2 +- .../generic_const_exprs/unused_expr.rs | 2 +- .../infer/one-param-uninferred.rs | 1 + .../infer/one-param-uninferred.stderr | 4 +- .../issues/issue-76701-ty-param-in-const.rs | 1 + .../issue-76701-ty-param-in-const.stderr | 4 +- tests/ui/const-generics/issues/issue-83249.rs | 2 +- tests/ui/const-generics/issues/issue-83466.rs | 1 + .../const-generics/issues/issue-83466.stderr | 4 +- .../late-bound-in-return-issue-77357.rs | 2 +- .../mgca/ambiguous-assoc-const.rs | 1 + .../mgca/ambiguous-assoc-const.stderr | 2 +- .../mgca/explicit_anon_consts.rs | 1 + .../mgca/explicit_anon_consts.stderr | 26 ++-- .../mgca/inherent-const-gating.rs | 2 +- .../mgca/selftyalias-containing-param.rs | 1 + .../mgca/selftyalias-containing-param.stderr | 4 +- .../min_const_generics/self-ty-in-const-1.rs | 1 + .../self-ty-in-const-1.stderr | 6 +- .../const-generics/occurs-check/bind-param.rs | 2 +- .../occurs-check/unify-fixpoint.rs | 1 + .../occurs-check/unify-n-nplusone.rs | 2 +- .../occurs-check/unused-substs-3.rs | 2 +- .../occurs-check/unused-substs-4.rs | 2 +- .../occurs-check/unused-substs-5.rs | 2 +- .../try_unify_ignore_lifetimes.rs | 2 +- .../issue-84957-const-str-as-bytes.rs | 1 + tests/ui/consts/const-eval/issue-85907.rs | 1 + tests/ui/consts/const-eval/issue-85907.stderr | 2 +- .../consts/dont-ctfe-unsized-initializer.rs | 1 + .../dont-ctfe-unsized-initializer.stderr | 4 +- tests/ui/consts/ice-zst-static-access.rs | 1 + tests/ui/consts/issue-89088.rs | 1 + tests/ui/consts/issue-89088.stderr | 2 +- tests/ui/coroutine/layout-error.rs | 1 + tests/ui/coroutine/layout-error.stderr | 2 +- .../stalled-coroutine-obligations.rs | 1 + .../stalled-coroutine-obligations.stderr | 14 +-- .../ui/coroutine/witness-ignore-fake-reads.rs | 1 + .../debuginfo-box-with-large-allocator.rs | 1 + ...fo_with_uninhabitable_field_and_unsized.rs | 2 +- .../as_expression.current.stderr | 10 +- .../as_expression.next.stderr | 12 +- .../do_not_recommend/as_expression.rs | 1 + .../custom-on-unimplemented-diagnostic.rs | 1 + .../custom-on-unimplemented-diagnostic.stderr | 8 +- tests/ui/drop/lint-tail-expr-drop-order.rs | 2 +- ...ail_expr_drop_order-on-coroutine-unwind.rs | 1 + ...expr_drop_order-on-coroutine-unwind.stderr | 10 +- .../tail_expr_drop_order-on-thread-local.rs | 1 + tests/ui/dropck/coroutine-liveness-1.rs | 1 + tests/ui/dropck/coroutine-liveness-2.rs | 1 + .../dropck-after-failed-type-lowering.rs | 1 + .../dropck-after-failed-type-lowering.stderr | 8 +- tests/ui/dropck/dropck-only-error-gat.rs | 1 + tests/ui/dropck/dropck-only-error-gat.stderr | 4 +- tests/ui/dst/issue-113447.rs | 1 + tests/ui/dst/issue-113447.stderr | 2 +- .../elaborated-predicates-ordering.rs | 1 + ...tchable-receiver-and-wc-references-Self.rs | 1 + ...ble-receiver-and-wc-references-Self.stderr | 8 +- tests/ui/dyn-keyword/dyn-2018-edition-lint.rs | 1 + .../dyn-keyword/dyn-2018-edition-lint.stderr | 8 +- .../ui/dyn-keyword/dyn-2021-edition-error.rs | 1 + .../dyn-keyword/dyn-2021-edition-error.stderr | 8 +- tests/ui/eii/static/subtype.rs | 1 + tests/ui/eii/static/subtype_wrong.rs | 1 + tests/ui/eii/static/subtype_wrong.stderr | 2 +- .../ret-ty-modulo-anonymization.rs | 1 + .../feature-gate-cfg_overflow_checks.rs | 1 + .../feature-gate-cfg_overflow_checks.stderr | 2 +- .../feature-gate-global-registration.rs | 1 + .../feature-gate-global-registration.stderr | 2 +- tests/ui/fn/fn_def_opaque_coercion.rs | 1 + .../ui/fn/fn_def_opaque_coercion_to_fn_ptr.rs | 1 + .../fn_def_opaque_coercion_to_fn_ptr.stderr | 4 +- tests/ui/function-pointer/issue-102289.rs | 1 + ...mbig-hr-projection-issue-93340.next.stderr | 2 +- ...ambig-hr-projection-issue-93340.old.stderr | 4 +- .../ambig-hr-projection-issue-93340.rs | 1 + .../elided-in-expr-position.rs | 2 +- .../equality-bound.rs | 2 + .../equality-bound.stderr | 32 ++--- ...ied-gat-bound-during-assoc-ty-selection.rs | 1 + ...gat-bound-during-assoc-ty-selection.stderr | 8 +- .../generic-associated-types/issue-74684-1.rs | 1 + .../issue-74684-1.stderr | 2 +- .../generic-associated-types/issue-74684-2.rs | 1 + .../issue-74684-2.stderr | 8 +- .../generic-associated-types/issue-79636-1.rs | 1 + .../issue-79636-1.stderr | 12 +- .../issue-80433-reduced.rs | 1 + .../generic-associated-types/issue-86787.rs | 1 + .../issue-86787.stderr | 6 +- .../generic-associated-types/issue-88287.rs | 1 + .../issue-88287.stderr | 4 +- .../rigid-hr-projection-issue-93340.rs | 1 + .../user_type_annotations_pattern.rs | 1 + .../user_type_annotations_pattern.stderr | 2 +- .../trait-bounds/issue-102899.rs | 1 + .../higher-ranked/trait-bounds/issue-88446.rs | 1 + .../normalize-under-binder/issue-80706.rs | 1 + ...-method-resolution-opaque-type.next.stderr | 2 +- ...e-method-resolution-opaque-type.old.stderr | 2 +- ...rm-before-method-resolution-opaque-type.rs | 1 + .../norm-before-method-resolution.rs | 1 + ...-in-higher-ranked-fn-signature.next.stderr | 2 +- ...ojections-in-higher-ranked-fn-signature.rs | 1 + tests/ui/impl-trait/autoderef.rs | 1 + .../impl-trait/extra-impl-in-trait-impl.fixed | 2 +- .../ui/impl-trait/extra-impl-in-trait-impl.rs | 2 +- ...esh-lifetime-from-bare-trait-obj-114664.rs | 1 + ...lifetime-from-bare-trait-obj-114664.stderr | 4 +- .../generic-with-implicit-hrtb-without-dyn.rs | 2 +- .../in-trait/assumed-wf-bounds-in-impl.rs | 1 + .../in-trait/cycle-if-impl-doesnt-apply.rs | 1 + .../impl-trait/in-trait/foreign-dyn-error.rs | 1 + .../in-trait/foreign-dyn-error.stderr | 2 +- tests/ui/impl-trait/in-trait/refine-err.rs | 1 + .../ui/impl-trait/in-trait/refine-err.stderr | 2 +- .../in-trait/suggest-missing-item.fixed | 2 +- .../in-trait/suggest-missing-item.rs | 2 +- tests/ui/impl-trait/issues/issue-100075.rs | 1 + .../ui/impl-trait/issues/issue-100075.stderr | 2 +- .../issues/issue-103181-1.current.stderr | 2 +- .../issues/issue-103181-1.next.stderr | 2 +- tests/ui/impl-trait/issues/issue-103181-1.rs | 1 + tests/ui/impl-trait/issues/issue-87295.rs | 1 + tests/ui/impl-trait/issues/issue-87295.stderr | 2 +- .../ui/impl-trait/method/method-resolution.rs | 1 + .../method/method-resolution3.current.stderr | 6 +- .../method/method-resolution3.next.stderr | 6 +- .../impl-trait/method/method-resolution3.rs | 1 + .../ambiguous-ops.current.stderr | 16 +-- .../non-defining-uses/ambiguous-ops.rs | 1 + ...nce-constraints-from-blanket-2.next.stderr | 2 +- ...id-inference-constraints-from-blanket-2.rs | 1 + ...void-inference-constraints-from-blanket.rs | 1 + .../multiple-opaques-ambig.rs | 2 +- .../non-defining-uses/multiple-opaques-ok.rs | 2 +- .../non-defining-uses/no-rigid-alias.rs | 2 +- .../non-defining-uses/use-item-bound.rs | 2 +- .../opaque-used-in-extraneous-argument.rs | 1 + .../opaque-used-in-extraneous-argument.stderr | 18 +-- tests/ui/impl-trait/question_mark.rs | 1 + .../recursive-parent-trait-method-call.rs | 1 + tests/ui/impl-trait/trait_upcasting.rs | 1 + .../trait_upcasting_reference_mismatch.rs | 1 + .../trait_upcasting_reference_mismatch.stderr | 2 +- tests/ui/impl-trait/unsize_adt.rs | 1 + tests/ui/impl-trait/unsize_slice.rs | 1 + ...ounds-entailment-wf-vars-issue-114783-1.rs | 1 + ...ounds-entailment-wf-vars-issue-114783-2.rs | 1 + tests/ui/implied-bounds/issue-100690.rs | 1 + tests/ui/implied-bounds/issue-100690.stderr | 4 +- tests/ui/implied-bounds/issue-101951.rs | 1 + ...port-alias-issue-121168.edition2015.stderr | 2 +- ...port-alias-issue-121168.edition2018.stderr | 2 +- ...port-alias-issue-121168.edition2021.stderr | 2 +- tests/ui/imports/import-alias-issue-121168.rs | 1 + tests/ui/inference/issue-104649.rs | 1 + tests/ui/inference/issue-104649.stderr | 2 +- tests/ui/inference/issue-80409.rs | 2 +- tests/ui/inference/issue-86162-1.rs | 1 + tests/ui/inference/issue-86162-1.stderr | 4 +- tests/ui/inference/issue-86162-2.rs | 1 + tests/ui/inference/issue-86162-2.stderr | 4 +- .../question-mark-type-inference-in-chain.rs | 1 + ...estion-mark-type-inference-in-chain.stderr | 10 +- .../inference/useless-turbofish-suggestion.rs | 1 + .../useless-turbofish-suggestion.stderr | 6 +- tests/ui/inline-const/const-expr-inference.rs | 1 + tests/ui/iterators/collect-into-slice.rs | 1 + tests/ui/iterators/collect-into-slice.stderr | 8 +- .../late-bound-lifetimes/cross_crate_alias.rs | 1 + tests/ui/layout/invalid-unsized-const-eval.rs | 1 + .../layout/invalid-unsized-const-eval.stderr | 4 +- .../layout/malformed-unsized-type-in-union.rs | 1 + .../malformed-unsized-type-in-union.stderr | 4 +- .../let-else/let-else-temporary-lifetime.rs | 1 + tests/ui/lifetimes/fullwidth-ampersand.rs | 1 + tests/ui/lifetimes/fullwidth-ampersand.stderr | 4 +- ...-bound-lifetime-arguments-warning-72278.rs | 2 +- .../path-count.fixed | 2 +- .../path-count.rs | 2 +- .../missing-lifetime-in-assoc-type-1.rs | 1 + .../missing-lifetime-in-assoc-type-1.stderr | 4 +- .../missing-lifetime-in-assoc-type-2.rs | 1 + .../missing-lifetime-in-assoc-type-2.stderr | 4 +- .../missing-lifetime-in-assoc-type-3.rs | 1 + .../missing-lifetime-in-assoc-type-3.stderr | 4 +- .../missing-lifetime-in-assoc-type-4.rs | 1 + .../missing-lifetime-in-assoc-type-4.stderr | 4 +- .../missing-lifetime-in-assoc-type-5.rs | 1 + .../missing-lifetime-in-assoc-type-5.stderr | 4 +- .../missing-lifetime-in-assoc-type-6.rs | 1 + .../missing-lifetime-in-assoc-type-6.stderr | 4 +- tests/ui/lifetimes/noisy-follow-up-erro.rs | 1 + .../ui/lifetimes/noisy-follow-up-erro.stderr | 6 +- tests/ui/lint/auxiliary/external_macros.rs | 5 + tests/ui/lint/dead-code/issue-85071-2.rs | 1 + tests/ui/lint/dead-code/issue-85071-2.stderr | 10 +- tests/ui/lint/dead-code/issue-85071.rs | 1 + tests/ui/lint/dead-code/issue-85071.stderr | 10 +- .../ui/lint/improper-ctypes/lint-113436-1.rs | 1 + .../lint/improper-ctypes/lint-113436-1.stderr | 10 +- .../lint/improper-ctypes/mustpass-113436.rs | 1 + ...lint-missing-copy-implementations-allow.rs | 1 + .../auxiliary/non_local_macro.rs | 1 + .../lint/non-local-defs/exhaustive-trait.rs | 1 + .../non-local-defs/exhaustive-trait.stderr | 12 +- tests/ui/lint/non-local-defs/exhaustive.rs | 1 + .../ui/lint/non-local-defs/exhaustive.stderr | 28 ++--- .../non-local-defs/from-local-for-global.rs | 1 + .../from-local-for-global.stderr | 2 +- tests/ui/lint/non-local-defs/generics.rs | 1 + tests/ui/lint/non-local-defs/generics.stderr | 6 +- tests/ui/lint/non-local-defs/local.rs | 1 + tests/ui/lint/non-local-defs/weird-exprs.rs | 1 + .../ui/lint/non-local-defs/weird-exprs.stderr | 12 +- ...ke-case-field-destructuring-issue-89469.rs | 1 + tests/ui/lint/reference_casting.rs | 1 + tests/ui/lint/reference_casting.stderr | 114 +++++++++--------- tests/ui/lint/todo-nostd.rs | 13 ++ tests/ui/lint/todo-nostd.stderr | 14 +++ tests/ui/lint/todo.rs | 32 +++++ tests/ui/lint/todo.stderr | 31 +++++ tests/ui/lint/unused-borrows.rs | 1 + tests/ui/lint/unused-borrows.stderr | 14 +-- .../lint-unused-imports-self-single.fixed | 2 +- .../unused/lint-unused-imports-self-single.rs | 2 +- tests/ui/lint/unused/unused-supertrait.rs | 1 + tests/ui/lint/unused/unused-supertrait.stderr | 4 +- .../unused/unused-var-in-unreachable-code.rs | 2 +- tests/ui/liveness/liveness-upvars.rs | 2 +- tests/ui/loop-match/invalid.rs | 2 +- .../no-name-for-DefPath-issue-133426.rs | 2 +- tests/ui/lto/lto-global-allocator.rs | 1 + tests/ui/macros/cfg_select.rs | 1 + tests/ui/macros/cfg_select.stderr | 48 ++++---- tests/ui/macros/concat-nested-repetition.rs | 1 + tests/ui/macros/issue-78333.rs | 1 + tests/ui/match/match_non_exhaustive.rs | 1 + tests/ui/match/match_non_exhaustive.stderr | 8 +- .../privately-uninhabited-issue-137999.rs | 1 + .../privately-uninhabited-issue-137999.stderr | 4 +- ...ont-ice-on-object-lookup-w-error-region.rs | 1 + ...ice-on-object-lookup-w-error-region.stderr | 2 +- tests/ui/methods/opaque_param_in_ufc.rs | 1 + .../methods/probe-error-on-infinite-deref.rs | 1 + .../probe-error-on-infinite-deref.stderr | 4 +- ...verflow-due-to-sized-predicate-ordering.rs | 1 + tests/ui/methods/self-type-is-sup-no-eq.rs | 1 + tests/ui/mir/issue-101844.rs | 1 + tests/ui/mir/issue-73914.rs | 1 + tests/ui/mir/issue-80949.rs | 1 + tests/ui/mir/issue-99852.rs | 1 + .../ui/mismatched_types/closure-ref-114180.rs | 1 + .../closure-ref-114180.stderr | 2 +- .../issue-74918-missing-lifetime.rs | 1 + .../issue-74918-missing-lifetime.stderr | 2 +- .../mismatched-types-issue-126222.fixed | 2 +- .../mismatched-types-issue-126222.rs | 2 +- .../region-var-in-moved-ty-issue-133118.rs | 1 + ...region-var-in-moved-ty-issue-133118.stderr | 4 +- .../fallback-closure-wrap.e2024.stderr | 6 +- .../fallback_change/fallback-closure-wrap.rs | 1 + ...-fallback-flowing-into-unsafe.e2015.stderr | 40 +++--- ...-fallback-flowing-into-unsafe.e2024.stderr | 42 +++---- ...never-type-fallback-flowing-into-unsafe.rs | 1 + tests/ui/nll/ice-106874.rs | 1 + tests/ui/nll/ice-106874.stderr | 20 +-- .../missing-universe-cause-issue-114907.rs | 1 + ...missing-universe-cause-issue-114907.stderr | 12 +- .../user-annotations/normalization-infer.rs | 1 + .../normalization-infer.stderr | 18 +-- .../normalizing-user-annotation.rs | 1 + .../suggest_tuple_wrap_root_obligation.rs | 1 + .../suggest_tuple_wrap_root_obligation.stderr | 8 +- tests/ui/panics/panic-in-message-fmt.rs | 1 + .../ui/panics/panic-in-message-fmt.run.stderr | 2 +- ...default-trait-shadow-cycle-issue-151358.rs | 1 + .../recursive-struct-oncelock-issue-151226.rs | 1 + ...ursive-struct-oncelock-issue-151226.stderr | 2 +- .../undefined-function-issue-120760.rs | 1 + .../undefined-function-issue-120760.stderr | 16 +-- tests/ui/parser/attribute-on-empty.rs | 1 + tests/ui/parser/attribute-on-empty.stderr | 16 +-- tests/ui/parser/eq-gt-to-gt-eq.fixed | 2 +- tests/ui/parser/eq-gt-to-gt-eq.rs | 2 +- ...-98601-delimiter-error-unexpected-close.rs | 1 + ...01-delimiter-error-unexpected-close.stderr | 2 +- tests/ui/pattern/byte-string-inference.rs | 1 + tests/ui/pattern/for-loop-bad-item.rs | 1 + tests/ui/pattern/for-loop-bad-item.stderr | 6 +- tests/ui/pattern/self-ctor-133272.rs | 1 + tests/ui/pattern/self-ctor-133272.stderr | 4 +- ...e-missing-pattern-excluding-comments.fixed | 1 + ...iate-missing-pattern-excluding-comments.rs | 1 + ...-missing-pattern-excluding-comments.stderr | 2 +- tests/ui/pin-ergonomics/pinned-drop-check.rs | 2 +- tests/ui/pin-ergonomics/sugar-no-const.rs | 2 +- tests/ui/privacy/auxiliary/issue-117997.rs | 1 + tests/ui/privacy/auxiliary/issue-92755.rs | 1 + tests/ui/privacy/projections.rs | 1 + tests/ui/privacy/projections.stderr | 16 +-- tests/ui/privacy/projections2.rs | 1 + tests/ui/privacy/projections2.stderr | 8 +- .../ui/privacy/suggest-new-projection-ice.rs | 1 + .../privacy/suggest-new-projection-ice.stderr | 2 +- .../query-cycle-printing-issue-151226.rs | 2 + .../query-cycle-printing-issue-151226.stderr | 2 +- tests/ui/reachable/expr_cast.rs | 1 + tests/ui/reachable/todo.rs | 41 +++++++ tests/ui/reachable/todo.stderr | 16 +++ tests/ui/regions/regions-name-undeclared.rs | 1 + .../ui/regions/regions-name-undeclared.stderr | 24 ++-- tests/ui/regions/resolve-re-error-ice.rs | 1 + tests/ui/regions/resolve-re-error-ice.stderr | 12 +- tests/ui/resolve/inner-attr-prelude-macro.rs | 1 + tests/ui/resolve/slice-as-slice.rs | 1 + tests/ui/resolve/slice-as-slice.stderr | 2 +- .../underscore-bindings-disambiguators.rs | 1 + .../underscore-bindings-disambiguators.stderr | 16 +-- .../temporary-early-drop.rs | 2 +- .../temporary-early-drop.rs | 2 +- .../future-prelude-collision-generic.fixed | 2 +- .../future-prelude-collision-generic.rs | 2 +- .../future-prelude-collision-macros.fixed | 2 +- .../future-prelude-collision-macros.rs | 2 +- .../future-prelude-collision-unneeded.rs | 2 +- tests/ui/sanitizer/cfi/can-reveal-opaques.rs | 1 + .../ui/scalable-vectors/wellformed-arrays.rs | 1 + ...arbitrary_self_types_dispatch_to_vtable.rs | 1 + .../dont-incompletely-prefer-built-in.rs | 1 + .../expr-type-error-plus-sized-obligation.rs | 2 +- .../recursive-type-coercion-from-never.rs | 1 + .../recursive-type-coercion-from-never.stderr | 6 +- tests/ui/span/issue-107353.rs | 2 +- .../auxiliary/anyid-repro-125197.rs | 1 + .../min_specialization/issue-79224.rs | 1 + .../min_specialization/issue-79224.stderr | 8 +- .../structs/syntax-error-not-missing-field.rs | 1 + .../syntax-error-not-missing-field.stderr | 22 ++-- .../apitit-unimplemented-method.rs | 1 + .../apitit-unimplemented-method.stderr | 2 +- .../ui/suggestions/derive-clone-for-eq.fixed | 1 + tests/ui/suggestions/derive-clone-for-eq.rs | 1 + .../ui/suggestions/derive-clone-for-eq.stderr | 4 +- .../derive-macro-missing-bounds.rs | 1 + .../derive-macro-missing-bounds.stderr | 18 +-- tests/ui/suggestions/field-has-method.rs | 1 + tests/ui/suggestions/field-has-method.stderr | 2 +- tests/ui/suggestions/issue-101623.rs | 1 + tests/ui/suggestions/issue-101623.stderr | 4 +- tests/ui/suggestions/issue-101984.rs | 1 + tests/ui/suggestions/issue-101984.stderr | 2 +- tests/ui/suggestions/issue-82566-2.rs | 1 + tests/ui/suggestions/issue-82566-2.stderr | 6 +- tests/ui/suggestions/issue-84700.rs | 1 + tests/ui/suggestions/issue-84700.stderr | 4 +- tests/ui/suggestions/issue-98562.rs | 1 + tests/ui/suggestions/issue-98562.stderr | 2 +- ...-suggestion-in-proper-span-issue-121267.rs | 1 + ...gestion-in-proper-span-issue-121267.stderr | 4 +- ...missing-assoc-fn-applicable-suggestions.rs | 1 + ...ing-assoc-fn-applicable-suggestions.stderr | 2 +- tests/ui/suggestions/missing-trait-item.fixed | 2 +- tests/ui/suggestions/missing-trait-item.rs | 2 +- ...ace-intended-coma-not-all-in-pattern.fixed | 1 + ...eplace-intended-coma-not-all-in-pattern.rs | 1 + ...ce-intended-coma-not-all-in-pattern.stderr | 2 +- ...adding-reference-to-trait-assoc-item.fixed | 2 +- ...st-adding-reference-to-trait-assoc-item.rs | 2 +- .../suggest-blanket-impl-local-trait.rs | 1 + .../suggest-blanket-impl-local-trait.stderr | 14 +-- ...le-struct-where-clause-suggestion-91520.rs | 1 + ...truct-where-clause-suggestion-91520.stderr | 2 +- ...ssing-where-clause-lifetimes-from-trait.rs | 1 + ...g-where-clause-lifetimes-from-trait.stderr | 10 +- .../issue_89119_intercrate_caching.rs | 1 + .../inline-incorrect-early-bound-in-ctfe.rs | 1 + ...nline-incorrect-early-bound-in-ctfe.stderr | 6 +- .../ambiguity-in-dropck-err-reporting.rs | 1 + .../ambiguity-in-dropck-err-reporting.stderr | 4 +- .../leaking-vars-in-cause-code-1.rs | 1 + .../leaking-vars-in-cause-code-1.stderr | 8 +- .../bare-fn-no-impl-fn-ptr-99875.rs | 1 + .../bare-fn-no-impl-fn-ptr-99875.stderr | 14 +-- ...complete-infer-via-sized-wc.current.stderr | 2 +- .../incomplete-infer-via-sized-wc.next.stderr | 2 +- .../traits/incomplete-infer-via-sized-wc.rs | 1 + tests/ui/traits/issue-52893.rs | 1 + tests/ui/traits/issue-52893.stderr | 6 +- tests/ui/traits/issue-77982.rs | 1 + tests/ui/traits/issue-77982.stderr | 14 +-- .../traits/issue-85360-eval-obligation-ice.rs | 1 + .../issue-85360-eval-obligation-ice.stderr | 4 +- tests/ui/traits/issue-92292.rs | 1 + .../auxiliary/struct-69725.rs | 1 + .../derive-clone-missing-bound-69725.stderr | 2 +- ..._eq_dont_use_normalizes_to_if_substs_eq.rs | 1 + .../alias-relate/tait-eq-proj-2.rs | 1 + .../next-solver/alias-relate/tait-eq-tait.rs | 1 + tests/ui/traits/next-solver/alias-sub.rs | 1 + .../ambig-projection-self-is-ambig.rs | 1 + ...iguity-due-to-uniquification-3.next.stderr | 6 +- .../ambiguity-due-to-uniquification-3.rs | 1 + .../runaway-impl-candidate-selection.rs | 1 + .../runaway-impl-candidate-selection.stderr | 4 +- .../coercion/non-wf-in-coerce-pointers.rs | 1 + .../coercion/non-wf-in-coerce-pointers.stderr | 8 +- .../unsize-coercion-recursion-limit.rs | 2 +- .../coercion/upcast-right-substs.rs | 1 + .../coercion/upcast-wrong-substs.rs | 1 + .../coercion/upcast-wrong-substs.stderr | 2 +- .../coherence/negative-coherence-bounds.rs | 1 + .../trait_ref_is_knowable-normalization-2.rs | 1 + .../cycles/provisional-result-done.rs | 1 + .../diagnostics/coerce-in-may-coerce.rs | 1 + .../diagnostics/coerce-in-may-coerce.stderr | 6 +- .../next-solver/dont-coerce-infer-to-dyn.rs | 1 + .../dont-normalize-proj-with-error.rs | 1 + .../dont-normalize-proj-with-error.stderr | 2 +- .../fudge-inference-with-aliases-1.rs | 1 + .../fudge-inference-with-aliases-2.rs | 1 + .../equating-projection-cyclically.rs | 1 + .../hr-alias-non-hr-alias-self-ty-1.rs | 2 +- .../hr-alias-non-hr-alias-self-ty-2.rs | 1 + .../hr-alias-universe-lowering-ambiguity.rs | 1 + .../generalize/occurs-check-nested-alias.rs | 2 +- .../global-cache-and-parallel-frontend.rs | 1 + .../global-cache-and-parallel-frontend.stderr | 4 +- ...wf-candidate-behind-stalled-coroutine-1.rs | 1 + tests/ui/traits/next-solver/non-wf-ret.rs | 1 + .../discard-impls-shadowed-by-env-2.rs | 2 +- ...zes_to_ignores_unnormalizable_candidate.rs | 1 + ...to_ignores_unnormalizable_candidate.stderr | 4 +- .../ambig-goal-infer-in-type-oulives.rs | 1 + .../normalize/normalize-rcvr-for-inherent.rs | 1 + .../skip-supertraits-in-object-candidate.rs | 1 + .../opaques/eventually-constrained-region.rs | 1 + .../opaques/method_autoderef_constraints.rs | 1 + .../method_autoderef_constraints.stderr | 4 +- .../report-all-unexpected-hidden-errors.rs | 1 + ...report-all-unexpected-hidden-errors.stderr | 6 +- ...w-plus-ambiguity-normalizes-to-response.rs | 1 + .../traits/next-solver/supertrait-alias-4.rs | 1 + tests/ui/traits/next-solver/try-example.rs | 1 + .../typeck/resolve-before-checking-never.rs | 1 + .../next-solver/well-formed-in-relate.rs | 1 + .../next-solver/well-formed-in-relate.stderr | 4 +- .../late-bound-in-anon-ct.rs | 1 + .../late-bound-in-anon-ct.stderr | 2 +- .../ui/traits/non_lifetime_binders/on-dyn.rs | 1 + .../traits/non_lifetime_binders/on-dyn.stderr | 2 +- .../ui/traits/non_lifetime_binders/on-ptr.rs | 1 + .../traits/non_lifetime_binders/on-ptr.stderr | 2 +- .../normalize/normalize-conflicting-impls.rs | 1 + .../normalize-conflicting-impls.stderr | 4 +- .../crash-due-to-projections-modulo-norm.rs | 1 + .../inductive-canonical-cycle.rs | 1 + .../deref-upcast-shadowing-lint.rs | 1 + .../deref-upcast-shadowing-lint.stderr | 4 +- .../inference-behavior-change-deref.rs | 1 + .../inference-behavior-change-deref.stderr | 2 +- .../migrate-lint-deny-regions.rs | 1 + .../migrate-lint-deny-regions.stderr | 4 +- .../ui/traits/trivial-unsized-projection-2.rs | 2 +- tests/ui/traits/trivial-unsized-projection.rs | 2 +- .../winnowing/global-non-global-env-1.rs | 1 + .../winnowing/global-non-global-env-2.rs | 1 + .../winnowing/global-non-global-env-3.rs | 1 + .../winnowing/global-non-global-env-4.rs | 1 + .../try-block/try-block-unused-delims.fixed | 1 + tests/ui/try-block/try-block-unused-delims.rs | 1 + .../try-block/try-block-unused-delims.stderr | 14 +-- tests/ui/tuple/wrong_argument_ice-3.rs | 1 + tests/ui/tuple/wrong_argument_ice-3.stderr | 4 +- .../type-alias-impl-trait/constrain_inputs.rs | 1 + .../constrain_inputs.stderr | 20 +-- .../different_defining_uses_never_type3.rs | 1 + ...different_defining_uses_never_type3.stderr | 4 +- .../hidden_type_mismatch.rs | 2 +- .../lazy_subtyping_of_opaques.rs | 1 + .../lazy_subtyping_of_opaques.stderr | 6 +- .../nested-rpit-with-lifetimes.rs | 1 + .../ui/type-alias-impl-trait/type_of_a_let.rs | 2 +- tests/ui/type/pattern_types/nested.rs | 1 + tests/ui/type/pattern_types/nested.stderr | 26 ++-- .../pattern_types/pattern_type_mismatch.rs | 1 + .../pattern_type_mismatch.stderr | 8 +- .../bad-index-due-to-nested.current.stderr | 12 +- .../bad-index-due-to-nested.next.stderr | 10 +- tests/ui/typeck/bad-index-due-to-nested.rs | 1 + .../bad-index-modulo-higher-ranked-regions.rs | 1 + ...-index-modulo-higher-ranked-regions.stderr | 4 +- tests/ui/typeck/issue-100246.rs | 1 + tests/ui/typeck/issue-100246.stderr | 2 +- tests/ui/typeck/issue-80207-unsized-return.rs | 1 + tests/ui/typeck/issue-89275.rs | 1 + tests/ui/typeck/issue-89275.stderr | 2 +- ...thod-name-with-maybe-ty-mismatch-146008.rs | 1 + ...-name-with-maybe-ty-mismatch-146008.stderr | 2 +- .../suggest-add-wrapper-issue-145294.rs | 1 + .../suggest-add-wrapper-issue-145294.stderr | 4 +- .../privately-uninhabited-mir-call.fixed | 2 +- .../privately-uninhabited-mir-call.rs | 2 +- tests/ui/unsafe/issue-87414-query-cycle.rs | 1 + 655 files changed, 1481 insertions(+), 877 deletions(-) create mode 100644 tests/ui/lint/auxiliary/external_macros.rs create mode 100644 tests/ui/lint/todo-nostd.rs create mode 100644 tests/ui/lint/todo-nostd.stderr create mode 100644 tests/ui/lint/todo.rs create mode 100644 tests/ui/lint/todo.stderr create mode 100644 tests/ui/reachable/todo.rs create mode 100644 tests/ui/reachable/todo.stderr 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 804d2757cf998..78cf933426bc9 100644 --- a/compiler/rustc_borrowck/src/universal_regions.rs +++ b/compiler/rustc_borrowck/src/universal_regions.rs @@ -373,6 +373,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 76c43e0df1a24..3434a942f03ef 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 1ce424332db20..fff2822e203cf 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 1d9dcdab4ced9..ac93a990c4e62 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>, @@ -522,6 +523,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/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 bb461ccb6f370..e4de1d8e45eb4 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -872,6 +872,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 741c34e0304af..161e1c770803d 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -1935,6 +1935,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_analysis/src/coherence/builtin.rs b/compiler/rustc_hir_analysis/src/coherence/builtin.rs index f83433c2bd503..92464668e3381 100644 --- a/compiler/rustc_hir_analysis/src/coherence/builtin.rs +++ b/compiler/rustc_hir_analysis/src/coherence/builtin.rs @@ -625,7 +625,7 @@ pub(crate) fn coerce_shared_info<'tcx>( span, Unnormalized::new_wip(trait_ref.args.type_at(1)), ) else { - todo!("something went wrong with structurally_normalize_ty"); + panic!("something went wrong with structurally_normalize_ty"); }; let param_env = tcx.param_env(impl_did); diff --git a/compiler/rustc_hir_typeck/src/cast.rs b/compiler/rustc_hir_typeck/src/cast.rs index 4d934703f4670..13a9faa95a031 100644 --- a/compiler/rustc_hir_typeck/src/cast.rs +++ b/compiler/rustc_hir_typeck/src/cast.rs @@ -88,6 +88,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 763d2a27e6cc0..a1a459c20932b 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 3f8ac61eed084..e7a6e177c7c08 100644 --- a/compiler/rustc_hir_typeck/src/errors.rs +++ b/compiler/rustc_hir_typeck/src/errors.rs @@ -1402,3 +1402,7 @@ pub(crate) struct FloatLiteralF32Fallback { )] pub 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 f1d9100a1d5f6..cce41ce598419 100644 --- a/compiler/rustc_hir_typeck/src/expr.rs +++ b/compiler/rustc_hir_typeck/src/expr.rs @@ -303,7 +303,25 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { if self.resolve_vars_with_obligations(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 + && let Some(span) = self.tcx.get_local_expansion_by(expr.span, sym::todo_macro) + { + self.tcx.emit_node_span_lint( + rustc_lint::builtin::TODO_MACRO_CALLS, // ignore-tidy-todo + expr.hir_id, + 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 c6892419443f8..fb82699f48617 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -115,6 +115,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, @@ -872,6 +873,28 @@ declare_lint! { report_in_external_macro } +declare_lint! { + /// The `todo_macro_calls` 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 1cd11bbd9ce4f..ef1a464fdaa70 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 e756277b92d76..04a899ff82ea2 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -43,7 +43,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, sym}; +use rustc_span::{DUMMY_SP, ExpnData, Ident, Span, Symbol, SyntaxContext, kw, sym}; use rustc_type_ir::TyKind::*; pub use rustc_type_ir::lift::Lift; use rustc_type_ir::{CollectAndApply, WithCachedTypeInfo, elaborate, search_graph}; @@ -1247,6 +1247,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 get_local_expansion_by(self, span: Span, mac: Symbol) -> Option { + 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 None; + }; + // first, find the `todo!` call site + let todo_ctxt = loop { + if ctxt.is_root() { + return None; + } + 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 None; + } + ctxt = data.call_site.ctxt(); + } + Some(todo_ctxt.outer_expn_data().call_site) + } } impl<'tcx> TyCtxtAt<'tcx> { diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 9db9b1769ab9c..9e4ee89a26bf8 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1730,6 +1730,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 99da2da391151..71792f73fafec 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -1250,6 +1250,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 2476dcd5bf87a..ab914d27ffdad 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -603,6 +603,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 824c78094a69b..7c5287ccd3f6a 100644 --- a/compiler/rustc_next_trait_solver/src/canonical/canonicalizer.rs +++ b/compiler/rustc_next_trait_solver/src/canonical/canonicalizer.rs @@ -518,6 +518,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 d6ddd9fec7c08..add2c04b26cfb 100644 --- a/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/effect_goals.rs @@ -277,6 +277,7 @@ where }) } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn consider_builtin_fn_ptr_trait_candidate( _ecx: &mut EvalCtxt<'_, D>, _goal: Goal, @@ -334,6 +335,7 @@ where .map_err(Into::into) } + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn consider_builtin_async_fn_trait_candidates( _ecx: &mut EvalCtxt<'_, D>, _goal: Goal, @@ -370,6 +372,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 e9a4d7e5919ad..ebed73bb74054 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 @@ -655,6 +655,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, @@ -930,6 +931,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 7e76d5a91ac66..3266e43d2574b 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/mir.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/mir.rs @@ -185,6 +185,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>, @@ -417,6 +419,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>, @@ -702,6 +706,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 c4f1da14da23e..38a9eb9ead927 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/ty.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/ty.rs @@ -414,6 +414,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>, @@ -499,6 +500,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>, @@ -745,6 +747,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 873ed9bb10398..ea2b57f3114fc 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 @@ -323,6 +323,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 72339efd0a132..d23290331c6b1 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -2056,6 +2056,7 @@ symbols! { to_owned_method, 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 61c1c83c3f8f6..e2670741949e4 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -442,6 +442,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 900d55cc556fc..e00e5798953e2 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -888,6 +888,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 24415c5a50e97..9ecd0fe01204b 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>, @@ -248,6 +249,7 @@ fn maybe_supported_error( } impl<'a, 'tcx> IsThirPolymorphic<'a, 'tcx> { + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn expr_is_poly(&mut self, expr: &thir::Expr<'tcx>) -> bool { if expr.ty.has_non_region_param() { return true; 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 6d7923baa175f..f7f2bcea023f2 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -811,7 +811,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 /// @@ -844,6 +847,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 aaa71786854da..38a45a8954a99 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 360ca83c65a91..0f411b945289d 100644 --- a/library/std/src/io/error.rs +++ b/library/std/src/io/error.rs @@ -589,6 +589,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 08478a62b7d85..ad05e3a9a6f70 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, @@ -780,6 +781,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 cf6deebe8e1d7..0347fc287d0c4 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2833,6 +2833,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 d13dbe7eb0490..cb1fb7cac56df 100644 --- a/src/librustdoc/formats/item_type.rs +++ b/src/librustdoc/formats/item_type.rs @@ -156,6 +156,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 84faa98384cc4..d49a2e7f5eaba 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -556,6 +556,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/ast_utils/mod.rs b/src/tools/clippy/clippy_utils/src/ast_utils/mod.rs index 7b408471574f9..26fdeb3591474 100644 --- a/src/tools/clippy/clippy_utils/src/ast_utils/mod.rs +++ b/src/tools/clippy/clippy_utils/src/ast_utils/mod.rs @@ -1025,7 +1025,7 @@ pub fn eq_attr(l: &Attribute, r: &Attribute) -> bool { pub fn eq_attr_item_kind(l: &AttrItemKind, r: &AttrItemKind) -> bool { match (l, r) { (AttrItemKind::Unparsed(l), AttrItemKind::Unparsed(r)) => eq_attr_args(l, r), - (AttrItemKind::Parsed(_l), AttrItemKind::Parsed(_r)) => todo!(), + (AttrItemKind::Parsed(_l), AttrItemKind::Parsed(_r)) => unimplemented!(), _ => false, } } diff --git a/src/tools/clippy/clippy_utils/src/hir_utils.rs b/src/tools/clippy/clippy_utils/src/hir_utils.rs index 7590090f9be40..b97f39cdeaadb 100644 --- a/src/tools/clippy/clippy_utils/src/hir_utils.rs +++ b/src/tools/clippy/clippy_utils/src/hir_utils.rs @@ -20,7 +20,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; @@ -477,7 +477,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 492eb89708aeb..6623a5d666932 100644 --- a/src/tools/clippy/clippy_utils/src/sym.rs +++ b/src/tools/clippy/clippy_utils/src/sym.rs @@ -608,7 +608,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/src/intrinsics/math.rs b/src/tools/miri/src/intrinsics/math.rs index fc7101df9ed08..1a23df79a5035 100644 --- a/src/tools/miri/src/intrinsics/math.rs +++ b/src/tools/miri/src/intrinsics/math.rs @@ -93,6 +93,7 @@ where impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {} pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { + #[cfg_attr(not(bootstrap), allow(todo_macro_calls))] fn emulate_math_intrinsic( &mut self, intrinsic_name: &str, 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 06ddda278765a..c01cbfc6191f3 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_implicit_writes //@[tree_implicit_writes]compile-flags: -Zmiri-tree-borrows -Zmiri-tree-borrows-implicit-writes 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/const-generics/try_unify_abstract_const_regression_tests/issue-77708-2.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-2.rs index 257a4196c0c93..2e44fba98e3b9 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-2.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-2.rs @@ -1,6 +1,6 @@ //@ revisions: rpass #![feature(generic_const_exprs)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] struct Z; const fn one() -> usize { diff --git a/tests/incremental/track-deps-in-new-solver.rs b/tests/incremental/track-deps-in-new-solver.rs index 4b4d733e1d921..8cf040fe728a6 100644 --- a/tests/incremental/track-deps-in-new-solver.rs +++ b/tests/incremental/track-deps-in-new-solver.rs @@ -1,7 +1,7 @@ //@ revisions: cpass1 cpass2 //@ compile-flags: -Znext-solver -#![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..e9b18e623c453 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_calls)] #![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/assumptions_on_binders/alias_outlives.rs b/tests/ui/assumptions_on_binders/alias_outlives.rs index c234773fb10d8..9c656f1508684 100644 --- a/tests/ui/assumptions_on_binders/alias_outlives.rs +++ b/tests/ui/assumptions_on_binders/alias_outlives.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znext-solver -Zassumptions-on-binders +#![allow(todo_macro_calls)] // test that a `::Assoc: '!a_u1` constraint is considered to be satisfied // if there's a `T::Assoc: 'static` assumption in the root universe and if not that it is diff --git a/tests/ui/assumptions_on_binders/alias_outlives.stderr b/tests/ui/assumptions_on_binders/alias_outlives.stderr index bd3819798737d..9132a709989dd 100644 --- a/tests/ui/assumptions_on_binders/alias_outlives.stderr +++ b/tests/ui/assumptions_on_binders/alias_outlives.stderr @@ -1,5 +1,5 @@ error: unsatisfied lifetime constraint from -Zassumptions-on-binders :3 - --> $DIR/alias_outlives.rs:37:1 + --> $DIR/alias_outlives.rs:38:1 | LL | const REGIONCK_ENV_FAIL<'a, T: AliasHaver>: ReqTrait = todo!() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | const REGIONCK_ENV_FAIL<'a, T: AliasHaver>: ReqTrait = todo!() = note: meoow :c error: unsatisfied lifetime constraint from -Zassumptions-on-binders :3 - --> $DIR/alias_outlives.rs:25:1 + --> $DIR/alias_outlives.rs:26:1 | LL | / fn borrowck_env_fail<'a, T: AliasHaver>() LL | | diff --git a/tests/ui/assumptions_on_binders/implied_higher_ranked_alias_outlives_assumption.rs b/tests/ui/assumptions_on_binders/implied_higher_ranked_alias_outlives_assumption.rs index c0cb6ce416aed..80d83247c818e 100644 --- a/tests/ui/assumptions_on_binders/implied_higher_ranked_alias_outlives_assumption.rs +++ b/tests/ui/assumptions_on_binders/implied_higher_ranked_alias_outlives_assumption.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Znext-solver -Zassumptions-on-binders //@ check-pass +#![allow(todo_macro_calls)] #![feature(generic_const_items)] 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/fn-exception-target-features.stderr b/tests/ui/async-await/async-closures/fn-exception-target-features.stderr index f0846bfdb1250..37977b45250ff 100644 --- a/tests/ui/async-await/async-closures/fn-exception-target-features.stderr +++ b/tests/ui/async-await/async-closures/fn-exception-target-features.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `#[target_features] fn() -> Pin + 'static)>> {target_feature}: AsyncFn()` is not satisfied - --> $DIR/fn-exception-target-features.rs:15:10 + --> $DIR/fn-exception-target-features.rs:16:10 | LL | test(target_feature); | ---- ^^^^^^^^^^^^^^ unsatisfied trait bound @@ -8,7 +8,7 @@ LL | test(target_feature); | = help: the trait `AsyncFn()` is not implemented for fn item `#[target_features] fn() -> Pin + 'static)>> {target_feature}` note: required by a bound in `test` - --> $DIR/fn-exception-target-features.rs:12:17 + --> $DIR/fn-exception-target-features.rs:13:17 | LL | fn test(f: impl AsyncFn()) {} | ^^^^^^^^^ required by this bound in `test` 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..a25056e4820f0 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_calls)] 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 e5d9485e1797b..927f8a91783ab 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 0cb117d3fc4c3..db102be2a5519 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,30 +1,30 @@ 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 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for that trait implementation, expected `Text`, found `Integer` error[E0277]: the trait bound `X: A` is not satisfied - --> $DIR/as_expression.rs:60:15 + --> $DIR/as_expression.rs:61:15 | LL | X.start().foo().finish(); | ^^^ unsatisfied trait bound | help: the trait `A` is not implemented for `X` - --> $DIR/as_expression.rs:70:1 + --> $DIR/as_expression.rs:71:1 | LL | struct X; | ^^^^^^^^ note: required by a bound in `Ext::foo` - --> $DIR/as_expression.rs:79:23 + --> $DIR/as_expression.rs:80:23 | LL | fn foo(self) -> Self | --- required by a bound in this associated function 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 d47424abcf10d..9240d896e4e3a 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,18 +23,18 @@ LL | T: AsExpression, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo::check` error[E0277]: the trait bound `X: A` is not satisfied - --> $DIR/as_expression.rs:60:15 + --> $DIR/as_expression.rs:61:15 | LL | X.start().foo().finish(); | ^^^ unsatisfied trait bound | help: the trait `A` is not implemented for `X` - --> $DIR/as_expression.rs:70:1 + --> $DIR/as_expression.rs:71:1 | LL | struct X; | ^^^^^^^^ note: required by a bound in `Ext::foo` - --> $DIR/as_expression.rs:79:23 + --> $DIR/as_expression.rs:80:23 | LL | fn foo(self) -> Self | --- required by a bound in this associated function 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 c92c78f91ea45..ebeb5d015be05 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/eii/static/subtype.rs b/tests/ui/eii/static/subtype.rs index d98e94fa90322..820c7eb57619d 100644 --- a/tests/ui/eii/static/subtype.rs +++ b/tests/ui/eii/static/subtype.rs @@ -3,6 +3,7 @@ // FIXME: linking on windows (specifically mingw) not yet supported, see tracking issue #125418 //@ ignore-windows // Tests that mismatching types of the declaration and definition are rejected +#![allow(todo_macro_calls)] #![feature(extern_item_impls)] use std::ptr; diff --git a/tests/ui/eii/static/subtype_wrong.rs b/tests/ui/eii/static/subtype_wrong.rs index 964a3d767b197..cb0e28f0e24ff 100644 --- a/tests/ui/eii/static/subtype_wrong.rs +++ b/tests/ui/eii/static/subtype_wrong.rs @@ -2,6 +2,7 @@ // FIXME: linking on windows (specifically mingw) not yet supported, see tracking issue #125418 //@ ignore-windows // Tests that mismatching types of the declaration and definition are rejected +#![allow(todo_macro_calls)] #![feature(extern_item_impls)] use std::ptr; diff --git a/tests/ui/eii/static/subtype_wrong.stderr b/tests/ui/eii/static/subtype_wrong.stderr index a20074947c15d..3600bdd062998 100644 --- a/tests/ui/eii/static/subtype_wrong.stderr +++ b/tests/ui/eii/static/subtype_wrong.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/subtype_wrong.rs:13:1 + --> $DIR/subtype_wrong.rs:14:1 | LL | static HELLO_IMPL: for<'a> fn(&'a u8) -> &'a u8 = |_| todo!(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other 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..487cea64b8e0d 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_calls)] 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..a153fea8cf009 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_calls)] 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 17fb911135896..41de099a200e7 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 155bce3576360..cedd4b89501fa 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 90adeb0236eb2..169d564ca13a3 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 2e1e9346d4e65..38f36bb4b5a8a 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:33:9 + --> $DIR/question-mark-type-inference-in-chain.rs:34: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:43:65 + --> $DIR/question-mark-type-inference-in-chain.rs:44: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:55:20 + --> $DIR/question-mark-type-inference-in-chain.rs:56: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:74:20 + --> $DIR/question-mark-type-inference-in-chain.rs:75: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:71:10 + --> $DIR/question-mark-type-inference-in-chain.rs:72: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..3d0bd970e7152 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_calls)] 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..7cc3ab84a6d3f --- /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_calls)] + | ^^^^^^^^^^^^^^^^ + +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..7977f726bf5cb --- /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_calls)] + | ^^^^^^^^^^^^^^^^ + +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 `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..7e352f278fd73 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_calls)] 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 be58b48a40576..7fa52ac2b5a32 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 9fd92ad668c2b..364c2cf532ea4 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 b8fbe103d2cf1..cfc6825351f07 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,73 +8,73 @@ 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 `=` error: doc comments are not allowed on `cfg_select` branches - --> $DIR/cfg_select.rs:208:5 + --> $DIR/cfg_select.rs:209:5 | LL | /// doc comment | ^^^^^^^^^^^^^^^ error: doc comments are not allowed on `cfg_select` branches - --> $DIR/cfg_select.rs:211:5 + --> $DIR/cfg_select.rs:212:5 | LL | /// doc comment | ^^^^^^^^^^^^^^^ error: attributes are not allowed on `cfg_select` branches - --> $DIR/cfg_select.rs:217:5 + --> $DIR/cfg_select.rs:218:5 | LL | #[cfg(false)] | ^^^^^^^^^^^^^ error: an inner attribute is not permitted in this context - --> $DIR/cfg_select.rs:224:5 + --> $DIR/cfg_select.rs:225:5 | LL | #![cfg(false)] | ^^^^^^^^^^^^^^ @@ -83,7 +83,7 @@ LL | #![cfg(false)] = note: outer attributes, like `#[test]`, annotate the item following them error[E0753]: expected outer doc comment - --> $DIR/cfg_select.rs:231:5 + --> $DIR/cfg_select.rs:232:5 | LL | //! inner doc comment | ^^^^^^^^^^^^^^^^^^^^^ @@ -96,7 +96,7 @@ LL + // inner doc comment | error: doc comments are not allowed on `cfg_select` branches - --> $DIR/cfg_select.rs:239:5 + --> $DIR/cfg_select.rs:240:5 | LL | /// line1 | ^^^^^^^^^ @@ -105,7 +105,7 @@ LL | /// line3 | ^^^^^^^^^ error[E0753]: expected outer doc comment - --> $DIR/cfg_select.rs:249:5 + --> $DIR/cfg_select.rs:250:5 | LL | //! inner doc comment | ^^^^^^^^^^^^^^^^^^^^^ @@ -118,13 +118,13 @@ LL + // inner doc comment | error: doc comments are not allowed on `cfg_select` branches - --> $DIR/cfg_select.rs:247:5 + --> $DIR/cfg_select.rs:248:5 | LL | /// outer doc comment | ^^^^^^^^^^^^^^^^^^^^^ warning: unreachable configuration predicate - --> $DIR/cfg_select.rs:136:5 + --> $DIR/cfg_select.rs:137:5 | LL | _ => {} | - always matches @@ -138,7 +138,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 @@ -146,25 +146,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"` @@ -175,7 +175,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..6bd31b4ec5ac9 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_calls)] 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 61fb67174fde4..1d1f51b749f28 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 @@ -4,6 +4,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 4d2241248fee0..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 @@ -10,7 +10,7 @@ LL | pub struct User<'a, 'dep> { | +++ error[E0560]: struct `User<'_>` has no field named `dep` - --> $DIR/undefined-function-issue-120760.rs:70:12 + --> $DIR/undefined-function-issue-120760.rs:71:12 | LL | User { dep }.save().await; | ^^^ `User<'_>` does not have this field @@ -18,16 +18,16 @@ LL | User { dep }.save().await; = note: available fields are: `name` error[E0425]: cannot find function `run` in this scope - --> $DIR/undefined-function-issue-120760.rs:61:17 + --> $DIR/undefined-function-issue-120760.rs:15:5 | -LL | let _ = run("dependency").await; - | ^^^ not found in this scope +LL | run("dependency").await; + | ^^^ not found in this scope error[E0425]: cannot find function `run` in this scope - --> $DIR/undefined-function-issue-120760.rs:14:5 + --> $DIR/undefined-function-issue-120760.rs:62:17 | -LL | run("dependency").await; - | ^^^ not found in this scope +LL | let _ = run("dependency").await; + | ^^^ not found in this scope error: aborting due to 4 previous errors 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..cf9b86a6efc2c 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_calls)] 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 f3053a3e7d79a..cb99096609a07 100644 --- a/tests/ui/pattern/self-ctor-133272.stderr +++ b/tests/ui/pattern/self-ctor-133272.stderr @@ -1,5 +1,5 @@ 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 @@ -7,7 +7,7 @@ LL | let S { ref Self } = todo!(); | while parsing the fields for this pattern 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..74ee293fa74b7 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_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.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/pinned-drop-check.rs b/tests/ui/pin-ergonomics/pinned-drop-check.rs index bd8d096fec547..f741bff6a4575 100644 --- a/tests/ui/pin-ergonomics/pinned-drop-check.rs +++ b/tests/ui/pin-ergonomics/pinned-drop-check.rs @@ -1,6 +1,6 @@ //@ edition:2024 #![feature(pin_ergonomics)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] // This test ensures that at least and at most one of `drop` and `pin_drop` // are implemented for types that implement `Drop`. 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..9c31abc2a32d2 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_calls)] #![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..e5bc8de0eab81 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_calls)] 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 7bb535bb20a75..cd3f87b5956ff 100644 --- a/tests/ui/sized/recursive-type-coercion-from-never.rs +++ b/tests/ui/sized/recursive-type-coercion-from-never.rs @@ -1,4 +1,5 @@ //@ build-fail +#![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 1e04c2ab396f0..51756b7cf6edf 100644 --- a/tests/ui/sized/recursive-type-coercion-from-never.stderr +++ b/tests/ui/sized/recursive-type-coercion-from-never.stderr @@ -1,17 +1,17 @@ error[E0391]: cycle detected when computing layout of `Foo<()>` - --> $DIR/recursive-type-coercion-from-never.rs:13:1 + --> $DIR/recursive-type-coercion-from-never.rs:14:1 | LL | struct Foo(T::Assoc); | ^^^^^^^^^^^^^^^^ | note: ...which requires computing layout of `<() as A>::Assoc`... - --> $DIR/recursive-type-coercion-from-never.rs:6:5 + --> $DIR/recursive-type-coercion-from-never.rs:7:5 | LL | type 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:16:1 + --> $DIR/recursive-type-coercion-from-never.rs:17: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..23db05851f41b 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_calls)] #[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..bc3b50a5066fa 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_calls)] 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..980126067cd4d 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_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.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..b2197f9bba8b8 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_calls)] 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 22f3a258e6986..9baac5934fd3c 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 bd33e3c2f47ee..8889564da8f2f 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 d484a0a1c4c28..77f1120e3b1b5 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,23 +1,23 @@ 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[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 e23751168c0dd..a17215403089a 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 `fn()`, 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 8713e288ad107..59cdc49681bd4 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 make sure 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 4b8384a6b6460..bab5a46e72a1c 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 make sure 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-candidate-behind-stalled-coroutine-1.rs b/tests/ui/traits/next-solver/non-wf-candidate-behind-stalled-coroutine-1.rs index e4368faa8fc11..b361b7346bcaf 100644 --- a/tests/ui/traits/next-solver/non-wf-candidate-behind-stalled-coroutine-1.rs +++ b/tests/ui/traits/next-solver/non-wf-candidate-behind-stalled-coroutine-1.rs @@ -3,6 +3,7 @@ //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ edition:2021 +#![allow(todo_macro_calls)] // Regression test for . // 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 5c1910546872e..90c77803829f7 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 4bf1233c4d987..afab862eb2da4 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 3b4c14a7cd8e3..2a7e9087fbcbf 100644 --- a/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.stderr +++ b/tests/ui/traits/next-solver/opaques/method_autoderef_constraints.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `u32: Trait` is not satisfied - --> $DIR/method_autoderef_constraints.rs:25:13 + --> $DIR/method_autoderef_constraints.rs:26:13 | 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 dbe8a656812a5..ae4ecb4486917 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 SyncView 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/normalize-conflicting-impls.rs b/tests/ui/traits/normalize/normalize-conflicting-impls.rs index 454b2fd015357..9675a76308e34 100644 --- a/tests/ui/traits/normalize/normalize-conflicting-impls.rs +++ b/tests/ui/traits/normalize/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/normalize-conflicting-impls.stderr b/tests/ui/traits/normalize/normalize-conflicting-impls.stderr index 9a66fe00c3fe4..57fef3a134ba7 100644 --- a/tests/ui/traits/normalize/normalize-conflicting-impls.stderr +++ b/tests/ui/traits/normalize/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..4026bd3d4f2c3 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_calls)] #![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 f062aa8f14d83..3ddf01007dd14 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 diff --git a/tests/ui/typeck/bad-index-due-to-nested.rs b/tests/ui/typeck/bad-index-due-to-nested.rs index 3110e9e03863f..f5294bf28c98d 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..0411f7031d41d 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_calls)] 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 From d9068c0259127c33e914e9bb500cd78208ac0363 Mon Sep 17 00:00:00 2001 From: Andre Bogus Date: Thu, 21 May 2026 09:43:21 +0200 Subject: [PATCH 2/3] fix the "run-make-cargo" test --- tests/run-make-cargo/rustc-crates-on-stable/rmake.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-make-cargo/rustc-crates-on-stable/rmake.rs b/tests/run-make-cargo/rustc-crates-on-stable/rmake.rs index de29abfd7c3a2..c787010733edd 100644 --- a/tests/run-make-cargo/rustc-crates-on-stable/rmake.rs +++ b/tests/run-make-cargo/rustc-crates-on-stable/rmake.rs @@ -10,7 +10,7 @@ fn main() { .env("RUSTC_STAGE", "0") .env("RUSTC", rustc_path()) // We want to disallow all nightly features to simulate a stable build - .env("RUSTFLAGS", "-D warnings -Zallow-features=") + .env("RUSTFLAGS", "-D warnings --check-cfg=cfg(bootstrap) -Zallow-features=") .arg("build") .arg("--manifest-path") .arg(source_root().join("Cargo.toml")) From 720c88b892ac5724912dd9b5394fcf78dc353f59 Mon Sep 17 00:00:00 2001 From: Andre Bogus Date: Thu, 21 May 2026 12:33:59 +0200 Subject: [PATCH 3/3] fix clippy tests --- .../arithmetic_side_effects_allowed.rs | 2 +- .../collapsible_if/collapsible_else_if.fixed | 2 +- .../collapsible_if/collapsible_else_if.rs | 2 +- .../result_large_err/result_large_err.rs | 2 +- .../conf_disallowed_types.rs | 1 + .../conf_disallowed_types.stderr | 42 ++--- .../undocumented_unsafe_blocks.rs | 2 +- .../unnecessary_box_returns.fixed | 1 + .../unnecessary_box_returns.rs | 1 + .../unnecessary_box_returns.stderr | 2 +- .../tests/ui/arithmetic_side_effects.rs | 2 +- .../ui/assertions_on_result_states.fixed | 2 +- .../tests/ui/assertions_on_result_states.rs | 2 +- .../clippy/tests/ui/assigning_clones.fixed | 2 +- src/tools/clippy/tests/ui/assigning_clones.rs | 2 +- .../tests/ui/auxiliary/proc_macro_derive.rs | 2 +- .../branches_sharing_code/shared_at_bottom.rs | 2 +- .../ui/branches_sharing_code/shared_at_top.rs | 2 +- .../shared_at_top_and_bottom.rs | 2 +- src/tools/clippy/tests/ui/cmp_null.fixed | 2 +- src/tools/clippy/tests/ui/cmp_null.rs | 2 +- .../tests/ui/cmp_owned/with_suggestion.fixed | 1 + .../tests/ui/cmp_owned/with_suggestion.rs | 1 + .../tests/ui/cmp_owned/with_suggestion.stderr | 22 +-- .../clippy/tests/ui/collapsible_else_if.fixed | 2 +- .../clippy/tests/ui/collapsible_else_if.rs | 2 +- .../clippy/tests/ui/collapsible_if.fixed | 2 +- src/tools/clippy/tests/ui/collapsible_if.rs | 2 +- .../clippy/tests/ui/collapsible_match.rs | 2 +- .../tests/ui/collapsible_match_fixable.fixed | 2 +- .../tests/ui/collapsible_match_fixable.rs | 2 +- .../clippy/tests/ui/crashes/ice-12585.rs | 2 +- .../clippy/tests/ui/crashes/ice-13862.rs | 1 + .../clippy/tests/ui/crashes/ice-9041.fixed | 2 +- src/tools/clippy/tests/ui/crashes/ice-9041.rs | 2 +- .../tests/ui/diverging_sub_expression.rs | 2 +- src/tools/clippy/tests/ui/endian_bytes.rs | 2 +- src/tools/clippy/tests/ui/entry.fixed | 2 +- src/tools/clippy/tests/ui/entry.rs | 2 +- src/tools/clippy/tests/ui/entry_unfixable.rs | 2 +- .../clippy/tests/ui/equatable_if_let.fixed | 2 +- src/tools/clippy/tests/ui/equatable_if_let.rs | 2 +- src/tools/clippy/tests/ui/error_impl_error.rs | 2 +- src/tools/clippy/tests/ui/eta.fixed | 2 +- src/tools/clippy/tests/ui/eta.rs | 2 +- .../clippy/tests/ui/explicit_auto_deref.fixed | 2 +- .../clippy/tests/ui/explicit_auto_deref.rs | 2 +- .../tests/ui/explicit_deref_methods.fixed | 2 +- .../clippy/tests/ui/explicit_deref_methods.rs | 2 +- .../clippy/tests/ui/filter_map_identity.fixed | 2 +- .../clippy/tests/ui/filter_map_identity.rs | 2 +- .../tests/ui/four_forward_slashes.fixed | 2 +- .../clippy/tests/ui/four_forward_slashes.rs | 2 +- .../ui/from_iter_instead_of_collect.fixed | 2 +- .../tests/ui/from_iter_instead_of_collect.rs | 2 +- src/tools/clippy/tests/ui/identity_op.fixed | 2 +- src/tools/clippy/tests/ui/identity_op.rs | 2 +- .../clippy/tests/ui/if_same_then_else.rs | 2 +- .../tests/ui/if_then_some_else_none.fixed | 2 +- .../clippy/tests/ui/if_then_some_else_none.rs | 2 +- .../ui/if_then_some_else_none_unfixable.rs | 2 +- .../tests/ui/ignored_unit_patterns.fixed | 2 +- .../clippy/tests/ui/ignored_unit_patterns.rs | 2 +- src/tools/clippy/tests/ui/impl.rs | 2 +- .../ui/impl_hash_with_borrow_str_and_bytes.rs | 1 + ...impl_hash_with_borrow_str_and_bytes.stderr | 6 +- src/tools/clippy/tests/ui/infinite_loops.rs | 2 +- .../clippy/tests/ui/into_iter_without_iter.rs | 1 + .../tests/ui/into_iter_without_iter.stderr | 12 +- src/tools/clippy/tests/ui/issue-7447.rs | 1 + src/tools/clippy/tests/ui/issue-7447.stderr | 4 +- .../tests/ui/iter_not_returning_iterator.rs | 1 + .../ui/iter_not_returning_iterator.stderr | 6 +- src/tools/clippy/tests/ui/iter_nth_zero.fixed | 1 + src/tools/clippy/tests/ui/iter_nth_zero.rs | 1 + .../clippy/tests/ui/iter_nth_zero.stderr | 6 +- .../tests/ui/iter_on_single_items.fixed | 2 +- .../clippy/tests/ui/iter_on_single_items.rs | 2 +- .../clippy/tests/ui/iter_without_into_iter.rs | 2 +- .../tests/ui/large_types_passed_by_value.rs | 1 + .../ui/large_types_passed_by_value.stderr | 16 +- .../clippy/tests/ui/len_without_is_empty.rs | 2 +- .../tests/ui/manual_assert.edition2018.fixed | 2 +- .../tests/ui/manual_assert.edition2021.fixed | 2 +- src/tools/clippy/tests/ui/manual_assert.rs | 2 +- src/tools/clippy/tests/ui/manual_find.rs | 2 +- .../tests/ui/manual_is_multiple_of.fixed | 1 + .../clippy/tests/ui/manual_is_multiple_of.rs | 1 + .../tests/ui/manual_is_multiple_of.stderr | 24 +-- src/tools/clippy/tests/ui/manual_let_else.rs | 2 +- .../ui/manual_let_else_question_mark.fixed | 2 +- .../tests/ui/manual_let_else_question_mark.rs | 2 +- src/tools/clippy/tests/ui/manual_ok_err.fixed | 1 + src/tools/clippy/tests/ui/manual_ok_err.rs | 1 + .../clippy/tests/ui/manual_ok_err.stderr | 26 +-- .../clippy/tests/ui/manual_repeat_n.fixed | 1 + src/tools/clippy/tests/ui/manual_repeat_n.rs | 1 + .../clippy/tests/ui/manual_repeat_n.stderr | 10 +- .../clippy/tests/ui/manual_slice_fill.fixed | 2 +- .../clippy/tests/ui/manual_slice_fill.rs | 2 +- src/tools/clippy/tests/ui/manual_try_fold.rs | 2 +- ...map_with_unused_argument_over_ranges.fixed | 2 +- .../map_with_unused_argument_over_ranges.rs | 2 +- .../tests/ui/match_like_matches_macro.fixed | 2 +- .../tests/ui/match_like_matches_macro.rs | 2 +- .../clippy/tests/ui/match_ref_pats.fixed | 2 +- src/tools/clippy/tests/ui/match_ref_pats.rs | 2 +- .../clippy/tests/ui/match_same_arms2.fixed | 2 +- src/tools/clippy/tests/ui/match_same_arms2.rs | 2 +- .../tests/ui/match_single_binding.fixed | 2 +- .../clippy/tests/ui/match_single_binding.rs | 2 +- .../missing_const_for_fn/could_be_const.fixed | 2 +- .../ui/missing_const_for_fn/could_be_const.rs | 2 +- .../ui/missing_const_for_thread_local.fixed | 1 + .../ui/missing_const_for_thread_local.rs | 1 + .../ui/missing_const_for_thread_local.stderr | 12 +- .../clippy/tests/ui/missing_panics_doc.rs | 2 +- .../clippy/tests/ui/missing_trait_methods.rs | 2 +- .../tests/ui/multiple_bound_locations.rs | 1 + .../tests/ui/multiple_bound_locations.stderr | 12 +- .../tests/ui/multiple_unsafe_ops_per_block.rs | 1 + .../ui/multiple_unsafe_ops_per_block.stderr | 154 +++++++++--------- .../clippy/tests/ui/must_use_candidates.fixed | 2 +- .../clippy/tests/ui/must_use_candidates.rs | 2 +- .../tests/ui/needless_bool/fixable.fixed | 2 +- .../clippy/tests/ui/needless_bool/fixable.rs | 2 +- .../tests/ui/needless_bool_assign.fixed | 2 +- .../clippy/tests/ui/needless_bool_assign.rs | 2 +- .../clippy/tests/ui/needless_collect.fixed | 2 +- src/tools/clippy/tests/ui/needless_collect.rs | 2 +- .../tests/ui/needless_collect_indirect.fixed | 2 +- .../tests/ui/needless_collect_indirect.rs | 2 +- .../clippy/tests/ui/needless_continue.rs | 2 +- .../tests/ui/needless_option_take.fixed | 1 + .../clippy/tests/ui/needless_option_take.rs | 1 + .../tests/ui/needless_option_take.stderr | 18 +- .../clippy/tests/ui/needless_return.fixed | 2 +- src/tools/clippy/tests/ui/needless_return.rs | 2 +- src/tools/clippy/tests/ui/never_loop.rs | 1 + src/tools/clippy/tests/ui/never_loop.stderr | 68 ++++---- .../clippy/tests/ui/new_without_default.fixed | 2 +- .../clippy/tests/ui/new_without_default.rs | 2 +- .../tests/ui/non_canonical_clone_impl.fixed | 2 +- .../tests/ui/non_canonical_clone_impl.rs | 2 +- .../ui/non_canonical_partial_ord_impl.fixed | 1 + .../ui/non_canonical_partial_ord_impl.rs | 1 + .../ui/non_canonical_partial_ord_impl.stderr | 10 +- ...n_canonical_partial_ord_impl_fully_qual.rs | 1 + ...nonical_partial_ord_impl_fully_qual.stderr | 4 +- src/tools/clippy/tests/ui/nonminimal_bool.rs | 2 +- .../clippy/tests/ui/option_if_let_else.fixed | 2 +- .../clippy/tests/ui/option_if_let_else.rs | 2 +- .../clippy/tests/ui/panic_in_result_fn.rs | 2 +- src/tools/clippy/tests/ui/panicking_macros.rs | 2 +- src/tools/clippy/tests/ui/ptr_arg.rs | 2 +- src/tools/clippy/tests/ui/question_mark.fixed | 2 +- src/tools/clippy/tests/ui/question_mark.rs | 2 +- .../clippy/tests/ui/redundant_guards.fixed | 2 +- src/tools/clippy/tests/ui/redundant_guards.rs | 2 +- src/tools/clippy/tests/ui/single_match.fixed | 2 +- src/tools/clippy/tests/ui/single_match.rs | 2 +- .../clippy/tests/ui/test_attr_in_doctest.rs | 6 +- .../tests/ui/test_attr_in_doctest.stderr | 4 +- .../trait_duplication_in_bounds_unfixable.rs | 2 +- src/tools/clippy/tests/ui/unused_async.rs | 2 +- src/tools/clippy/tests/ui/unused_io_amount.rs | 2 +- src/tools/clippy/tests/ui/unused_self.rs | 2 +- .../tests/ui/unused_unit.edition2021.fixed | 2 +- .../tests/ui/unused_unit.edition2024.fixed | 2 +- src/tools/clippy/tests/ui/unused_unit.rs | 2 +- src/tools/clippy/tests/ui/use_self.fixed | 2 +- src/tools/clippy/tests/ui/use_self.rs | 2 +- src/tools/clippy/tests/ui/vec_box_sized.rs | 2 +- .../clippy/tests/ui/wrong_self_convention2.rs | 2 +- .../tests/ui/zero_sized_btreemap_values.rs | 1 + .../ui/zero_sized_btreemap_values.stderr | 26 +-- .../tests/ui/zero_sized_hashmap_values.rs | 1 + .../tests/ui/zero_sized_hashmap_values.stderr | 28 ++-- src/tools/clippy/tests/ui/zombie_processes.rs | 2 +- 179 files changed, 416 insertions(+), 383 deletions(-) diff --git a/src/tools/clippy/tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs b/src/tools/clippy/tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs index 01a84a526c09c..36925ae11fc91 100644 --- a/src/tools/clippy/tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs +++ b/src/tools/clippy/tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs @@ -1,5 +1,5 @@ #![warn(clippy::arithmetic_side_effects)] -#![allow(clippy::unnecessary_literal_unwrap)] +#![allow(clippy::unnecessary_literal_unwrap, todo_macro_calls)] use core::ops::{Add, Neg}; diff --git a/src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.fixed b/src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.fixed index 213b56b786b18..b849d96114e7f 100644 --- a/src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.fixed +++ b/src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.fixed @@ -1,4 +1,4 @@ -#![allow(clippy::eq_op, clippy::nonminimal_bool)] +#![allow(clippy::eq_op, clippy::nonminimal_bool, todo_macro_calls)] #![warn(clippy::collapsible_else_if)] #[rustfmt::skip] diff --git a/src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.rs b/src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.rs index 2d4c2c54031eb..ad4f39d5be51d 100644 --- a/src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.rs +++ b/src/tools/clippy/tests/ui-toml/collapsible_if/collapsible_else_if.rs @@ -1,4 +1,4 @@ -#![allow(clippy::eq_op, clippy::nonminimal_bool)] +#![allow(clippy::eq_op, clippy::nonminimal_bool, todo_macro_calls)] #![warn(clippy::collapsible_else_if)] #[rustfmt::skip] diff --git a/src/tools/clippy/tests/ui-toml/result_large_err/result_large_err.rs b/src/tools/clippy/tests/ui-toml/result_large_err/result_large_err.rs index 170f37db7593e..d33e796cda85e 100644 --- a/src/tools/clippy/tests/ui-toml/result_large_err/result_large_err.rs +++ b/src/tools/clippy/tests/ui-toml/result_large_err/result_large_err.rs @@ -1,6 +1,6 @@ //@compile-flags: --crate-name result_large_err #![warn(clippy::result_large_err)] -#![allow(clippy::large_enum_variant)] +#![allow(clippy::large_enum_variant, todo_macro_calls)] fn f() -> Result<(), [u8; 511]> { todo!() diff --git a/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs b/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs index 82c9abe8beb42..ecf60149fb412 100644 --- a/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs +++ b/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::disallowed_types)] extern crate quote; diff --git a/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.stderr b/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.stderr index 061cdc7649ad2..a6d382b0efd4f 100644 --- a/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.stderr +++ b/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.stderr @@ -1,5 +1,5 @@ error: use of a disallowed type `std::sync::atomic::AtomicU32` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:7:1 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:8:1 | LL | use std::sync::atomic::AtomicU32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -8,61 +8,61 @@ LL | use std::sync::atomic::AtomicU32; = help: to override `-D warnings` add `#[allow(clippy::disallowed_types)]` error: use of a disallowed type `std::time::Instant` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:9:1 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:10:1 | LL | use std::time::Instant as Sneaky; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of a disallowed type `std::time::Instant` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:14:33 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:15:33 | LL | fn bad_return_type() -> fn() -> Sneaky { | ^^^^^^ error: use of a disallowed type `std::time::Instant` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:19:28 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:20:28 | LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {} | ^^^^^^ error: use of a disallowed type `std::sync::atomic::AtomicU32` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:19:39 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:20:39 | LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {} | ^^^^^^^^^^^^^^^^^^^^^^ error: use of a disallowed type `std::io::Read` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:23:22 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:24:22 | LL | fn trait_obj(_: &dyn std::io::Read) {} | ^^^^^^^^^^^^^ error: use of a disallowed type `usize` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:26:33 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:27:33 | LL | fn full_and_single_path_prim(_: usize, _: bool) {} | ^^^^^ error: use of a disallowed type `bool` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:26:43 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:27:43 | LL | fn full_and_single_path_prim(_: usize, _: bool) {} | ^^^^ error: use of a disallowed type `usize` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:30:28 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:31:28 | LL | fn const_generics() {} | ^^^^^ error: use of a disallowed type `usize` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:33:24 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:34:24 | LL | struct GenArg([u8; U]); | ^^^^^ error: use of a disallowed type `std::net::Ipv4Addr` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:38:10 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:39:10 | LL | fn ip(_: std::net::Ipv4Addr) {} | ^^^^^^^^^^^^^^^^^^ @@ -70,61 +70,61 @@ LL | fn ip(_: std::net::Ipv4Addr) {} = note: no IPv4 allowed error: use of a disallowed type `std::net::TcpListener` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:41:16 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:42:16 | LL | fn listener(_: std::net::TcpListener) {} | ^^^^^^^^^^^^^^^^^^^^^ error: use of a disallowed type `std::collections::HashMap` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:46:48 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:47:48 | LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of a disallowed type `std::collections::HashMap` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:46:12 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:47:12 | LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of a disallowed type `std::time::Instant` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:49:13 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:50:13 | LL | let _ = Sneaky::now(); | ^^^^^^ error: use of a disallowed type `std::sync::atomic::AtomicU32` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:51:13 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:52:13 | LL | let _ = foo::atomic::AtomicU32::new(0); | ^^^^^^^^^^^^^^^^^^^^^^ error: use of a disallowed type `std::sync::atomic::AtomicU32` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:53:17 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:54:17 | LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of a disallowed type `std::sync::atomic::AtomicU32` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:53:48 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:54:48 | LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1); | ^^^^^^^^^^^^^^^^^^^^^^ error: use of a disallowed type `syn::TypePath` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:56:43 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:57:43 | LL | let _: std::collections::BTreeMap<(), syn::TypePath> = Default::default(); | ^^^^^^^^^^^^^ error: use of a disallowed type `proc_macro2::Ident` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:58:13 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:59:13 | LL | let _ = syn::Ident::new("", todo!()); | ^^^^^^^^^^ error: use of a disallowed type `usize` - --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:61:12 + --> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:62:12 | LL | let _: usize = 64_usize; | ^^^^^ diff --git a/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs b/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs index 8032c388ccfe4..ebecf28046a5f 100644 --- a/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs +++ b/src/tools/clippy/tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs @@ -9,7 +9,7 @@ non_local_definitions, clippy::let_unit_value, clippy::missing_safety_doc -)] +, todo_macro_calls)] extern crate proc_macro_unsafe; diff --git a/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.fixed b/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.fixed index 413bc0bf1e378..e22e7846da82d 100644 --- a/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.fixed +++ b/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.fixed @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::unnecessary_box_returns)] fn f() -> [u8; 64] { diff --git a/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs b/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs index b44fbb5544856..bfa5f56639372 100644 --- a/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs +++ b/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::unnecessary_box_returns)] fn f() -> Box<[u8; 64]> { diff --git a/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.stderr b/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.stderr index f10b486464884..b2caa39859981 100644 --- a/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.stderr +++ b/src/tools/clippy/tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.stderr @@ -1,5 +1,5 @@ error: boxed return of the sized type `[u8; 64]` - --> tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs:3:11 + --> tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs:4:11 | LL | fn f() -> Box<[u8; 64]> { | ^^^^^^^^^^^^^ help: try: `[u8; 64]` diff --git a/src/tools/clippy/tests/ui/arithmetic_side_effects.rs b/src/tools/clippy/tests/ui/arithmetic_side_effects.rs index 87397a549bf41..7cfc5e60172a5 100644 --- a/src/tools/clippy/tests/ui/arithmetic_side_effects.rs +++ b/src/tools/clippy/tests/ui/arithmetic_side_effects.rs @@ -11,7 +11,7 @@ clippy::unnecessary_owned_empty_strings, arithmetic_overflow, unconditional_panic -)] +, todo_macro_calls)] #![warn(clippy::arithmetic_side_effects)] extern crate proc_macro_derive; diff --git a/src/tools/clippy/tests/ui/assertions_on_result_states.fixed b/src/tools/clippy/tests/ui/assertions_on_result_states.fixed index b2b7318c113f7..c2076453e3f9c 100644 --- a/src/tools/clippy/tests/ui/assertions_on_result_states.fixed +++ b/src/tools/clippy/tests/ui/assertions_on_result_states.fixed @@ -1,5 +1,5 @@ #![warn(clippy::assertions_on_result_states)] -#![allow(clippy::unnecessary_literal_unwrap)] +#![allow(clippy::unnecessary_literal_unwrap, todo_macro_calls)] use std::result::Result; diff --git a/src/tools/clippy/tests/ui/assertions_on_result_states.rs b/src/tools/clippy/tests/ui/assertions_on_result_states.rs index 33f1485326b38..082d43b5061ae 100644 --- a/src/tools/clippy/tests/ui/assertions_on_result_states.rs +++ b/src/tools/clippy/tests/ui/assertions_on_result_states.rs @@ -1,5 +1,5 @@ #![warn(clippy::assertions_on_result_states)] -#![allow(clippy::unnecessary_literal_unwrap)] +#![allow(clippy::unnecessary_literal_unwrap, todo_macro_calls)] use std::result::Result; diff --git a/src/tools/clippy/tests/ui/assigning_clones.fixed b/src/tools/clippy/tests/ui/assigning_clones.fixed index 9e44008e6fabc..4b20e51d11c53 100644 --- a/src/tools/clippy/tests/ui/assigning_clones.fixed +++ b/src/tools/clippy/tests/ui/assigning_clones.fixed @@ -1,4 +1,4 @@ -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow(clippy::redundant_clone)] #![allow(clippy::ptr_arg)] // https://github.com/rust-lang/rust-clippy/issues/10612 #![allow(clippy::needless_late_init)] diff --git a/src/tools/clippy/tests/ui/assigning_clones.rs b/src/tools/clippy/tests/ui/assigning_clones.rs index 8ae8abfed367a..bca9d56693f7d 100644 --- a/src/tools/clippy/tests/ui/assigning_clones.rs +++ b/src/tools/clippy/tests/ui/assigning_clones.rs @@ -1,4 +1,4 @@ -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow(clippy::redundant_clone)] #![allow(clippy::ptr_arg)] // https://github.com/rust-lang/rust-clippy/issues/10612 #![allow(clippy::needless_late_init)] diff --git a/src/tools/clippy/tests/ui/auxiliary/proc_macro_derive.rs b/src/tools/clippy/tests/ui/auxiliary/proc_macro_derive.rs index 629a500ff6f56..14fc97b02f673 100644 --- a/src/tools/clippy/tests/ui/auxiliary/proc_macro_derive.rs +++ b/src/tools/clippy/tests/ui/auxiliary/proc_macro_derive.rs @@ -1,5 +1,5 @@ #![feature(proc_macro_quote, proc_macro_span)] -#![allow(clippy::field_reassign_with_default)] +#![allow(clippy::field_reassign_with_default, todo_macro_calls)] #![allow(clippy::eq_op)] #![allow(clippy::literal_string_with_formatting_args)] diff --git a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.rs b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.rs index a7f950b44cafc..2af9099d030e5 100644 --- a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.rs +++ b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_bottom.rs @@ -4,7 +4,7 @@ clippy::uninlined_format_args, clippy::redundant_pattern_matching, dead_code -)] +, todo_macro_calls)] //@no-rustfix // This tests the branches_sharing_code lint at the end of blocks diff --git a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.rs b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.rs index dcd77679fc691..10249fe7a7544 100644 --- a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.rs +++ b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top.rs @@ -1,5 +1,5 @@ #![deny(clippy::branches_sharing_code, clippy::if_same_then_else)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] #![allow(clippy::mixed_read_write_in_expression, clippy::uninlined_format_args)] //@no-rustfix // This tests the branches_sharing_code lint at the start of blocks diff --git a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.rs b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.rs index 1646b5705b6dd..4a8e97ec005bf 100644 --- a/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.rs +++ b/src/tools/clippy/tests/ui/branches_sharing_code/shared_at_top_and_bottom.rs @@ -1,5 +1,5 @@ #![deny(clippy::branches_sharing_code, clippy::if_same_then_else)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] //@no-rustfix // branches_sharing_code at the top and bottom of the if blocks diff --git a/src/tools/clippy/tests/ui/cmp_null.fixed b/src/tools/clippy/tests/ui/cmp_null.fixed index 1b49549e9712c..1c388e4bd6943 100644 --- a/src/tools/clippy/tests/ui/cmp_null.fixed +++ b/src/tools/clippy/tests/ui/cmp_null.fixed @@ -1,5 +1,5 @@ #![warn(clippy::cmp_null)] -#![allow(clippy::manual_assert_eq)] +#![allow(clippy::manual_assert_eq, todo_macro_calls)] use std::ptr; diff --git a/src/tools/clippy/tests/ui/cmp_null.rs b/src/tools/clippy/tests/ui/cmp_null.rs index 35de3a14afc6f..09640f2e45dca 100644 --- a/src/tools/clippy/tests/ui/cmp_null.rs +++ b/src/tools/clippy/tests/ui/cmp_null.rs @@ -1,5 +1,5 @@ #![warn(clippy::cmp_null)] -#![allow(clippy::manual_assert_eq)] +#![allow(clippy::manual_assert_eq, todo_macro_calls)] use std::ptr; diff --git a/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.fixed b/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.fixed index 1a1f3ff1194be..4a2c4eda60196 100644 --- a/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.fixed +++ b/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.fixed @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #[warn(clippy::cmp_owned)] #[allow(clippy::unnecessary_operation, clippy::no_effect, unused_must_use, clippy::eq_op)] fn main() { diff --git a/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.rs b/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.rs index 185c568937875..bb4be593934a7 100644 --- a/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.rs +++ b/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #[warn(clippy::cmp_owned)] #[allow(clippy::unnecessary_operation, clippy::no_effect, unused_must_use, clippy::eq_op)] fn main() { diff --git a/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.stderr b/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.stderr index 7d9a12b1ddd33..a292f22b0f375 100644 --- a/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.stderr +++ b/src/tools/clippy/tests/ui/cmp_owned/with_suggestion.stderr @@ -1,5 +1,5 @@ error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:5:14 + --> tests/ui/cmp_owned/with_suggestion.rs:6:14 | LL | x != "foo".to_string(); | ^^^^^^^^^^^^^^^^^ help: try: `"foo"` @@ -8,55 +8,55 @@ LL | x != "foo".to_string(); = help: to override `-D warnings` add `#[allow(clippy::cmp_owned)]` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:8:9 + --> tests/ui/cmp_owned/with_suggestion.rs:9:9 | LL | "foo".to_string() != x; | ^^^^^^^^^^^^^^^^^ help: try: `"foo"` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:16:10 + --> tests/ui/cmp_owned/with_suggestion.rs:17:10 | LL | x != "foo".to_owned(); | ^^^^^^^^^^^^^^^^ help: try: `"foo"` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:19:10 + --> tests/ui/cmp_owned/with_suggestion.rs:20:10 | LL | x != String::from("foo"); | ^^^^^^^^^^^^^^^^^^^ help: try: `"foo"` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:24:5 + --> tests/ui/cmp_owned/with_suggestion.rs:25:5 | LL | Foo.to_owned() == Foo; | ^^^^^^^^^^^^^^ help: try: `Foo` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:27:30 + --> tests/ui/cmp_owned/with_suggestion.rs:28:30 | LL | "abc".chars().filter(|c| c.to_owned() != 'X'); | ^^^^^^^^^^^^ help: try: `*c` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:80:21 + --> tests/ui/cmp_owned/with_suggestion.rs:81:21 | LL | let _ = foo1 == "foo".to_owned(); | ^^^^^^^^^^^^^^^^ help: try: `"foo"` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:83:21 + --> tests/ui/cmp_owned/with_suggestion.rs:84:21 | LL | let _ = foo1 == foo2.to_owned(); | ^^^^^^^^^^^^^^^ help: try: `foo2` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:110:16 + --> tests/ui/cmp_owned/with_suggestion.rs:111:16 | LL | if item == t!(frohes_neu_Jahr).to_string() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t!(frohes_neu_Jahr)` error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:141:51 + --> tests/ui/cmp_owned/with_suggestion.rs:142:51 | LL | let res = <$ty>::default() == "$def".to_string(); | ^^^^^^^^^^^^^^^^^^ help: try: `"$def"` @@ -69,7 +69,7 @@ LL | | } = note: this error originates in the macro `all_comes_from_macro` (in Nightly builds, run with -Z macro-backtrace for more info) error: this creates an owned instance just for comparison - --> tests/ui/cmp_owned/with_suggestion.rs:156:16 + --> tests/ui/cmp_owned/with_suggestion.rs:157:16 | LL | if path != std::path::PathBuf::from(ROOT) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*ROOT` diff --git a/src/tools/clippy/tests/ui/collapsible_else_if.fixed b/src/tools/clippy/tests/ui/collapsible_else_if.fixed index cd2d9be9f4334..ad76b1d8a25dd 100644 --- a/src/tools/clippy/tests/ui/collapsible_else_if.fixed +++ b/src/tools/clippy/tests/ui/collapsible_else_if.fixed @@ -1,4 +1,4 @@ -#![allow(clippy::assertions_on_constants, clippy::equatable_if_let, clippy::needless_ifs)] +#![allow(clippy::assertions_on_constants, clippy::equatable_if_let, clippy::needless_ifs, todo_macro_calls)] #![warn(clippy::collapsible_else_if)] #[rustfmt::skip] diff --git a/src/tools/clippy/tests/ui/collapsible_else_if.rs b/src/tools/clippy/tests/ui/collapsible_else_if.rs index 75f2043285388..a92484733f1c0 100644 --- a/src/tools/clippy/tests/ui/collapsible_else_if.rs +++ b/src/tools/clippy/tests/ui/collapsible_else_if.rs @@ -1,4 +1,4 @@ -#![allow(clippy::assertions_on_constants, clippy::equatable_if_let, clippy::needless_ifs)] +#![allow(clippy::assertions_on_constants, clippy::equatable_if_let, clippy::needless_ifs, todo_macro_calls)] #![warn(clippy::collapsible_else_if)] #[rustfmt::skip] diff --git a/src/tools/clippy/tests/ui/collapsible_if.fixed b/src/tools/clippy/tests/ui/collapsible_if.fixed index 6e3fd0f78ddfd..bd22dc62e5e2a 100644 --- a/src/tools/clippy/tests/ui/collapsible_if.fixed +++ b/src/tools/clippy/tests/ui/collapsible_if.fixed @@ -5,7 +5,7 @@ clippy::nonminimal_bool, clippy::eq_op, clippy::redundant_pattern_matching -)] +, todo_macro_calls)] #[rustfmt::skip] #[warn(clippy::collapsible_if)] diff --git a/src/tools/clippy/tests/ui/collapsible_if.rs b/src/tools/clippy/tests/ui/collapsible_if.rs index 666252a526547..3d5b2865c4952 100644 --- a/src/tools/clippy/tests/ui/collapsible_if.rs +++ b/src/tools/clippy/tests/ui/collapsible_if.rs @@ -5,7 +5,7 @@ clippy::nonminimal_bool, clippy::eq_op, clippy::redundant_pattern_matching -)] +, todo_macro_calls)] #[rustfmt::skip] #[warn(clippy::collapsible_if)] diff --git a/src/tools/clippy/tests/ui/collapsible_match.rs b/src/tools/clippy/tests/ui/collapsible_match.rs index 51cb0168c735b..b6a6e62fa00e2 100644 --- a/src/tools/clippy/tests/ui/collapsible_match.rs +++ b/src/tools/clippy/tests/ui/collapsible_match.rs @@ -7,7 +7,7 @@ clippy::single_match, clippy::uninlined_format_args, clippy::let_unit_value -)] +, todo_macro_calls)] fn lint_cases(opt_opt: Option>, res_opt: Result, String>) { // match without block diff --git a/src/tools/clippy/tests/ui/collapsible_match_fixable.fixed b/src/tools/clippy/tests/ui/collapsible_match_fixable.fixed index 8e5934d3693a3..8edd7cff50539 100644 --- a/src/tools/clippy/tests/ui/collapsible_match_fixable.fixed +++ b/src/tools/clippy/tests/ui/collapsible_match_fixable.fixed @@ -1,5 +1,5 @@ #![warn(clippy::collapsible_match)] -#![allow(clippy::single_match, clippy::redundant_guards)] +#![allow(clippy::single_match, clippy::redundant_guards, todo_macro_calls)] fn issue16558() { let opt = Some(1); diff --git a/src/tools/clippy/tests/ui/collapsible_match_fixable.rs b/src/tools/clippy/tests/ui/collapsible_match_fixable.rs index e2ccae4559612..a29115c4b56a7 100644 --- a/src/tools/clippy/tests/ui/collapsible_match_fixable.rs +++ b/src/tools/clippy/tests/ui/collapsible_match_fixable.rs @@ -1,5 +1,5 @@ #![warn(clippy::collapsible_match)] -#![allow(clippy::single_match, clippy::redundant_guards)] +#![allow(clippy::single_match, clippy::redundant_guards, todo_macro_calls)] fn issue16558() { let opt = Some(1); diff --git a/src/tools/clippy/tests/ui/crashes/ice-12585.rs b/src/tools/clippy/tests/ui/crashes/ice-12585.rs index f35e95c6bc342..c04f465cb50fb 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-12585.rs +++ b/src/tools/clippy/tests/ui/crashes/ice-12585.rs @@ -1,6 +1,6 @@ //@ check-pass -#![allow(clippy::unit_arg)] +#![allow(clippy::unit_arg, todo_macro_calls)] struct One { x: i32, diff --git a/src/tools/clippy/tests/ui/crashes/ice-13862.rs b/src/tools/clippy/tests/ui/crashes/ice-13862.rs index 774774e6245b4..d316388005c9c 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-13862.rs +++ b/src/tools/clippy/tests/ui/crashes/ice-13862.rs @@ -1,4 +1,5 @@ //@ check-pass +#![allow(todo_macro_calls)] #![crate_type = "lib"] #![no_std] diff --git a/src/tools/clippy/tests/ui/crashes/ice-9041.fixed b/src/tools/clippy/tests/ui/crashes/ice-9041.fixed index 32399e4255d1d..fc6c35c42394d 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-9041.fixed +++ b/src/tools/clippy/tests/ui/crashes/ice-9041.fixed @@ -1,5 +1,5 @@ #![warn(clippy::search_is_some)] -#![allow(clippy::needless_borrow)] +#![allow(clippy::needless_borrow, todo_macro_calls)] pub struct Thing; diff --git a/src/tools/clippy/tests/ui/crashes/ice-9041.rs b/src/tools/clippy/tests/ui/crashes/ice-9041.rs index 55e88fa6da5af..e6a8c6d647e62 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-9041.rs +++ b/src/tools/clippy/tests/ui/crashes/ice-9041.rs @@ -1,5 +1,5 @@ #![warn(clippy::search_is_some)] -#![allow(clippy::needless_borrow)] +#![allow(clippy::needless_borrow, todo_macro_calls)] pub struct Thing; diff --git a/src/tools/clippy/tests/ui/diverging_sub_expression.rs b/src/tools/clippy/tests/ui/diverging_sub_expression.rs index b226ba69799e7..fba4cb20bc432 100644 --- a/src/tools/clippy/tests/ui/diverging_sub_expression.rs +++ b/src/tools/clippy/tests/ui/diverging_sub_expression.rs @@ -1,5 +1,5 @@ #![warn(clippy::diverging_sub_expression)] -#![allow(clippy::match_same_arms, clippy::overly_complex_bool_expr)] +#![allow(clippy::match_same_arms, clippy::overly_complex_bool_expr, todo_macro_calls)] #![allow(clippy::nonminimal_bool)] #[allow(clippy::empty_loop)] fn diverge() -> ! { diff --git a/src/tools/clippy/tests/ui/endian_bytes.rs b/src/tools/clippy/tests/ui/endian_bytes.rs index 879467c7f6e23..ebce587aa9d61 100644 --- a/src/tools/clippy/tests/ui/endian_bytes.rs +++ b/src/tools/clippy/tests/ui/endian_bytes.rs @@ -1,4 +1,4 @@ -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow(clippy::diverging_sub_expression)] #![no_main] diff --git a/src/tools/clippy/tests/ui/entry.fixed b/src/tools/clippy/tests/ui/entry.fixed index 75e173b9a84d9..29bd7c4b1c258 100644 --- a/src/tools/clippy/tests/ui/entry.fixed +++ b/src/tools/clippy/tests/ui/entry.fixed @@ -1,6 +1,6 @@ //@needs-asm-support -#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)] +#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if, todo_macro_calls)] #![warn(clippy::map_entry)] use std::arch::asm; diff --git a/src/tools/clippy/tests/ui/entry.rs b/src/tools/clippy/tests/ui/entry.rs index 7e3308c87356f..c120846f146e8 100644 --- a/src/tools/clippy/tests/ui/entry.rs +++ b/src/tools/clippy/tests/ui/entry.rs @@ -1,6 +1,6 @@ //@needs-asm-support -#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)] +#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if, todo_macro_calls)] #![warn(clippy::map_entry)] use std::arch::asm; diff --git a/src/tools/clippy/tests/ui/entry_unfixable.rs b/src/tools/clippy/tests/ui/entry_unfixable.rs index c4c055572086e..1a9d16b399bd2 100644 --- a/src/tools/clippy/tests/ui/entry_unfixable.rs +++ b/src/tools/clippy/tests/ui/entry_unfixable.rs @@ -1,4 +1,4 @@ -#![allow(clippy::needless_pass_by_value, clippy::collapsible_if)] +#![allow(clippy::needless_pass_by_value, clippy::collapsible_if, todo_macro_calls)] #![warn(clippy::map_entry)] use std::collections::HashMap; diff --git a/src/tools/clippy/tests/ui/equatable_if_let.fixed b/src/tools/clippy/tests/ui/equatable_if_let.fixed index 2cf69cf7b2fdf..d1c8dc2c9bbfc 100644 --- a/src/tools/clippy/tests/ui/equatable_if_let.fixed +++ b/src/tools/clippy/tests/ui/equatable_if_let.fixed @@ -1,5 +1,5 @@ //@aux-build:proc_macros.rs -#![allow(clippy::derive_partial_eq_without_eq, clippy::needless_ifs)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::needless_ifs, todo_macro_calls)] #![warn(clippy::equatable_if_let)] use proc_macros::{external, inline_macros}; diff --git a/src/tools/clippy/tests/ui/equatable_if_let.rs b/src/tools/clippy/tests/ui/equatable_if_let.rs index 94302b3dfa652..5f429d60cb19f 100644 --- a/src/tools/clippy/tests/ui/equatable_if_let.rs +++ b/src/tools/clippy/tests/ui/equatable_if_let.rs @@ -1,5 +1,5 @@ //@aux-build:proc_macros.rs -#![allow(clippy::derive_partial_eq_without_eq, clippy::needless_ifs)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::needless_ifs, todo_macro_calls)] #![warn(clippy::equatable_if_let)] use proc_macros::{external, inline_macros}; diff --git a/src/tools/clippy/tests/ui/error_impl_error.rs b/src/tools/clippy/tests/ui/error_impl_error.rs index 5c88888f38eac..39981456386fa 100644 --- a/src/tools/clippy/tests/ui/error_impl_error.rs +++ b/src/tools/clippy/tests/ui/error_impl_error.rs @@ -1,4 +1,4 @@ -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![warn(clippy::error_impl_error)] #![no_main] diff --git a/src/tools/clippy/tests/ui/eta.fixed b/src/tools/clippy/tests/ui/eta.fixed index 36300aa56eb32..9c036081049ac 100644 --- a/src/tools/clippy/tests/ui/eta.fixed +++ b/src/tools/clippy/tests/ui/eta.fixed @@ -2,7 +2,7 @@ //@require-annotations-for-level: ERROR #![warn(clippy::redundant_closure, clippy::redundant_closure_for_method_calls)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow( clippy::needless_borrow, clippy::needless_option_as_deref, diff --git a/src/tools/clippy/tests/ui/eta.rs b/src/tools/clippy/tests/ui/eta.rs index 63b441851ec1b..eab36802c2ca2 100644 --- a/src/tools/clippy/tests/ui/eta.rs +++ b/src/tools/clippy/tests/ui/eta.rs @@ -2,7 +2,7 @@ //@require-annotations-for-level: ERROR #![warn(clippy::redundant_closure, clippy::redundant_closure_for_method_calls)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow( clippy::needless_borrow, clippy::needless_option_as_deref, diff --git a/src/tools/clippy/tests/ui/explicit_auto_deref.fixed b/src/tools/clippy/tests/ui/explicit_auto_deref.fixed index ec6bed152e797..bd341b7119cdb 100644 --- a/src/tools/clippy/tests/ui/explicit_auto_deref.fixed +++ b/src/tools/clippy/tests/ui/explicit_auto_deref.fixed @@ -12,7 +12,7 @@ clippy::borrow_deref_ref, clippy::let_unit_value, clippy::needless_lifetimes -)] +, todo_macro_calls)] trait CallableStr { type T: Fn(&str); diff --git a/src/tools/clippy/tests/ui/explicit_auto_deref.rs b/src/tools/clippy/tests/ui/explicit_auto_deref.rs index ca58c650d9ce9..60867091ae8f3 100644 --- a/src/tools/clippy/tests/ui/explicit_auto_deref.rs +++ b/src/tools/clippy/tests/ui/explicit_auto_deref.rs @@ -12,7 +12,7 @@ clippy::borrow_deref_ref, clippy::let_unit_value, clippy::needless_lifetimes -)] +, todo_macro_calls)] trait CallableStr { type T: Fn(&str); diff --git a/src/tools/clippy/tests/ui/explicit_deref_methods.fixed b/src/tools/clippy/tests/ui/explicit_deref_methods.fixed index 35149755a34be..7fc67f992cedc 100644 --- a/src/tools/clippy/tests/ui/explicit_deref_methods.fixed +++ b/src/tools/clippy/tests/ui/explicit_deref_methods.fixed @@ -1,6 +1,6 @@ //@aux-build:proc_macros.rs #![warn(clippy::explicit_deref_methods)] -#![allow(unused_variables, unused_must_use)] +#![allow(unused_variables, unused_must_use, todo_macro_calls)] #![allow( clippy::borrow_deref_ref, clippy::deref_addrof, diff --git a/src/tools/clippy/tests/ui/explicit_deref_methods.rs b/src/tools/clippy/tests/ui/explicit_deref_methods.rs index 215c5450597f0..6b0b80f177245 100644 --- a/src/tools/clippy/tests/ui/explicit_deref_methods.rs +++ b/src/tools/clippy/tests/ui/explicit_deref_methods.rs @@ -1,6 +1,6 @@ //@aux-build:proc_macros.rs #![warn(clippy::explicit_deref_methods)] -#![allow(unused_variables, unused_must_use)] +#![allow(unused_variables, unused_must_use, todo_macro_calls)] #![allow( clippy::borrow_deref_ref, clippy::deref_addrof, diff --git a/src/tools/clippy/tests/ui/filter_map_identity.fixed b/src/tools/clippy/tests/ui/filter_map_identity.fixed index c9e2c5f5049f3..87393df989f7e 100644 --- a/src/tools/clippy/tests/ui/filter_map_identity.fixed +++ b/src/tools/clippy/tests/ui/filter_map_identity.fixed @@ -1,4 +1,4 @@ -#![allow(unused_imports, clippy::needless_return, clippy::useless_vec)] +#![allow(unused_imports, clippy::needless_return, clippy::useless_vec, todo_macro_calls)] #![warn(clippy::filter_map_identity)] #![feature(stmt_expr_attributes)] diff --git a/src/tools/clippy/tests/ui/filter_map_identity.rs b/src/tools/clippy/tests/ui/filter_map_identity.rs index 4c8d48f5221f1..437d30355c292 100644 --- a/src/tools/clippy/tests/ui/filter_map_identity.rs +++ b/src/tools/clippy/tests/ui/filter_map_identity.rs @@ -1,4 +1,4 @@ -#![allow(unused_imports, clippy::needless_return, clippy::useless_vec)] +#![allow(unused_imports, clippy::needless_return, clippy::useless_vec, todo_macro_calls)] #![warn(clippy::filter_map_identity)] #![feature(stmt_expr_attributes)] diff --git a/src/tools/clippy/tests/ui/four_forward_slashes.fixed b/src/tools/clippy/tests/ui/four_forward_slashes.fixed index 6f387b67ccbf4..9a752e23538e9 100644 --- a/src/tools/clippy/tests/ui/four_forward_slashes.fixed +++ b/src/tools/clippy/tests/ui/four_forward_slashes.fixed @@ -1,6 +1,6 @@ //@aux-build:proc_macros.rs #![feature(custom_inner_attributes)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![warn(clippy::four_forward_slashes)] #![no_main] #![rustfmt::skip] diff --git a/src/tools/clippy/tests/ui/four_forward_slashes.rs b/src/tools/clippy/tests/ui/four_forward_slashes.rs index fae07e7d6094b..1b5aa8af63e1f 100644 --- a/src/tools/clippy/tests/ui/four_forward_slashes.rs +++ b/src/tools/clippy/tests/ui/four_forward_slashes.rs @@ -1,6 +1,6 @@ //@aux-build:proc_macros.rs #![feature(custom_inner_attributes)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![warn(clippy::four_forward_slashes)] #![no_main] #![rustfmt::skip] diff --git a/src/tools/clippy/tests/ui/from_iter_instead_of_collect.fixed b/src/tools/clippy/tests/ui/from_iter_instead_of_collect.fixed index be98b22779584..aff50aec7115f 100644 --- a/src/tools/clippy/tests/ui/from_iter_instead_of_collect.fixed +++ b/src/tools/clippy/tests/ui/from_iter_instead_of_collect.fixed @@ -1,5 +1,5 @@ #![warn(clippy::from_iter_instead_of_collect)] -#![allow(unused_imports)] +#![allow(unused_imports, todo_macro_calls)] #![allow(clippy::useless_vec, clippy::manual_repeat_n)] use std::collections::{BTreeMap, BTreeSet, HashMap, VecDeque}; diff --git a/src/tools/clippy/tests/ui/from_iter_instead_of_collect.rs b/src/tools/clippy/tests/ui/from_iter_instead_of_collect.rs index ce20fef2ac337..0b9d7dc1c7d40 100644 --- a/src/tools/clippy/tests/ui/from_iter_instead_of_collect.rs +++ b/src/tools/clippy/tests/ui/from_iter_instead_of_collect.rs @@ -1,5 +1,5 @@ #![warn(clippy::from_iter_instead_of_collect)] -#![allow(unused_imports)] +#![allow(unused_imports, todo_macro_calls)] #![allow(clippy::useless_vec, clippy::manual_repeat_n)] use std::collections::{BTreeMap, BTreeSet, HashMap, VecDeque}; diff --git a/src/tools/clippy/tests/ui/identity_op.fixed b/src/tools/clippy/tests/ui/identity_op.fixed index 4e14e1a5e33f0..feb2bf516bc76 100644 --- a/src/tools/clippy/tests/ui/identity_op.fixed +++ b/src/tools/clippy/tests/ui/identity_op.fixed @@ -1,5 +1,5 @@ #![warn(clippy::identity_op)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow( clippy::eq_op, clippy::no_effect, diff --git a/src/tools/clippy/tests/ui/identity_op.rs b/src/tools/clippy/tests/ui/identity_op.rs index ebbef5723ffb2..8aade34bb717d 100644 --- a/src/tools/clippy/tests/ui/identity_op.rs +++ b/src/tools/clippy/tests/ui/identity_op.rs @@ -1,5 +1,5 @@ #![warn(clippy::identity_op)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow( clippy::eq_op, clippy::no_effect, diff --git a/src/tools/clippy/tests/ui/if_same_then_else.rs b/src/tools/clippy/tests/ui/if_same_then_else.rs index 6982a9d143e4c..a2c44ae854c7c 100644 --- a/src/tools/clippy/tests/ui/if_same_then_else.rs +++ b/src/tools/clippy/tests/ui/if_same_then_else.rs @@ -9,7 +9,7 @@ clippy::branches_sharing_code, dead_code, unreachable_code -)] +, todo_macro_calls)] use std::ops::*; diff --git a/src/tools/clippy/tests/ui/if_then_some_else_none.fixed b/src/tools/clippy/tests/ui/if_then_some_else_none.fixed index 6bf636bb2b0bc..d000067feb153 100644 --- a/src/tools/clippy/tests/ui/if_then_some_else_none.fixed +++ b/src/tools/clippy/tests/ui/if_then_some_else_none.fixed @@ -3,7 +3,7 @@ clippy::redundant_pattern_matching, clippy::unnecessary_lazy_evaluations, clippy::manual_filter -)] +, todo_macro_calls)] fn main() { // Should issue an error. diff --git a/src/tools/clippy/tests/ui/if_then_some_else_none.rs b/src/tools/clippy/tests/ui/if_then_some_else_none.rs index 2cb14ea4d1bcd..3bcf885e83af8 100644 --- a/src/tools/clippy/tests/ui/if_then_some_else_none.rs +++ b/src/tools/clippy/tests/ui/if_then_some_else_none.rs @@ -3,7 +3,7 @@ clippy::redundant_pattern_matching, clippy::unnecessary_lazy_evaluations, clippy::manual_filter -)] +, todo_macro_calls)] fn main() { // Should issue an error. diff --git a/src/tools/clippy/tests/ui/if_then_some_else_none_unfixable.rs b/src/tools/clippy/tests/ui/if_then_some_else_none_unfixable.rs index be04299a6ab15..c3ddb316e3564 100644 --- a/src/tools/clippy/tests/ui/if_then_some_else_none_unfixable.rs +++ b/src/tools/clippy/tests/ui/if_then_some_else_none_unfixable.rs @@ -1,5 +1,5 @@ #![warn(clippy::if_then_some_else_none)] -#![allow(clippy::manual_is_multiple_of)] +#![allow(clippy::manual_is_multiple_of, todo_macro_calls)] mod issue15257 { use std::pin::Pin; diff --git a/src/tools/clippy/tests/ui/ignored_unit_patterns.fixed b/src/tools/clippy/tests/ui/ignored_unit_patterns.fixed index 118f0b4889529..cd964b52071d0 100644 --- a/src/tools/clippy/tests/ui/ignored_unit_patterns.fixed +++ b/src/tools/clippy/tests/ui/ignored_unit_patterns.fixed @@ -5,7 +5,7 @@ clippy::redundant_pattern_matching, clippy::single_match, clippy::needless_borrow -)] +, todo_macro_calls)] fn foo() -> Result<(), ()> { unimplemented!() diff --git a/src/tools/clippy/tests/ui/ignored_unit_patterns.rs b/src/tools/clippy/tests/ui/ignored_unit_patterns.rs index 92feb9e6c2814..6342416a8bde3 100644 --- a/src/tools/clippy/tests/ui/ignored_unit_patterns.rs +++ b/src/tools/clippy/tests/ui/ignored_unit_patterns.rs @@ -5,7 +5,7 @@ clippy::redundant_pattern_matching, clippy::single_match, clippy::needless_borrow -)] +, todo_macro_calls)] fn foo() -> Result<(), ()> { unimplemented!() diff --git a/src/tools/clippy/tests/ui/impl.rs b/src/tools/clippy/tests/ui/impl.rs index 75761a34c86ee..04989ca7781c1 100644 --- a/src/tools/clippy/tests/ui/impl.rs +++ b/src/tools/clippy/tests/ui/impl.rs @@ -1,4 +1,4 @@ -#![allow(dead_code, clippy::extra_unused_lifetimes)] +#![allow(dead_code, clippy::extra_unused_lifetimes, todo_macro_calls)] #![warn(clippy::multiple_inherent_impl)] struct MyStruct; diff --git a/src/tools/clippy/tests/ui/impl_hash_with_borrow_str_and_bytes.rs b/src/tools/clippy/tests/ui/impl_hash_with_borrow_str_and_bytes.rs index f6ce6153e01d1..ba20f3e9e3e3b 100644 --- a/src/tools/clippy/tests/ui/impl_hash_with_borrow_str_and_bytes.rs +++ b/src/tools/clippy/tests/ui/impl_hash_with_borrow_str_and_bytes.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::impl_hash_borrow_with_str_and_bytes)] use std::borrow::Borrow; diff --git a/src/tools/clippy/tests/ui/impl_hash_with_borrow_str_and_bytes.stderr b/src/tools/clippy/tests/ui/impl_hash_with_borrow_str_and_bytes.stderr index c327ce3f7ca12..6badec6280447 100644 --- a/src/tools/clippy/tests/ui/impl_hash_with_borrow_str_and_bytes.stderr +++ b/src/tools/clippy/tests/ui/impl_hash_with_borrow_str_and_bytes.stderr @@ -1,5 +1,5 @@ error: the semantics of `Borrow` around `Hash` can't be satisfied when both `Borrow` and `Borrow<[u8]>` are implemented - --> tests/ui/impl_hash_with_borrow_str_and_bytes.rs:10:6 + --> tests/ui/impl_hash_with_borrow_str_and_bytes.rs:11:6 | LL | impl Hash for ExampleType { | ^^^^ @@ -13,7 +13,7 @@ LL | impl Hash for ExampleType { = help: to override `-D warnings` add `#[allow(clippy::impl_hash_borrow_with_str_and_bytes)]` error: the semantics of `Borrow` around `Hash` can't be satisfied when both `Borrow` and `Borrow<[u8]>` are implemented - --> tests/ui/impl_hash_with_borrow_str_and_bytes.rs:73:10 + --> tests/ui/impl_hash_with_borrow_str_and_bytes.rs:74:10 | LL | #[derive(Hash)] | ^^^^ @@ -25,7 +25,7 @@ LL | #[derive(Hash)] = help: ... or not implementing `Hash` for this type error: the semantics of `Borrow` around `Hash` can't be satisfied when both `Borrow` and `Borrow<[u8]>` are implemented - --> tests/ui/impl_hash_with_borrow_str_and_bytes.rs:117:6 + --> tests/ui/impl_hash_with_borrow_str_and_bytes.rs:118:6 | LL | impl Hash for GenericExampleType2 { | ^^^^ diff --git a/src/tools/clippy/tests/ui/infinite_loops.rs b/src/tools/clippy/tests/ui/infinite_loops.rs index c0f0087b374c5..debea570f3a58 100644 --- a/src/tools/clippy/tests/ui/infinite_loops.rs +++ b/src/tools/clippy/tests/ui/infinite_loops.rs @@ -1,7 +1,7 @@ //@no-rustfix: multiple suggestions add `-> !` to the same fn //@aux-build:proc_macros.rs -#![allow(clippy::never_loop, clippy::while_let_loop)] +#![allow(clippy::never_loop, clippy::while_let_loop, todo_macro_calls)] #![warn(clippy::infinite_loop)] extern crate proc_macros; diff --git a/src/tools/clippy/tests/ui/into_iter_without_iter.rs b/src/tools/clippy/tests/ui/into_iter_without_iter.rs index f0b86e5620e9b..b142873bb4e12 100644 --- a/src/tools/clippy/tests/ui/into_iter_without_iter.rs +++ b/src/tools/clippy/tests/ui/into_iter_without_iter.rs @@ -1,5 +1,6 @@ //@no-rustfix: suggestions reference out of scope lifetimes/types //@aux-build:proc_macros.rs +#![allow(todo_macro_calls)] #![warn(clippy::into_iter_without_iter)] extern crate proc_macros; diff --git a/src/tools/clippy/tests/ui/into_iter_without_iter.stderr b/src/tools/clippy/tests/ui/into_iter_without_iter.stderr index a033ff645f49a..63c9e1d469232 100644 --- a/src/tools/clippy/tests/ui/into_iter_without_iter.stderr +++ b/src/tools/clippy/tests/ui/into_iter_without_iter.stderr @@ -1,5 +1,5 @@ error: `IntoIterator` implemented for a reference type without an `iter` method - --> tests/ui/into_iter_without_iter.rs:9:1 + --> tests/ui/into_iter_without_iter.rs:10:1 | LL | / impl<'a> IntoIterator for &'a S1 { LL | | @@ -22,7 +22,7 @@ LL + } | error: `IntoIterator` implemented for a reference type without an `iter_mut` method - --> tests/ui/into_iter_without_iter.rs:17:1 + --> tests/ui/into_iter_without_iter.rs:18:1 | LL | / impl<'a> IntoIterator for &'a mut S1 { LL | | @@ -43,7 +43,7 @@ LL + } | error: `IntoIterator` implemented for a reference type without an `iter` method - --> tests/ui/into_iter_without_iter.rs:27:1 + --> tests/ui/into_iter_without_iter.rs:28:1 | LL | / impl<'a, T> IntoIterator for &'a S2 { LL | | @@ -64,7 +64,7 @@ LL + } | error: `IntoIterator` implemented for a reference type without an `iter_mut` method - --> tests/ui/into_iter_without_iter.rs:35:1 + --> tests/ui/into_iter_without_iter.rs:36:1 | LL | / impl<'a, T> IntoIterator for &'a mut S2 { LL | | @@ -85,7 +85,7 @@ LL + } | error: `IntoIterator` implemented for a reference type without an `iter_mut` method - --> tests/ui/into_iter_without_iter.rs:86:1 + --> tests/ui/into_iter_without_iter.rs:87:1 | LL | / impl<'a, T> IntoIterator for &mut S4<'a, T> { LL | | @@ -106,7 +106,7 @@ LL + } | error: `IntoIterator` implemented for a reference type without an `iter` method - --> tests/ui/into_iter_without_iter.rs:120:9 + --> tests/ui/into_iter_without_iter.rs:121:9 | LL | / impl<'a> IntoIterator for &'a Issue12037 { LL | | diff --git a/src/tools/clippy/tests/ui/issue-7447.rs b/src/tools/clippy/tests/ui/issue-7447.rs index 452011de1195e..61d8f4cac48c8 100644 --- a/src/tools/clippy/tests/ui/issue-7447.rs +++ b/src/tools/clippy/tests/ui/issue-7447.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] use std::borrow::Cow; use std::collections::BTreeMap; use std::marker::PhantomData; diff --git a/src/tools/clippy/tests/ui/issue-7447.stderr b/src/tools/clippy/tests/ui/issue-7447.stderr index 09a75c6b8d299..fc00830c9aece 100644 --- a/src/tools/clippy/tests/ui/issue-7447.stderr +++ b/src/tools/clippy/tests/ui/issue-7447.stderr @@ -1,5 +1,5 @@ error: sub-expression diverges - --> tests/ui/issue-7447.rs:26:15 + --> tests/ui/issue-7447.rs:27:15 | LL | byte_view(panic!()); | ^^^^^^^^ @@ -8,7 +8,7 @@ LL | byte_view(panic!()); = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]` error: sub-expression diverges - --> tests/ui/issue-7447.rs:29:19 + --> tests/ui/issue-7447.rs:30:19 | LL | group_entries(panic!()); | ^^^^^^^^ diff --git a/src/tools/clippy/tests/ui/iter_not_returning_iterator.rs b/src/tools/clippy/tests/ui/iter_not_returning_iterator.rs index d2497ed4330c2..36fbad0e1cecf 100644 --- a/src/tools/clippy/tests/ui/iter_not_returning_iterator.rs +++ b/src/tools/clippy/tests/ui/iter_not_returning_iterator.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::iter_not_returning_iterator)] struct Data { diff --git a/src/tools/clippy/tests/ui/iter_not_returning_iterator.stderr b/src/tools/clippy/tests/ui/iter_not_returning_iterator.stderr index 74ee8325d53e1..04aae9cb4fb89 100644 --- a/src/tools/clippy/tests/ui/iter_not_returning_iterator.stderr +++ b/src/tools/clippy/tests/ui/iter_not_returning_iterator.stderr @@ -1,5 +1,5 @@ error: this method is named `iter` but its return type does not implement `Iterator` - --> tests/ui/iter_not_returning_iterator.rs:30:5 + --> tests/ui/iter_not_returning_iterator.rs:31:5 | LL | fn iter(&self) -> Counter2 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -8,13 +8,13 @@ LL | fn iter(&self) -> Counter2 { = help: to override `-D warnings` add `#[allow(clippy::iter_not_returning_iterator)]` error: this method is named `iter_mut` but its return type does not implement `Iterator` - --> tests/ui/iter_not_returning_iterator.rs:36:5 + --> tests/ui/iter_not_returning_iterator.rs:37:5 | LL | fn iter_mut(&self) -> Counter2 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: this method is named `iter` but its return type does not implement `Iterator` - --> tests/ui/iter_not_returning_iterator.rs:54:5 + --> tests/ui/iter_not_returning_iterator.rs:55:5 | LL | fn iter(&self) -> Self::I; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/tools/clippy/tests/ui/iter_nth_zero.fixed b/src/tools/clippy/tests/ui/iter_nth_zero.fixed index 07153db90c196..eb5f3caaec97c 100644 --- a/src/tools/clippy/tests/ui/iter_nth_zero.fixed +++ b/src/tools/clippy/tests/ui/iter_nth_zero.fixed @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::iter_nth_zero)] use std::collections::HashSet; diff --git a/src/tools/clippy/tests/ui/iter_nth_zero.rs b/src/tools/clippy/tests/ui/iter_nth_zero.rs index 45d008cd70408..a1d18f6f5fd5d 100644 --- a/src/tools/clippy/tests/ui/iter_nth_zero.rs +++ b/src/tools/clippy/tests/ui/iter_nth_zero.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::iter_nth_zero)] use std::collections::HashSet; diff --git a/src/tools/clippy/tests/ui/iter_nth_zero.stderr b/src/tools/clippy/tests/ui/iter_nth_zero.stderr index edd44838b7ec5..ea9659d465320 100644 --- a/src/tools/clippy/tests/ui/iter_nth_zero.stderr +++ b/src/tools/clippy/tests/ui/iter_nth_zero.stderr @@ -1,5 +1,5 @@ error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent - --> tests/ui/iter_nth_zero.rs:18:14 + --> tests/ui/iter_nth_zero.rs:19:14 | LL | let _x = s.iter().nth(0); | ^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `s.iter().next()` @@ -8,13 +8,13 @@ LL | let _x = s.iter().nth(0); = help: to override `-D warnings` add `#[allow(clippy::iter_nth_zero)]` error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent - --> tests/ui/iter_nth_zero.rs:24:14 + --> tests/ui/iter_nth_zero.rs:25:14 | LL | let _y = iter.nth(0); | ^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `iter.next()` error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent - --> tests/ui/iter_nth_zero.rs:30:22 + --> tests/ui/iter_nth_zero.rs:31:22 | LL | let _unwrapped = iter2.nth(0).unwrap(); | ^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `iter2.next()` diff --git a/src/tools/clippy/tests/ui/iter_on_single_items.fixed b/src/tools/clippy/tests/ui/iter_on_single_items.fixed index c5f85122aa76c..7d63c8382cd1a 100644 --- a/src/tools/clippy/tests/ui/iter_on_single_items.fixed +++ b/src/tools/clippy/tests/ui/iter_on_single_items.fixed @@ -1,5 +1,5 @@ #![warn(clippy::iter_on_single_items)] -#![allow(clippy::iter_next_slice, clippy::redundant_clone)] +#![allow(clippy::iter_next_slice, clippy::redundant_clone, todo_macro_calls)] fn array() { assert_eq!(std::iter::once(123).next(), Some(123)); diff --git a/src/tools/clippy/tests/ui/iter_on_single_items.rs b/src/tools/clippy/tests/ui/iter_on_single_items.rs index ffeb76d627b0b..afb4e09652bcc 100644 --- a/src/tools/clippy/tests/ui/iter_on_single_items.rs +++ b/src/tools/clippy/tests/ui/iter_on_single_items.rs @@ -1,5 +1,5 @@ #![warn(clippy::iter_on_single_items)] -#![allow(clippy::iter_next_slice, clippy::redundant_clone)] +#![allow(clippy::iter_next_slice, clippy::redundant_clone, todo_macro_calls)] fn array() { assert_eq!([123].into_iter().next(), Some(123)); diff --git a/src/tools/clippy/tests/ui/iter_without_into_iter.rs b/src/tools/clippy/tests/ui/iter_without_into_iter.rs index dc3149be2cb4b..73628cc06bd16 100644 --- a/src/tools/clippy/tests/ui/iter_without_into_iter.rs +++ b/src/tools/clippy/tests/ui/iter_without_into_iter.rs @@ -1,7 +1,7 @@ //@no-rustfix //@aux-build:proc_macros.rs #![warn(clippy::iter_without_into_iter)] -#![allow(clippy::needless_lifetimes)] +#![allow(clippy::needless_lifetimes, todo_macro_calls)] extern crate proc_macros; pub struct S1; diff --git a/src/tools/clippy/tests/ui/large_types_passed_by_value.rs b/src/tools/clippy/tests/ui/large_types_passed_by_value.rs index 562a46306e065..3a1f04b8141b0 100644 --- a/src/tools/clippy/tests/ui/large_types_passed_by_value.rs +++ b/src/tools/clippy/tests/ui/large_types_passed_by_value.rs @@ -1,6 +1,7 @@ //@normalize-stderr-test: "\(\d+ byte\)" -> "(N byte)" //@normalize-stderr-test: "\(limit: \d+ byte\)" -> "(limit: N byte)" //@no-rustfix +#![allow(todo_macro_calls)] #![warn(clippy::large_types_passed_by_value)] pub struct Large([u8; 2048]); diff --git a/src/tools/clippy/tests/ui/large_types_passed_by_value.stderr b/src/tools/clippy/tests/ui/large_types_passed_by_value.stderr index 0ad68bc326e02..7abd4fb3eab2e 100644 --- a/src/tools/clippy/tests/ui/large_types_passed_by_value.stderr +++ b/src/tools/clippy/tests/ui/large_types_passed_by_value.stderr @@ -1,5 +1,5 @@ error: this argument (N byte) is passed by value, but might be more efficient if passed by reference (limit: N byte) - --> tests/ui/large_types_passed_by_value.rs:20:11 + --> tests/ui/large_types_passed_by_value.rs:21:11 | LL | fn bad(a: LargeAndCopy) {} | ^^^^^^^^^^^^ help: consider passing by reference instead: `&LargeAndCopy` @@ -8,43 +8,43 @@ LL | fn bad(a: LargeAndCopy) {} = help: to override `-D warnings` add `#[allow(clippy::large_types_passed_by_value)]` error: this argument (N byte) is passed by value, but might be more efficient if passed by reference (limit: N byte) - --> tests/ui/large_types_passed_by_value.rs:26:37 + --> tests/ui/large_types_passed_by_value.rs:27:37 | LL | fn other_is_not_ok(self, other: LargeAndCopy) {} | ^^^^^^^^^^^^ help: consider passing by reference instead: `&LargeAndCopy` error: this argument (N byte) is passed by value, but might be more efficient if passed by reference (limit: N byte) - --> tests/ui/large_types_passed_by_value.rs:33:36 + --> tests/ui/large_types_passed_by_value.rs:34:36 | LL | fn devoure_array(&self, array: [u8; 6666]); | ^^^^^^^^^^ help: consider passing by reference instead: `&[u8; 6666]` error: this argument (N byte) is passed by value, but might be more efficient if passed by reference (limit: N byte) - --> tests/ui/large_types_passed_by_value.rs:35:34 + --> tests/ui/large_types_passed_by_value.rs:36:34 | LL | fn devoure_tuple(&self, tup: (LargeAndCopy, LargeAndCopy)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by reference instead: `&(LargeAndCopy, LargeAndCopy)` error: this argument (N byte) is passed by value, but might be more efficient if passed by reference (limit: N byte) - --> tests/ui/large_types_passed_by_value.rs:37:50 + --> tests/ui/large_types_passed_by_value.rs:38:50 | LL | fn devoure_array_and_tuple_wow(&self, array: [u8; 6666], tup: (LargeAndCopy, LargeAndCopy)); | ^^^^^^^^^^ help: consider passing by reference instead: `&[u8; 6666]` error: this argument (N byte) is passed by value, but might be more efficient if passed by reference (limit: N byte) - --> tests/ui/large_types_passed_by_value.rs:37:67 + --> tests/ui/large_types_passed_by_value.rs:38:67 | LL | fn devoure_array_and_tuple_wow(&self, array: [u8; 6666], tup: (LargeAndCopy, LargeAndCopy)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by reference instead: `&(LargeAndCopy, LargeAndCopy)` error: this argument (N byte) is passed by value, but might be more efficient if passed by reference (limit: N byte) - --> tests/ui/large_types_passed_by_value.rs:64:17 + --> tests/ui/large_types_passed_by_value.rs:65:17 | LL | fn foo_never(x: LargeAndCopy) { | ^^^^^^^^^^^^ help: consider passing by reference instead: `&LargeAndCopy` error: this argument (N byte) is passed by value, but might be more efficient if passed by reference (limit: N byte) - --> tests/ui/large_types_passed_by_value.rs:69:11 + --> tests/ui/large_types_passed_by_value.rs:70:11 | LL | fn foo(x: LargeAndCopy) { | ^^^^^^^^^^^^ help: consider passing by reference instead: `&LargeAndCopy` diff --git a/src/tools/clippy/tests/ui/len_without_is_empty.rs b/src/tools/clippy/tests/ui/len_without_is_empty.rs index 509348628dd67..8957c87dd151e 100644 --- a/src/tools/clippy/tests/ui/len_without_is_empty.rs +++ b/src/tools/clippy/tests/ui/len_without_is_empty.rs @@ -1,5 +1,5 @@ #![warn(clippy::len_without_is_empty)] -#![allow(dead_code, unused)] +#![allow(dead_code, unused, todo_macro_calls)] pub struct PubOne; diff --git a/src/tools/clippy/tests/ui/manual_assert.edition2018.fixed b/src/tools/clippy/tests/ui/manual_assert.edition2018.fixed index d1f798bd5c54b..425fc136b9c38 100644 --- a/src/tools/clippy/tests/ui/manual_assert.edition2018.fixed +++ b/src/tools/clippy/tests/ui/manual_assert.edition2018.fixed @@ -3,7 +3,7 @@ //@[edition2021] edition:2021 #![warn(clippy::manual_assert)] -#![allow(dead_code, unused_doc_comments)] +#![allow(dead_code, unused_doc_comments, todo_macro_calls)] #![allow(clippy::nonminimal_bool, clippy::uninlined_format_args, clippy::useless_vec)] macro_rules! one { diff --git a/src/tools/clippy/tests/ui/manual_assert.edition2021.fixed b/src/tools/clippy/tests/ui/manual_assert.edition2021.fixed index d1f798bd5c54b..425fc136b9c38 100644 --- a/src/tools/clippy/tests/ui/manual_assert.edition2021.fixed +++ b/src/tools/clippy/tests/ui/manual_assert.edition2021.fixed @@ -3,7 +3,7 @@ //@[edition2021] edition:2021 #![warn(clippy::manual_assert)] -#![allow(dead_code, unused_doc_comments)] +#![allow(dead_code, unused_doc_comments, todo_macro_calls)] #![allow(clippy::nonminimal_bool, clippy::uninlined_format_args, clippy::useless_vec)] macro_rules! one { diff --git a/src/tools/clippy/tests/ui/manual_assert.rs b/src/tools/clippy/tests/ui/manual_assert.rs index 7611795542230..635927e9a6f65 100644 --- a/src/tools/clippy/tests/ui/manual_assert.rs +++ b/src/tools/clippy/tests/ui/manual_assert.rs @@ -3,7 +3,7 @@ //@[edition2021] edition:2021 #![warn(clippy::manual_assert)] -#![allow(dead_code, unused_doc_comments)] +#![allow(dead_code, unused_doc_comments, todo_macro_calls)] #![allow(clippy::nonminimal_bool, clippy::uninlined_format_args, clippy::useless_vec)] macro_rules! one { diff --git a/src/tools/clippy/tests/ui/manual_find.rs b/src/tools/clippy/tests/ui/manual_find.rs index 7b9846cfe429d..5a3725cfdcaa0 100644 --- a/src/tools/clippy/tests/ui/manual_find.rs +++ b/src/tools/clippy/tests/ui/manual_find.rs @@ -1,4 +1,4 @@ -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![warn(clippy::manual_find)] //@no-rustfix fn vec_string(strings: Vec) -> Option { diff --git a/src/tools/clippy/tests/ui/manual_is_multiple_of.fixed b/src/tools/clippy/tests/ui/manual_is_multiple_of.fixed index 82e0684e5e57b..9e09105d9aa8d 100644 --- a/src/tools/clippy/tests/ui/manual_is_multiple_of.fixed +++ b/src/tools/clippy/tests/ui/manual_is_multiple_of.fixed @@ -1,4 +1,5 @@ //@aux-build: proc_macros.rs +#![allow(todo_macro_calls)] #![warn(clippy::manual_is_multiple_of)] fn main() {} diff --git a/src/tools/clippy/tests/ui/manual_is_multiple_of.rs b/src/tools/clippy/tests/ui/manual_is_multiple_of.rs index 82a492e240921..05244e70b59b1 100644 --- a/src/tools/clippy/tests/ui/manual_is_multiple_of.rs +++ b/src/tools/clippy/tests/ui/manual_is_multiple_of.rs @@ -1,4 +1,5 @@ //@aux-build: proc_macros.rs +#![allow(todo_macro_calls)] #![warn(clippy::manual_is_multiple_of)] fn main() {} diff --git a/src/tools/clippy/tests/ui/manual_is_multiple_of.stderr b/src/tools/clippy/tests/ui/manual_is_multiple_of.stderr index 3aba869c9111a..e314329f53f1b 100644 --- a/src/tools/clippy/tests/ui/manual_is_multiple_of.stderr +++ b/src/tools/clippy/tests/ui/manual_is_multiple_of.stderr @@ -1,5 +1,5 @@ error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:8:13 + --> tests/ui/manual_is_multiple_of.rs:9:13 | LL | let _ = a % b == 0; | ^^^^^^^^^^ help: replace with: `a.is_multiple_of(b)` @@ -8,67 +8,67 @@ LL | let _ = a % b == 0; = help: to override `-D warnings` add `#[allow(clippy::manual_is_multiple_of)]` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:9:13 + --> tests/ui/manual_is_multiple_of.rs:10:13 | LL | let _ = (a + 1) % (b + 1) == 0; | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(a + 1).is_multiple_of(b + 1)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:10:13 + --> tests/ui/manual_is_multiple_of.rs:11:13 | LL | let _ = a % b != 0; | ^^^^^^^^^^ help: replace with: `!a.is_multiple_of(b)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:11:13 + --> tests/ui/manual_is_multiple_of.rs:12:13 | LL | let _ = (a + 1) % (b + 1) != 0; | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!(a + 1).is_multiple_of(b + 1)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:13:13 + --> tests/ui/manual_is_multiple_of.rs:14:13 | LL | let _ = a % b > 0; | ^^^^^^^^^ help: replace with: `!a.is_multiple_of(b)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:14:13 + --> tests/ui/manual_is_multiple_of.rs:15:13 | LL | let _ = 0 < a % b; | ^^^^^^^^^ help: replace with: `!a.is_multiple_of(b)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:28:13 + --> tests/ui/manual_is_multiple_of.rs:29:13 | LL | let _ = a % b == 0; | ^^^^^^^^^^ help: replace with: `a.is_multiple_of(*b)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:41:26 + --> tests/ui/manual_is_multiple_of.rs:42:26 | LL | let cl = |a: u64, b| a % b == 0; | ^^^^^^^^^^ help: replace with: `a.is_multiple_of(b)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:45:27 + --> tests/ui/manual_is_multiple_of.rs:46:27 | LL | let cl = |a: &u64, b| a % b == 0; | ^^^^^^^^^^ help: replace with: `a.is_multiple_of(b)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:63:19 + --> tests/ui/manual_is_multiple_of.rs:64:19 | LL | while n % p == 0 { | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(*p)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:97:58 + --> tests/ui/manual_is_multiple_of.rs:98:58 | LL | let d = |n: u32| -> u32 { (1..=n / 2).filter(|i| n % i == 0).sum() }; | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(*i)` error: manual implementation of `.is_multiple_of()` - --> tests/ui/manual_is_multiple_of.rs:115:8 + --> tests/ui/manual_is_multiple_of.rs:116:8 | LL | if dot_0!(a) % dot_0!(b) == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `dot_0!(a).is_multiple_of(dot_0!(b))` diff --git a/src/tools/clippy/tests/ui/manual_let_else.rs b/src/tools/clippy/tests/ui/manual_let_else.rs index 8271671645efd..8bb885c720271 100644 --- a/src/tools/clippy/tests/ui/manual_let_else.rs +++ b/src/tools/clippy/tests/ui/manual_let_else.rs @@ -1,5 +1,5 @@ #![feature(try_blocks)] -#![allow(unused_braces, unused_variables, dead_code)] +#![allow(unused_braces, unused_variables, dead_code, todo_macro_calls)] #![allow( clippy::collapsible_else_if, clippy::unused_unit, diff --git a/src/tools/clippy/tests/ui/manual_let_else_question_mark.fixed b/src/tools/clippy/tests/ui/manual_let_else_question_mark.fixed index aca32a49c13b6..4b44e7feb4024 100644 --- a/src/tools/clippy/tests/ui/manual_let_else_question_mark.fixed +++ b/src/tools/clippy/tests/ui/manual_let_else_question_mark.fixed @@ -1,4 +1,4 @@ -#![allow(unused_braces, unused_variables, dead_code)] +#![allow(unused_braces, unused_variables, dead_code, todo_macro_calls)] #![allow( clippy::collapsible_else_if, clippy::unused_unit, diff --git a/src/tools/clippy/tests/ui/manual_let_else_question_mark.rs b/src/tools/clippy/tests/ui/manual_let_else_question_mark.rs index 8b43d59816f9c..9f28ff57bf931 100644 --- a/src/tools/clippy/tests/ui/manual_let_else_question_mark.rs +++ b/src/tools/clippy/tests/ui/manual_let_else_question_mark.rs @@ -1,4 +1,4 @@ -#![allow(unused_braces, unused_variables, dead_code)] +#![allow(unused_braces, unused_variables, dead_code, todo_macro_calls)] #![allow( clippy::collapsible_else_if, clippy::unused_unit, diff --git a/src/tools/clippy/tests/ui/manual_ok_err.fixed b/src/tools/clippy/tests/ui/manual_ok_err.fixed index e22f91a0155f5..e50332b8af481 100644 --- a/src/tools/clippy/tests/ui/manual_ok_err.fixed +++ b/src/tools/clippy/tests/ui/manual_ok_err.fixed @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::manual_ok_err)] fn funcall() -> Result { diff --git a/src/tools/clippy/tests/ui/manual_ok_err.rs b/src/tools/clippy/tests/ui/manual_ok_err.rs index c1355f0d40965..4026ea5f9746d 100644 --- a/src/tools/clippy/tests/ui/manual_ok_err.rs +++ b/src/tools/clippy/tests/ui/manual_ok_err.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::manual_ok_err)] fn funcall() -> Result { diff --git a/src/tools/clippy/tests/ui/manual_ok_err.stderr b/src/tools/clippy/tests/ui/manual_ok_err.stderr index 0c2ed368eb97a..7219498a6addc 100644 --- a/src/tools/clippy/tests/ui/manual_ok_err.stderr +++ b/src/tools/clippy/tests/ui/manual_ok_err.stderr @@ -1,5 +1,5 @@ error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:8:13 + --> tests/ui/manual_ok_err.rs:9:13 | LL | let _ = match funcall() { | _____________^ @@ -13,7 +13,7 @@ LL | | }; = help: to override `-D warnings` add `#[allow(clippy::manual_ok_err)]` error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:14:13 + --> tests/ui/manual_ok_err.rs:15:13 | LL | let _ = match funcall() { | _____________^ @@ -24,7 +24,7 @@ LL | | }; | |_____^ help: replace with: `funcall().ok()` error: manual implementation of `err` - --> tests/ui/manual_ok_err.rs:20:13 + --> tests/ui/manual_ok_err.rs:21:13 | LL | let _ = match funcall() { | _____________^ @@ -35,7 +35,7 @@ LL | | }; | |_____^ help: replace with: `funcall().err()` error: manual implementation of `err` - --> tests/ui/manual_ok_err.rs:26:13 + --> tests/ui/manual_ok_err.rs:27:13 | LL | let _ = match funcall() { | _____________^ @@ -46,7 +46,7 @@ LL | | }; | |_____^ help: replace with: `funcall().err()` error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:32:13 + --> tests/ui/manual_ok_err.rs:33:13 | LL | let _ = if let Ok(v) = funcall() { | _____________^ @@ -59,7 +59,7 @@ LL | | }; | |_____^ help: replace with: `funcall().ok()` error: manual implementation of `err` - --> tests/ui/manual_ok_err.rs:40:13 + --> tests/ui/manual_ok_err.rs:41:13 | LL | let _ = if let Err(v) = funcall() { | _____________^ @@ -72,7 +72,7 @@ LL | | }; | |_____^ help: replace with: `funcall().err()` error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:49:13 + --> tests/ui/manual_ok_err.rs:50:13 | LL | let _ = match funcall() { | _____________^ @@ -83,7 +83,7 @@ LL | | }; | |_____^ help: replace with: `funcall().ok()` error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:66:13 + --> tests/ui/manual_ok_err.rs:67:13 | LL | let _ = match -S { | _____________^ @@ -94,7 +94,7 @@ LL | | }; | |_____^ help: replace with: `(-S).ok()` error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:137:12 + --> tests/ui/manual_ok_err.rs:138:12 | LL | } else if let Ok(n) = "1".parse::() { | ____________^ @@ -112,7 +112,7 @@ LL ~ }; | error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:152:9 + --> tests/ui/manual_ok_err.rs:153:9 | LL | / match &x.field { LL | | @@ -122,7 +122,7 @@ LL | | } | |_________^ help: replace with: `(&x.field).as_ref().ok()` error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:161:9 + --> tests/ui/manual_ok_err.rs:162:9 | LL | / match result_with_ref() { LL | | @@ -132,7 +132,7 @@ LL | | } | |_________^ help: replace with: `result_with_ref().as_ref().ok()` error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:173:9 + --> tests/ui/manual_ok_err.rs:174:9 | LL | / match result_with_ref_mut(x) { LL | | @@ -142,7 +142,7 @@ LL | | } | |_________^ help: replace with: `result_with_ref_mut(x).as_mut().ok()` error: manual implementation of `ok` - --> tests/ui/manual_ok_err.rs:188:13 + --> tests/ui/manual_ok_err.rs:189:13 | LL | let _ = match test_expr!(42) { | _____________^ diff --git a/src/tools/clippy/tests/ui/manual_repeat_n.fixed b/src/tools/clippy/tests/ui/manual_repeat_n.fixed index 44ad3c02d3b85..f9dc34579ae06 100644 --- a/src/tools/clippy/tests/ui/manual_repeat_n.fixed +++ b/src/tools/clippy/tests/ui/manual_repeat_n.fixed @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::manual_repeat_n)] use std::iter::repeat; diff --git a/src/tools/clippy/tests/ui/manual_repeat_n.rs b/src/tools/clippy/tests/ui/manual_repeat_n.rs index ef6d6827d573d..07f7ae2c7ec0e 100644 --- a/src/tools/clippy/tests/ui/manual_repeat_n.rs +++ b/src/tools/clippy/tests/ui/manual_repeat_n.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::manual_repeat_n)] use std::iter::repeat; diff --git a/src/tools/clippy/tests/ui/manual_repeat_n.stderr b/src/tools/clippy/tests/ui/manual_repeat_n.stderr index de968b3ff7919..c37dc8dd21fc1 100644 --- a/src/tools/clippy/tests/ui/manual_repeat_n.stderr +++ b/src/tools/clippy/tests/ui/manual_repeat_n.stderr @@ -1,5 +1,5 @@ error: this `repeat().take()` can be written more concisely - --> tests/ui/manual_repeat_n.rs:6:13 + --> tests/ui/manual_repeat_n.rs:7:13 | LL | let _ = repeat(10).take(3); | ^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(10, 3)` @@ -8,25 +8,25 @@ LL | let _ = repeat(10).take(3); = help: to override `-D warnings` add `#[allow(clippy::manual_repeat_n)]` error: this `repeat().take()` can be written more concisely - --> tests/ui/manual_repeat_n.rs:9:13 + --> tests/ui/manual_repeat_n.rs:10:13 | LL | let _ = repeat(String::from("foo")).take(4); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(String::from("foo"), 4)` error: this `repeat().take()` can be written more concisely - --> tests/ui/manual_repeat_n.rs:12:18 + --> tests/ui/manual_repeat_n.rs:13:18 | LL | for value in std::iter::repeat(5).take(3) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(5, 3)` error: this `repeat().take()` can be written more concisely - --> tests/ui/manual_repeat_n.rs:15:21 + --> tests/ui/manual_repeat_n.rs:16:21 | LL | let _: Vec<_> = std::iter::repeat(String::from("bar")).take(10).collect(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(String::from("bar"), 10)` error: this `repeat().take()` can be written more concisely - --> tests/ui/manual_repeat_n.rs:18:13 + --> tests/ui/manual_repeat_n.rs:19:13 | LL | let _ = repeat(vec![1, 2]).take(2); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(vec![1, 2], 2)` diff --git a/src/tools/clippy/tests/ui/manual_slice_fill.fixed b/src/tools/clippy/tests/ui/manual_slice_fill.fixed index d07d1d60e2c16..0218eb2acdc86 100644 --- a/src/tools/clippy/tests/ui/manual_slice_fill.fixed +++ b/src/tools/clippy/tests/ui/manual_slice_fill.fixed @@ -1,5 +1,5 @@ #![warn(clippy::manual_slice_fill)] -#![allow(clippy::needless_range_loop, clippy::useless_vec)] +#![allow(clippy::needless_range_loop, clippy::useless_vec, todo_macro_calls)] macro_rules! assign_element { ($slice:ident, $index:expr) => { diff --git a/src/tools/clippy/tests/ui/manual_slice_fill.rs b/src/tools/clippy/tests/ui/manual_slice_fill.rs index c74ab2225c0a4..6dc4dada327aa 100644 --- a/src/tools/clippy/tests/ui/manual_slice_fill.rs +++ b/src/tools/clippy/tests/ui/manual_slice_fill.rs @@ -1,5 +1,5 @@ #![warn(clippy::manual_slice_fill)] -#![allow(clippy::needless_range_loop, clippy::useless_vec)] +#![allow(clippy::needless_range_loop, clippy::useless_vec, todo_macro_calls)] macro_rules! assign_element { ($slice:ident, $index:expr) => { diff --git a/src/tools/clippy/tests/ui/manual_try_fold.rs b/src/tools/clippy/tests/ui/manual_try_fold.rs index cd2b0720f5bff..d855fc404aae6 100644 --- a/src/tools/clippy/tests/ui/manual_try_fold.rs +++ b/src/tools/clippy/tests/ui/manual_try_fold.rs @@ -1,5 +1,5 @@ //@aux-build:proc_macros.rs -#![allow(clippy::unnecessary_fold, unused)] +#![allow(clippy::unnecessary_fold, unused, todo_macro_calls)] #![warn(clippy::manual_try_fold)] #![feature(try_trait_v2)] #![feature(try_trait_v2_residual)] diff --git a/src/tools/clippy/tests/ui/map_with_unused_argument_over_ranges.fixed b/src/tools/clippy/tests/ui/map_with_unused_argument_over_ranges.fixed index 97cb727488395..17193ea107776 100644 --- a/src/tools/clippy/tests/ui/map_with_unused_argument_over_ranges.fixed +++ b/src/tools/clippy/tests/ui/map_with_unused_argument_over_ranges.fixed @@ -3,7 +3,7 @@ clippy::redundant_closure, clippy::reversed_empty_ranges, clippy::identity_op -)] +, todo_macro_calls)] #![warn(clippy::map_with_unused_argument_over_ranges)] fn do_something() -> usize { diff --git a/src/tools/clippy/tests/ui/map_with_unused_argument_over_ranges.rs b/src/tools/clippy/tests/ui/map_with_unused_argument_over_ranges.rs index f0222f407b8ca..432fc7cbff9b9 100644 --- a/src/tools/clippy/tests/ui/map_with_unused_argument_over_ranges.rs +++ b/src/tools/clippy/tests/ui/map_with_unused_argument_over_ranges.rs @@ -3,7 +3,7 @@ clippy::redundant_closure, clippy::reversed_empty_ranges, clippy::identity_op -)] +, todo_macro_calls)] #![warn(clippy::map_with_unused_argument_over_ranges)] fn do_something() -> usize { diff --git a/src/tools/clippy/tests/ui/match_like_matches_macro.fixed b/src/tools/clippy/tests/ui/match_like_matches_macro.fixed index 045ee32bd8bb8..76e46fd16d552 100644 --- a/src/tools/clippy/tests/ui/match_like_matches_macro.fixed +++ b/src/tools/clippy/tests/ui/match_like_matches_macro.fixed @@ -5,7 +5,7 @@ clippy::equatable_if_let, clippy::needless_borrowed_reference, clippy::redundant_guards -)] +, todo_macro_calls)] fn main() { let x = Some(5); diff --git a/src/tools/clippy/tests/ui/match_like_matches_macro.rs b/src/tools/clippy/tests/ui/match_like_matches_macro.rs index 231e1ae98f86a..a3bfc484d31ff 100644 --- a/src/tools/clippy/tests/ui/match_like_matches_macro.rs +++ b/src/tools/clippy/tests/ui/match_like_matches_macro.rs @@ -5,7 +5,7 @@ clippy::equatable_if_let, clippy::needless_borrowed_reference, clippy::redundant_guards -)] +, todo_macro_calls)] fn main() { let x = Some(5); diff --git a/src/tools/clippy/tests/ui/match_ref_pats.fixed b/src/tools/clippy/tests/ui/match_ref_pats.fixed index f727546838b43..8b56e888fb9fe 100644 --- a/src/tools/clippy/tests/ui/match_ref_pats.fixed +++ b/src/tools/clippy/tests/ui/match_ref_pats.fixed @@ -1,5 +1,5 @@ #![warn(clippy::match_ref_pats)] -#![allow(dead_code, unused_variables)] +#![allow(dead_code, unused_variables, todo_macro_calls)] #![allow( clippy::enum_variant_names, clippy::equatable_if_let, diff --git a/src/tools/clippy/tests/ui/match_ref_pats.rs b/src/tools/clippy/tests/ui/match_ref_pats.rs index eca4d584acd2b..7d8ac13895870 100644 --- a/src/tools/clippy/tests/ui/match_ref_pats.rs +++ b/src/tools/clippy/tests/ui/match_ref_pats.rs @@ -1,5 +1,5 @@ #![warn(clippy::match_ref_pats)] -#![allow(dead_code, unused_variables)] +#![allow(dead_code, unused_variables, todo_macro_calls)] #![allow( clippy::enum_variant_names, clippy::equatable_if_let, diff --git a/src/tools/clippy/tests/ui/match_same_arms2.fixed b/src/tools/clippy/tests/ui/match_same_arms2.fixed index cb860cef1e688..afe460ae2950e 100644 --- a/src/tools/clippy/tests/ui/match_same_arms2.fixed +++ b/src/tools/clippy/tests/ui/match_same_arms2.fixed @@ -5,7 +5,7 @@ clippy::uninlined_format_args, clippy::match_single_binding, clippy::match_like_matches_macro -)] +, todo_macro_calls)] fn bar(_: T) {} fn foo() -> bool { diff --git a/src/tools/clippy/tests/ui/match_same_arms2.rs b/src/tools/clippy/tests/ui/match_same_arms2.rs index 0fd5d76e7d3e7..44bad038fe6d8 100644 --- a/src/tools/clippy/tests/ui/match_same_arms2.rs +++ b/src/tools/clippy/tests/ui/match_same_arms2.rs @@ -5,7 +5,7 @@ clippy::uninlined_format_args, clippy::match_single_binding, clippy::match_like_matches_macro -)] +, todo_macro_calls)] fn bar(_: T) {} fn foo() -> bool { diff --git a/src/tools/clippy/tests/ui/match_single_binding.fixed b/src/tools/clippy/tests/ui/match_single_binding.fixed index fa82a316d64d9..58bcb77e8245a 100644 --- a/src/tools/clippy/tests/ui/match_single_binding.fixed +++ b/src/tools/clippy/tests/ui/match_single_binding.fixed @@ -5,7 +5,7 @@ clippy::no_effect, clippy::toplevel_ref_arg, clippy::useless_vec -)] +, todo_macro_calls)] struct Point { x: i32, diff --git a/src/tools/clippy/tests/ui/match_single_binding.rs b/src/tools/clippy/tests/ui/match_single_binding.rs index 6c1fae89e230d..27f9cee7838c7 100644 --- a/src/tools/clippy/tests/ui/match_single_binding.rs +++ b/src/tools/clippy/tests/ui/match_single_binding.rs @@ -5,7 +5,7 @@ clippy::no_effect, clippy::toplevel_ref_arg, clippy::useless_vec -)] +, todo_macro_calls)] struct Point { x: i32, diff --git a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed index 95bf63ed1df6f..cd8d681300904 100644 --- a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed +++ b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed @@ -1,5 +1,5 @@ #![warn(clippy::missing_const_for_fn)] -#![allow(incomplete_features, clippy::let_and_return, clippy::missing_transmute_annotations)] +#![allow(incomplete_features, clippy::let_and_return, clippy::missing_transmute_annotations, todo_macro_calls)] #![feature(const_trait_impl)] use std::mem::transmute; diff --git a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs index 8290be6754621..14a5ac4eadaa3 100644 --- a/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs +++ b/src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs @@ -1,5 +1,5 @@ #![warn(clippy::missing_const_for_fn)] -#![allow(incomplete_features, clippy::let_and_return, clippy::missing_transmute_annotations)] +#![allow(incomplete_features, clippy::let_and_return, clippy::missing_transmute_annotations, todo_macro_calls)] #![feature(const_trait_impl)] use std::mem::transmute; diff --git a/src/tools/clippy/tests/ui/missing_const_for_thread_local.fixed b/src/tools/clippy/tests/ui/missing_const_for_thread_local.fixed index 2efe10c153da3..6ac2954faf517 100644 --- a/src/tools/clippy/tests/ui/missing_const_for_thread_local.fixed +++ b/src/tools/clippy/tests/ui/missing_const_for_thread_local.fixed @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::missing_const_for_thread_local)] use std::cell::{Cell, RefCell}; diff --git a/src/tools/clippy/tests/ui/missing_const_for_thread_local.rs b/src/tools/clippy/tests/ui/missing_const_for_thread_local.rs index 119cc5a99fa05..a5e5d9a6e7c8c 100644 --- a/src/tools/clippy/tests/ui/missing_const_for_thread_local.rs +++ b/src/tools/clippy/tests/ui/missing_const_for_thread_local.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::missing_const_for_thread_local)] use std::cell::{Cell, RefCell}; diff --git a/src/tools/clippy/tests/ui/missing_const_for_thread_local.stderr b/src/tools/clippy/tests/ui/missing_const_for_thread_local.stderr index 4e90c10c92f8f..d36615f15b723 100644 --- a/src/tools/clippy/tests/ui/missing_const_for_thread_local.stderr +++ b/src/tools/clippy/tests/ui/missing_const_for_thread_local.stderr @@ -1,5 +1,5 @@ error: initializer for `thread_local` value can be made `const` - --> tests/ui/missing_const_for_thread_local.rs:8:41 + --> tests/ui/missing_const_for_thread_local.rs:9:41 | LL | static BUF_1: RefCell = RefCell::new(String::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }` @@ -8,31 +8,31 @@ LL | static BUF_1: RefCell = RefCell::new(String::new()); = help: to override `-D warnings` add `#[allow(clippy::missing_const_for_thread_local)]` error: initializer for `thread_local` value can be made `const` - --> tests/ui/missing_const_for_thread_local.rs:18:29 + --> tests/ui/missing_const_for_thread_local.rs:19:29 | LL | static SIMPLE:i32 = 1; | ^ help: replace with: `const { 1 }` error: initializer for `thread_local` value can be made `const` - --> tests/ui/missing_const_for_thread_local.rs:24:59 + --> tests/ui/missing_const_for_thread_local.rs:25:59 | LL | static BUF_3_CAN_BE_MADE_CONST: RefCell = RefCell::new(String::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }` error: initializer for `thread_local` value can be made `const` - --> tests/ui/missing_const_for_thread_local.rs:27:59 + --> tests/ui/missing_const_for_thread_local.rs:28:59 | LL | static BUF_4_CAN_BE_MADE_CONST: RefCell = RefCell::new(String::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }` error: initializer for `thread_local` value can be made `const` - --> tests/ui/missing_const_for_thread_local.rs:32:31 + --> tests/ui/missing_const_for_thread_local.rs:33:31 | LL | static PEEL_ME: i32 = { 1 }; | ^^^^^ help: replace with: `const { 1 }` error: initializer for `thread_local` value can be made `const` - --> tests/ui/missing_const_for_thread_local.rs:35:36 + --> tests/ui/missing_const_for_thread_local.rs:36:36 | LL | static PEEL_ME_MANY: i32 = { let x = 1; x * x }; | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { { let x = 1; x * x } }` diff --git a/src/tools/clippy/tests/ui/missing_panics_doc.rs b/src/tools/clippy/tests/ui/missing_panics_doc.rs index d016e099e303b..9a240de73fb4d 100644 --- a/src/tools/clippy/tests/ui/missing_panics_doc.rs +++ b/src/tools/clippy/tests/ui/missing_panics_doc.rs @@ -1,6 +1,6 @@ //@aux-build:macro_rules.rs #![warn(clippy::missing_panics_doc)] -#![allow(clippy::option_map_unit_fn, clippy::unnecessary_literal_unwrap)] +#![allow(clippy::option_map_unit_fn, clippy::unnecessary_literal_unwrap, todo_macro_calls)] #[macro_use] extern crate macro_rules; diff --git a/src/tools/clippy/tests/ui/missing_trait_methods.rs b/src/tools/clippy/tests/ui/missing_trait_methods.rs index 67070a2999510..3e9f8fa9a4e5f 100644 --- a/src/tools/clippy/tests/ui/missing_trait_methods.rs +++ b/src/tools/clippy/tests/ui/missing_trait_methods.rs @@ -1,4 +1,4 @@ -#![allow(unused, clippy::needless_lifetimes)] +#![allow(unused, clippy::needless_lifetimes, todo_macro_calls)] #![warn(clippy::missing_trait_methods)] trait A { diff --git a/src/tools/clippy/tests/ui/multiple_bound_locations.rs b/src/tools/clippy/tests/ui/multiple_bound_locations.rs index 95b269d8935df..369e64fa1a6e5 100644 --- a/src/tools/clippy/tests/ui/multiple_bound_locations.rs +++ b/src/tools/clippy/tests/ui/multiple_bound_locations.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::multiple_bound_locations)] fn ty(a: F) diff --git a/src/tools/clippy/tests/ui/multiple_bound_locations.stderr b/src/tools/clippy/tests/ui/multiple_bound_locations.stderr index 22dd2e0a55249..3b7896472e3b6 100644 --- a/src/tools/clippy/tests/ui/multiple_bound_locations.stderr +++ b/src/tools/clippy/tests/ui/multiple_bound_locations.stderr @@ -1,5 +1,5 @@ error: bound is defined in more than one place - --> tests/ui/multiple_bound_locations.rs:3:7 + --> tests/ui/multiple_bound_locations.rs:4:7 | LL | fn ty(a: F) | ^ @@ -11,7 +11,7 @@ LL | F: Sized, = help: to override `-D warnings` add `#[allow(clippy::multiple_bound_locations)]` error: bound is defined in more than one place - --> tests/ui/multiple_bound_locations.rs:10:17 + --> tests/ui/multiple_bound_locations.rs:11:17 | LL | fn lifetime<'a, 'b: 'a, 'c>(a: &'b str, b: &'a str, c: &'c str) | ^^ @@ -20,7 +20,7 @@ LL | 'b: 'c, | ^^ error: bound is defined in more than one place - --> tests/ui/multiple_bound_locations.rs:17:12 + --> tests/ui/multiple_bound_locations.rs:18:12 | LL | fn ty_pred() | ^ @@ -29,7 +29,7 @@ LL | for<'a> F: Send + 'a, | ^ error: bound is defined in more than one place - --> tests/ui/multiple_bound_locations.rs:27:11 + --> tests/ui/multiple_bound_locations.rs:28:11 | LL | fn ty(a: F) | ^ @@ -38,7 +38,7 @@ LL | F: Sized, | ^ error: bound is defined in more than one place - --> tests/ui/multiple_bound_locations.rs:34:21 + --> tests/ui/multiple_bound_locations.rs:35:21 | LL | fn lifetime<'a, 'b: 'a, 'c>(a: &'b str, b: &'a str, c: &'c str) | ^^ @@ -47,7 +47,7 @@ LL | 'b: 'c, | ^^ error: bound is defined in more than one place - --> tests/ui/multiple_bound_locations.rs:41:16 + --> tests/ui/multiple_bound_locations.rs:42:16 | LL | fn ty_pred() | ^ diff --git a/src/tools/clippy/tests/ui/multiple_unsafe_ops_per_block.rs b/src/tools/clippy/tests/ui/multiple_unsafe_ops_per_block.rs index 0ff881472cbb9..6bf2f6d48c9ef 100644 --- a/src/tools/clippy/tests/ui/multiple_unsafe_ops_per_block.rs +++ b/src/tools/clippy/tests/ui/multiple_unsafe_ops_per_block.rs @@ -1,5 +1,6 @@ //@needs-asm-support //@aux-build:proc_macros.rs +#![allow(todo_macro_calls)] #![expect( dropping_copy_types, clippy::unnecessary_operation, diff --git a/src/tools/clippy/tests/ui/multiple_unsafe_ops_per_block.stderr b/src/tools/clippy/tests/ui/multiple_unsafe_ops_per_block.stderr index 185225bd28c84..75b5590b7364f 100644 --- a/src/tools/clippy/tests/ui/multiple_unsafe_ops_per_block.stderr +++ b/src/tools/clippy/tests/ui/multiple_unsafe_ops_per_block.stderr @@ -1,5 +1,5 @@ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:38:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:39:5 | LL | / unsafe { LL | | @@ -9,12 +9,12 @@ LL | | } | |_____^ | note: modification of a mutable static occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:40:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:41:9 | LL | STATIC += 1; | ^^^^^^^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:41:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:42:9 | LL | not_very_safe(); | ^^^^^^^^^^^^^^^ @@ -22,7 +22,7 @@ LL | not_very_safe(); = help: to override `-D warnings` add `#[allow(clippy::multiple_unsafe_ops_per_block)]` error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:48:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:49:5 | LL | / unsafe { LL | | @@ -32,18 +32,18 @@ LL | | } | |_____^ | note: raw pointer dereference occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:51:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:52:9 | LL | *raw_ptr(); | ^^^^^^^^^^ note: union field access occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:50:14 + --> tests/ui/multiple_unsafe_ops_per_block.rs:51:14 | LL | drop(u.u); | ^^^ error: this `unsafe` block contains 3 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:56:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:57:5 | LL | / unsafe { LL | | @@ -54,23 +54,23 @@ LL | | } | |_____^ | note: inline assembly used here - --> tests/ui/multiple_unsafe_ops_per_block.rs:58:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:59:9 | LL | asm!("nop"); | ^^^^^^^^^^^ note: modification of a mutable static occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:60:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:61:9 | LL | STATIC = 0; | ^^^^^^^^^^ note: unsafe method call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:59:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:60:9 | LL | sample.not_very_safe(); | ^^^^^^^^^^^^^^^^^^^^^^ error: this `unsafe` block contains 6 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:66:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:67:5 | LL | / unsafe { LL | | @@ -82,38 +82,38 @@ LL | | } | |_____^ | note: access of a mutable static occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:69:14 + --> tests/ui/multiple_unsafe_ops_per_block.rs:70:14 | LL | drop(STATIC); | ^^^^^^ note: inline assembly used here - --> tests/ui/multiple_unsafe_ops_per_block.rs:73:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:74:9 | LL | asm!("nop"); | ^^^^^^^^^^^ note: raw pointer dereference occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:72:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:73:9 | LL | *raw_ptr(); | ^^^^^^^^^^ note: union field access occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:68:14 + --> tests/ui/multiple_unsafe_ops_per_block.rs:69:14 | LL | drop(u.u); | ^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:71:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:72:9 | LL | not_very_safe(); | ^^^^^^^^^^^^^^^ note: unsafe method call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:70:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:71:9 | LL | sample.not_very_safe(); | ^^^^^^^^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:109:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:110:5 | LL | / unsafe { LL | | @@ -123,35 +123,35 @@ LL | | } | |_____^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:111:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:112:9 | LL | f(); | ^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:112:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:113:9 | LL | f(); | ^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:118:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:119:9 | LL | unsafe { char::from_u32_unchecked(*ptr.cast::()) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: raw pointer dereference occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:118:43 + --> tests/ui/multiple_unsafe_ops_per_block.rs:119:43 | LL | unsafe { char::from_u32_unchecked(*ptr.cast::()) } | ^^^^^^^^^^^^^^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:118:18 + --> tests/ui/multiple_unsafe_ops_per_block.rs:119:18 | LL | unsafe { char::from_u32_unchecked(*ptr.cast::()) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:139:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:140:9 | LL | / unsafe { LL | | @@ -161,18 +161,18 @@ LL | | } | |_________^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:141:13 + --> tests/ui/multiple_unsafe_ops_per_block.rs:142:13 | LL | x(); | ^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:142:13 + --> tests/ui/multiple_unsafe_ops_per_block.rs:143:13 | LL | x(); | ^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:151:13 + --> tests/ui/multiple_unsafe_ops_per_block.rs:152:13 | LL | / unsafe { LL | | @@ -182,18 +182,18 @@ LL | | } | |_____________^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:153:17 + --> tests/ui/multiple_unsafe_ops_per_block.rs:154:17 | LL | T::X(); | ^^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:154:17 + --> tests/ui/multiple_unsafe_ops_per_block.rs:155:17 | LL | T::X(); | ^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:162:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:163:9 | LL | / unsafe { LL | | @@ -203,18 +203,18 @@ LL | | } | |_________^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:164:13 + --> tests/ui/multiple_unsafe_ops_per_block.rs:165:13 | LL | x.0(); | ^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:165:13 + --> tests/ui/multiple_unsafe_ops_per_block.rs:166:13 | LL | x.0(); | ^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:192:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:193:5 | LL | / unsafe { LL | | @@ -225,18 +225,18 @@ LL | | } | |_____^ | note: modification of a mutable static occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:195:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:196:9 | LL | STATIC += 1; | ^^^^^^^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:194:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:195:9 | LL | not_very_safe(); | ^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:207:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:208:5 | LL | / unsafe { LL | | @@ -246,18 +246,18 @@ LL | | } | |_____^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:209:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:210:9 | LL | not_very_safe(); | ^^^^^^^^^^^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:210:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:211:9 | LL | foo_unchecked().await; | ^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:214:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:215:5 | LL | / unsafe { LL | | @@ -266,18 +266,18 @@ LL | | } | |_____^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:216:14 + --> tests/ui/multiple_unsafe_ops_per_block.rs:217:14 | LL | Some(foo_unchecked()).unwrap_unchecked().await; | ^^^^^^^^^^^^^^^ note: unsafe method call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:216:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:217:9 | LL | Some(foo_unchecked()).unwrap_unchecked().await; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:236:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:237:5 | LL | / unsafe { LL | | @@ -287,18 +287,18 @@ LL | | } | |_____^ | note: union field access occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:238:14 + --> tests/ui/multiple_unsafe_ops_per_block.rs:239:14 | LL | _ = &u.i; | ^^^ note: union field access occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:239:14 + --> tests/ui/multiple_unsafe_ops_per_block.rs:240:14 | LL | _ = &u.i; | ^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:244:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:245:5 | LL | / unsafe { LL | | @@ -308,18 +308,18 @@ LL | | } | |_____^ | note: raw pointer dereference occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:246:24 + --> tests/ui/multiple_unsafe_ops_per_block.rs:247:24 | LL | _ = &raw const (*&raw const u).i; | ^^^^^^^^^^^^^^^ note: raw pointer dereference occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:247:24 + --> tests/ui/multiple_unsafe_ops_per_block.rs:248:24 | LL | _ = &raw const (*&raw const u).i; | ^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:294:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:295:5 | LL | / unsafe { LL | | @@ -329,18 +329,18 @@ LL | | } | |_____^ | note: union field access occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:296:24 + --> tests/ui/multiple_unsafe_ops_per_block.rs:297:24 | LL | _ = &raw const w.s.i; | ^^^ note: union field access occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:297:24 + --> tests/ui/multiple_unsafe_ops_per_block.rs:298:24 | LL | _ = &raw const w.s.i; | ^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:309:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:310:5 | LL | / unsafe { LL | | @@ -349,18 +349,18 @@ LL | | } | |_____^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:311:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:312:9 | LL | apply(|| f(0)); | ^^^^^^^^^^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:311:18 + --> tests/ui/multiple_unsafe_ops_per_block.rs:312:18 | LL | apply(|| f(0)); | ^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:326:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:327:5 | LL | / unsafe { LL | | @@ -370,18 +370,18 @@ LL | | } | |_____^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:328:31 + --> tests/ui/multiple_unsafe_ops_per_block.rs:329:31 | LL | let _ = format!("{}", foo()); | ^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:329:31 + --> tests/ui/multiple_unsafe_ops_per_block.rs:330:31 | LL | let _ = format!("{}", foo()); | ^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:338:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:339:5 | LL | / unsafe { LL | | @@ -390,18 +390,18 @@ LL | | } | |_____^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:340:20 + --> tests/ui/multiple_unsafe_ops_per_block.rs:341:20 | LL | assert_eq!(foo(), 0, "{}", foo()); // One unsafe operation | ^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:340:36 + --> tests/ui/multiple_unsafe_ops_per_block.rs:341:36 | LL | assert_eq!(foo(), 0, "{}", foo()); // One unsafe operation | ^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:356:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:357:5 | LL | / unsafe { LL | | @@ -411,18 +411,18 @@ LL | | } | |_____^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:358:16 + --> tests/ui/multiple_unsafe_ops_per_block.rs:359:16 | LL | twice!(foo()); | ^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:359:16 + --> tests/ui/multiple_unsafe_ops_per_block.rs:360:16 | LL | twice!(foo()); | ^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:362:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:363:5 | LL | / unsafe { LL | | @@ -432,18 +432,18 @@ LL | | } | |_____^ | note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:364:20 + --> tests/ui/multiple_unsafe_ops_per_block.rs:365:20 | LL | assert_eq!(foo(), 0, "{}", 1 + 2); | ^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:365:20 + --> tests/ui/multiple_unsafe_ops_per_block.rs:366:20 | LL | assert_eq!(foo(), 0, "{}", 1 + 2); | ^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:396:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:397:5 | LL | / unsafe { LL | | @@ -453,18 +453,18 @@ LL | | } | |_____^ | note: this macro call expands into one or more unsafe operations - --> tests/ui/multiple_unsafe_ops_per_block.rs:398:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:399:9 | LL | double_non_arg_unsafe!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ note: this macro call expands into one or more unsafe operations - --> tests/ui/multiple_unsafe_ops_per_block.rs:399:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:400:9 | LL | double_non_arg_unsafe!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:407:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:408:5 | LL | / unsafe { LL | | @@ -474,18 +474,18 @@ LL | | } | |_____^ | note: this macro call expands into one or more unsafe operations - --> tests/ui/multiple_unsafe_ops_per_block.rs:409:20 + --> tests/ui/multiple_unsafe_ops_per_block.rs:410:20 | LL | assert_eq!(double_non_arg_unsafe!(), ()); | ^^^^^^^^^^^^^^^^^^^^^^^^ note: this macro call expands into one or more unsafe operations - --> tests/ui/multiple_unsafe_ops_per_block.rs:410:20 + --> tests/ui/multiple_unsafe_ops_per_block.rs:411:20 | LL | assert_eq!(double_non_arg_unsafe!(), ()); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:413:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:414:5 | LL | / unsafe { LL | | @@ -494,18 +494,18 @@ LL | | } | |_____^ | note: this macro call expands into one or more unsafe operations - --> tests/ui/multiple_unsafe_ops_per_block.rs:415:21 + --> tests/ui/multiple_unsafe_ops_per_block.rs:416:21 | LL | assert_eq!((double_non_arg_unsafe!(), double_non_arg_unsafe!()), ((), ())); | ^^^^^^^^^^^^^^^^^^^^^^^^ note: this macro call expands into one or more unsafe operations - --> tests/ui/multiple_unsafe_ops_per_block.rs:415:47 + --> tests/ui/multiple_unsafe_ops_per_block.rs:416:47 | LL | assert_eq!((double_non_arg_unsafe!(), double_non_arg_unsafe!()), ((), ())); | ^^^^^^^^^^^^^^^^^^^^^^^^ error: this `unsafe` block contains 2 unsafe operations, expected only one - --> tests/ui/multiple_unsafe_ops_per_block.rs:430:5 + --> tests/ui/multiple_unsafe_ops_per_block.rs:431:5 | LL | / unsafe { LL | | @@ -514,12 +514,12 @@ LL | | } | |_____^ | note: this macro call expands into one or more unsafe operations - --> tests/ui/multiple_unsafe_ops_per_block.rs:432:9 + --> tests/ui/multiple_unsafe_ops_per_block.rs:433:9 | LL | unsafe_with_arg!(foo()); | ^^^^^^^^^^^^^^^^^^^^^^^ note: unsafe function call occurs here - --> tests/ui/multiple_unsafe_ops_per_block.rs:432:26 + --> tests/ui/multiple_unsafe_ops_per_block.rs:433:26 | LL | unsafe_with_arg!(foo()); | ^^^^^ diff --git a/src/tools/clippy/tests/ui/must_use_candidates.fixed b/src/tools/clippy/tests/ui/must_use_candidates.fixed index 17569884658b1..ee68685c86bf4 100644 --- a/src/tools/clippy/tests/ui/must_use_candidates.fixed +++ b/src/tools/clippy/tests/ui/must_use_candidates.fixed @@ -4,7 +4,7 @@ clippy::redundant_allocation, clippy::needless_pass_by_ref_mut, static_mut_refs -)] +, todo_macro_calls)] #![warn(clippy::must_use_candidate)] use std::rc::Rc; use std::sync::Arc; diff --git a/src/tools/clippy/tests/ui/must_use_candidates.rs b/src/tools/clippy/tests/ui/must_use_candidates.rs index 8b898533d01b7..1aa15f34d4547 100644 --- a/src/tools/clippy/tests/ui/must_use_candidates.rs +++ b/src/tools/clippy/tests/ui/must_use_candidates.rs @@ -4,7 +4,7 @@ clippy::redundant_allocation, clippy::needless_pass_by_ref_mut, static_mut_refs -)] +, todo_macro_calls)] #![warn(clippy::must_use_candidate)] use std::rc::Rc; use std::sync::Arc; diff --git a/src/tools/clippy/tests/ui/needless_bool/fixable.fixed b/src/tools/clippy/tests/ui/needless_bool/fixable.fixed index 0af4f87bec677..9a6699fbd35de 100644 --- a/src/tools/clippy/tests/ui/needless_bool/fixable.fixed +++ b/src/tools/clippy/tests/ui/needless_bool/fixable.fixed @@ -9,7 +9,7 @@ clippy::needless_return, clippy::self_named_constructors, clippy::struct_field_names -)] +, todo_macro_calls)] use std::cell::Cell; diff --git a/src/tools/clippy/tests/ui/needless_bool/fixable.rs b/src/tools/clippy/tests/ui/needless_bool/fixable.rs index 2e8719bd041e0..d349de3c8ca78 100644 --- a/src/tools/clippy/tests/ui/needless_bool/fixable.rs +++ b/src/tools/clippy/tests/ui/needless_bool/fixable.rs @@ -9,7 +9,7 @@ clippy::needless_return, clippy::self_named_constructors, clippy::struct_field_names -)] +, todo_macro_calls)] use std::cell::Cell; diff --git a/src/tools/clippy/tests/ui/needless_bool_assign.fixed b/src/tools/clippy/tests/ui/needless_bool_assign.fixed index 8fd5720381404..220b7298e7304 100644 --- a/src/tools/clippy/tests/ui/needless_bool_assign.fixed +++ b/src/tools/clippy/tests/ui/needless_bool_assign.fixed @@ -1,4 +1,4 @@ -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![warn(clippy::needless_bool_assign)] fn random() -> bool { diff --git a/src/tools/clippy/tests/ui/needless_bool_assign.rs b/src/tools/clippy/tests/ui/needless_bool_assign.rs index 4721ab433b327..0754d9796602d 100644 --- a/src/tools/clippy/tests/ui/needless_bool_assign.rs +++ b/src/tools/clippy/tests/ui/needless_bool_assign.rs @@ -1,4 +1,4 @@ -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![warn(clippy::needless_bool_assign)] fn random() -> bool { diff --git a/src/tools/clippy/tests/ui/needless_collect.fixed b/src/tools/clippy/tests/ui/needless_collect.fixed index 2d59c1d42b051..76060723e574f 100644 --- a/src/tools/clippy/tests/ui/needless_collect.fixed +++ b/src/tools/clippy/tests/ui/needless_collect.fixed @@ -4,7 +4,7 @@ clippy::suspicious_map, clippy::iter_count, clippy::manual_contains -)] +, todo_macro_calls)] use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList}; diff --git a/src/tools/clippy/tests/ui/needless_collect.rs b/src/tools/clippy/tests/ui/needless_collect.rs index 346cddd88e703..8e1dffd9db3da 100644 --- a/src/tools/clippy/tests/ui/needless_collect.rs +++ b/src/tools/clippy/tests/ui/needless_collect.rs @@ -4,7 +4,7 @@ clippy::suspicious_map, clippy::iter_count, clippy::manual_contains -)] +, todo_macro_calls)] use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList}; diff --git a/src/tools/clippy/tests/ui/needless_collect_indirect.fixed b/src/tools/clippy/tests/ui/needless_collect_indirect.fixed index 22b9bb6f6a20a..e035513d5cbbf 100644 --- a/src/tools/clippy/tests/ui/needless_collect_indirect.fixed +++ b/src/tools/clippy/tests/ui/needless_collect_indirect.fixed @@ -4,7 +4,7 @@ clippy::needless_ifs, clippy::iter_next_slice, clippy::iter_count -)] +, todo_macro_calls)] #![warn(clippy::needless_collect)] use std::collections::{BinaryHeap, HashMap, HashSet, LinkedList, VecDeque}; diff --git a/src/tools/clippy/tests/ui/needless_collect_indirect.rs b/src/tools/clippy/tests/ui/needless_collect_indirect.rs index 20b7ae91a6b88..de7fb4011c6eb 100644 --- a/src/tools/clippy/tests/ui/needless_collect_indirect.rs +++ b/src/tools/clippy/tests/ui/needless_collect_indirect.rs @@ -4,7 +4,7 @@ clippy::needless_ifs, clippy::iter_next_slice, clippy::iter_count -)] +, todo_macro_calls)] #![warn(clippy::needless_collect)] use std::collections::{BinaryHeap, HashMap, HashSet, LinkedList, VecDeque}; diff --git a/src/tools/clippy/tests/ui/needless_continue.rs b/src/tools/clippy/tests/ui/needless_continue.rs index 3275dddf1a0f4..054491bf7049f 100644 --- a/src/tools/clippy/tests/ui/needless_continue.rs +++ b/src/tools/clippy/tests/ui/needless_continue.rs @@ -1,5 +1,5 @@ #![warn(clippy::needless_continue)] -#![allow(clippy::uninlined_format_args)] +#![allow(clippy::uninlined_format_args, todo_macro_calls)] macro_rules! zero { ($x:expr) => { diff --git a/src/tools/clippy/tests/ui/needless_option_take.fixed b/src/tools/clippy/tests/ui/needless_option_take.fixed index a8bd50b79899b..ce1ec70ef557c 100644 --- a/src/tools/clippy/tests/ui/needless_option_take.fixed +++ b/src/tools/clippy/tests/ui/needless_option_take.fixed @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct MyStruct; impl MyStruct { diff --git a/src/tools/clippy/tests/ui/needless_option_take.rs b/src/tools/clippy/tests/ui/needless_option_take.rs index 8141ee43db11f..1fcacd70bd9ce 100644 --- a/src/tools/clippy/tests/ui/needless_option_take.rs +++ b/src/tools/clippy/tests/ui/needless_option_take.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] struct MyStruct; impl MyStruct { diff --git a/src/tools/clippy/tests/ui/needless_option_take.stderr b/src/tools/clippy/tests/ui/needless_option_take.stderr index 9054463c07cd2..c6fc298e6b25b 100644 --- a/src/tools/clippy/tests/ui/needless_option_take.stderr +++ b/src/tools/clippy/tests/ui/needless_option_take.stderr @@ -1,5 +1,5 @@ error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:23:5 + --> tests/ui/needless_option_take.rs:24:5 | LL | x.as_ref().take(); | ^^^^^^^^^^------- @@ -11,7 +11,7 @@ LL | x.as_ref().take(); = help: to override `-D warnings` add `#[allow(clippy::needless_option_take)]` error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:31:13 + --> tests/ui/needless_option_take.rs:32:13 | LL | let y = x.as_mut().take(); | ^^^^^^^^^^------- @@ -21,7 +21,7 @@ LL | let y = x.as_mut().take(); = note: `as_mut` creates a temporary value, so calling take() has no effect error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:34:13 + --> tests/ui/needless_option_take.rs:35:13 | LL | let y = x.replace(289).take(); | ^^^^^^^^^^^^^^------- @@ -31,7 +31,7 @@ LL | let y = x.replace(289).take(); = note: `replace` creates a temporary value, so calling take() has no effect error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:37:13 + --> tests/ui/needless_option_take.rs:38:13 | LL | let y = Some(3).as_mut().take(); | ^^^^^^^^^^^^^^^^------- @@ -41,7 +41,7 @@ LL | let y = Some(3).as_mut().take(); = note: `as_mut` creates a temporary value, so calling take() has no effect error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:40:13 + --> tests/ui/needless_option_take.rs:41:13 | LL | let y = Option::as_mut(&mut x).take(); | ^^^^^^^^^^^^^^^^^^^^^^------- @@ -51,7 +51,7 @@ LL | let y = Option::as_mut(&mut x).take(); = note: `as_mut` creates a temporary value, so calling take() has no effect error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:44:13 + --> tests/ui/needless_option_take.rs:45:13 | LL | let x = return_option().take(); | ^^^^^^^^^^^^^^^------- @@ -61,7 +61,7 @@ LL | let x = return_option().take(); = note: `return_option` creates a temporary value, so calling take() has no effect error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:48:13 + --> tests/ui/needless_option_take.rs:49:13 | LL | let x = MyStruct::get_option().take(); | ^^^^^^^^^^^^^^^^^^^^^^------- @@ -71,7 +71,7 @@ LL | let x = MyStruct::get_option().take(); = note: `get_option` creates a temporary value, so calling take() has no effect error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:54:13 + --> tests/ui/needless_option_take.rs:55:13 | LL | let y = my_vec.first().take(); | ^^^^^^^^^^^^^^------- @@ -81,7 +81,7 @@ LL | let y = my_vec.first().take(); = note: `first` creates a temporary value, so calling take() has no effect error: called `Option::take()` on a temporary value - --> tests/ui/needless_option_take.rs:57:13 + --> tests/ui/needless_option_take.rs:58:13 | LL | let y = my_vec.first().take(); | ^^^^^^^^^^^^^^------- diff --git a/src/tools/clippy/tests/ui/needless_return.fixed b/src/tools/clippy/tests/ui/needless_return.fixed index f5f8bb21e815b..9afaf3f270f5e 100644 --- a/src/tools/clippy/tests/ui/needless_return.fixed +++ b/src/tools/clippy/tests/ui/needless_return.fixed @@ -1,6 +1,6 @@ //@aux-build:proc_macros.rs #![feature(yeet_expr)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow( clippy::if_same_then_else, clippy::single_match, diff --git a/src/tools/clippy/tests/ui/needless_return.rs b/src/tools/clippy/tests/ui/needless_return.rs index 495516c1c2e5d..430e2be90a45e 100644 --- a/src/tools/clippy/tests/ui/needless_return.rs +++ b/src/tools/clippy/tests/ui/needless_return.rs @@ -1,6 +1,6 @@ //@aux-build:proc_macros.rs #![feature(yeet_expr)] -#![allow(unused)] +#![allow(unused, todo_macro_calls)] #![allow( clippy::if_same_then_else, clippy::single_match, diff --git a/src/tools/clippy/tests/ui/never_loop.rs b/src/tools/clippy/tests/ui/never_loop.rs index 7b2d66450f171..f82e8c1299a41 100644 --- a/src/tools/clippy/tests/ui/never_loop.rs +++ b/src/tools/clippy/tests/ui/never_loop.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![feature(try_blocks)] #![expect(clippy::eq_op, clippy::single_match, clippy::while_immutable_condition)] //@no-rustfix diff --git a/src/tools/clippy/tests/ui/never_loop.stderr b/src/tools/clippy/tests/ui/never_loop.stderr index 815758107884c..404d0cb57508d 100644 --- a/src/tools/clippy/tests/ui/never_loop.stderr +++ b/src/tools/clippy/tests/ui/never_loop.stderr @@ -1,5 +1,5 @@ error: this loop never actually loops - --> tests/ui/never_loop.rs:9:5 + --> tests/ui/never_loop.rs:10:5 | LL | / loop { ... | @@ -10,7 +10,7 @@ LL | | } = note: `#[deny(clippy::never_loop)]` on by default error: this loop never actually loops - --> tests/ui/never_loop.rs:33:5 + --> tests/ui/never_loop.rs:34:5 | LL | / loop { ... | @@ -19,7 +19,7 @@ LL | | } | |_____^ error: this loop never actually loops - --> tests/ui/never_loop.rs:55:5 + --> tests/ui/never_loop.rs:56:5 | LL | / loop { ... | @@ -28,7 +28,7 @@ LL | | } | |_____^ error: this loop never actually loops - --> tests/ui/never_loop.rs:59:9 + --> tests/ui/never_loop.rs:60:9 | LL | / while i == 0 { ... | @@ -36,7 +36,7 @@ LL | | } | |_________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:73:9 + --> tests/ui/never_loop.rs:74:9 | LL | / loop { ... | @@ -45,7 +45,7 @@ LL | | } | |_________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:111:5 + --> tests/ui/never_loop.rs:112:5 | LL | / while let Some(y) = x { ... | @@ -53,7 +53,7 @@ LL | | } | |_____^ error: this loop never actually loops - --> tests/ui/never_loop.rs:120:5 + --> tests/ui/never_loop.rs:121:5 | LL | / for x in 0..10 { ... | @@ -67,7 +67,7 @@ LL + if let Some(x) = (0..10).next() { | error: this loop never actually loops - --> tests/ui/never_loop.rs:170:5 + --> tests/ui/never_loop.rs:171:5 | LL | / 'outer: while a { ... | @@ -76,7 +76,7 @@ LL | | } | |_____^ error: this loop never actually loops - --> tests/ui/never_loop.rs:187:9 + --> tests/ui/never_loop.rs:188:9 | LL | / while false { LL | | @@ -86,7 +86,7 @@ LL | | } | |_________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:240:13 + --> tests/ui/never_loop.rs:241:13 | LL | let _ = loop { | _____________^ @@ -99,7 +99,7 @@ LL | | }; | |_____^ error: this loop never actually loops - --> tests/ui/never_loop.rs:263:5 + --> tests/ui/never_loop.rs:264:5 | LL | / 'a: loop { LL | | @@ -110,7 +110,7 @@ LL | | } | |_____^ error: sub-expression diverges - --> tests/ui/never_loop.rs:268:17 + --> tests/ui/never_loop.rs:269:17 | LL | break 'a; | ^^^^^^^^ @@ -119,7 +119,7 @@ LL | break 'a; = help: to override `-D warnings` add `#[allow(clippy::diverging_sub_expression)]` error: this loop never actually loops - --> tests/ui/never_loop.rs:300:13 + --> tests/ui/never_loop.rs:301:13 | LL | / for _ in 0..20 { LL | | @@ -135,7 +135,7 @@ LL + if let Some(_) = (0..20).next() { | error: this loop never actually loops - --> tests/ui/never_loop.rs:385:13 + --> tests/ui/never_loop.rs:386:13 | LL | / 'c: loop { LL | | @@ -145,7 +145,7 @@ LL | | } | |_____________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:397:5 + --> tests/ui/never_loop.rs:398:5 | LL | / loop { LL | | @@ -155,7 +155,7 @@ LL | | } | |_____^ error: this loop never actually loops - --> tests/ui/never_loop.rs:402:5 + --> tests/ui/never_loop.rs:403:5 | LL | / loop { LL | | @@ -165,7 +165,7 @@ LL | | } | |_____^ error: this loop never actually loops - --> tests/ui/never_loop.rs:423:5 + --> tests/ui/never_loop.rs:424:5 | LL | / for v in 0..10 { LL | | @@ -183,7 +183,7 @@ LL ~ | error: this loop never actually loops - --> tests/ui/never_loop.rs:431:5 + --> tests/ui/never_loop.rs:432:5 | LL | / 'outer: for v in 0..10 { LL | | @@ -194,7 +194,7 @@ LL | | } | |_____^ | help: this code is unreachable. Consider moving the reachable parts out - --> tests/ui/never_loop.rs:433:9 + --> tests/ui/never_loop.rs:434:9 | LL | / loop { LL | | @@ -202,7 +202,7 @@ LL | | break 'outer; LL | | } | |_________^ help: this code is unreachable. Consider moving the reachable parts out - --> tests/ui/never_loop.rs:437:9 + --> tests/ui/never_loop.rs:438:9 | LL | return; | ^^^^^^^ @@ -213,7 +213,7 @@ LL + if let Some(v) = (0..10).next() { | error: this loop never actually loops - --> tests/ui/never_loop.rs:433:9 + --> tests/ui/never_loop.rs:434:9 | LL | / loop { LL | | @@ -222,7 +222,7 @@ LL | | } | |_________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:440:5 + --> tests/ui/never_loop.rs:441:5 | LL | / for v in 0..10 { LL | | @@ -239,7 +239,7 @@ LL + if let Some(v) = (0..10).next() { | error: this loop never actually loops - --> tests/ui/never_loop.rs:442:9 + --> tests/ui/never_loop.rs:443:9 | LL | / 'inner: loop { LL | | @@ -248,7 +248,7 @@ LL | | } | |_________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:453:5 + --> tests/ui/never_loop.rs:454:5 | LL | / 'a: for _ in 0..1 { LL | | @@ -264,7 +264,7 @@ LL ~ | error: this loop never actually loops - --> tests/ui/never_loop.rs:459:5 + --> tests/ui/never_loop.rs:460:5 | LL | / 'a: for i in 0..1 { LL | | @@ -288,7 +288,7 @@ LL ~ | error: this loop never actually loops - --> tests/ui/never_loop.rs:474:5 + --> tests/ui/never_loop.rs:475:5 | LL | / for v in 0..10 { LL | | @@ -311,7 +311,7 @@ LL ~ | error: this loop never actually loops - --> tests/ui/never_loop.rs:485:5 + --> tests/ui/never_loop.rs:486:5 | LL | / 'bar: for _ in 0..100 { LL | | @@ -321,7 +321,7 @@ LL | | } | |_____^ | help: this code is unreachable. Consider moving the reachable parts out - --> tests/ui/never_loop.rs:487:9 + --> tests/ui/never_loop.rs:488:9 | LL | / loop { LL | | @@ -336,7 +336,7 @@ LL + if let Some(_) = (0..100).next() { | error: this loop never actually loops - --> tests/ui/never_loop.rs:487:9 + --> tests/ui/never_loop.rs:488:9 | LL | / loop { LL | | @@ -346,7 +346,7 @@ LL | | } | |_________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:494:5 + --> tests/ui/never_loop.rs:495:5 | LL | / 'foo: for _ in 0..100 { LL | | @@ -356,7 +356,7 @@ LL | | } | |_____^ | help: this code is unreachable. Consider moving the reachable parts out - --> tests/ui/never_loop.rs:496:9 + --> tests/ui/never_loop.rs:497:9 | LL | / loop { LL | | @@ -372,7 +372,7 @@ LL + if let Some(_) = (0..100).next() { | error: this loop never actually loops - --> tests/ui/never_loop.rs:496:9 + --> tests/ui/never_loop.rs:497:9 | LL | / loop { LL | | @@ -383,7 +383,7 @@ LL | | } | |_________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:499:13 + --> tests/ui/never_loop.rs:500:13 | LL | / loop { LL | | @@ -393,7 +393,7 @@ LL | | } | |_____________^ error: this loop never actually loops - --> tests/ui/never_loop.rs:522:5 + --> tests/ui/never_loop.rs:523:5 | LL | / loop { LL | | unsafe { diff --git a/src/tools/clippy/tests/ui/new_without_default.fixed b/src/tools/clippy/tests/ui/new_without_default.fixed index f6591820feeb5..42783ae375449 100644 --- a/src/tools/clippy/tests/ui/new_without_default.fixed +++ b/src/tools/clippy/tests/ui/new_without_default.fixed @@ -3,7 +3,7 @@ clippy::extra_unused_lifetimes, clippy::extra_unused_type_parameters, clippy::needless_lifetimes -)] +, todo_macro_calls)] #![warn(clippy::new_without_default)] pub struct Foo; diff --git a/src/tools/clippy/tests/ui/new_without_default.rs b/src/tools/clippy/tests/ui/new_without_default.rs index d3447f2e16b2e..0451fcda09b65 100644 --- a/src/tools/clippy/tests/ui/new_without_default.rs +++ b/src/tools/clippy/tests/ui/new_without_default.rs @@ -3,7 +3,7 @@ clippy::extra_unused_lifetimes, clippy::extra_unused_type_parameters, clippy::needless_lifetimes -)] +, todo_macro_calls)] #![warn(clippy::new_without_default)] pub struct Foo; diff --git a/src/tools/clippy/tests/ui/non_canonical_clone_impl.fixed b/src/tools/clippy/tests/ui/non_canonical_clone_impl.fixed index 3e2ffaf014680..0142b51e3aa69 100644 --- a/src/tools/clippy/tests/ui/non_canonical_clone_impl.fixed +++ b/src/tools/clippy/tests/ui/non_canonical_clone_impl.fixed @@ -1,5 +1,5 @@ //@aux-build:proc_macro_derive.rs -#![allow(clippy::clone_on_copy, unused)] +#![allow(clippy::clone_on_copy, unused, todo_macro_calls)] #![allow(clippy::assigning_clones)] #![no_main] diff --git a/src/tools/clippy/tests/ui/non_canonical_clone_impl.rs b/src/tools/clippy/tests/ui/non_canonical_clone_impl.rs index abe3883207522..17e28f2933a68 100644 --- a/src/tools/clippy/tests/ui/non_canonical_clone_impl.rs +++ b/src/tools/clippy/tests/ui/non_canonical_clone_impl.rs @@ -1,5 +1,5 @@ //@aux-build:proc_macro_derive.rs -#![allow(clippy::clone_on_copy, unused)] +#![allow(clippy::clone_on_copy, unused, todo_macro_calls)] #![allow(clippy::assigning_clones)] #![no_main] diff --git a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.fixed b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.fixed index aa23fd99ad77b..fa2e6329b16b2 100644 --- a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.fixed +++ b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.fixed @@ -1,4 +1,5 @@ //@aux-build:proc_macro_derive.rs +#![allow(todo_macro_calls)] #![no_main] extern crate proc_macros; diff --git a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.rs b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.rs index da7f73f7c4bef..782eb102384f7 100644 --- a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.rs +++ b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.rs @@ -1,4 +1,5 @@ //@aux-build:proc_macro_derive.rs +#![allow(todo_macro_calls)] #![no_main] extern crate proc_macros; diff --git a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.stderr b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.stderr index 36f68ae897d3d..ffd0611497fa7 100644 --- a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.stderr +++ b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.stderr @@ -1,5 +1,5 @@ error: non-canonical implementation of `partial_cmp` on an `Ord` type - --> tests/ui/non_canonical_partial_ord_impl.rs:20:1 + --> tests/ui/non_canonical_partial_ord_impl.rs:21:1 | LL | / impl PartialOrd for A { LL | | @@ -20,7 +20,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp | error: non-canonical implementation of `partial_cmp` on an `Ord` type - --> tests/ui/non_canonical_partial_ord_impl.rs:55:1 + --> tests/ui/non_canonical_partial_ord_impl.rs:56:1 | LL | / impl PartialOrd for C { LL | | @@ -39,7 +39,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp | error: non-canonical implementation of `partial_cmp` on an `Ord` type - --> tests/ui/non_canonical_partial_ord_impl.rs:191:9 + --> tests/ui/non_canonical_partial_ord_impl.rs:192:9 | LL | / impl PartialOrd for A { LL | | @@ -59,7 +59,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option { Some( | error: non-canonical implementation of `partial_cmp` on an `Ord` type - --> tests/ui/non_canonical_partial_ord_impl.rs:271:1 + --> tests/ui/non_canonical_partial_ord_impl.rs:272:1 | LL | / impl PartialOrd for K { LL | | @@ -78,7 +78,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp | error: non-canonical implementation of `partial_cmp` on an `Ord` type - --> tests/ui/non_canonical_partial_ord_impl.rs:289:1 + --> tests/ui/non_canonical_partial_ord_impl.rs:290:1 | LL | / impl PartialOrd for L { LL | | diff --git a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl_fully_qual.rs b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl_fully_qual.rs index 99cd7ebac60cd..55d8ae10c4de7 100644 --- a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl_fully_qual.rs +++ b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl_fully_qual.rs @@ -1,5 +1,6 @@ // This test's filename is... a bit verbose. But it ensures we suggest the correct code when `Ord` // is not in scope. +#![allow(todo_macro_calls)] #![no_main] #![no_implicit_prelude] //@no-rustfix diff --git a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl_fully_qual.stderr b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl_fully_qual.stderr index 83ca78bbb59e6..6936c3c642fc0 100644 --- a/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl_fully_qual.stderr +++ b/src/tools/clippy/tests/ui/non_canonical_partial_ord_impl_fully_qual.stderr @@ -1,5 +1,5 @@ error: non-canonical implementation of `partial_cmp` on an `Ord` type - --> tests/ui/non_canonical_partial_ord_impl_fully_qual.rs:23:1 + --> tests/ui/non_canonical_partial_ord_impl_fully_qual.rs:24:1 | LL | / impl PartialOrd for A { LL | | @@ -21,7 +21,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp | error: non-canonical implementation of `partial_cmp` on an `Ord` type - --> tests/ui/non_canonical_partial_ord_impl_fully_qual.rs:47:1 + --> tests/ui/non_canonical_partial_ord_impl_fully_qual.rs:48:1 | LL | / impl PartialOrd for B { LL | | diff --git a/src/tools/clippy/tests/ui/nonminimal_bool.rs b/src/tools/clippy/tests/ui/nonminimal_bool.rs index d040ba6ee83cb..de3d88875b0b8 100644 --- a/src/tools/clippy/tests/ui/nonminimal_bool.rs +++ b/src/tools/clippy/tests/ui/nonminimal_bool.rs @@ -4,7 +4,7 @@ clippy::diverging_sub_expression, clippy::needless_ifs, clippy::redundant_pattern_matching -)] +, todo_macro_calls)] #![warn(clippy::nonminimal_bool)] #![allow(clippy::useless_vec)] diff --git a/src/tools/clippy/tests/ui/option_if_let_else.fixed b/src/tools/clippy/tests/ui/option_if_let_else.fixed index a2ecea773efe5..31dca3a9b4430 100644 --- a/src/tools/clippy/tests/ui/option_if_let_else.fixed +++ b/src/tools/clippy/tests/ui/option_if_let_else.fixed @@ -8,7 +8,7 @@ clippy::manual_unwrap_or_default, clippy::manual_unwrap_or, clippy::unnecessary_option_map_or_else -)] +, todo_macro_calls)] fn bad1(string: Option<&str>) -> (bool, &str) { string.map_or((false, "hello"), |x| (true, x)) diff --git a/src/tools/clippy/tests/ui/option_if_let_else.rs b/src/tools/clippy/tests/ui/option_if_let_else.rs index 3adbc785237f6..67f8ba40bb4b0 100644 --- a/src/tools/clippy/tests/ui/option_if_let_else.rs +++ b/src/tools/clippy/tests/ui/option_if_let_else.rs @@ -8,7 +8,7 @@ clippy::manual_unwrap_or_default, clippy::manual_unwrap_or, clippy::unnecessary_option_map_or_else -)] +, todo_macro_calls)] fn bad1(string: Option<&str>) -> (bool, &str) { if let Some(x) = string { diff --git a/src/tools/clippy/tests/ui/panic_in_result_fn.rs b/src/tools/clippy/tests/ui/panic_in_result_fn.rs index 005e38db90216..54d0dcc665cbd 100644 --- a/src/tools/clippy/tests/ui/panic_in_result_fn.rs +++ b/src/tools/clippy/tests/ui/panic_in_result_fn.rs @@ -1,5 +1,5 @@ #![warn(clippy::panic_in_result_fn)] -#![allow(clippy::unnecessary_wraps)] +#![allow(clippy::unnecessary_wraps, todo_macro_calls)] struct A; impl A { diff --git a/src/tools/clippy/tests/ui/panicking_macros.rs b/src/tools/clippy/tests/ui/panicking_macros.rs index a9728d4708e6e..d1a5ab46d10d5 100644 --- a/src/tools/clippy/tests/ui/panicking_macros.rs +++ b/src/tools/clippy/tests/ui/panicking_macros.rs @@ -1,4 +1,4 @@ -#![allow(clippy::assertions_on_constants, clippy::eq_op, clippy::let_unit_value)] +#![allow(clippy::assertions_on_constants, clippy::eq_op, clippy::let_unit_value, todo_macro_calls)] #![warn(clippy::unimplemented, clippy::unreachable, clippy::todo, clippy::panic)] extern crate core; diff --git a/src/tools/clippy/tests/ui/ptr_arg.rs b/src/tools/clippy/tests/ui/ptr_arg.rs index be14e0762ff42..0595f2f1ada16 100644 --- a/src/tools/clippy/tests/ui/ptr_arg.rs +++ b/src/tools/clippy/tests/ui/ptr_arg.rs @@ -4,7 +4,7 @@ clippy::needless_lifetimes, clippy::redundant_clone, clippy::needless_pass_by_ref_mut -)] +, todo_macro_calls)] #![warn(clippy::ptr_arg)] //@no-rustfix use std::borrow::Cow; diff --git a/src/tools/clippy/tests/ui/question_mark.fixed b/src/tools/clippy/tests/ui/question_mark.fixed index 786431bc1f539..774a9b71ab08a 100644 --- a/src/tools/clippy/tests/ui/question_mark.fixed +++ b/src/tools/clippy/tests/ui/question_mark.fixed @@ -4,7 +4,7 @@ clippy::no_effect, clippy::needless_return, clippy::toplevel_ref_arg -)] +, todo_macro_calls)] use std::sync::MutexGuard; diff --git a/src/tools/clippy/tests/ui/question_mark.rs b/src/tools/clippy/tests/ui/question_mark.rs index 7cbcc604eb591..8e3b8ac533939 100644 --- a/src/tools/clippy/tests/ui/question_mark.rs +++ b/src/tools/clippy/tests/ui/question_mark.rs @@ -4,7 +4,7 @@ clippy::no_effect, clippy::needless_return, clippy::toplevel_ref_arg -)] +, todo_macro_calls)] use std::sync::MutexGuard; diff --git a/src/tools/clippy/tests/ui/redundant_guards.fixed b/src/tools/clippy/tests/ui/redundant_guards.fixed index f433d8263023a..da48172a50fff 100644 --- a/src/tools/clippy/tests/ui/redundant_guards.fixed +++ b/src/tools/clippy/tests/ui/redundant_guards.fixed @@ -1,5 +1,5 @@ //@aux-build:proc_macros.rs -#![allow(clippy::no_effect, unused, clippy::single_match, invalid_nan_comparisons)] +#![allow(clippy::no_effect, unused, clippy::single_match, invalid_nan_comparisons, todo_macro_calls)] #![warn(clippy::redundant_guards)] #[macro_use] diff --git a/src/tools/clippy/tests/ui/redundant_guards.rs b/src/tools/clippy/tests/ui/redundant_guards.rs index 02115af75ed06..07569dbff2046 100644 --- a/src/tools/clippy/tests/ui/redundant_guards.rs +++ b/src/tools/clippy/tests/ui/redundant_guards.rs @@ -1,5 +1,5 @@ //@aux-build:proc_macros.rs -#![allow(clippy::no_effect, unused, clippy::single_match, invalid_nan_comparisons)] +#![allow(clippy::no_effect, unused, clippy::single_match, invalid_nan_comparisons, todo_macro_calls)] #![warn(clippy::redundant_guards)] #[macro_use] diff --git a/src/tools/clippy/tests/ui/single_match.fixed b/src/tools/clippy/tests/ui/single_match.fixed index fe28674ec18e5..8050656fa7a77 100644 --- a/src/tools/clippy/tests/ui/single_match.fixed +++ b/src/tools/clippy/tests/ui/single_match.fixed @@ -7,7 +7,7 @@ clippy::redundant_guards, clippy::redundant_pattern_matching, clippy::manual_unwrap_or_default -)] +, todo_macro_calls)] fn dummy() {} fn single_match() { diff --git a/src/tools/clippy/tests/ui/single_match.rs b/src/tools/clippy/tests/ui/single_match.rs index 0f558cb5f786c..331f467d750c2 100644 --- a/src/tools/clippy/tests/ui/single_match.rs +++ b/src/tools/clippy/tests/ui/single_match.rs @@ -7,7 +7,7 @@ clippy::redundant_guards, clippy::redundant_pattern_matching, clippy::manual_unwrap_or_default -)] +, todo_macro_calls)] fn dummy() {} fn single_match() { diff --git a/src/tools/clippy/tests/ui/test_attr_in_doctest.rs b/src/tools/clippy/tests/ui/test_attr_in_doctest.rs index ee48cebc5e0cf..15d0815b28e01 100644 --- a/src/tools/clippy/tests/ui/test_attr_in_doctest.rs +++ b/src/tools/clippy/tests/ui/test_attr_in_doctest.rs @@ -1,3 +1,5 @@ +#![allow(todo_macro_calls)] + /// This is a test for `#[test]` in doctests /// /// # Examples @@ -9,7 +11,7 @@ /// assert_eq!(1, 1); /// } /// ``` -/// +/// /// Make sure we catch multiple tests in one example, /// and show that we really parse the attr: /// ``` @@ -27,7 +29,7 @@ /// "); /// } /// ``` -/// +/// /// We don't catch examples that aren't run: /// ```ignore /// #[test] diff --git a/src/tools/clippy/tests/ui/test_attr_in_doctest.stderr b/src/tools/clippy/tests/ui/test_attr_in_doctest.stderr index a8fa53034036b..7b7f8b5377f27 100644 --- a/src/tools/clippy/tests/ui/test_attr_in_doctest.stderr +++ b/src/tools/clippy/tests/ui/test_attr_in_doctest.stderr @@ -1,5 +1,5 @@ error: unit tests in doctest are not executed - --> tests/ui/test_attr_in_doctest.rs:6:5 + --> tests/ui/test_attr_in_doctest.rs:8:5 | LL | /// #[test] | ^^^^^^^ @@ -8,7 +8,7 @@ LL | /// #[test] = help: to override `-D warnings` add `#[allow(clippy::test_attr_in_doctest)]` error: unit tests in doctest are not executed - --> tests/ui/test_attr_in_doctest.rs:16:5 + --> tests/ui/test_attr_in_doctest.rs:18:5 | LL | /// #[test] | ^^^^^^^ diff --git a/src/tools/clippy/tests/ui/trait_duplication_in_bounds_unfixable.rs b/src/tools/clippy/tests/ui/trait_duplication_in_bounds_unfixable.rs index cf72ed844a78c..c7f1aa0ae32b5 100644 --- a/src/tools/clippy/tests/ui/trait_duplication_in_bounds_unfixable.rs +++ b/src/tools/clippy/tests/ui/trait_duplication_in_bounds_unfixable.rs @@ -1,5 +1,5 @@ #![deny(clippy::trait_duplication_in_bounds)] -#![allow(clippy::multiple_bound_locations)] +#![allow(clippy::multiple_bound_locations, todo_macro_calls)] use std::collections::BTreeMap; use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign}; diff --git a/src/tools/clippy/tests/ui/unused_async.rs b/src/tools/clippy/tests/ui/unused_async.rs index b6780d240b17c..b32b2059e1741 100644 --- a/src/tools/clippy/tests/ui/unused_async.rs +++ b/src/tools/clippy/tests/ui/unused_async.rs @@ -1,5 +1,5 @@ #![warn(clippy::unused_async)] -#![allow(incomplete_features)] +#![allow(incomplete_features, todo_macro_calls)] use std::future::Future; use std::pin::Pin; diff --git a/src/tools/clippy/tests/ui/unused_io_amount.rs b/src/tools/clippy/tests/ui/unused_io_amount.rs index 32a50375806a3..7c659396f7ac9 100644 --- a/src/tools/clippy/tests/ui/unused_io_amount.rs +++ b/src/tools/clippy/tests/ui/unused_io_amount.rs @@ -1,4 +1,4 @@ -#![allow(dead_code, clippy::needless_pass_by_ref_mut)] +#![allow(dead_code, clippy::needless_pass_by_ref_mut, todo_macro_calls)] #![allow(clippy::redundant_pattern_matching)] #![warn(clippy::unused_io_amount)] diff --git a/src/tools/clippy/tests/ui/unused_self.rs b/src/tools/clippy/tests/ui/unused_self.rs index cb80d946acedb..381d598117796 100644 --- a/src/tools/clippy/tests/ui/unused_self.rs +++ b/src/tools/clippy/tests/ui/unused_self.rs @@ -1,5 +1,5 @@ #![warn(clippy::unused_self)] -#![allow(clippy::boxed_local, clippy::fn_params_excessive_bools)] +#![allow(clippy::boxed_local, clippy::fn_params_excessive_bools, todo_macro_calls)] mod unused_self { use std::pin::Pin; diff --git a/src/tools/clippy/tests/ui/unused_unit.edition2021.fixed b/src/tools/clippy/tests/ui/unused_unit.edition2021.fixed index 8e12bd2c8c7b9..2d8befa35c61d 100644 --- a/src/tools/clippy/tests/ui/unused_unit.edition2021.fixed +++ b/src/tools/clippy/tests/ui/unused_unit.edition2021.fixed @@ -13,7 +13,7 @@ #![rustfmt::skip] #![deny(clippy::unused_unit)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] #![allow(clippy::from_over_into)] struct Unitter; diff --git a/src/tools/clippy/tests/ui/unused_unit.edition2024.fixed b/src/tools/clippy/tests/ui/unused_unit.edition2024.fixed index 688d2fe9afa28..01ada13c5e00e 100644 --- a/src/tools/clippy/tests/ui/unused_unit.edition2024.fixed +++ b/src/tools/clippy/tests/ui/unused_unit.edition2024.fixed @@ -13,7 +13,7 @@ #![rustfmt::skip] #![deny(clippy::unused_unit)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] #![allow(clippy::from_over_into)] struct Unitter; diff --git a/src/tools/clippy/tests/ui/unused_unit.rs b/src/tools/clippy/tests/ui/unused_unit.rs index 31e980f2655c6..6c080ca058634 100644 --- a/src/tools/clippy/tests/ui/unused_unit.rs +++ b/src/tools/clippy/tests/ui/unused_unit.rs @@ -13,7 +13,7 @@ #![rustfmt::skip] #![deny(clippy::unused_unit)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] #![allow(clippy::from_over_into)] struct Unitter; diff --git a/src/tools/clippy/tests/ui/use_self.fixed b/src/tools/clippy/tests/ui/use_self.fixed index 37559f9a23673..1b0cc4f6401b1 100644 --- a/src/tools/clippy/tests/ui/use_self.fixed +++ b/src/tools/clippy/tests/ui/use_self.fixed @@ -1,7 +1,7 @@ //@aux-build:proc_macro_derive.rs #![warn(clippy::use_self)] -#![allow(dead_code, unreachable_code)] +#![allow(dead_code, unreachable_code, todo_macro_calls)] #![allow( clippy::should_implement_trait, clippy::upper_case_acronyms, diff --git a/src/tools/clippy/tests/ui/use_self.rs b/src/tools/clippy/tests/ui/use_self.rs index 74abd2f61bf92..0dead3b633d5b 100644 --- a/src/tools/clippy/tests/ui/use_self.rs +++ b/src/tools/clippy/tests/ui/use_self.rs @@ -1,7 +1,7 @@ //@aux-build:proc_macro_derive.rs #![warn(clippy::use_self)] -#![allow(dead_code, unreachable_code)] +#![allow(dead_code, unreachable_code, todo_macro_calls)] #![allow( clippy::should_implement_trait, clippy::upper_case_acronyms, diff --git a/src/tools/clippy/tests/ui/vec_box_sized.rs b/src/tools/clippy/tests/ui/vec_box_sized.rs index 897add423b6d4..65a3934cfb89c 100644 --- a/src/tools/clippy/tests/ui/vec_box_sized.rs +++ b/src/tools/clippy/tests/ui/vec_box_sized.rs @@ -1,6 +1,6 @@ //@no-rustfix -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] #![feature(allocator_api)] use std::alloc::{AllocError, Allocator, Layout}; diff --git a/src/tools/clippy/tests/ui/wrong_self_convention2.rs b/src/tools/clippy/tests/ui/wrong_self_convention2.rs index 0a3e4982a49ac..852cdd3293ac5 100644 --- a/src/tools/clippy/tests/ui/wrong_self_convention2.rs +++ b/src/tools/clippy/tests/ui/wrong_self_convention2.rs @@ -1,5 +1,5 @@ #![warn(clippy::wrong_self_convention)] -#![allow(dead_code)] +#![allow(dead_code, todo_macro_calls)] fn main() {} diff --git a/src/tools/clippy/tests/ui/zero_sized_btreemap_values.rs b/src/tools/clippy/tests/ui/zero_sized_btreemap_values.rs index cdeea15f28bc8..da8309922eb39 100644 --- a/src/tools/clippy/tests/ui/zero_sized_btreemap_values.rs +++ b/src/tools/clippy/tests/ui/zero_sized_btreemap_values.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::zero_sized_map_values)] use std::collections::BTreeMap; diff --git a/src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr b/src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr index 40acb0b211f7f..890f4f611ea0b 100644 --- a/src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr +++ b/src/tools/clippy/tests/ui/zero_sized_btreemap_values.stderr @@ -1,5 +1,5 @@ error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:5:28 + --> tests/ui/zero_sized_btreemap_values.rs:6:28 | LL | const CONST_NOT_OK: Option> = None; | ^^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ LL | const CONST_NOT_OK: Option> = None; = help: to override `-D warnings` add `#[allow(clippy::zero_sized_map_values)]` error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:9:30 + --> tests/ui/zero_sized_btreemap_values.rs:10:30 | LL | static STATIC_NOT_OK: Option> = None; | ^^^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | static STATIC_NOT_OK: Option> = None; = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:13:17 + --> tests/ui/zero_sized_btreemap_values.rs:14:17 | LL | type NotOkMap = BTreeMap; | ^^^^^^^^^^^^^^^^^^^^ @@ -25,7 +25,7 @@ LL | type NotOkMap = BTreeMap; = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:18:11 + --> tests/ui/zero_sized_btreemap_values.rs:19:11 | LL | NotOk(BTreeMap), | ^^^^^^^^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ LL | NotOk(BTreeMap), = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:24:13 + --> tests/ui/zero_sized_btreemap_values.rs:25:13 | LL | not_ok: BTreeMap, | ^^^^^^^^^^^^^^^^^^^^ @@ -41,7 +41,7 @@ LL | not_ok: BTreeMap, = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:26:22 + --> tests/ui/zero_sized_btreemap_values.rs:27:22 | LL | also_not_ok: Vec>, | ^^^^^^^^^^^^^^^^^^^ @@ -49,7 +49,7 @@ LL | also_not_ok: Vec>, = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:35:30 + --> tests/ui/zero_sized_btreemap_values.rs:36:30 | LL | fn weird_map(&self, map: BTreeMap); | ^^^^^^^^^^^^^^^^^^^ @@ -57,7 +57,7 @@ LL | fn weird_map(&self, map: BTreeMap); = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:44:25 + --> tests/ui/zero_sized_btreemap_values.rs:45:25 | LL | fn not_ok(&self) -> BTreeMap { | ^^^^^^^^^^^^^^^^^^^^ @@ -65,7 +65,7 @@ LL | fn not_ok(&self) -> BTreeMap { = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:63:14 + --> tests/ui/zero_sized_btreemap_values.rs:64:14 | LL | fn test(map: BTreeMap, key: &str) -> BTreeMap { | ^^^^^^^^^^^^^^^^^^^^ @@ -73,7 +73,7 @@ LL | fn test(map: BTreeMap, key: &str) -> BTreeMap { = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:63:50 + --> tests/ui/zero_sized_btreemap_values.rs:64:50 | LL | fn test(map: BTreeMap, key: &str) -> BTreeMap { | ^^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ LL | fn test(map: BTreeMap, key: &str) -> BTreeMap { = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:75:35 + --> tests/ui/zero_sized_btreemap_values.rs:76:35 | LL | let _: BTreeMap = BTreeMap::new(); | ^^^^^^^^ @@ -89,7 +89,7 @@ LL | let _: BTreeMap = BTreeMap::new(); = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:75:12 + --> tests/ui/zero_sized_btreemap_values.rs:76:12 | LL | let _: BTreeMap = BTreeMap::new(); | ^^^^^^^^^^^^^^^^^^^^ @@ -97,7 +97,7 @@ LL | let _: BTreeMap = BTreeMap::new(); = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_btreemap_values.rs:81:12 + --> tests/ui/zero_sized_btreemap_values.rs:82:12 | LL | let _: BTreeMap<_, _> = std::iter::empty::<(String, ())>().collect(); | ^^^^^^^^^^^^^^ diff --git a/src/tools/clippy/tests/ui/zero_sized_hashmap_values.rs b/src/tools/clippy/tests/ui/zero_sized_hashmap_values.rs index ee2fd19b5ee5a..0750d95770364 100644 --- a/src/tools/clippy/tests/ui/zero_sized_hashmap_values.rs +++ b/src/tools/clippy/tests/ui/zero_sized_hashmap_values.rs @@ -1,3 +1,4 @@ +#![allow(todo_macro_calls)] #![warn(clippy::zero_sized_map_values)] use std::collections::HashMap; diff --git a/src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr b/src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr index 52ffef280c1df..9cdf8d5d98be5 100644 --- a/src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr +++ b/src/tools/clippy/tests/ui/zero_sized_hashmap_values.stderr @@ -1,5 +1,5 @@ error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:5:28 + --> tests/ui/zero_sized_hashmap_values.rs:6:28 | LL | const CONST_NOT_OK: Option> = None; | ^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ LL | const CONST_NOT_OK: Option> = None; = help: to override `-D warnings` add `#[allow(clippy::zero_sized_map_values)]` error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:9:30 + --> tests/ui/zero_sized_hashmap_values.rs:10:30 | LL | static STATIC_NOT_OK: Option> = None; | ^^^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | static STATIC_NOT_OK: Option> = None; = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:13:17 + --> tests/ui/zero_sized_hashmap_values.rs:14:17 | LL | type NotOkMap = HashMap; | ^^^^^^^^^^^^^^^^^^^ @@ -25,7 +25,7 @@ LL | type NotOkMap = HashMap; = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:18:11 + --> tests/ui/zero_sized_hashmap_values.rs:19:11 | LL | NotOk(HashMap), | ^^^^^^^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ LL | NotOk(HashMap), = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:24:13 + --> tests/ui/zero_sized_hashmap_values.rs:25:13 | LL | not_ok: HashMap, | ^^^^^^^^^^^^^^^^^^^ @@ -41,7 +41,7 @@ LL | not_ok: HashMap, = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:26:22 + --> tests/ui/zero_sized_hashmap_values.rs:27:22 | LL | also_not_ok: Vec>, | ^^^^^^^^^^^^^^^^^^ @@ -49,7 +49,7 @@ LL | also_not_ok: Vec>, = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:35:30 + --> tests/ui/zero_sized_hashmap_values.rs:36:30 | LL | fn weird_map(&self, map: HashMap); | ^^^^^^^^^^^^^^^^^^ @@ -57,7 +57,7 @@ LL | fn weird_map(&self, map: HashMap); = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:44:25 + --> tests/ui/zero_sized_hashmap_values.rs:45:25 | LL | fn not_ok(&self) -> HashMap { | ^^^^^^^^^^^^^^^^^^^ @@ -65,7 +65,7 @@ LL | fn not_ok(&self) -> HashMap { = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:63:14 + --> tests/ui/zero_sized_hashmap_values.rs:64:14 | LL | fn test(map: HashMap, key: &str) -> HashMap { | ^^^^^^^^^^^^^^^^^^^ @@ -73,7 +73,7 @@ LL | fn test(map: HashMap, key: &str) -> HashMap { = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:63:49 + --> tests/ui/zero_sized_hashmap_values.rs:64:49 | LL | fn test(map: HashMap, key: &str) -> HashMap { | ^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ LL | fn test(map: HashMap, key: &str) -> HashMap { = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:91:14 + --> tests/ui/zero_sized_hashmap_values.rs:92:14 | LL | type D = HashMap>; | ^^^^^^^^^^^^^^^^^^ @@ -89,7 +89,7 @@ LL | type D = HashMap>; = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:104:34 + --> tests/ui/zero_sized_hashmap_values.rs:105:34 | LL | let _: HashMap = HashMap::new(); | ^^^^^^^ @@ -97,7 +97,7 @@ LL | let _: HashMap = HashMap::new(); = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:104:12 + --> tests/ui/zero_sized_hashmap_values.rs:105:12 | LL | let _: HashMap = HashMap::new(); | ^^^^^^^^^^^^^^^^^^^ @@ -105,7 +105,7 @@ LL | let _: HashMap = HashMap::new(); = help: consider using a set instead error: map with zero-sized value type - --> tests/ui/zero_sized_hashmap_values.rs:110:12 + --> tests/ui/zero_sized_hashmap_values.rs:111:12 | LL | let _: HashMap<_, _> = std::iter::empty::<(String, ())>().collect(); | ^^^^^^^^^^^^^ diff --git a/src/tools/clippy/tests/ui/zombie_processes.rs b/src/tools/clippy/tests/ui/zombie_processes.rs index e81b5fd4f3e24..e786fbc9d7a7d 100644 --- a/src/tools/clippy/tests/ui/zombie_processes.rs +++ b/src/tools/clippy/tests/ui/zombie_processes.rs @@ -1,5 +1,5 @@ #![warn(clippy::zombie_processes)] -#![allow(clippy::if_same_then_else, clippy::ifs_same_cond, clippy::needless_return)] +#![allow(clippy::if_same_then_else, clippy::ifs_same_cond, clippy::needless_return, todo_macro_calls)] use std::process::{Child, Command, ExitStatus};