From b4c34b6eaa01b58e933af7508b1426257ff29646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Fri, 21 Jun 2024 22:15:05 +0000 Subject: [PATCH] Remove redundancy in resolve error between main message and primary label ``` error[E0576]: cannot find method or associated constant `BAR` --> $DIR/issue-87638.rs:20:27 | LL | let _ = ::BAR; | ^^^ not found in trait `Trait` ``` instead of ``` error[E0576]: cannot find method or associated constant `BAR` in trait `Trait` --> $DIR/issue-87638.rs:20:27 | LL | let _ = ::BAR; | ^^^ not found in `Trait` ``` The general rule is that the primary span label should work well on its own (suitable to be shown in editors), while the main message provides additional context of the general case. When using `--error-format=short`, we concatenate the main message and the primary labels, so they should be complementary. --- .../rustc_resolve/src/late/diagnostics.rs | 4 +- .../clippy/tests/ui/crashes/ice-6252.stderr | 4 +- .../ui/option_map_unit_fn_unfixable.stderr | 8 ++-- .../doctest/failed-doctest-output.stdout | 2 +- tests/rustdoc-ui/impl-fn-nesting.rs | 18 +++---- tests/rustdoc-ui/impl-fn-nesting.stderr | 18 +++---- .../issues/issue-81662-shortness.rs | 2 +- .../issues/issue-81662-shortness.stdout | 2 +- tests/ui/annotate-snippet/missing-type.rs | 2 +- tests/ui/annotate-snippet/missing-type.stderr | 2 +- .../extern-fn-arg-names.rs | 2 +- .../extern-fn-arg-names.stderr | 2 +- .../argument-suggestions/issue-109831.stderr | 4 +- .../slice-pat-type-mismatches.rs | 4 +- .../slice-pat-type-mismatches.stderr | 2 +- tests/ui/asm/issue-113788.rs | 2 +- tests/ui/asm/issue-113788.stderr | 2 +- tests/ui/associated-consts/issue-93835.rs | 4 +- tests/ui/associated-consts/issue-93835.stderr | 6 +-- tests/ui/associated-item/issue-87638.fixed | 4 +- tests/ui/associated-item/issue-87638.rs | 4 +- tests/ui/associated-item/issue-87638.stderr | 8 ++-- tests/ui/associated-path-shl.rs | 10 ++-- tests/ui/associated-path-shl.stderr | 10 ++-- .../missing-trait-bound-for-assoc-fails.rs | 2 +- ...missing-trait-bound-for-assoc-fails.stderr | 2 +- .../associated-types/associated-types-eq-1.rs | 2 +- .../associated-types-eq-1.stderr | 2 +- tests/ui/associated-types/issue-19883.rs | 2 +- tests/ui/associated-types/issue-19883.stderr | 4 +- tests/ui/associated-types/issue-22037.rs | 2 +- tests/ui/associated-types/issue-22037.stderr | 4 +- .../async-closures/tainted-body.rs | 2 +- .../async-closures/tainted-body.stderr | 2 +- tests/ui/async-await/async-fn/not-a-trait.rs | 2 +- .../async-await/async-fn/not-a-trait.stderr | 2 +- .../drop-order-locals-are-hidden.rs | 8 ++-- .../drop-order-locals-are-hidden.stderr | 8 ++-- .../in-trait/return-not-existing-pair.rs | 2 +- .../in-trait/return-not-existing-pair.stderr | 2 +- ...eturn-not-existing-type-wrapping-rpitit.rs | 2 +- ...n-not-existing-type-wrapping-rpitit.stderr | 2 +- .../issue-72590-type-error-sized.stderr | 4 +- tests/ui/attributes/issue-90873.rs | 4 +- .../attributes/key-value-expansion-scope.rs | 30 ++++++------ tests/ui/attributes/main-removed-1.rs | 2 +- tests/ui/attributes/obsolete-attr.rs | 4 +- tests/ui/attributes/unknown-attr.rs | 6 +-- .../unsafe/double-unsafe-attributes.rs | 2 +- tests/ui/attributes/unused-item-in-attr.rs | 2 +- tests/ui/c-variadic/issue-86053-1.rs | 2 +- tests/ui/c-variadic/issue-86053-1.stderr | 2 +- tests/ui/cast/cast-errors-issue-43825.stderr | 2 +- tests/ui/cast/casts-issue-46365.stderr | 2 +- .../cast/ice-cast-type-with-error-124848.rs | 2 +- .../ice-cast-type-with-error-124848.stderr | 2 +- tests/ui/cfg/diagnostics-cross-crate.rs | 8 ++-- tests/ui/cfg/diagnostics-cross-crate.stderr | 16 +++---- tests/ui/cfg/diagnostics-not-a-def.stderr | 4 +- tests/ui/cfg/diagnostics-reexport.rs | 2 +- tests/ui/cfg/diagnostics-reexport.stderr | 4 +- tests/ui/cfg/diagnostics-same-crate.rs | 10 ++-- tests/ui/cfg/diagnostics-same-crate.stderr | 12 ++--- tests/ui/closures/issue-78720.rs | 2 +- tests/ui/closures/issue-78720.stderr | 2 +- tests/ui/closures/issue-90871.rs | 2 +- tests/ui/closures/issue-90871.stderr | 2 +- tests/ui/codemap_tests/tab.stderr | 2 +- tests/ui/codemap_tests/unicode_2.stderr | 2 +- tests/ui/coercion/type-errors.rs | 6 +-- tests/ui/coercion/type-errors.stderr | 6 +-- .../coherence-error-suppression.stderr | 2 +- .../coherence/illegal-copy-bad-projection.rs | 2 +- .../illegal-copy-bad-projection.stderr | 2 +- .../ui-testing-optout.stderr | 6 +-- ...-attr-unknown-attribute-macro-expansion.rs | 2 +- .../cfg-generic-params.rs | 10 ++-- .../cfg_accessible.stderr | 6 +-- tests/ui/conditional-compilation/test-cfg.rs | 2 +- .../conditional-compilation/test-cfg.stderr | 2 +- .../early/invalid-const-arguments.stderr | 4 +- .../generic_const_exprs/error_in_ty.rs | 2 +- .../generic_const_exprs/error_in_ty.stderr | 2 +- ...to-be-a-closure-or-coroutine-ice-113776.rs | 2 +- ...e-a-closure-or-coroutine-ice-113776.stderr | 2 +- ...icates-of-no-entry-found-for-key-119275.rs | 2 +- ...es-of-no-entry-found-for-key-119275.stderr | 2 +- .../generic_const_exprs/issue-109141.rs | 2 +- .../generic_const_exprs/issue-109141.stderr | 2 +- .../unevaluated-const-ice-119731.rs | 10 ++-- .../unevaluated-const-ice-119731.stderr | 10 ++-- .../const-generics/not_wf_param_in_rpitit.rs | 2 +- .../not_wf_param_in_rpitit.stderr | 2 +- .../const-generics/type_not_in_scope.stderr | 2 +- tests/ui/const-generics/unknown_adt.stderr | 2 +- .../ice-type-mismatch-when-copying-112824.rs | 2 +- ...e-type-mismatch-when-copying-112824.stderr | 2 +- .../const-eval/ice-unhandled-type-122191.rs | 2 +- .../ice-unhandled-type-122191.stderr | 2 +- .../erroneous_type_in_const_return_value.rs | 2 +- ...rroneous_type_in_const_return_value.stderr | 2 +- tests/ui/consts/erroneous_type_in_promoted.rs | 2 +- .../consts/erroneous_type_in_promoted.stderr | 2 +- .../ice-bad-input-type-for-cast-83056.rs | 2 +- .../ice-bad-input-type-for-cast-83056.stderr | 2 +- tests/ui/consts/issue-104609.rs | 2 +- tests/ui/consts/issue-104609.stderr | 2 +- tests/ui/consts/issue-116186.rs | 2 +- tests/ui/consts/issue-116186.stderr | 2 +- tests/ui/consts/issue-90878-2.rs | 2 +- tests/ui/consts/issue-91434.rs | 2 +- tests/ui/consts/issue-91434.stderr | 2 +- tests/ui/coroutine/gen_block.none.stderr | 6 +-- tests/ui/coroutine/layout-error.rs | 2 +- tests/ui/coroutine/layout-error.stderr | 2 +- tests/ui/custom_attribute.rs | 6 +-- tests/ui/deduplicate-diagnostics.rs | 4 +- tests/ui/delegation/bad-resolve.rs | 4 +- tests/ui/delegation/bad-resolve.stderr | 4 +- tests/ui/delegation/explicit-paths.rs | 8 ++-- tests/ui/delegation/explicit-paths.stderr | 8 ++-- tests/ui/delegation/ice-issue-124342.rs | 4 +- tests/ui/delegation/ice-issue-124342.stderr | 6 +-- tests/ui/delegation/target-expr.rs | 2 +- tests/ui/delegation/target-expr.stderr | 2 +- tests/ui/derived-errors/issue-31997.rs | 2 +- tests/ui/derived-errors/issue-31997.stderr | 2 +- tests/ui/derives/deriving-bounds.rs | 8 ++-- .../ui/derives/deriving-meta-unknown-trait.rs | 4 +- tests/ui/derives/deriving-primitive.rs | 4 +- .../ui/diagnostic_namespace/requires_path.rs | 2 +- tests/ui/did_you_mean/issue-103909.rs | 2 +- tests/ui/did_you_mean/issue-103909.stderr | 2 +- .../issue-56028-there-is-an-enum-variant.rs | 4 +- ...ssue-56028-there-is-an-enum-variant.stderr | 4 +- tests/ui/did_you_mean/println-typo.rs | 2 +- tests/ui/dropck/drop-on-non-struct.stderr | 2 +- tests/ui/editions/async-block-2015.rs | 2 +- tests/ui/editions/async-block-2015.stderr | 2 +- tests/ui/enum/suggest-default-attribute.rs | 2 +- tests/ui/error-codes/E0405.stderr | 2 +- tests/ui/error-codes/E0411.stderr | 2 +- tests/ui/error-codes/E0412.stderr | 2 +- tests/ui/error-codes/E0425.stderr | 2 +- tests/ui/error-festival.stderr | 2 +- .../ui/errors/remap-path-prefix.normal.stderr | 2 +- ...p-path-prefix.with-diagnostic-scope.stderr | 2 +- ...ath-prefix.without-diagnostic-scope.stderr | 2 +- tests/ui/expr/if/bad-if-let-suggestion.rs | 10 ++-- tests/ui/expr/if/bad-if-let-suggestion.stderr | 10 ++-- .../malformed_closure/ruby_style_closure.rs | 2 +- .../ruby_style_closure.stderr | 2 +- tests/ui/extern/extern-with-type-bounds.rs | 2 +- .../ui/extern/extern-with-type-bounds.stderr | 2 +- ...363-extern-item-where-clauses-debug-ice.rs | 4 +- ...extern-item-where-clauses-debug-ice.stderr | 4 +- tests/ui/extern/issue-80074.rs | 4 +- .../feature-gate-concat_idents2.rs | 2 +- .../feature-gate-concat_idents2.stderr | 2 +- .../feature-gate-custom_attribute.rs | 20 ++++---- .../feature-gate-custom_attribute2.rs | 34 ++++++------- .../feature-gate-gen_blocks.none.stderr | 2 +- .../feature-gates/feature-gate-rustc-attrs.rs | 2 +- .../issue-43106-gating-of-derive-2.rs | 12 ++--- .../fmt/format-args-capture-issue-102057.rs | 14 +++--- .../format-args-capture-issue-102057.stderr | 14 +++--- .../ui/fmt/format-args-capture-issue-94010.rs | 4 +- .../format-args-capture-issue-94010.stderr | 4 +- .../format-args-capture-missing-variables.rs | 12 ++--- ...rmat-args-capture-missing-variables.stderr | 12 ++--- tests/ui/fmt/ifmt-bad-arg.rs | 10 ++-- tests/ui/fmt/ifmt-bad-arg.stderr | 10 ++-- tests/ui/fmt/unicode-escape-spans.stderr | 20 ++++---- tests/ui/for/for-expn.rs | 2 +- tests/ui/for/for-expn.stderr | 2 +- ...n-help-with-err-generic-is-not-function.rs | 8 ++-- ...lp-with-err-generic-is-not-function.stderr | 4 +- .../ui/functions-closures/fn-help-with-err.rs | 2 +- .../fn-help-with-err.stderr | 2 +- .../equality-bound.rs | 12 ++--- .../equality-bound.stderr | 12 ++--- tests/ui/generics/issue-106694.rs | 6 +-- tests/ui/generics/issue-106694.stderr | 6 +-- tests/ui/hygiene/arguments.rs | 2 +- tests/ui/hygiene/arguments.stderr | 2 +- tests/ui/hygiene/cross-crate-glob-hygiene.rs | 2 +- .../hygiene/cross-crate-glob-hygiene.stderr | 2 +- tests/ui/hygiene/cross-crate-name-hiding-2.rs | 2 +- .../hygiene/cross-crate-name-hiding-2.stderr | 2 +- tests/ui/hygiene/cross-crate-name-hiding.rs | 2 +- .../ui/hygiene/cross-crate-name-hiding.stderr | 2 +- tests/ui/hygiene/for-loop.rs | 2 +- tests/ui/hygiene/for-loop.stderr | 2 +- tests/ui/hygiene/generate-mod.rs | 12 ++--- tests/ui/hygiene/generate-mod.stderr | 12 ++--- tests/ui/hygiene/globs.rs | 8 ++-- tests/ui/hygiene/globs.stderr | 8 ++-- tests/ui/hygiene/no_implicit_prelude-2018.rs | 2 +- tests/ui/hygiene/pattern-macro.rs | 2 +- tests/ui/hygiene/pattern-macro.stderr | 2 +- tests/ui/hygiene/rustc-macro-transparency.rs | 2 +- .../hygiene/rustc-macro-transparency.stderr | 2 +- ...ure-rpitits-are-created-before-freezing.rs | 2 +- ...rpitits-are-created-before-freezing.stderr | 2 +- .../rpitit-shadowed-by-missing-adt.rs | 2 +- .../rpitit-shadowed-by-missing-adt.stderr | 2 +- tests/ui/impl-trait/issue-103181-2.rs | 2 +- tests/ui/impl-trait/issue-103181-2.stderr | 2 +- tests/ui/impl-trait/issue-54966.rs | 2 +- tests/ui/impl-trait/issue-54966.stderr | 2 +- tests/ui/impl-trait/issues/issue-82139.rs | 2 +- tests/ui/impl-trait/issues/issue-82139.stderr | 2 +- .../opaque-used-in-extraneous-argument.stderr | 4 +- .../precise-capturing/bad-params.rs | 4 +- .../precise-capturing/bad-params.stderr | 4 +- tests/ui/implied-bounds/references-err.rs | 2 +- tests/ui/implied-bounds/references-err.stderr | 2 +- .../ui/imports/glob-conflict-cross-crate-1.rs | 4 +- .../glob-conflict-cross-crate-1.stderr | 8 ++-- .../ui/imports/glob-conflict-cross-crate-2.rs | 2 +- .../glob-conflict-cross-crate-2.stderr | 2 +- tests/ui/imports/glob-resolve1.rs | 14 +++--- tests/ui/imports/glob-resolve1.stderr | 14 +++--- ...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 | 2 +- tests/ui/imports/import-glob-0.rs | 2 +- tests/ui/imports/import-glob-0.stderr | 2 +- tests/ui/imports/import-glob-circular.rs | 2 +- tests/ui/imports/import-glob-circular.stderr | 2 +- tests/ui/imports/inaccessible_type_aliases.rs | 4 +- .../imports/inaccessible_type_aliases.stderr | 4 +- tests/ui/imports/issue-4366-2.rs | 2 +- tests/ui/imports/issue-4366-2.stderr | 2 +- tests/ui/imports/issue-4366.rs | 2 +- tests/ui/imports/issue-4366.stderr | 2 +- tests/ui/imports/issue-59764.rs | 2 +- tests/ui/imports/issue-59764.stderr | 2 +- tests/ui/issues-71798.rs | 2 +- tests/ui/issues-71798.stderr | 2 +- tests/ui/issues/issue-15167.rs | 8 ++-- tests/ui/issues/issue-15167.stderr | 8 ++-- tests/ui/issues/issue-18058.rs | 2 +- tests/ui/issues/issue-18058.stderr | 2 +- tests/ui/issues/issue-19734.rs | 2 +- tests/ui/issues/issue-2281-part1.rs | 2 +- tests/ui/issues/issue-2281-part1.stderr | 2 +- tests/ui/issues/issue-30589.rs | 2 +- tests/ui/issues/issue-30589.stderr | 2 +- tests/ui/issues/issue-32655.rs | 4 +- tests/ui/issues/issue-32950.rs | 2 +- tests/ui/issues/issue-32950.stderr | 2 +- tests/ui/issues/issue-33525.stderr | 2 +- tests/ui/issues/issue-33571.rs | 4 +- tests/ui/issues/issue-36836.rs | 2 +- tests/ui/issues/issue-36836.stderr | 2 +- tests/ui/issues/issue-40845.rs | 4 +- tests/ui/issues/issue-46332.rs | 2 +- tests/ui/issues/issue-46332.stderr | 2 +- tests/ui/issues/issue-53300.rs | 2 +- tests/ui/issues/issue-53300.stderr | 2 +- tests/ui/issues/issue-58712.rs | 4 +- tests/ui/issues/issue-58712.stderr | 4 +- .../issues/issue-72839-error-overflow.stderr | 2 +- tests/ui/issues/issue-77919.rs | 4 +- tests/ui/issues/issue-77919.stderr | 4 +- tests/ui/issues/issue-86756.rs | 2 +- tests/ui/issues/issue-86756.stderr | 2 +- tests/ui/issues/issue-8767.rs | 2 +- tests/ui/issues/issue-8767.stderr | 2 +- .../ui/keyword/keyword-self-as-identifier.rs | 2 +- .../keyword/keyword-self-as-identifier.stderr | 2 +- tests/ui/label/label_misspelled.rs | 16 +++---- tests/ui/label/label_misspelled.stderr | 16 +++---- tests/ui/label/label_misspelled_2.rs | 4 +- tests/ui/label/label_misspelled_2.stderr | 4 +- tests/ui/lang-items/issue-83471.stderr | 2 +- .../cannot-transmute-unnormalizable-type.rs | 2 +- ...annot-transmute-unnormalizable-type.stderr | 2 +- tests/ui/layout/issue-84108.rs | 4 +- tests/ui/layout/issue-84108.stderr | 4 +- .../layout/malformed-unsized-type-in-union.rs | 2 +- .../malformed-unsized-type-in-union.stderr | 2 +- tests/ui/layout/transmute-to-tail-with-err.rs | 2 +- .../layout/transmute-to-tail-with-err.stderr | 2 +- tests/ui/let-else/let-else-scope.rs | 2 +- tests/ui/let-else/let-else-scope.stderr | 2 +- .../issue-83907-invalid-fn-like-path.stderr | 2 +- .../lint/internal/trivial-diagnostics.stderr | 4 +- tests/ui/lint/issue-35075.rs | 4 +- tests/ui/lint/issue-35075.stderr | 4 +- tests/ui/lint/recommend-literal.rs | 18 +++---- tests/ui/lint/recommend-literal.stderr | 18 +++---- tests/ui/lint/use_suggestion_json.stderr | 4 +- tests/ui/loops/loop-break-value.rs | 2 +- tests/ui/loops/loop-break-value.stderr | 2 +- tests/ui/lowering/span-bug-issue-121431.rs | 2 +- .../ui/lowering/span-bug-issue-121431.stderr | 2 +- .../ui/macros/defined-later-issue-121061-2.rs | 2 +- tests/ui/macros/defined-later-issue-121061.rs | 2 +- tests/ui/macros/expand-full-no-resolution.rs | 4 +- tests/ui/macros/issue-100199.rs | 2 +- tests/ui/macros/issue-100199.stderr | 2 +- tests/ui/macros/issue-11692-1.rs | 2 +- tests/ui/macros/issue-11692-2.rs | 2 +- tests/ui/macros/issue-118786.rs | 2 +- tests/ui/macros/macro-backtrace-nested.stderr | 4 +- tests/ui/macros/macro-context.rs | 4 +- tests/ui/macros/macro-context.stderr | 4 +- .../macro-expand-within-generics-in-path.rs | 2 +- .../macro-metavar-expr-concat/hygiene.rs | 2 +- .../macro-metavar-expr-concat/hygiene.stderr | 2 +- tests/ui/macros/macro-outer-attributes.rs | 2 +- tests/ui/macros/macro-outer-attributes.stderr | 4 +- tests/ui/macros/macro-parameter-span.rs | 2 +- tests/ui/macros/macro-parameter-span.stderr | 2 +- tests/ui/macros/macro-path-prelude-fail-3.rs | 2 +- tests/ui/macros/macro-reexport-removed.rs | 2 +- .../rfc-3086-metavar-expr/syntax-errors.rs | 12 ++--- .../syntax-errors.stderr | 12 ++--- tests/ui/match/expr_before_ident_pat.rs | 2 +- tests/ui/match/expr_before_ident_pat.stderr | 2 +- tests/ui/match/issue-82866.rs | 4 +- tests/ui/match/issue-82866.stderr | 4 +- tests/ui/match/issue-92100.rs | 2 +- tests/ui/match/issue-92100.stderr | 2 +- tests/ui/match/match-join.rs | 2 +- tests/ui/match/match-join.stderr | 2 +- ...ggest-method-on-call-for-ambig-receiver.rs | 2 +- ...t-method-on-call-for-ambig-receiver.stderr | 2 +- .../suggest-method-on-call-with-macro-rcvr.rs | 2 +- ...gest-method-on-call-with-macro-rcvr.stderr | 2 +- .../issue-83499-input-output-iteration-ice.rs | 2 +- ...ue-83499-input-output-iteration-ice.stderr | 2 +- ...build-2021-closure-capture-ice-110453-1.rs | 2 +- ...d-2021-closure-capture-ice-110453-1.stderr | 2 +- ...build-2021-closure-capture-ice-110453-2.rs | 2 +- ...d-2021-closure-capture-ice-110453-2.stderr | 2 +- tests/ui/mir/validate/error-body.rs | 2 +- tests/ui/mir/validate/error-body.stderr | 2 +- .../missing-items/missing-const-parameter.rs | 10 ++-- .../missing-const-parameter.stderr | 10 ++-- .../missing-items/missing-type-parameter2.rs | 10 ++-- .../missing-type-parameter2.stderr | 10 ++-- tests/ui/missing/missing-macro-use.rs | 2 +- .../mod_file_correct_spans.rs | 2 +- .../mod_file_correct_spans.stderr | 4 +- ...spaced-enum-glob-import-no-impls-xcrate.rs | 8 ++-- ...ed-enum-glob-import-no-impls-xcrate.stderr | 12 ++--- .../namespaced-enum-glob-import-no-impls.rs | 8 ++-- ...amespaced-enum-glob-import-no-impls.stderr | 12 ++--- tests/ui/nested-cfg-attrs.rs | 2 +- tests/ui/nested-cfg-attrs.stderr | 2 +- .../avoid-ice-on-warning.new.stderr | 2 +- .../avoid-ice-on-warning.old.stderr | 2 +- .../ui/object-safety/avoid-ice-on-warning.rs | 2 +- tests/ui/object-safety/erroneous_signature.rs | 4 +- .../object-safety/erroneous_signature.stderr | 4 +- tests/ui/offset-of/offset-of-enum.rs | 2 +- tests/ui/offset-of/offset-of-enum.stderr | 2 +- tests/ui/offset-of/offset-of-self.rs | 4 +- tests/ui/offset-of/offset-of-self.stderr | 6 +-- tests/ui/panics/default-backtrace-ice.stderr | 2 +- .../multiple-tail-expr-behind-cfg.rs | 2 +- tests/ui/parser/circular_modules_main.stderr | 4 +- ...onst-param-decl-on-type-instead-of-impl.rs | 2 +- ...-param-decl-on-type-instead-of-impl.stderr | 2 +- tests/ui/parser/default-unmatched-assoc.rs | 4 +- tests/ui/parser/default-unmatched-extern.rs | 2 +- tests/ui/parser/dyn-trait-compatibility.rs | 14 +++--- .../ui/parser/dyn-trait-compatibility.stderr | 14 +++--- tests/ui/parser/emoji-identifiers.rs | 2 +- tests/ui/parser/emoji-identifiers.stderr | 2 +- tests/ui/parser/fn-field-parse-error-ice.rs | 2 +- .../ui/parser/fn-field-parse-error-ice.stderr | 2 +- tests/ui/parser/issues/issue-103143.rs | 2 +- tests/ui/parser/issues/issue-103143.stderr | 2 +- .../issues/issue-103748-ICE-wrong-braces.rs | 2 +- .../issue-103748-ICE-wrong-braces.stderr | 2 +- tests/ui/parser/issues/issue-112458.rs | 2 +- tests/ui/parser/issues/issue-112458.stderr | 2 +- tests/ui/parser/issues/issue-118531-ice.rs | 2 +- tests/ui/parser/issues/issue-32505.rs | 2 +- tests/ui/parser/issues/issue-32505.stderr | 2 +- .../issue-65122-mac-invoc-in-mut-patterns.rs | 4 +- tests/ui/parser/kw-in-trait-bounds.rs | 8 ++-- tests/ui/parser/kw-in-trait-bounds.stderr | 8 ++-- ...ultibyte-char-use-seperator-issue-80134.rs | 4 +- ...byte-char-use-seperator-issue-80134.stderr | 4 +- tests/ui/parser/not-a-pred.rs | 2 +- tests/ui/parser/not-a-pred.stderr | 2 +- tests/ui/parser/pat-lt-bracket-5.rs | 2 +- tests/ui/parser/pat-lt-bracket-5.stderr | 2 +- tests/ui/parser/raw/raw-literal-keywords.rs | 6 +-- .../ui/parser/raw/raw-literal-keywords.stderr | 6 +-- .../recover/recover-fn-ptr-with-generics.rs | 4 +- .../recover-fn-ptr-with-generics.stderr | 4 +- .../ui/parser/recover/recover-ref-dyn-mut.rs | 2 +- .../parser/recover/recover-ref-dyn-mut.stderr | 2 +- .../recover/recover-unticked-labels.fixed | 2 +- .../parser/recover/recover-unticked-labels.rs | 2 +- .../recover/recover-unticked-labels.stderr | 2 +- .../parser/trailing-question-in-macro-type.rs | 2 +- .../trailing-question-in-macro-type.stderr | 2 +- tests/ui/parser/unmatched-langle-1.rs | 4 +- tests/ui/parser/unmatched-langle-1.stderr | 4 +- tests/ui/parser/where_with_bound.rs | 2 +- tests/ui/parser/where_with_bound.stderr | 2 +- ...-pattern-meant-to-be-slice-rest-pattern.rs | 12 ++--- ...tern-meant-to-be-slice-rest-pattern.stderr | 12 ++--- .../issue-119493-type-error-ice.stderr | 4 +- .../issue-119778-type-error-ice.stderr | 4 +- tests/ui/privacy/privacy-ns1.rs | 4 +- tests/ui/privacy/privacy-ns1.stderr | 4 +- .../ambiguous-builtin-attrs-test.rs | 2 +- .../ambiguous-builtin-attrs-test.stderr | 2 +- .../ui/proc-macro/ambiguous-builtin-attrs.rs | 2 +- .../proc-macro/ambiguous-builtin-attrs.stderr | 2 +- .../proc-macro/attributes-on-modules-fail.rs | 4 +- .../attributes-on-modules-fail.stderr | 4 +- tests/ui/proc-macro/break-token-spans.stderr | 2 +- .../proc-macro/derive-helper-legacy-limits.rs | 2 +- .../derive-helper-legacy-spurious.rs | 4 +- .../ui/proc-macro/derive-helper-shadowing.rs | 4 +- tests/ui/proc-macro/derive-still-gated.rs | 2 +- .../ui/proc-macro/disappearing-resolution.rs | 2 +- tests/ui/proc-macro/empty-where-clause.stderr | 6 +-- .../ui/proc-macro/gen-macro-rules-hygiene.rs | 4 +- .../proc-macro/gen-macro-rules-hygiene.stderr | 4 +- tests/ui/proc-macro/generate-mod.rs | 16 +++---- tests/ui/proc-macro/generate-mod.stderr | 8 ++-- .../issue-118455-skip-err-builtin.rs | 2 +- tests/ui/proc-macro/issue-38586.stderr | 2 +- tests/ui/proc-macro/issue-83510.rs | 4 +- tests/ui/proc-macro/issue-83510.stderr | 4 +- tests/ui/proc-macro/keep-expr-tokens.stderr | 4 +- tests/ui/proc-macro/lints_in_proc_macros.rs | 2 +- .../ui/proc-macro/lints_in_proc_macros.stderr | 2 +- .../proc-macro/macro-namespace-reserved-2.rs | 10 ++-- tests/ui/proc-macro/macro-rules-derive.stderr | 2 +- tests/ui/proc-macro/mixed-site-span.rs | 6 +-- tests/ui/proc-macro/mixed-site-span.stderr | 8 ++-- tests/ui/proc-macro/parent-source-spans.rs | 6 +-- .../ui/proc-macro/parent-source-spans.stderr | 6 +-- tests/ui/proc-macro/proc-macro-attributes.rs | 2 +- tests/ui/proc-macro/resolve-error.rs | 4 +- .../ui/proc-macro/span-from-proc-macro.stderr | 6 +-- tests/ui/proc-macro/weird-hygiene.stderr | 4 +- tests/ui/query-system/issue-83479.rs | 4 +- tests/ui/query-system/issue-83479.stderr | 4 +- tests/ui/recursion/recursive-reexports.rs | 2 +- tests/ui/recursion/recursive-reexports.stderr | 4 +- tests/ui/regions/outlives-with-missing.rs | 2 +- tests/ui/regions/outlives-with-missing.stderr | 2 +- tests/ui/reserved/reserved-attr-on-macro.rs | 2 +- .../resolve/associated-fn-called-as-fn.stderr | 4 +- tests/ui/resolve/bad-env-capture.stderr | 4 +- tests/ui/resolve/bad-env-capture2.stderr | 4 +- tests/ui/resolve/bad-env-capture3.stderr | 4 +- tests/ui/resolve/bad-expr-path.rs | 6 +-- tests/ui/resolve/bad-expr-path.stderr | 8 ++-- tests/ui/resolve/bad-expr-path2.rs | 4 +- tests/ui/resolve/bad-expr-path2.stderr | 4 +- tests/ui/resolve/crate-called-as-function.rs | 2 +- .../resolve/crate-called-as-function.stderr | 2 +- tests/ui/resolve/crate-in-paths.rs | 2 +- tests/ui/resolve/crate-in-paths.stderr | 2 +- tests/ui/resolve/editions-crate-root-2015.rs | 4 +- .../resolve/editions-crate-root-2015.stderr | 4 +- tests/ui/resolve/editions-crate-root-2018.rs | 8 ++-- .../resolve/editions-crate-root-2018.stderr | 4 +- .../ui/resolve/enums-are-namespaced-xc.stderr | 12 ++--- tests/ui/resolve/enums-pats-not-idents.rs | 2 +- tests/ui/resolve/enums-pats-not-idents.stderr | 2 +- ...ethod-in-self-not-available-in-assoc-fn.rs | 6 +-- ...d-in-self-not-available-in-assoc-fn.stderr | 6 +-- tests/ui/resolve/filter-intrinsics.stderr | 4 +- tests/ui/resolve/issue-102946.rs | 2 +- tests/ui/resolve/issue-102946.stderr | 2 +- tests/ui/resolve/issue-103474.rs | 6 +-- tests/ui/resolve/issue-103474.stderr | 6 +-- .../resolve/issue-104700-inner_scope.stderr | 4 +- tests/ui/resolve/issue-116164.rs | 2 +- tests/ui/resolve/issue-116164.stderr | 2 +- tests/ui/resolve/issue-118295.rs | 2 +- tests/ui/resolve/issue-14254.stderr | 48 +++++++++---------- tests/ui/resolve/issue-17518.stderr | 2 +- tests/ui/resolve/issue-21221-1.stderr | 8 ++-- tests/ui/resolve/issue-21221-2.stderr | 2 +- tests/ui/resolve/issue-21221-3.stderr | 2 +- tests/ui/resolve/issue-21221-4.stderr | 2 +- tests/ui/resolve/issue-2356.rs | 2 +- tests/ui/resolve/issue-2356.stderr | 30 ++++++------ tests/ui/resolve/issue-24968.stderr | 10 ++-- tests/ui/resolve/issue-26545.rs | 2 +- tests/ui/resolve/issue-26545.stderr | 2 +- tests/ui/resolve/issue-31845.rs | 2 +- tests/ui/resolve/issue-31845.stderr | 2 +- tests/ui/resolve/issue-35675.rs | 8 ++-- tests/ui/resolve/issue-35675.stderr | 8 ++-- tests/ui/resolve/issue-42944.rs | 2 +- tests/ui/resolve/issue-42944.stderr | 2 +- tests/ui/resolve/issue-49074.rs | 4 +- tests/ui/resolve/issue-50599.stderr | 4 +- tests/ui/resolve/issue-5099.rs | 6 +-- tests/ui/resolve/issue-5099.stderr | 6 +-- tests/ui/resolve/issue-5927.rs | 4 +- tests/ui/resolve/issue-5927.stderr | 4 +- tests/ui/resolve/issue-60057.rs | 4 +- tests/ui/resolve/issue-60057.stderr | 4 +- .../issue-69401-trait-fn-no-body-ty-local.rs | 2 +- ...sue-69401-trait-fn-no-body-ty-local.stderr | 2 +- tests/ui/resolve/issue-80079.rs | 2 +- tests/ui/resolve/issue-80079.stderr | 2 +- tests/ui/resolve/issue-85348.rs | 2 +- tests/ui/resolve/issue-85348.stderr | 2 +- tests/ui/resolve/issue-88472.rs | 8 ++-- tests/ui/resolve/issue-88472.stderr | 4 +- tests/ui/resolve/issue-90113.rs | 2 +- tests/ui/resolve/issue-90113.stderr | 2 +- tests/ui/resolve/levenshtein.stderr | 16 +++---- .../ui/resolve/no-implicit-prelude-nested.rs | 30 ++++++------ .../resolve/no-implicit-prelude-nested.stderr | 30 ++++++------ tests/ui/resolve/no-implicit-prelude.rs | 10 ++-- tests/ui/resolve/no-implicit-prelude.stderr | 10 ++-- tests/ui/resolve/privacy-enum-ctor.rs | 8 ++-- tests/ui/resolve/privacy-enum-ctor.stderr | 8 ++-- tests/ui/resolve/raw-ident-in-path.rs | 2 +- tests/ui/resolve/raw-ident-in-path.stderr | 2 +- .../resolve/resolve-assoc-suggestions.stderr | 18 +++---- .../ui/resolve/resolve-primitive-fallback.rs | 2 +- .../resolve/resolve-primitive-fallback.stderr | 2 +- tests/ui/resolve/resolve-self-in-impl-2.rs | 2 +- .../ui/resolve/resolve-self-in-impl-2.stderr | 2 +- .../resolve-speculative-adjustment.stderr | 8 ++-- tests/ui/resolve/resolve-unknown-trait.rs | 6 +-- tests/ui/resolve/resolve-unknown-trait.stderr | 6 +-- ...gest-import-without-clobbering-attrs.fixed | 2 +- ...suggest-import-without-clobbering-attrs.rs | 2 +- ...est-import-without-clobbering-attrs.stderr | 2 +- ...iable-with-name-similar-to-struct-field.rs | 10 ++-- ...e-with-name-similar-to-struct-field.stderr | 14 +++--- .../typo-suggestion-named-underscore.rs | 4 +- .../typo-suggestion-named-underscore.stderr | 4 +- ...xed-closure-sugar-nonexistent-trait.stderr | 2 +- .../resolve/unresolved_static_type_field.rs | 2 +- .../unresolved_static_type_field.stderr | 2 +- tests/ui/resolve/use_suggestion.stderr | 4 +- .../resolve/use_suggestion_placement.stderr | 6 +-- tests/ui/resolve/visibility-indeterminate.rs | 2 +- .../rfc-2294-if-let-guard/bindings.stderr | 4 +- tests/ui/rmeta/rmeta.rs | 2 +- tests/ui/rmeta/rmeta.stderr | 2 +- .../rust-2018/issue-52202-use-suggestions.rs | 2 +- .../issue-52202-use-suggestions.stderr | 2 +- tests/ui/rustdoc/cfg-rustdoc.stderr | 2 +- tests/ui/self/class-missing-self.rs | 4 +- tests/ui/self/class-missing-self.stderr | 4 +- tests/ui/self/elision/nested-item.rs | 2 +- tests/ui/self/elision/nested-item.stderr | 2 +- tests/ui/self/self_type_keyword-2.rs | 6 +-- tests/ui/self/self_type_keyword-2.stderr | 6 +-- tests/ui/self/self_type_keyword.rs | 2 +- tests/ui/self/self_type_keyword.stderr | 2 +- tests/ui/self/suggest-self-2.rs | 8 ++-- tests/ui/self/suggest-self-2.stderr | 8 ++-- tests/ui/self/suggest-self.rs | 6 +-- tests/ui/self/suggest-self.stderr | 6 +-- ...dings-in-pattern-with-ty-err-doesnt-ice.rs | 2 +- ...s-in-pattern-with-ty-err-doesnt-ice.stderr | 2 +- ...021-incompatible-closure-captures-96258.rs | 2 +- ...incompatible-closure-captures-96258.stderr | 2 +- tests/ui/span/suggestion-raw-68962.stderr | 4 +- tests/ui/span/typo-suggestion.stderr | 4 +- .../issue-68830-spurious-diagnostics.rs | 2 +- .../issue-68830-spurious-diagnostics.stderr | 2 +- .../min_specialization/impl-on-nonexisting.rs | 2 +- .../impl-on-nonexisting.stderr | 2 +- tests/ui/stability-attribute/issue-109177.rs | 2 +- .../stability-attribute/issue-109177.stderr | 2 +- .../unresolved_stability_lint.rs | 2 +- .../unresolved_stability_lint.stderr | 2 +- .../ice-struct-tail-normalization-113272.rs | 2 +- ...ce-struct-tail-normalization-113272.stderr | 2 +- .../struct-fields-shorthand-unresolved.rs | 2 +- .../struct-fields-shorthand-unresolved.stderr | 2 +- .../ui/structs/unresolved-struct-with-fru.rs | 2 +- .../structs/unresolved-struct-with-fru.stderr | 2 +- .../suggestions/assoc-const-without-self.rs | 2 +- .../assoc-const-without-self.stderr | 2 +- .../assoc-type-in-method-return.rs | 2 +- .../assoc-type-in-method-return.stderr | 2 +- tests/ui/suggestions/assoc_fn_without_self.rs | 16 +++---- .../suggestions/assoc_fn_without_self.stderr | 16 +++---- tests/ui/suggestions/attribute-typos.rs | 6 +-- tests/ui/suggestions/bool_typo_err_suggest.rs | 4 +- .../suggestions/bool_typo_err_suggest.stderr | 4 +- .../dont-suggest-foreign-doc-hidden.rs | 4 +- .../dont-suggest-foreign-doc-hidden.stderr | 4 +- .../suggestions/fn-to-method-deeply-nested.rs | 12 ++--- .../fn-to-method-deeply-nested.stderr | 12 ++--- tests/ui/suggestions/fn-to-method.rs | 6 +-- tests/ui/suggestions/fn-to-method.stderr | 6 +-- .../ice-unwrap-probe-many-result-125876.rs | 2 +- ...ice-unwrap-probe-many-result-125876.stderr | 2 +- tests/ui/suggestions/if-let-typo.rs | 4 +- tests/ui/suggestions/if-let-typo.stderr | 4 +- .../suggestions/issue-104086-suggest-let.rs | 34 ++++++------- .../issue-104086-suggest-let.stderr | 34 ++++++------- tests/ui/suggestions/issue-104287.rs | 2 +- tests/ui/suggestions/issue-104287.stderr | 2 +- .../issue-66968-suggest-sorted-words.stderr | 2 +- ...method-access-to-range-literal-typo.stderr | 2 +- .../no-extern-crate-in-type.stderr | 2 +- tests/ui/suggestions/non_ascii_ident.rs | 4 +- tests/ui/suggestions/non_ascii_ident.stderr | 4 +- .../ui/suggestions/raw-name-use-suggestion.rs | 2 +- .../raw-name-use-suggestion.stderr | 2 +- .../suggestions/silenced-binding-typo.stderr | 2 +- .../suggest-let-for-assignment.fixed | 22 ++++----- .../suggestions/suggest-let-for-assignment.rs | 22 ++++----- .../suggest-let-for-assignment.stderr | 22 ++++----- .../suggestions/suggest_print_over_printf.rs | 2 +- .../suggest_print_over_printf.stderr | 2 +- ...type-ascription-instead-of-path-in-type.rs | 2 +- ...-ascription-instead-of-path-in-type.stderr | 2 +- .../type-not-found-in-adt-field.rs | 8 ++-- .../type-not-found-in-adt-field.stderr | 4 +- tests/ui/suggestions/while-let-typo.rs | 4 +- tests/ui/suggestions/while-let-typo.stderr | 4 +- .../tool-attributes-misplaced-1.rs | 8 ++-- tests/ui/track-diagnostics/track.stderr | 2 +- tests/ui/track-diagnostics/track3.stderr | 2 +- .../ice-unsized-struct-arg-issue-121612.rs | 4 +- ...ice-unsized-struct-arg-issue-121612.stderr | 4 +- .../ice-unsized-tuple-const-issue-121443.rs | 2 +- ...ce-unsized-tuple-const-issue-121443.stderr | 2 +- .../impl-bound-with-references-error.rs | 2 +- .../impl-bound-with-references-error.stderr | 2 +- ...owed-path-in-trait-bound-suggestion.stderr | 2 +- .../assoc_type_bound_with_struct.rs | 2 +- .../assoc_type_bound_with_struct.stderr | 2 +- .../dont-autoderef-ty-with-escaping-var.rs | 2 +- ...dont-autoderef-ty-with-escaping-var.stderr | 2 +- ...alller-supplied-obligation-issue-121941.rs | 2 +- ...er-supplied-obligation-issue-121941.stderr | 2 +- tests/ui/traits/ignore-err-impls.rs | 2 +- tests/ui/traits/ignore-err-impls.stderr | 2 +- tests/ui/traits/issue-22384.rs | 2 +- tests/ui/traits/issue-22384.stderr | 4 +- tests/ui/traits/issue-50480.rs | 12 ++--- tests/ui/traits/issue-50480.stderr | 12 ++--- tests/ui/traits/issue-75627.stderr | 2 +- tests/ui/traits/issue-78372.rs | 6 +-- tests/ui/traits/issue-78372.stderr | 6 +-- .../dont-normalize-proj-with-error.rs | 2 +- .../dont-normalize-proj-with-error.stderr | 2 +- .../next-solver/issue-118950-root-region.rs | 2 +- .../issue-118950-root-region.stderr | 2 +- tests/ui/traits/no-fallback-multiple-impls.rs | 2 +- .../traits/no-fallback-multiple-impls.stderr | 2 +- .../binder-defaults-112547.rs | 2 +- .../binder-defaults-112547.stderr | 2 +- .../binder-defaults-118697.rs | 2 +- .../binder-defaults-118697.stderr | 2 +- tests/ui/traits/trait-selection-ice-84727.rs | 8 ++-- .../traits/trait-selection-ice-84727.stderr | 8 ++-- tests/ui/transmutability/issue-101739-1.rs | 2 +- .../ui/transmutability/issue-101739-1.stderr | 2 +- .../unknown_dst.stderr | 2 +- .../unknown_src.stderr | 2 +- .../unknown_src_field.stderr | 2 +- tests/ui/tuple/tuple-struct-fields/test.rs | 2 +- .../ui/tuple/tuple-struct-fields/test.stderr | 2 +- tests/ui/tuple/tuple-struct-fields/test2.rs | 4 +- .../ui/tuple/tuple-struct-fields/test2.stderr | 4 +- tests/ui/tuple/tuple-struct-fields/test3.rs | 4 +- .../ui/tuple/tuple-struct-fields/test3.stderr | 4 +- .../nested-impl-trait-in-tait.rs | 2 +- .../nested-impl-trait-in-tait.stderr | 2 +- .../ui/type-alias/issue-62364-self-ty-arg.rs | 2 +- .../type-alias/issue-62364-self-ty-arg.stderr | 2 +- tests/ui/type/issue-7607-1.rs | 2 +- tests/ui/type/issue-7607-1.stderr | 2 +- tests/ui/type/type-path-err-node-types.rs | 2 +- tests/ui/type/type-path-err-node-types.stderr | 8 ++-- .../ui/typeck/apit-with-error-type-in-sig.rs | 2 +- .../typeck/apit-with-error-type-in-sig.stderr | 2 +- .../typeck/autoderef-with-param-env-error.rs | 2 +- .../autoderef-with-param-env-error.stderr | 2 +- tests/ui/typeck/check-args-on-fn-err-2.rs | 2 +- tests/ui/typeck/check-args-on-fn-err-2.stderr | 2 +- tests/ui/typeck/check-args-on-fn-err.rs | 2 +- tests/ui/typeck/check-args-on-fn-err.stderr | 2 +- tests/ui/typeck/issue-104510-ice.rs | 2 +- tests/ui/typeck/issue-104510-ice.stderr | 2 +- tests/ui/typeck/issue-104513-ice.rs | 2 +- tests/ui/typeck/issue-104513-ice.stderr | 2 +- tests/ui/typeck/issue-105946.rs | 2 +- tests/ui/typeck/issue-105946.stderr | 2 +- tests/ui/typeck/issue-106929.rs | 2 +- tests/ui/typeck/issue-106929.stderr | 2 +- ...sue-114423-ice-regression-in-suggestion.rs | 6 +-- ...114423-ice-regression-in-suggestion.stderr | 6 +-- tests/ui/typeck/issue-83693.rs | 6 +-- tests/ui/typeck/issue-83693.stderr | 6 +-- tests/ui/typeck/issue-88844.rs | 2 +- tests/ui/typeck/issue-88844.stderr | 2 +- tests/ui/typeck/issue-90319.rs | 2 +- tests/ui/typeck/issue-90319.stderr | 2 +- tests/ui/typeck/issue-91267.rs | 2 +- tests/ui/typeck/issue-91267.stderr | 2 +- .../typeck/nonexistent-field-not-ambiguous.rs | 2 +- .../nonexistent-field-not-ambiguous.stderr | 2 +- tests/ui/typeck/quiet-type-err-let-binding.rs | 2 +- .../typeck/quiet-type-err-let-binding.stderr | 2 +- tests/ui/ufcs/ufcs-partially-resolved.rs | 20 ++++---- tests/ui/ufcs/ufcs-partially-resolved.stderr | 28 +++++------ ...mismatch-closure-from-another-scope.stderr | 4 +- tests/ui/union/unresolved-field-isnt-copy.rs | 2 +- .../union/unresolved-field-isnt-copy.stderr | 2 +- tests/ui/unresolved/unresolved-candidates.rs | 2 +- .../unresolved/unresolved-candidates.stderr | 2 +- ...ce-hir-wf-check-anon-const-issue-122199.rs | 4 +- ...ir-wf-check-anon-const-issue-122199.stderr | 4 +- tests/ui/wf/issue-110157.rs | 4 +- tests/ui/wf/issue-110157.stderr | 4 +- tests/ui/where-clauses/ignore-err-clauses.rs | 2 +- .../where-clauses/ignore-err-clauses.stderr | 2 +- .../normalization-of-unknown-type.stderr | 2 +- 731 files changed, 1559 insertions(+), 1559 deletions(-) diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 764cc350182a6..c2a6f433c4beb 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -347,11 +347,11 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> { } else { suggestion }; - (format!("not found in {mod_str}"), override_suggestion) + (format!("not found in {mod_prefix}{mod_str}"), override_suggestion) }; BaseError { - msg: format!("cannot find {expected} `{item_str}` in {mod_prefix}{mod_str}"), + msg: format!("cannot find {expected} `{item_str}`"), fallback_label, span: item_span, span_label, diff --git a/src/tools/clippy/tests/ui/crashes/ice-6252.stderr b/src/tools/clippy/tests/ui/crashes/ice-6252.stderr index cd2031af1c6da..067809c7cd6f6 100644 --- a/src/tools/clippy/tests/ui/crashes/ice-6252.stderr +++ b/src/tools/clippy/tests/ui/crashes/ice-6252.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `PhantomData` in this scope +error[E0412]: cannot find type `PhantomData` --> tests/ui/crashes/ice-6252.rs:9:9 | LL | _n: PhantomData, @@ -9,7 +9,7 @@ help: consider importing this struct LL + use std::marker::PhantomData; | -error[E0412]: cannot find type `VAL` in this scope +error[E0412]: cannot find type `VAL` --> tests/ui/crashes/ice-6252.rs:11:63 | LL | impl TypeVal for Multiply where N: TypeVal {} diff --git a/src/tools/clippy/tests/ui/option_map_unit_fn_unfixable.stderr b/src/tools/clippy/tests/ui/option_map_unit_fn_unfixable.stderr index 66271036113ca..b49d182b64567 100644 --- a/src/tools/clippy/tests/ui/option_map_unit_fn_unfixable.stderr +++ b/src/tools/clippy/tests/ui/option_map_unit_fn_unfixable.stderr @@ -1,22 +1,22 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> tests/ui/option_map_unit_fn_unfixable.rs:17:5 | LL | x.field.map(|value| { do_nothing(value); do_nothing(value) }); | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> tests/ui/option_map_unit_fn_unfixable.rs:19:5 | LL | x.field.map(|value| if value > 0 { do_nothing(value); do_nothing(value) }); | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> tests/ui/option_map_unit_fn_unfixable.rs:23:5 | LL | x.field.map(|value| { | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> tests/ui/option_map_unit_fn_unfixable.rs:27:5 | LL | x.field.map(|value| { do_nothing(value); do_nothing(value); }); diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout index 7b0cf9a432d4c..4c7233a296060 100644 --- a/tests/rustdoc-ui/doctest/failed-doctest-output.stdout +++ b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout @@ -6,7 +6,7 @@ test $DIR/failed-doctest-output.rs - SomeStruct (line 15) ... FAILED failures: ---- $DIR/failed-doctest-output.rs - OtherStruct (line 25) stdout ---- -error[E0425]: cannot find value `no` in this scope +error[E0425]: cannot find value `no` --> $DIR/failed-doctest-output.rs:26:1 | LL | no diff --git a/tests/rustdoc-ui/impl-fn-nesting.rs b/tests/rustdoc-ui/impl-fn-nesting.rs index a927f6bd79976..38275ebcc6c32 100644 --- a/tests/rustdoc-ui/impl-fn-nesting.rs +++ b/tests/rustdoc-ui/impl-fn-nesting.rs @@ -9,28 +9,28 @@ pub trait NeedsBody { /// This function has docs pub fn f(a: UnknownType, b: B) { -//~^ ERROR cannot find trait `UnknownBound` in this scope -//~| ERROR cannot find type `UnknownType` in this scope +//~^ ERROR cannot find trait `UnknownBound` +//~| ERROR cannot find type `UnknownType` impl UnknownTrait for ValidType {} //~ ERROR cannot find trait `UnknownTrait` impl UnknownTrait for T {} - //~^ ERROR cannot find trait `UnknownBound` in this scope - //~| ERROR cannot find trait `UnknownTrait` in this scope + //~^ ERROR cannot find trait `UnknownBound` + //~| ERROR cannot find trait `UnknownTrait` impl ValidTrait for UnknownType {} - //~^ ERROR cannot find type `UnknownType` in this scope + //~^ ERROR cannot find type `UnknownType` impl ValidTrait for ValidType where ValidTrait: UnknownBound {} - //~^ ERROR cannot find trait `UnknownBound` in this scope + //~^ ERROR cannot find trait `UnknownBound` /// This impl has documentation impl NeedsBody for ValidType { type Item = UnknownType; - //~^ ERROR cannot find type `UnknownType` in this scope + //~^ ERROR cannot find type `UnknownType` /// This function has documentation fn f() { ::a(); content::shouldnt::matter(); unknown_macro!(); - //~^ ERROR cannot find macro `unknown_macro` in this scope + //~^ ERROR cannot find macro `unknown_macro` /// This is documentation for a macro macro_rules! can_define_macros_here_too { @@ -42,7 +42,7 @@ pub fn f(a: UnknownType, b: B) { /// This also is documented. pub fn doubly_nested(c: UnknownType) { - //~^ ERROR cannot find type `UnknownType` in this scope + //~^ ERROR cannot find type `UnknownType` } } } diff --git a/tests/rustdoc-ui/impl-fn-nesting.stderr b/tests/rustdoc-ui/impl-fn-nesting.stderr index 75e6b4ed217dd..8723380894f29 100644 --- a/tests/rustdoc-ui/impl-fn-nesting.stderr +++ b/tests/rustdoc-ui/impl-fn-nesting.stderr @@ -4,55 +4,55 @@ error: cannot find macro `unknown_macro` in this scope LL | unknown_macro!(); | ^^^^^^^^^^^^^ -error[E0405]: cannot find trait `UnknownBound` in this scope +error[E0405]: cannot find trait `UnknownBound` --> $DIR/impl-fn-nesting.rs:11:13 | LL | pub fn f(a: UnknownType, b: B) { | ^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `UnknownType` in this scope +error[E0412]: cannot find type `UnknownType` --> $DIR/impl-fn-nesting.rs:11:30 | LL | pub fn f(a: UnknownType, b: B) { | ^^^^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `UnknownTrait` in this scope +error[E0405]: cannot find trait `UnknownTrait` --> $DIR/impl-fn-nesting.rs:14:10 | LL | impl UnknownTrait for ValidType {} | ^^^^^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `UnknownTrait` in this scope +error[E0405]: cannot find trait `UnknownTrait` --> $DIR/impl-fn-nesting.rs:15:27 | LL | impl UnknownTrait for T {} | ^^^^^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `UnknownBound` in this scope +error[E0405]: cannot find trait `UnknownBound` --> $DIR/impl-fn-nesting.rs:15:13 | LL | impl UnknownTrait for T {} | ^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `UnknownType` in this scope +error[E0412]: cannot find type `UnknownType` --> $DIR/impl-fn-nesting.rs:18:25 | LL | impl ValidTrait for UnknownType {} | ^^^^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `UnknownBound` in this scope +error[E0405]: cannot find trait `UnknownBound` --> $DIR/impl-fn-nesting.rs:20:53 | LL | impl ValidTrait for ValidType where ValidTrait: UnknownBound {} | ^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `UnknownType` in this scope +error[E0412]: cannot find type `UnknownType` --> $DIR/impl-fn-nesting.rs:25:21 | LL | type Item = UnknownType; | ^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `UnknownType` in this scope +error[E0412]: cannot find type `UnknownType` --> $DIR/impl-fn-nesting.rs:44:37 | LL | pub fn doubly_nested(c: UnknownType) { diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.rs b/tests/rustdoc-ui/issues/issue-81662-shortness.rs index 736ca3c5bad2f..271a97aa9de77 100644 --- a/tests/rustdoc-ui/issues/issue-81662-shortness.rs +++ b/tests/rustdoc-ui/issues/issue-81662-shortness.rs @@ -1,6 +1,6 @@ //@ compile-flags:--test --error-format=short //@ check-stdout -//@ error-pattern:cannot find function `foo` in this scope +//@ error-pattern:cannot find function `foo` //@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR" //@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" //@ failure-status: 101 diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.stdout b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout index f32f51e12f2c3..754396380116d 100644 --- a/tests/rustdoc-ui/issues/issue-81662-shortness.stdout +++ b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout @@ -5,7 +5,7 @@ test $DIR/issue-81662-shortness.rs - foo (line 8) ... FAILED failures: ---- $DIR/issue-81662-shortness.rs - foo (line 8) stdout ---- -$DIR/issue-81662-shortness.rs:9:1: error[E0425]: cannot find function `foo` in this scope +$DIR/issue-81662-shortness.rs:9:1: error[E0425]: cannot find function `foo` error: aborting due to 1 previous error Couldn't compile the test. diff --git a/tests/ui/annotate-snippet/missing-type.rs b/tests/ui/annotate-snippet/missing-type.rs index ea1c2521103e8..29834d2028ed7 100644 --- a/tests/ui/annotate-snippet/missing-type.rs +++ b/tests/ui/annotate-snippet/missing-type.rs @@ -1,5 +1,5 @@ //@ compile-flags: --error-format human-annotate-rs -Z unstable-options -//@ error-pattern:cannot find type `Iter` in this scope +//@ error-pattern:cannot find type `Iter` pub fn main() { let x: Iter; diff --git a/tests/ui/annotate-snippet/missing-type.stderr b/tests/ui/annotate-snippet/missing-type.stderr index 89ce19c182f52..c6c5c1d258ed2 100644 --- a/tests/ui/annotate-snippet/missing-type.stderr +++ b/tests/ui/annotate-snippet/missing-type.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Iter` in this scope +error[E0412]: cannot find type `Iter` --> $DIR/missing-type.rs:5:12 | LL | let x: Iter; diff --git a/tests/ui/argument-suggestions/extern-fn-arg-names.rs b/tests/ui/argument-suggestions/extern-fn-arg-names.rs index df2fd6624cd0c..ed9697d7e5c52 100644 --- a/tests/ui/argument-suggestions/extern-fn-arg-names.rs +++ b/tests/ui/argument-suggestions/extern-fn-arg-names.rs @@ -1,6 +1,6 @@ extern "Rust" { fn dstfn(src: i32, dst: err); - //~^ ERROR cannot find type `err` in this scope + //~^ ERROR cannot find type `err` } fn main() { diff --git a/tests/ui/argument-suggestions/extern-fn-arg-names.stderr b/tests/ui/argument-suggestions/extern-fn-arg-names.stderr index f6bc84c1203ad..265c0ad477b39 100644 --- a/tests/ui/argument-suggestions/extern-fn-arg-names.stderr +++ b/tests/ui/argument-suggestions/extern-fn-arg-names.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `err` in this scope +error[E0412]: cannot find type `err` --> $DIR/extern-fn-arg-names.rs:2:29 | LL | fn dstfn(src: i32, dst: err); diff --git a/tests/ui/argument-suggestions/issue-109831.stderr b/tests/ui/argument-suggestions/issue-109831.stderr index 7b9a3c9ef2c6c..2962e10aebbe6 100644 --- a/tests/ui/argument-suggestions/issue-109831.stderr +++ b/tests/ui/argument-suggestions/issue-109831.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `C` in this scope +error[E0412]: cannot find type `C` --> $DIR/issue-109831.rs:4:24 | LL | struct A; @@ -16,7 +16,7 @@ help: you might be missing a type parameter LL | fn f(b1: B, b2: B, a2: C) {} | +++ -error[E0425]: cannot find value `C` in this scope +error[E0425]: cannot find value `C` --> $DIR/issue-109831.rs:7:16 | LL | struct A; diff --git a/tests/ui/array-slice-vec/slice-pat-type-mismatches.rs b/tests/ui/array-slice-vec/slice-pat-type-mismatches.rs index 03a1876fdc5a5..ea4141b27664e 100644 --- a/tests/ui/array-slice-vec/slice-pat-type-mismatches.rs +++ b/tests/ui/array-slice-vec/slice-pat-type-mismatches.rs @@ -24,8 +24,8 @@ fn main() { }; match does_not_exist { - //~^ ERROR cannot find value `does_not_exist` in this scope - [] => {} // ERROR cannot find value `does_not_exist` in this scope + //~^ ERROR cannot find value `does_not_exist` + [] => {} // ERROR cannot find value `does_not_exist` }; } diff --git a/tests/ui/array-slice-vec/slice-pat-type-mismatches.stderr b/tests/ui/array-slice-vec/slice-pat-type-mismatches.stderr index d1d042c477681..f48c1564babd4 100644 --- a/tests/ui/array-slice-vec/slice-pat-type-mismatches.stderr +++ b/tests/ui/array-slice-vec/slice-pat-type-mismatches.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `does_not_exist` in this scope +error[E0425]: cannot find value `does_not_exist` --> $DIR/slice-pat-type-mismatches.rs:26:11 | LL | match does_not_exist { diff --git a/tests/ui/asm/issue-113788.rs b/tests/ui/asm/issue-113788.rs index 3b11e253eda27..1d63cb309ef73 100644 --- a/tests/ui/asm/issue-113788.rs +++ b/tests/ui/asm/issue-113788.rs @@ -2,6 +2,6 @@ //@ needs-asm-support //@ only-x86_64 fn main() { - let peb: *const PEB; //~ ERROR cannot find type `PEB` in this scope [E0412] + let peb: *const PEB; //~ ERROR cannot find type `PEB` [E0412] unsafe { std::arch::asm!("mov {0}, fs:[0x30]", out(reg) peb); } } diff --git a/tests/ui/asm/issue-113788.stderr b/tests/ui/asm/issue-113788.stderr index c44ba3c91d91a..ba27c8b101fb1 100644 --- a/tests/ui/asm/issue-113788.stderr +++ b/tests/ui/asm/issue-113788.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `PEB` in this scope +error[E0412]: cannot find type `PEB` --> $DIR/issue-113788.rs:5:21 | LL | let peb: *const PEB; diff --git a/tests/ui/associated-consts/issue-93835.rs b/tests/ui/associated-consts/issue-93835.rs index 9cc33d53f9cd5..cf458b11135eb 100644 --- a/tests/ui/associated-consts/issue-93835.rs +++ b/tests/ui/associated-consts/issue-93835.rs @@ -2,10 +2,10 @@ fn e() { type_ascribe!(p, a>); - //~^ ERROR cannot find type `a` in this scope + //~^ ERROR cannot find type `a` //~| ERROR cannot find value //~| ERROR associated const equality - //~| ERROR cannot find trait `p` in this scope + //~| ERROR cannot find trait `p` } fn main() {} diff --git a/tests/ui/associated-consts/issue-93835.stderr b/tests/ui/associated-consts/issue-93835.stderr index dfe78b3d1f380..8de7c04530f54 100644 --- a/tests/ui/associated-consts/issue-93835.stderr +++ b/tests/ui/associated-consts/issue-93835.stderr @@ -1,16 +1,16 @@ -error[E0425]: cannot find value `p` in this scope +error[E0425]: cannot find value `p` --> $DIR/issue-93835.rs:4:19 | LL | type_ascribe!(p, a>); | ^ not found in this scope -error[E0412]: cannot find type `a` in this scope +error[E0412]: cannot find type `a` --> $DIR/issue-93835.rs:4:22 | LL | type_ascribe!(p, a>); | ^ not found in this scope -error[E0405]: cannot find trait `p` in this scope +error[E0405]: cannot find trait `p` --> $DIR/issue-93835.rs:4:26 | LL | type_ascribe!(p, a>); diff --git a/tests/ui/associated-item/issue-87638.fixed b/tests/ui/associated-item/issue-87638.fixed index 36184e7862557..a923dec25ade6 100644 --- a/tests/ui/associated-item/issue-87638.fixed +++ b/tests/ui/associated-item/issue-87638.fixed @@ -14,9 +14,9 @@ impl Trait for S { } fn main() { - let _: ::Target; //~ ERROR cannot find associated type `Output` in trait `Trait` + let _: ::Target; //~ ERROR cannot find associated type `Output` //~^ HELP maybe you meant this associated type - let _ = ::FOO; //~ ERROR cannot find method or associated constant `BAR` in trait `Trait` + let _ = ::FOO; //~ ERROR cannot find method or associated constant `BAR` //~^ HELP maybe you meant this associated constant } diff --git a/tests/ui/associated-item/issue-87638.rs b/tests/ui/associated-item/issue-87638.rs index 30187625ff3da..9ccd44aa43b43 100644 --- a/tests/ui/associated-item/issue-87638.rs +++ b/tests/ui/associated-item/issue-87638.rs @@ -14,9 +14,9 @@ impl Trait for S { } fn main() { - let _: ::Output; //~ ERROR cannot find associated type `Output` in trait `Trait` + let _: ::Output; //~ ERROR cannot find associated type `Output` //~^ HELP maybe you meant this associated type - let _ = ::BAR; //~ ERROR cannot find method or associated constant `BAR` in trait `Trait` + let _ = ::BAR; //~ ERROR cannot find method or associated constant `BAR` //~^ HELP maybe you meant this associated constant } diff --git a/tests/ui/associated-item/issue-87638.stderr b/tests/ui/associated-item/issue-87638.stderr index cf6083444b0e6..ce13a4eac4b3b 100644 --- a/tests/ui/associated-item/issue-87638.stderr +++ b/tests/ui/associated-item/issue-87638.stderr @@ -1,4 +1,4 @@ -error[E0576]: cannot find associated type `Output` in trait `Trait` +error[E0576]: cannot find associated type `Output` --> $DIR/issue-87638.rs:17:26 | LL | type Target; @@ -7,10 +7,10 @@ LL | type Target; LL | let _: ::Output; | ^^^^^^ | | - | not found in `Trait` + | not found in trait `Trait` | help: maybe you meant this associated type: `Target` -error[E0576]: cannot find method or associated constant `BAR` in trait `Trait` +error[E0576]: cannot find method or associated constant `BAR` --> $DIR/issue-87638.rs:20:27 | LL | const FOO: usize; @@ -19,7 +19,7 @@ LL | const FOO: usize; LL | let _ = ::BAR; | ^^^ | | - | not found in `Trait` + | not found in trait `Trait` | help: maybe you meant this associated constant: `FOO` error: aborting due to 2 previous errors diff --git a/tests/ui/associated-path-shl.rs b/tests/ui/associated-path-shl.rs index 20a6fd83faa32..a9639063ee824 100644 --- a/tests/ui/associated-path-shl.rs +++ b/tests/ui/associated-path-shl.rs @@ -1,9 +1,9 @@ // Check that associated paths starting with `<<` are successfully parsed. fn main() { - let _: <::B>::C; //~ ERROR cannot find type `A` in this scope - let _ = <::B>::C; //~ ERROR cannot find type `A` in this scope - let <::B>::C; //~ ERROR cannot find type `A` in this scope - let 0 ..= <::B>::C; //~ ERROR cannot find type `A` in this scope - <::B>::C; //~ ERROR cannot find type `A` in this scope + let _: <::B>::C; //~ ERROR cannot find type `A` + let _ = <::B>::C; //~ ERROR cannot find type `A` + let <::B>::C; //~ ERROR cannot find type `A` + let 0 ..= <::B>::C; //~ ERROR cannot find type `A` + <::B>::C; //~ ERROR cannot find type `A` } diff --git a/tests/ui/associated-path-shl.stderr b/tests/ui/associated-path-shl.stderr index 71ee93f4835fb..330a304919c2b 100644 --- a/tests/ui/associated-path-shl.stderr +++ b/tests/ui/associated-path-shl.stderr @@ -1,28 +1,28 @@ -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/associated-path-shl.rs:4:14 | LL | let _: <::B>::C; | ^ not found in this scope -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/associated-path-shl.rs:5:15 | LL | let _ = <::B>::C; | ^ not found in this scope -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/associated-path-shl.rs:6:11 | LL | let <::B>::C; | ^ not found in this scope -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/associated-path-shl.rs:7:17 | LL | let 0 ..= <::B>::C; | ^ not found in this scope -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/associated-path-shl.rs:8:7 | LL | <::B>::C; diff --git a/tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.rs b/tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.rs index 07d0f8f8769e5..93c7203f14710 100644 --- a/tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.rs +++ b/tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.rs @@ -2,7 +2,7 @@ fn foo(_m: M) where M::Item: Temp, - //~^ ERROR cannot find trait `Temp` in this scope [E0405] + //~^ ERROR cannot find trait `Temp` [E0405] //~| ERROR associated type `Item` not found for `M` [E0220] { } diff --git a/tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.stderr b/tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.stderr index bc2807b03961c..65c37ecf5bbc0 100644 --- a/tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.stderr +++ b/tests/ui/associated-type-bounds/missing-trait-bound-for-assoc-fails.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Temp` in this scope +error[E0405]: cannot find trait `Temp` --> $DIR/missing-trait-bound-for-assoc-fails.rs:4:14 | LL | M::Item: Temp, diff --git a/tests/ui/associated-types/associated-types-eq-1.rs b/tests/ui/associated-types/associated-types-eq-1.rs index c371138ff45b1..f672f83d260a2 100644 --- a/tests/ui/associated-types/associated-types-eq-1.rs +++ b/tests/ui/associated-types/associated-types-eq-1.rs @@ -7,7 +7,7 @@ pub trait Foo { } fn foo2(x: I) { - let _: A = x.boo(); //~ ERROR cannot find type `A` in this scope + let _: A = x.boo(); //~ ERROR cannot find type `A` } pub fn main() {} diff --git a/tests/ui/associated-types/associated-types-eq-1.stderr b/tests/ui/associated-types/associated-types-eq-1.stderr index 14ef36876740b..a9267d07265dd 100644 --- a/tests/ui/associated-types/associated-types-eq-1.stderr +++ b/tests/ui/associated-types/associated-types-eq-1.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/associated-types-eq-1.rs:10:12 | LL | fn foo2(x: I) { diff --git a/tests/ui/associated-types/issue-19883.rs b/tests/ui/associated-types/issue-19883.rs index 5cf422043a585..ad63ea57e1ad0 100644 --- a/tests/ui/associated-types/issue-19883.rs +++ b/tests/ui/associated-types/issue-19883.rs @@ -7,7 +7,7 @@ trait From { trait To: Sized { fn to>(self) -> >::Dst - //~^ ERROR cannot find associated type `Dst` in trait `From` + //~^ ERROR cannot find associated type `Dst` { From::from(self) } diff --git a/tests/ui/associated-types/issue-19883.stderr b/tests/ui/associated-types/issue-19883.stderr index 35184e852cfe1..03a4bdf38c388 100644 --- a/tests/ui/associated-types/issue-19883.stderr +++ b/tests/ui/associated-types/issue-19883.stderr @@ -1,4 +1,4 @@ -error[E0576]: cannot find associated type `Dst` in trait `From` +error[E0576]: cannot find associated type `Dst` --> $DIR/issue-19883.rs:9:30 | LL | type Output; @@ -7,7 +7,7 @@ LL | type Output; LL | >::Dst | ^^^ | | - | not found in `From` + | not found in trait `From` | help: maybe you meant this associated type: `Output` error: aborting due to 1 previous error diff --git a/tests/ui/associated-types/issue-22037.rs b/tests/ui/associated-types/issue-22037.rs index b9eb41b6ea6e5..83c17132e7a31 100644 --- a/tests/ui/associated-types/issue-22037.rs +++ b/tests/ui/associated-types/issue-22037.rs @@ -1,7 +1,7 @@ trait A { type Output; fn a(&self) -> ::X; - //~^ ERROR cannot find associated type `X` in trait `A` + //~^ ERROR cannot find associated type `X` } impl A for u32 { diff --git a/tests/ui/associated-types/issue-22037.stderr b/tests/ui/associated-types/issue-22037.stderr index b02dad97d354e..135f228bfad48 100644 --- a/tests/ui/associated-types/issue-22037.stderr +++ b/tests/ui/associated-types/issue-22037.stderr @@ -1,4 +1,4 @@ -error[E0576]: cannot find associated type `X` in trait `A` +error[E0576]: cannot find associated type `X` --> $DIR/issue-22037.rs:3:33 | LL | type Output; @@ -6,7 +6,7 @@ LL | type Output; LL | fn a(&self) -> ::X; | ^ | | - | not found in `A` + | not found in trait `A` | help: maybe you meant this associated type: `Output` error: aborting due to 1 previous error diff --git a/tests/ui/async-await/async-closures/tainted-body.rs b/tests/ui/async-await/async-closures/tainted-body.rs index e42d9d6e36ade..8ea499de9c7a4 100644 --- a/tests/ui/async-await/async-closures/tainted-body.rs +++ b/tests/ui/async-await/async-closures/tainted-body.rs @@ -7,7 +7,7 @@ fn main() { let _ = async || { used_fn(); - //~^ ERROR cannot find function `used_fn` in this scope + //~^ ERROR cannot find function `used_fn` 0 }; } diff --git a/tests/ui/async-await/async-closures/tainted-body.stderr b/tests/ui/async-await/async-closures/tainted-body.stderr index b06a896b81f52..f8ae0d1558809 100644 --- a/tests/ui/async-await/async-closures/tainted-body.stderr +++ b/tests/ui/async-await/async-closures/tainted-body.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `used_fn` in this scope +error[E0425]: cannot find function `used_fn` --> $DIR/tainted-body.rs:9:9 | LL | used_fn(); diff --git a/tests/ui/async-await/async-fn/not-a-trait.rs b/tests/ui/async-await/async-fn/not-a-trait.rs index 0d22cbd2c0730..663bdcdaefc89 100644 --- a/tests/ui/async-await/async-fn/not-a-trait.rs +++ b/tests/ui/async-await/async-fn/not-a-trait.rs @@ -8,6 +8,6 @@ fn test(x: impl async S) {} //~^ ERROR expected trait, found struct `S` fn missing(x: impl async Missing) {} -//~^ ERROR cannot find trait `Missing` in this scope +//~^ ERROR cannot find trait `Missing` fn main() {} diff --git a/tests/ui/async-await/async-fn/not-a-trait.stderr b/tests/ui/async-await/async-fn/not-a-trait.stderr index d49f7d7d2fc16..b9a07a0b04cc1 100644 --- a/tests/ui/async-await/async-fn/not-a-trait.stderr +++ b/tests/ui/async-await/async-fn/not-a-trait.stderr @@ -4,7 +4,7 @@ error[E0404]: expected trait, found struct `S` LL | fn test(x: impl async S) {} | ^ not a trait -error[E0405]: cannot find trait `Missing` in this scope +error[E0405]: cannot find trait `Missing` --> $DIR/not-a-trait.rs:10:26 | LL | fn missing(x: impl async Missing) {} diff --git a/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs b/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs index d4897a1caf39d..cb9c70ff665ed 100644 --- a/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs +++ b/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.rs @@ -1,13 +1,13 @@ //@ edition:2018 async fn foobar_async(x: u32, (a, _, _c): (u32, u32, u32), _: u32, _y: u32) { - assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1` in this scope [E0425] - assert_eq!(__arg2, 4); //~ ERROR cannot find value `__arg2` in this scope [E0425] + assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1` [E0425] + assert_eq!(__arg2, 4); //~ ERROR cannot find value `__arg2` [E0425] } async fn baz_async(ref mut x: u32, ref y: u32) { - assert_eq!(__arg0, 1); //~ ERROR cannot find value `__arg0` in this scope [E0425] - assert_eq!(__arg1, 2); //~ ERROR cannot find value `__arg1` in this scope [E0425] + assert_eq!(__arg0, 1); //~ ERROR cannot find value `__arg0` [E0425] + assert_eq!(__arg1, 2); //~ ERROR cannot find value `__arg1` [E0425] } fn main() {} diff --git a/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr b/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr index aa04a613f47c1..01460b1a9751e 100644 --- a/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr +++ b/tests/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr @@ -1,22 +1,22 @@ -error[E0425]: cannot find value `__arg1` in this scope +error[E0425]: cannot find value `__arg1` --> $DIR/drop-order-locals-are-hidden.rs:4:16 | LL | assert_eq!(__arg1, (1, 2, 3)); | ^^^^^^ not found in this scope -error[E0425]: cannot find value `__arg2` in this scope +error[E0425]: cannot find value `__arg2` --> $DIR/drop-order-locals-are-hidden.rs:5:16 | LL | assert_eq!(__arg2, 4); | ^^^^^^ not found in this scope -error[E0425]: cannot find value `__arg0` in this scope +error[E0425]: cannot find value `__arg0` --> $DIR/drop-order-locals-are-hidden.rs:9:16 | LL | assert_eq!(__arg0, 1); | ^^^^^^ not found in this scope -error[E0425]: cannot find value `__arg1` in this scope +error[E0425]: cannot find value `__arg1` --> $DIR/drop-order-locals-are-hidden.rs:10:16 | LL | assert_eq!(__arg1, 2); diff --git a/tests/ui/async-await/in-trait/return-not-existing-pair.rs b/tests/ui/async-await/in-trait/return-not-existing-pair.rs index 3889efe1f2a3c..e72c8d8e93783 100644 --- a/tests/ui/async-await/in-trait/return-not-existing-pair.rs +++ b/tests/ui/async-await/in-trait/return-not-existing-pair.rs @@ -3,7 +3,7 @@ trait MyTrait<'a, 'b, T> { async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T); - //~^ ERROR: cannot find type `ConnImpl` in this scope [E0412] + //~^ ERROR: cannot find type `ConnImpl` [E0412] } impl<'a, 'b, T, U> MyTrait for U { diff --git a/tests/ui/async-await/in-trait/return-not-existing-pair.stderr b/tests/ui/async-await/in-trait/return-not-existing-pair.stderr index 13d3606abba78..bfa1cf1ddecf0 100644 --- a/tests/ui/async-await/in-trait/return-not-existing-pair.stderr +++ b/tests/ui/async-await/in-trait/return-not-existing-pair.stderr @@ -9,7 +9,7 @@ help: indicate the anonymous lifetimes LL | impl<'a, 'b, T, U> MyTrait<'_, '_, T> for U { | +++++++ -error[E0412]: cannot find type `ConnImpl` in this scope +error[E0412]: cannot find type `ConnImpl` --> $DIR/return-not-existing-pair.rs:5:48 | LL | async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T); diff --git a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs index e45fca6de770f..e485a19a41523 100644 --- a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs +++ b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.rs @@ -5,7 +5,7 @@ struct Wrapper(T); trait Foo { fn bar() -> Wrapper>; - //~^ ERROR: cannot find type `Missing` in this scope [E0412] + //~^ ERROR: cannot find type `Missing` [E0412] } impl Foo for () { diff --git a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr index 84e0a643485f7..58773c066b884 100644 --- a/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr +++ b/tests/ui/async-await/in-trait/return-not-existing-type-wrapping-rpitit.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/return-not-existing-type-wrapping-rpitit.rs:7:25 | LL | fn bar() -> Wrapper>; diff --git a/tests/ui/async-await/issue-72590-type-error-sized.stderr b/tests/ui/async-await/issue-72590-type-error-sized.stderr index 1b822234d80cc..557b29472bfe5 100644 --- a/tests/ui/async-await/issue-72590-type-error-sized.stderr +++ b/tests/ui/async-await/issue-72590-type-error-sized.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `Nonexistent` in this scope +error[E0412]: cannot find type `Nonexistent` --> $DIR/issue-72590-type-error-sized.rs:6:10 | LL | foo: Nonexistent, | ^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/issue-72590-type-error-sized.rs:11:11 | LL | test: Missing diff --git a/tests/ui/attributes/issue-90873.rs b/tests/ui/attributes/issue-90873.rs index 53339ce7e28fb..47643c52fd2d3 100644 --- a/tests/ui/attributes/issue-90873.rs +++ b/tests/ui/attributes/issue-90873.rs @@ -1,9 +1,9 @@ #![u=||{static d=||1;}] //~^ attribute value must be a literal -//~| cannot find attribute `u` in this scope +//~| cannot find attribute `u` //~| missing type for `static` item #![a={impl std::ops::Neg for i8 {}}] //~^ ERROR attribute value must be a literal -//~| ERROR cannot find attribute `a` in this scope +//~| ERROR cannot find attribute `a` //~| ERROR `main` function not found in crate `issue_90873` diff --git a/tests/ui/attributes/key-value-expansion-scope.rs b/tests/ui/attributes/key-value-expansion-scope.rs index b84fe4873c371..449809ec8d4dc 100644 --- a/tests/ui/attributes/key-value-expansion-scope.rs +++ b/tests/ui/attributes/key-value-expansion-scope.rs @@ -1,17 +1,17 @@ #![doc = in_root!()] // FIXME, this is a bug -#![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope +#![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` #![doc = in_mod_escape!()] // FIXME, this is a bug -#![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope +#![doc = in_block!()] //~ ERROR cannot find macro `in_block` -#[doc = in_root!()] //~ ERROR cannot find macro `in_root` in this scope -#[doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope -#[doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape` in this scope -#[doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope +#[doc = in_root!()] //~ ERROR cannot find macro `in_root` +#[doc = in_mod!()] //~ ERROR cannot find macro `in_mod` +#[doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape` +#[doc = in_block!()] //~ ERROR cannot find macro `in_block` fn before() { - #![doc = in_root!()] //~ ERROR cannot find macro `in_root` in this scope - #![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope - #![doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape` in this scope - #![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope + #![doc = in_root!()] //~ ERROR cannot find macro `in_root` + #![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` + #![doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape` + #![doc = in_block!()] //~ ERROR cannot find macro `in_block` } macro_rules! in_root { () => { "" } } @@ -40,7 +40,7 @@ mod macros_escape { } fn block() { - #![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope + #![doc = in_block!()] //~ ERROR cannot find macro `in_block` macro_rules! in_block { () => { "" } } @@ -51,14 +51,14 @@ fn block() { } #[doc = in_root!()] // OK -#[doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope +#[doc = in_mod!()] //~ ERROR cannot find macro `in_mod` #[doc = in_mod_escape!()] // OK -#[doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope +#[doc = in_block!()] //~ ERROR cannot find macro `in_block` fn after() { #![doc = in_root!()] // OK - #![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope + #![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` #![doc = in_mod_escape!()] // OK - #![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope + #![doc = in_block!()] //~ ERROR cannot find macro `in_block` } fn main() {} diff --git a/tests/ui/attributes/main-removed-1.rs b/tests/ui/attributes/main-removed-1.rs index 0e887469d4466..36cec5c6d958f 100644 --- a/tests/ui/attributes/main-removed-1.rs +++ b/tests/ui/attributes/main-removed-1.rs @@ -1,2 +1,2 @@ -#[main] //~ ERROR cannot find attribute `main` in this scope +#[main] //~ ERROR cannot find attribute `main` fn main() {} diff --git a/tests/ui/attributes/obsolete-attr.rs b/tests/ui/attributes/obsolete-attr.rs index 7019abcaffbae..ae048eda531dd 100644 --- a/tests/ui/attributes/obsolete-attr.rs +++ b/tests/ui/attributes/obsolete-attr.rs @@ -1,9 +1,9 @@ // Obsolete attributes fall back to unstable custom attributes. #[ab_isize = "stdcall"] extern "C" {} -//~^ ERROR cannot find attribute `ab_isize` in this scope +//~^ ERROR cannot find attribute `ab_isize` #[fixed_stack_segment] fn f() {} -//~^ ERROR cannot find attribute `fixed_stack_segment` in this scope +//~^ ERROR cannot find attribute `fixed_stack_segment` fn main() {} diff --git a/tests/ui/attributes/unknown-attr.rs b/tests/ui/attributes/unknown-attr.rs index 70fef04e95c67..ff6969c2426b4 100644 --- a/tests/ui/attributes/unknown-attr.rs +++ b/tests/ui/attributes/unknown-attr.rs @@ -3,10 +3,10 @@ #![feature(custom_inner_attributes)] #![mutable_doc] -//~^ ERROR cannot find attribute `mutable_doc` in this scope +//~^ ERROR cannot find attribute `mutable_doc` #[dance] mod a {} -//~^ ERROR cannot find attribute `dance` in this scope +//~^ ERROR cannot find attribute `dance` #[dance] fn main() {} -//~^ ERROR cannot find attribute `dance` in this scope +//~^ ERROR cannot find attribute `dance` diff --git a/tests/ui/attributes/unsafe/double-unsafe-attributes.rs b/tests/ui/attributes/unsafe/double-unsafe-attributes.rs index a6c0ea578f25a..de94328ba7320 100644 --- a/tests/ui/attributes/unsafe/double-unsafe-attributes.rs +++ b/tests/ui/attributes/unsafe/double-unsafe-attributes.rs @@ -2,7 +2,7 @@ #[unsafe(unsafe(no_mangle))] //~^ ERROR expected identifier, found keyword `unsafe` -//~| ERROR cannot find attribute `r#unsafe` in this scope +//~| ERROR cannot find attribute `r#unsafe` //~| ERROR `r#unsafe` is not an unsafe attribute fn a() {} diff --git a/tests/ui/attributes/unused-item-in-attr.rs b/tests/ui/attributes/unused-item-in-attr.rs index fda0a5d6a3f16..460e85569865c 100644 --- a/tests/ui/attributes/unused-item-in-attr.rs +++ b/tests/ui/attributes/unused-item-in-attr.rs @@ -1,6 +1,6 @@ #[w = { extern crate alloc; }] //~^ ERROR attribute value must be a literal -//~| ERROR cannot find attribute `w` in this scope +//~| ERROR cannot find attribute `w` fn f() {} fn main() {} diff --git a/tests/ui/c-variadic/issue-86053-1.rs b/tests/ui/c-variadic/issue-86053-1.rs index f952235be9811..ce80375dbd51a 100644 --- a/tests/ui/c-variadic/issue-86053-1.rs +++ b/tests/ui/c-variadic/issue-86053-1.rs @@ -1,7 +1,7 @@ // Regression test for the ICE described in issue #86053. //@ error-pattern:unexpected `self` parameter in function //@ error-pattern:`...` must be the last argument of a C-variadic function -//@ error-pattern:cannot find type `F` in this scope +//@ error-pattern:cannot find type `F` #![feature(c_variadic)] diff --git a/tests/ui/c-variadic/issue-86053-1.stderr b/tests/ui/c-variadic/issue-86053-1.stderr index 69e19e1d4d26b..8e1881a815c91 100644 --- a/tests/ui/c-variadic/issue-86053-1.stderr +++ b/tests/ui/c-variadic/issue-86053-1.stderr @@ -52,7 +52,7 @@ error: only foreign or `unsafe extern "C"` functions may be C-variadic LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) { | ^^^ ^^^ -error[E0412]: cannot find type `F` in this scope +error[E0412]: cannot find type `F` --> $DIR/issue-86053-1.rs:11:48 | LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) { diff --git a/tests/ui/cast/cast-errors-issue-43825.stderr b/tests/ui/cast/cast-errors-issue-43825.stderr index 658d5ddbb611c..5ed78fd04cf74 100644 --- a/tests/ui/cast/cast-errors-issue-43825.stderr +++ b/tests/ui/cast/cast-errors-issue-43825.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `error` in this scope +error[E0425]: cannot find value `error` --> $DIR/cast-errors-issue-43825.rs:2:17 | LL | let error = error; diff --git a/tests/ui/cast/casts-issue-46365.stderr b/tests/ui/cast/casts-issue-46365.stderr index 84bc73a9b7862..68e46618a621e 100644 --- a/tests/ui/cast/casts-issue-46365.stderr +++ b/tests/ui/cast/casts-issue-46365.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Ipsum` in this scope +error[E0412]: cannot find type `Ipsum` --> $DIR/casts-issue-46365.rs:2:12 | LL | ipsum: Ipsum diff --git a/tests/ui/cast/ice-cast-type-with-error-124848.rs b/tests/ui/cast/ice-cast-type-with-error-124848.rs index 9b3732b02db43..e8b99e5878e2a 100644 --- a/tests/ui/cast/ice-cast-type-with-error-124848.rs +++ b/tests/ui/cast/ice-cast-type-with-error-124848.rs @@ -6,7 +6,7 @@ use std::cell::Cell; struct MyType<'a>(Cell>>, Pin); //~^ ERROR use of undeclared lifetime name `'unpinned` -//~| ERROR cannot find type `Pin` in this scope +//~| ERROR cannot find type `Pin` fn main() { let mut unpinned = MyType(Cell::new(None)); diff --git a/tests/ui/cast/ice-cast-type-with-error-124848.stderr b/tests/ui/cast/ice-cast-type-with-error-124848.stderr index 2d86bf76d1102..60a4eb21bfd16 100644 --- a/tests/ui/cast/ice-cast-type-with-error-124848.stderr +++ b/tests/ui/cast/ice-cast-type-with-error-124848.stderr @@ -24,7 +24,7 @@ LL | fn main() { LL | let bad_addr = &unpinned as *const Cell>> as usize; | ^^ undeclared lifetime -error[E0412]: cannot find type `Pin` in this scope +error[E0412]: cannot find type `Pin` --> $DIR/ice-cast-type-with-error-124848.rs:7:60 | LL | struct MyType<'a>(Cell>>, Pin); diff --git a/tests/ui/cfg/diagnostics-cross-crate.rs b/tests/ui/cfg/diagnostics-cross-crate.rs index 77dd91d6c2823..e5d7e02afe374 100644 --- a/tests/ui/cfg/diagnostics-cross-crate.rs +++ b/tests/ui/cfg/diagnostics-cross-crate.rs @@ -5,12 +5,12 @@ extern crate cfged_out; fn main() { // There is no uwu at this path - no diagnostic. cfged_out::uwu(); //~ ERROR cannot find function - //~^ NOTE not found in `cfged_out` + //~^ NOTE not found in crate `cfged_out` // It does exist here - diagnostic. cfged_out::inner::uwu(); //~ ERROR cannot find function //~^ NOTE found an item that was configured out - //~| NOTE not found in `cfged_out::inner` + //~| NOTE not found in module `cfged_out::inner` // The module isn't found - we would like to get a diagnostic, but currently don't due to // the awkward way the resolver diagnostics are currently implemented. @@ -21,11 +21,11 @@ fn main() { // It should find the one in the right module, not the wrong one. cfged_out::inner::right::meow(); //~ ERROR cannot find function //~^ NOTE found an item that was configured out - //~| NOTE not found in `cfged_out::inner::right + //~| NOTE not found in module `cfged_out::inner::right //~| NOTE the item is gated behind the `what-a-cool-feature` feature // Exists in the crate root - diagnostic. cfged_out::vanished(); //~ ERROR cannot find function //~^ NOTE found an item that was configured out - //~| NOTE not found in `cfged_out` + //~| NOTE not found in crate `cfged_out` } diff --git a/tests/ui/cfg/diagnostics-cross-crate.stderr b/tests/ui/cfg/diagnostics-cross-crate.stderr index 8a238f3640445..a01b1a47ef8d1 100644 --- a/tests/ui/cfg/diagnostics-cross-crate.stderr +++ b/tests/ui/cfg/diagnostics-cross-crate.stderr @@ -10,17 +10,17 @@ note: found an item that was configured out LL | pub mod doesnt_exist { | ^^^^^^^^^^^^ -error[E0425]: cannot find function `uwu` in crate `cfged_out` +error[E0425]: cannot find function `uwu` --> $DIR/diagnostics-cross-crate.rs:7:16 | LL | cfged_out::uwu(); - | ^^^ not found in `cfged_out` + | ^^^ not found in crate `cfged_out` -error[E0425]: cannot find function `uwu` in module `cfged_out::inner` +error[E0425]: cannot find function `uwu` --> $DIR/diagnostics-cross-crate.rs:11:23 | LL | cfged_out::inner::uwu(); - | ^^^ not found in `cfged_out::inner` + | ^^^ not found in module `cfged_out::inner` | note: found an item that was configured out --> $DIR/auxiliary/cfged_out.rs:3:12 @@ -28,11 +28,11 @@ note: found an item that was configured out LL | pub fn uwu() {} | ^^^ -error[E0425]: cannot find function `meow` in module `cfged_out::inner::right` +error[E0425]: cannot find function `meow` --> $DIR/diagnostics-cross-crate.rs:22:30 | LL | cfged_out::inner::right::meow(); - | ^^^^ not found in `cfged_out::inner::right` + | ^^^^ not found in module `cfged_out::inner::right` | note: found an item that was configured out --> $DIR/auxiliary/cfged_out.rs:17:16 @@ -41,11 +41,11 @@ LL | pub fn meow() {} | ^^^^ = note: the item is gated behind the `what-a-cool-feature` feature -error[E0425]: cannot find function `vanished` in crate `cfged_out` +error[E0425]: cannot find function `vanished` --> $DIR/diagnostics-cross-crate.rs:28:16 | LL | cfged_out::vanished(); - | ^^^^^^^^ not found in `cfged_out` + | ^^^^^^^^ not found in crate `cfged_out` | note: found an item that was configured out --> $DIR/auxiliary/cfged_out.rs:22:8 diff --git a/tests/ui/cfg/diagnostics-not-a-def.stderr b/tests/ui/cfg/diagnostics-not-a-def.stderr index 89bbf574871b8..67c33f4c59634 100644 --- a/tests/ui/cfg/diagnostics-not-a-def.stderr +++ b/tests/ui/cfg/diagnostics-not-a-def.stderr @@ -1,8 +1,8 @@ -error[E0425]: cannot find function `i_am_not` in module `inner` +error[E0425]: cannot find function `i_am_not` --> $DIR/diagnostics-not-a-def.rs:14:12 | LL | inner::i_am_not(); - | ^^^^^^^^ not found in `inner` + | ^^^^^^^^ not found in module `inner` error: aborting due to 1 previous error diff --git a/tests/ui/cfg/diagnostics-reexport.rs b/tests/ui/cfg/diagnostics-reexport.rs index 9b3208cb87cf9..71ded444bc41c 100644 --- a/tests/ui/cfg/diagnostics-reexport.rs +++ b/tests/ui/cfg/diagnostics-reexport.rs @@ -36,5 +36,5 @@ mod b { fn main() { // There is no uwu at this path - no diagnostic. inner::uwu(); //~ ERROR cannot find function - //~^ NOTE not found in `inner` + //~^ NOTE not found in module `inner` } diff --git a/tests/ui/cfg/diagnostics-reexport.stderr b/tests/ui/cfg/diagnostics-reexport.stderr index e25b7cf86e210..c64179a741bb7 100644 --- a/tests/ui/cfg/diagnostics-reexport.stderr +++ b/tests/ui/cfg/diagnostics-reexport.stderr @@ -29,11 +29,11 @@ note: found an item that was configured out LL | pub fn y() {} | ^ -error[E0425]: cannot find function `uwu` in module `inner` +error[E0425]: cannot find function `uwu` --> $DIR/diagnostics-reexport.rs:38:12 | LL | inner::uwu(); - | ^^^ not found in `inner` + | ^^^ not found in module `inner` | note: found an item that was configured out --> $DIR/diagnostics-reexport.rs:8:20 diff --git a/tests/ui/cfg/diagnostics-same-crate.rs b/tests/ui/cfg/diagnostics-same-crate.rs index b2a0fb58dd6b5..f31b08d3ad901 100644 --- a/tests/ui/cfg/diagnostics-same-crate.rs +++ b/tests/ui/cfg/diagnostics-same-crate.rs @@ -32,7 +32,7 @@ mod placeholder { //~| NOTE no `doesnt_exist` in `inner` use super::inner::doesnt_exist::hi; //~^ ERROR unresolved import `super::inner::doesnt_exist` - //~| NOTE could not find `doesnt_exist` in `inner` + //~| NOTE could not find `doesnt_exist` } #[cfg(i_dont_exist_and_you_can_do_nothing_about_it)] @@ -41,11 +41,11 @@ pub fn vanished() {} fn main() { // There is no uwu at this path - no diagnostic. uwu(); //~ ERROR cannot find function - //~^ NOTE not found in this scope + //~^ NOTE not found // It does exist here - diagnostic. inner::uwu(); //~ ERROR cannot find function - //~| NOTE not found in `inner` + //~| NOTE not found in module `inner` // The module isn't found - we would like to get a diagnostic, but currently don't due to // the awkward way the resolver diagnostics are currently implemented. @@ -54,12 +54,12 @@ fn main() { // It should find the one in the right module, not the wrong one. inner::right::meow(); //~ ERROR cannot find function - //~| NOTE not found in `inner::right + //~| NOTE not found in module `inner::right //~| NOTE the item is gated behind the `what-a-cool-feature` feature // Exists in the crate root - we would generally want a diagnostic, // but currently don't have one. // Not that it matters much though, this is highly unlikely to confuse anyone. vanished(); //~ ERROR cannot find function - //~^ NOTE not found in this scope + //~^ NOTE not found } diff --git a/tests/ui/cfg/diagnostics-same-crate.stderr b/tests/ui/cfg/diagnostics-same-crate.stderr index 86421736b8c60..f215738469249 100644 --- a/tests/ui/cfg/diagnostics-same-crate.stderr +++ b/tests/ui/cfg/diagnostics-same-crate.stderr @@ -34,11 +34,11 @@ note: found an item that was configured out LL | pub mod doesnt_exist { | ^^^^^^^^^^^^ -error[E0425]: cannot find function `uwu` in module `inner` +error[E0425]: cannot find function `uwu` --> $DIR/diagnostics-same-crate.rs:47:12 | LL | inner::uwu(); - | ^^^ not found in `inner` + | ^^^ not found in module `inner` | note: found an item that was configured out --> $DIR/diagnostics-same-crate.rs:5:12 @@ -46,11 +46,11 @@ note: found an item that was configured out LL | pub fn uwu() {} | ^^^ -error[E0425]: cannot find function `meow` in module `inner::right` +error[E0425]: cannot find function `meow` --> $DIR/diagnostics-same-crate.rs:56:19 | LL | inner::right::meow(); - | ^^^^ not found in `inner::right` + | ^^^^ not found in module `inner::right` | note: found an item that was configured out --> $DIR/diagnostics-same-crate.rs:24:16 @@ -59,13 +59,13 @@ LL | pub fn meow() {} | ^^^^ = note: the item is gated behind the `what-a-cool-feature` feature -error[E0425]: cannot find function `uwu` in this scope +error[E0425]: cannot find function `uwu` --> $DIR/diagnostics-same-crate.rs:43:5 | LL | uwu(); | ^^^ not found in this scope -error[E0425]: cannot find function `vanished` in this scope +error[E0425]: cannot find function `vanished` --> $DIR/diagnostics-same-crate.rs:63:5 | LL | vanished(); diff --git a/tests/ui/closures/issue-78720.rs b/tests/ui/closures/issue-78720.rs index 81af030fe5568..5fa9d805774d1 100644 --- a/tests/ui/closures/issue-78720.rs +++ b/tests/ui/closures/issue-78720.rs @@ -11,7 +11,7 @@ trait FilterBase2 { struct Map2 { _func: F, - //~^ ERROR cannot find type `F` in this scope + //~^ ERROR cannot find type `F` } impl FilterBase2 for F {} diff --git a/tests/ui/closures/issue-78720.stderr b/tests/ui/closures/issue-78720.stderr index 5d65c87b0fd61..09b115b07e153 100644 --- a/tests/ui/closures/issue-78720.stderr +++ b/tests/ui/closures/issue-78720.stderr @@ -4,7 +4,7 @@ error: at least one trait must be specified LL | fn server() -> impl { | ^^^^ -error[E0412]: cannot find type `F` in this scope +error[E0412]: cannot find type `F` --> $DIR/issue-78720.rs:13:12 | LL | _func: F, diff --git a/tests/ui/closures/issue-90871.rs b/tests/ui/closures/issue-90871.rs index 7ce061cd388c9..e8b57a3e76883 100644 --- a/tests/ui/closures/issue-90871.rs +++ b/tests/ui/closures/issue-90871.rs @@ -2,6 +2,6 @@ fn main() { type_ascribe!(2, n([u8; || 1])) - //~^ ERROR cannot find type `n` in this scope + //~^ ERROR cannot find type `n` //~| ERROR mismatched types } diff --git a/tests/ui/closures/issue-90871.stderr b/tests/ui/closures/issue-90871.stderr index ef1cb213f73be..4a607b5b66a84 100644 --- a/tests/ui/closures/issue-90871.stderr +++ b/tests/ui/closures/issue-90871.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `n` in this scope +error[E0412]: cannot find type `n` --> $DIR/issue-90871.rs:4:22 | LL | type_ascribe!(2, n([u8; || 1])) diff --git a/tests/ui/codemap_tests/tab.stderr b/tests/ui/codemap_tests/tab.stderr index d2de7486557f7..51f68358873d5 100644 --- a/tests/ui/codemap_tests/tab.stderr +++ b/tests/ui/codemap_tests/tab.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `bar` in this scope +error[E0425]: cannot find value `bar` --> $DIR/tab.rs:4:2 | LL | bar; diff --git a/tests/ui/codemap_tests/unicode_2.stderr b/tests/ui/codemap_tests/unicode_2.stderr index 19aae1d3c9511..c0acaa95d2127 100644 --- a/tests/ui/codemap_tests/unicode_2.stderr +++ b/tests/ui/codemap_tests/unicode_2.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `a̐é` in this scope +error[E0425]: cannot find value `a̐é` --> $DIR/unicode_2.rs:4:13 | LL | let _ = a̐é; diff --git a/tests/ui/coercion/type-errors.rs b/tests/ui/coercion/type-errors.rs index a86789907a055..4d1f6fec30bcb 100644 --- a/tests/ui/coercion/type-errors.rs +++ b/tests/ui/coercion/type-errors.rs @@ -3,7 +3,7 @@ // shortcutting and returning success, because we need the adjustments for building the MIR. pub fn has_error() -> TypeError {} -//~^ ERROR cannot find type `TypeError` in this scope +//~^ ERROR cannot find type `TypeError` // https://github.com/rust-lang/rust/issues/120884 // Casting a function item to a data pointer in valid in HIR, but invalid in MIR. @@ -16,11 +16,11 @@ pub fn cast() -> *const u8 { // https://github.com/rust-lang/rust/issues/120945 // This one ICEd, because we skipped the builtin deref from `&TypeError` to `TypeError`. pub fn autoderef_source(e: &TypeError) { - //~^ ERROR cannot find type `TypeError` in this scope + //~^ ERROR cannot find type `TypeError` autoderef_target(e) } pub fn autoderef_target(_: &TypeError) {} -//~^ ERROR cannot find type `TypeError` in this scope +//~^ ERROR cannot find type `TypeError` fn main() {} diff --git a/tests/ui/coercion/type-errors.stderr b/tests/ui/coercion/type-errors.stderr index 14deb785f75aa..dd0fe6a5660af 100644 --- a/tests/ui/coercion/type-errors.stderr +++ b/tests/ui/coercion/type-errors.stderr @@ -1,16 +1,16 @@ -error[E0412]: cannot find type `TypeError` in this scope +error[E0412]: cannot find type `TypeError` --> $DIR/type-errors.rs:5:23 | LL | pub fn has_error() -> TypeError {} | ^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `TypeError` in this scope +error[E0412]: cannot find type `TypeError` --> $DIR/type-errors.rs:18:29 | LL | pub fn autoderef_source(e: &TypeError) { | ^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `TypeError` in this scope +error[E0412]: cannot find type `TypeError` --> $DIR/type-errors.rs:23:29 | LL | pub fn autoderef_target(_: &TypeError) {} diff --git a/tests/ui/coherence/coherence-error-suppression.stderr b/tests/ui/coherence/coherence-error-suppression.stderr index fcaa510c632a8..0e96bee2e9ba5 100644 --- a/tests/ui/coherence/coherence-error-suppression.stderr +++ b/tests/ui/coherence/coherence-error-suppression.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `DoesNotExist` in this scope +error[E0412]: cannot find type `DoesNotExist` --> $DIR/coherence-error-suppression.rs:9:14 | LL | impl Foo for DoesNotExist {} diff --git a/tests/ui/coherence/illegal-copy-bad-projection.rs b/tests/ui/coherence/illegal-copy-bad-projection.rs index 797443a0abe5a..bd8a00ef06455 100644 --- a/tests/ui/coherence/illegal-copy-bad-projection.rs +++ b/tests/ui/coherence/illegal-copy-bad-projection.rs @@ -4,7 +4,7 @@ trait AsPtr { impl AsPtr for () { type Ptr = *const void; - //~^ ERROR cannot find type `void` in this scope + //~^ ERROR cannot find type `void` } #[derive(Copy, Clone)] diff --git a/tests/ui/coherence/illegal-copy-bad-projection.stderr b/tests/ui/coherence/illegal-copy-bad-projection.stderr index 2a74cb5a9b8b1..be778e6f488bd 100644 --- a/tests/ui/coherence/illegal-copy-bad-projection.stderr +++ b/tests/ui/coherence/illegal-copy-bad-projection.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `void` in this scope +error[E0412]: cannot find type `void` --> $DIR/illegal-copy-bad-projection.rs:6:23 | LL | type Ptr = *const void; diff --git a/tests/ui/compiletest-self-test/ui-testing-optout.stderr b/tests/ui/compiletest-self-test/ui-testing-optout.stderr index 652c472c0bcfe..e789b56f5f7ae 100644 --- a/tests/ui/compiletest-self-test/ui-testing-optout.stderr +++ b/tests/ui/compiletest-self-test/ui-testing-optout.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `B` in this scope +error[E0412]: cannot find type `B` --> $DIR/ui-testing-optout.rs:4:10 | 4 | type A = B; | ^ not found in this scope -error[E0412]: cannot find type `D` in this scope +error[E0412]: cannot find type `D` --> $DIR/ui-testing-optout.rs:7:10 | 4 | type A = B; @@ -13,7 +13,7 @@ error[E0412]: cannot find type `D` in this scope 7 | type C = D; | ^ help: a type alias with a similar name exists: `A` -error[E0412]: cannot find type `F` in this scope +error[E0412]: cannot find type `F` --> $DIR/ui-testing-optout.rs:92:10 | 4 | type A = B; diff --git a/tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.rs b/tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.rs index 45b757e928302..14fa0ad847e24 100644 --- a/tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.rs +++ b/tests/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.rs @@ -1,7 +1,7 @@ macro_rules! foo { () => { #[cfg_attr(all(), unknown)] - //~^ ERROR cannot find attribute `unknown` in this scope + //~^ ERROR cannot find attribute `unknown` fn foo() {} } } diff --git a/tests/ui/conditional-compilation/cfg-generic-params.rs b/tests/ui/conditional-compilation/cfg-generic-params.rs index 4bb8f8ae94f69..dccd9380eb468 100644 --- a/tests/ui/conditional-compilation/cfg-generic-params.rs +++ b/tests/ui/conditional-compilation/cfg-generic-params.rs @@ -17,22 +17,22 @@ struct WhereBad where for<#[cfg(FALSE)] 'a, #[cfg(yes)] T> u8: Copy; fn f_lt_no<#[cfg_attr(FALSE, unknown)] 'a>() {} // OK fn f_lt_yes<#[cfg_attr(yes, unknown)] 'a>() {} -//~^ ERROR cannot find attribute `unknown` in this scope +//~^ ERROR cannot find attribute `unknown` fn f_ty_no<#[cfg_attr(FALSE, unknown)] T>() {} // OK fn f_ty_yes<#[cfg_attr(yes, unknown)] T>() {} -//~^ ERROR cannot find attribute `unknown` in this scope +//~^ ERROR cannot find attribute `unknown` type FnNo = for<#[cfg_attr(FALSE, unknown)] 'a> fn(); // OK type FnYes = for<#[cfg_attr(yes, unknown)] 'a> fn(); -//~^ ERROR cannot find attribute `unknown` in this scope +//~^ ERROR cannot find attribute `unknown` type PolyNo = dyn for<#[cfg_attr(FALSE, unknown)] 'a> Copy; // OK type PolyYes = dyn for<#[cfg_attr(yes, unknown)] 'a> Copy; -//~^ ERROR cannot find attribute `unknown` in this scope +//~^ ERROR cannot find attribute `unknown` struct WhereNo where for<#[cfg_attr(FALSE, unknown)] 'a> u8: Copy; // OK struct WhereYes where for<#[cfg_attr(yes, unknown)] 'a> u8: Copy; -//~^ ERROR cannot find attribute `unknown` in this scope +//~^ ERROR cannot find attribute `unknown` fn main() { f_lt::<'static>(); diff --git a/tests/ui/conditional-compilation/cfg_accessible.stderr b/tests/ui/conditional-compilation/cfg_accessible.stderr index e3731a1ad7128..a2a7b1a9f66e9 100644 --- a/tests/ui/conditional-compilation/cfg_accessible.stderr +++ b/tests/ui/conditional-compilation/cfg_accessible.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `ExistingPrivate` in this scope +error[E0425]: cannot find value `ExistingPrivate` --> $DIR/cfg_accessible.rs:52:5 | LL | ExistingPrivate; @@ -10,13 +10,13 @@ note: unit struct `m::ExistingPrivate` exists but is inaccessible LL | struct ExistingPrivate; | ^^^^^^^^^^^^^^^^^^^^^^^ not accessible -error[E0425]: cannot find value `NonExistingPrivate` in this scope +error[E0425]: cannot find value `NonExistingPrivate` --> $DIR/cfg_accessible.rs:53:5 | LL | NonExistingPrivate; | ^^^^^^^^^^^^^^^^^^ not found in this scope -error[E0425]: cannot find value `NonExistingTraitAlias` in this scope +error[E0425]: cannot find value `NonExistingTraitAlias` --> $DIR/cfg_accessible.rs:54:5 | LL | NonExistingTraitAlias; diff --git a/tests/ui/conditional-compilation/test-cfg.rs b/tests/ui/conditional-compilation/test-cfg.rs index adbbc309be447..700fb3954c40b 100644 --- a/tests/ui/conditional-compilation/test-cfg.rs +++ b/tests/ui/conditional-compilation/test-cfg.rs @@ -4,5 +4,5 @@ fn foo() {} fn main() { - foo(); //~ ERROR cannot find function `foo` in this scope + foo(); //~ ERROR cannot find function `foo` } diff --git a/tests/ui/conditional-compilation/test-cfg.stderr b/tests/ui/conditional-compilation/test-cfg.stderr index 9715f16acc20c..62bca67db729f 100644 --- a/tests/ui/conditional-compilation/test-cfg.stderr +++ b/tests/ui/conditional-compilation/test-cfg.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/test-cfg.rs:7:5 | LL | foo(); diff --git a/tests/ui/const-generics/early/invalid-const-arguments.stderr b/tests/ui/const-generics/early/invalid-const-arguments.stderr index cee34e3b71593..3472a4c40ca48 100644 --- a/tests/ui/const-generics/early/invalid-const-arguments.stderr +++ b/tests/ui/const-generics/early/invalid-const-arguments.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `N` in this scope +error[E0412]: cannot find type `N` --> $DIR/invalid-const-arguments.rs:5:16 | LL | struct A; @@ -16,7 +16,7 @@ help: you might be missing a type parameter LL | impl Foo for A {} | +++ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/invalid-const-arguments.rs:14:32 | LL | struct A; diff --git a/tests/ui/const-generics/generic_const_exprs/error_in_ty.rs b/tests/ui/const-generics/generic_const_exprs/error_in_ty.rs index 29ad935c0149c..76f0ce033a07a 100644 --- a/tests/ui/const-generics/generic_const_exprs/error_in_ty.rs +++ b/tests/ui/const-generics/generic_const_exprs/error_in_ty.rs @@ -4,7 +4,7 @@ #![allow(incomplete_features)] pub struct A {} -//~^ ERROR: cannot find value `x` in this scope +//~^ ERROR: cannot find value `x` //~| ERROR: `[usize; x]` is forbidden as the type of a const generic parameter impl A<2> { diff --git a/tests/ui/const-generics/generic_const_exprs/error_in_ty.stderr b/tests/ui/const-generics/generic_const_exprs/error_in_ty.stderr index 0e40255bcf59b..45fd2e1121db8 100644 --- a/tests/ui/const-generics/generic_const_exprs/error_in_ty.stderr +++ b/tests/ui/const-generics/generic_const_exprs/error_in_ty.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/error_in_ty.rs:6:31 | LL | pub struct A {} diff --git a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs index 4bea3ad87f5ed..0ca496880b346 100644 --- a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs +++ b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs @@ -9,7 +9,7 @@ use core::ops::SubAssign; fn f( data: &[(); { let f: F = async { 1 }; - //~^ ERROR cannot find type `F` in this scope + //~^ ERROR cannot find type `F` 1 }], diff --git a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr index be79450a3ce31..d4a399f61bdec 100644 --- a/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr +++ b/tests/ui/const-generics/generic_const_exprs/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `F` in this scope +error[E0412]: cannot find type `F` --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:11:17 | LL | let f: F = async { 1 }; diff --git a/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.rs b/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.rs index 4ba696f4ae080..9a04e1bc3391d 100644 --- a/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.rs +++ b/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.rs @@ -5,7 +5,7 @@ fn bug(&self) //~^ ERROR `self` parameter is only allowed in associated functions -//~^^ ERROR cannot find type `Nat` in this scope +//~^^ ERROR cannot find type `Nat` where for [(); COT::BYTES]:, //~^ ERROR only lifetime parameters can be used in this context diff --git a/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.stderr b/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.stderr index ee0ec38ab0631..7a2a5ade7fea1 100644 --- a/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.stderr +++ b/tests/ui/const-generics/generic_const_exprs/ice-predicates-of-no-entry-found-for-key-119275.stderr @@ -6,7 +6,7 @@ LL | fn bug(&self) | = note: associated functions are those in `impl` or `trait` definitions -error[E0412]: cannot find type `Nat` in this scope +error[E0412]: cannot find type `Nat` --> $DIR/ice-predicates-of-no-entry-found-for-key-119275.rs:6:17 | LL | fn bug(&self) diff --git a/tests/ui/const-generics/generic_const_exprs/issue-109141.rs b/tests/ui/const-generics/generic_const_exprs/issue-109141.rs index c6dd981cced00..c7d3de8b8c375 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-109141.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-109141.rs @@ -9,6 +9,6 @@ impl EntriesBuffer { } struct EntriesBuffer(Box<[[u8; HashesEntryLEN]; 5]>); -//~^ ERROR: cannot find value `HashesEntryLEN` in this scope +//~^ ERROR: cannot find value `HashesEntryLEN` fn main() {} diff --git a/tests/ui/const-generics/generic_const_exprs/issue-109141.stderr b/tests/ui/const-generics/generic_const_exprs/issue-109141.stderr index 7a9572d000d5a..0068873f08721 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-109141.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-109141.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `HashesEntryLEN` in this scope +error[E0425]: cannot find value `HashesEntryLEN` --> $DIR/issue-109141.rs:11:32 | LL | struct EntriesBuffer(Box<[[u8; HashesEntryLEN]; 5]>); diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs index 51cae20df84d4..1bf05041477b2 100644 --- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs +++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs @@ -11,8 +11,8 @@ mod v20 { const v2: v11 = [[256; v4]; v4]; const v0: [[usize; v4]; v4] = v6(v8); - //~^ ERROR cannot find value `v8` in this scope - //~| ERROR cannot find function `v6` in this scope + //~^ ERROR cannot find value `v8` + //~| ERROR cannot find function `v6` pub struct v17 { //~^ WARN type `v17` should have an upper camel case name //~| ERROR `[[usize; v4]; v4]` is forbidden as the type of a const generic parameter @@ -21,16 +21,16 @@ mod v20 { impl v17<512, v0> { pub const fn v21() -> v18 {} - //~^ ERROR cannot find type `v18` in this scope + //~^ ERROR cannot find type `v18` } impl v17 { //~^ ERROR maximum number of nodes exceeded in constant v20::v17::::{constant#1} //~| ERROR maximum number of nodes exceeded in constant v20::v17::::{constant#1} pub const fn v21() -> v18 { - //~^ ERROR cannot find type `v18` in this scope + //~^ ERROR cannot find type `v18` v18 { _p: () } - //~^ ERROR cannot find struct, variant or union type `v18` in this scope + //~^ ERROR cannot find struct, variant or union type `v18` } } } diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr index 39f022fbee9db..dfba4fab25874 100644 --- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr +++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr @@ -7,13 +7,13 @@ LL | pub use v20::{v13, v17}; | no `v13` in `v20` | help: a similar name exists in the module: `v11` -error[E0425]: cannot find value `v8` in this scope +error[E0425]: cannot find value `v8` --> $DIR/unevaluated-const-ice-119731.rs:13:38 | LL | const v0: [[usize; v4]; v4] = v6(v8); | ^^ not found in this scope -error[E0412]: cannot find type `v18` in this scope +error[E0412]: cannot find type `v18` --> $DIR/unevaluated-const-ice-119731.rs:23:31 | LL | pub type v11 = [[usize; v4]; v4]; @@ -22,7 +22,7 @@ LL | pub type v11 = [[usize; v4]; v4]; LL | pub const fn v21() -> v18 {} | ^^^ help: a type alias with a similar name exists: `v11` -error[E0412]: cannot find type `v18` in this scope +error[E0412]: cannot find type `v18` --> $DIR/unevaluated-const-ice-119731.rs:30:31 | LL | pub type v11 = [[usize; v4]; v4]; @@ -31,7 +31,7 @@ LL | pub type v11 = [[usize; v4]; v4]; LL | pub const fn v21() -> v18 { | ^^^ help: a type alias with a similar name exists: `v11` -error[E0422]: cannot find struct, variant or union type `v18` in this scope +error[E0422]: cannot find struct, variant or union type `v18` --> $DIR/unevaluated-const-ice-119731.rs:32:13 | LL | pub type v11 = [[usize; v4]; v4]; @@ -54,7 +54,7 @@ warning: type `v17` should have an upper camel case name LL | pub struct v17 { | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `V17` -error[E0425]: cannot find function `v6` in this scope +error[E0425]: cannot find function `v6` --> $DIR/unevaluated-const-ice-119731.rs:13:35 | LL | const v0: [[usize; v4]; v4] = v6(v8); diff --git a/tests/ui/const-generics/not_wf_param_in_rpitit.rs b/tests/ui/const-generics/not_wf_param_in_rpitit.rs index 5471dc9022f90..9e8a822c9c5e2 100644 --- a/tests/ui/const-generics/not_wf_param_in_rpitit.rs +++ b/tests/ui/const-generics/not_wf_param_in_rpitit.rs @@ -1,7 +1,7 @@ //@ edition:2021 trait Trait { - //~^ ERROR: cannot find value `bar` in this scope + //~^ ERROR: cannot find value `bar` //~| ERROR: cycle detected when computing type of `Trait::N` //~| ERROR: the trait `Trait` cannot be made into an object //~| ERROR: the trait `Trait` cannot be made into an object diff --git a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr index 9095948d22b8a..d15c244ae5120 100644 --- a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr +++ b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `bar` in this scope +error[E0425]: cannot find value `bar` --> $DIR/not_wf_param_in_rpitit.rs:3:30 | LL | trait Trait { diff --git a/tests/ui/const-generics/type_not_in_scope.stderr b/tests/ui/const-generics/type_not_in_scope.stderr index 5f45550a62796..55fa5b9cfc365 100644 --- a/tests/ui/const-generics/type_not_in_scope.stderr +++ b/tests/ui/const-generics/type_not_in_scope.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `X` in this scope +error[E0412]: cannot find type `X` --> $DIR/type_not_in_scope.rs:1:6 | LL | impl X { diff --git a/tests/ui/const-generics/unknown_adt.stderr b/tests/ui/const-generics/unknown_adt.stderr index 2e8210772e94a..d27314275c591 100644 --- a/tests/ui/const-generics/unknown_adt.stderr +++ b/tests/ui/const-generics/unknown_adt.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `UnknownStruct` in this scope +error[E0412]: cannot find type `UnknownStruct` --> $DIR/unknown_adt.rs:2:12 | LL | let _: UnknownStruct<7>; diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs index 09f7e2ba5b1dd..69251b301a2a7 100644 --- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs +++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs @@ -4,7 +4,7 @@ pub struct Opcode(pub u8); pub struct Opcode2(&'a S); //~^ ERROR use of undeclared lifetime name `'a` -//~^^ ERROR cannot find type `S` in this scope +//~^^ ERROR cannot find type `S` impl Opcode2 { pub const OP2: Opcode2 = Opcode2(Opcode(0x1)); diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr index 9442eac0cf54a..9d2cd64fb5a66 100644 --- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr +++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr @@ -6,7 +6,7 @@ LL | pub struct Opcode2(&'a S); | | | help: consider introducing lifetime `'a` here: `<'a>` -error[E0412]: cannot find type `S` in this scope +error[E0412]: cannot find type `S` --> $DIR/ice-type-mismatch-when-copying-112824.rs:5:24 | LL | pub struct Opcode2(&'a S); diff --git a/tests/ui/consts/const-eval/ice-unhandled-type-122191.rs b/tests/ui/consts/const-eval/ice-unhandled-type-122191.rs index a92b99976e262..376de119481cb 100644 --- a/tests/ui/consts/const-eval/ice-unhandled-type-122191.rs +++ b/tests/ui/consts/const-eval/ice-unhandled-type-122191.rs @@ -4,7 +4,7 @@ type Foo = impl Send; struct A; const VALUE: Foo = value(); -//~^ ERROR cannot find function `value` in this scope +//~^ ERROR cannot find function `value` fn test() { match VALUE { diff --git a/tests/ui/consts/const-eval/ice-unhandled-type-122191.stderr b/tests/ui/consts/const-eval/ice-unhandled-type-122191.stderr index daf0ccaa776ca..fcba6c45a35e4 100644 --- a/tests/ui/consts/const-eval/ice-unhandled-type-122191.stderr +++ b/tests/ui/consts/const-eval/ice-unhandled-type-122191.stderr @@ -8,7 +8,7 @@ LL | type Foo = impl Send; = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0425]: cannot find function `value` in this scope +error[E0425]: cannot find function `value` --> $DIR/ice-unhandled-type-122191.rs:6:20 | LL | const VALUE: Foo = value(); diff --git a/tests/ui/consts/erroneous_type_in_const_return_value.rs b/tests/ui/consts/erroneous_type_in_const_return_value.rs index 304211f77da72..69a907d89d0fe 100644 --- a/tests/ui/consts/erroneous_type_in_const_return_value.rs +++ b/tests/ui/consts/erroneous_type_in_const_return_value.rs @@ -4,7 +4,7 @@ enum Eek { TheConst, UnusedByTheConst(Sum), - //~^ ERROR cannot find type `Sum` in this scope + //~^ ERROR cannot find type `Sum` } const EEK_ZERO: &[Eek] = &[]; diff --git a/tests/ui/consts/erroneous_type_in_const_return_value.stderr b/tests/ui/consts/erroneous_type_in_const_return_value.stderr index 453f5b640973f..390c8e5151ad9 100644 --- a/tests/ui/consts/erroneous_type_in_const_return_value.stderr +++ b/tests/ui/consts/erroneous_type_in_const_return_value.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Sum` in this scope +error[E0412]: cannot find type `Sum` --> $DIR/erroneous_type_in_const_return_value.rs:6:22 | LL | UnusedByTheConst(Sum), diff --git a/tests/ui/consts/erroneous_type_in_promoted.rs b/tests/ui/consts/erroneous_type_in_promoted.rs index 32e33c2030fbb..6e34618bdbaf3 100644 --- a/tests/ui/consts/erroneous_type_in_promoted.rs +++ b/tests/ui/consts/erroneous_type_in_promoted.rs @@ -4,7 +4,7 @@ enum Eek { TheConst, UnusedByTheConst(Sum), - //~^ ERROR cannot find type `Sum` in this scope + //~^ ERROR cannot find type `Sum` } const fn foo() { diff --git a/tests/ui/consts/erroneous_type_in_promoted.stderr b/tests/ui/consts/erroneous_type_in_promoted.stderr index 0601fc9ebe7fb..f70404b2f5797 100644 --- a/tests/ui/consts/erroneous_type_in_promoted.stderr +++ b/tests/ui/consts/erroneous_type_in_promoted.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Sum` in this scope +error[E0412]: cannot find type `Sum` --> $DIR/erroneous_type_in_promoted.rs:6:22 | LL | UnusedByTheConst(Sum), diff --git a/tests/ui/consts/ice-bad-input-type-for-cast-83056.rs b/tests/ui/consts/ice-bad-input-type-for-cast-83056.rs index 1a22dc2b5495a..1e5e9007c415a 100644 --- a/tests/ui/consts/ice-bad-input-type-for-cast-83056.rs +++ b/tests/ui/consts/ice-bad-input-type-for-cast-83056.rs @@ -3,5 +3,5 @@ struct S([bool; f as usize]); fn f() -> T {} -//~^ ERROR cannot find type `T` in this scope +//~^ ERROR cannot find type `T` pub fn main() {} diff --git a/tests/ui/consts/ice-bad-input-type-for-cast-83056.stderr b/tests/ui/consts/ice-bad-input-type-for-cast-83056.stderr index 115f168852058..374bf6cc8d8a5 100644 --- a/tests/ui/consts/ice-bad-input-type-for-cast-83056.stderr +++ b/tests/ui/consts/ice-bad-input-type-for-cast-83056.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/ice-bad-input-type-for-cast-83056.rs:5:11 | LL | struct S([bool; f as usize]); diff --git a/tests/ui/consts/issue-104609.rs b/tests/ui/consts/issue-104609.rs index 9ee83b409c16f..b769569857daa 100644 --- a/tests/ui/consts/issue-104609.rs +++ b/tests/ui/consts/issue-104609.rs @@ -1,6 +1,6 @@ fn foo() { oops; - //~^ ERROR: cannot find value `oops` in this scope + //~^ ERROR: cannot find value `oops` } unsafe fn bar() { diff --git a/tests/ui/consts/issue-104609.stderr b/tests/ui/consts/issue-104609.stderr index fe84d83725fd2..408c0c242a7fd 100644 --- a/tests/ui/consts/issue-104609.stderr +++ b/tests/ui/consts/issue-104609.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `oops` in this scope +error[E0425]: cannot find value `oops` --> $DIR/issue-104609.rs:2:5 | LL | oops; diff --git a/tests/ui/consts/issue-116186.rs b/tests/ui/consts/issue-116186.rs index a77c38c64dc57..8a8d3e0747917 100644 --- a/tests/ui/consts/issue-116186.rs +++ b/tests/ui/consts/issue-116186.rs @@ -2,7 +2,7 @@ #![feature(generic_const_exprs)] fn something(path: [usize; N]) -> impl Clone { - //~^ ERROR cannot find value `N` in this scope + //~^ ERROR cannot find value `N` match path { [] => 0, //~ ERROR cannot pattern-match on an array without a fixed length _ => 1, diff --git a/tests/ui/consts/issue-116186.stderr b/tests/ui/consts/issue-116186.stderr index e6eae2d9f55ef..2e8c2dc4d3d78 100644 --- a/tests/ui/consts/issue-116186.stderr +++ b/tests/ui/consts/issue-116186.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `N` in this scope +error[E0425]: cannot find value `N` --> $DIR/issue-116186.rs:4:28 | LL | fn something(path: [usize; N]) -> impl Clone { diff --git a/tests/ui/consts/issue-90878-2.rs b/tests/ui/consts/issue-90878-2.rs index 0e61c65305fbe..0a5cb98c8206a 100644 --- a/tests/ui/consts/issue-90878-2.rs +++ b/tests/ui/consts/issue-90878-2.rs @@ -1,5 +1,5 @@ #![l=|x|[b;x ]] //~ ERROR attribute value must be a literal -//~^ ERROR cannot find attribute `l` in this scope +//~^ ERROR cannot find attribute `l` // notice the space at the start, // we can't attach any attributes to this file because it needs to be at the start diff --git a/tests/ui/consts/issue-91434.rs b/tests/ui/consts/issue-91434.rs index 001dc708f8932..9131b16ec4df5 100644 --- a/tests/ui/consts/issue-91434.rs +++ b/tests/ui/consts/issue-91434.rs @@ -1,5 +1,5 @@ fn main() { [9; [[9E; h]]]; //~^ ERROR: expected at least one digit in exponent - //~| ERROR: cannot find value `h` in this scope [E0425] + //~| ERROR: cannot find value `h` [E0425] } diff --git a/tests/ui/consts/issue-91434.stderr b/tests/ui/consts/issue-91434.stderr index 08d3ad77053d5..3123a12e77cb6 100644 --- a/tests/ui/consts/issue-91434.stderr +++ b/tests/ui/consts/issue-91434.stderr @@ -4,7 +4,7 @@ error: expected at least one digit in exponent LL | [9; [[9E; h]]]; | ^^ -error[E0425]: cannot find value `h` in this scope +error[E0425]: cannot find value `h` --> $DIR/issue-91434.rs:2:15 | LL | [9; [[9E; h]]]; diff --git a/tests/ui/coroutine/gen_block.none.stderr b/tests/ui/coroutine/gen_block.none.stderr index 64fa2be003de5..781434ad05ab9 100644 --- a/tests/ui/coroutine/gen_block.none.stderr +++ b/tests/ui/coroutine/gen_block.none.stderr @@ -6,19 +6,19 @@ LL | let y = gen { yield 42 }; | | | while parsing this struct -error[E0422]: cannot find struct, variant or union type `gen` in this scope +error[E0422]: cannot find struct, variant or union type `gen` --> $DIR/gen_block.rs:7:13 | LL | let x = gen {}; | ^^^ not found in this scope -error[E0422]: cannot find struct, variant or union type `gen` in this scope +error[E0422]: cannot find struct, variant or union type `gen` --> $DIR/gen_block.rs:10:13 | LL | let y = gen { yield 42 }; | ^^^ not found in this scope -error[E0422]: cannot find struct, variant or union type `gen` in this scope +error[E0422]: cannot find struct, variant or union type `gen` --> $DIR/gen_block.rs:13:5 | LL | gen {}; diff --git a/tests/ui/coroutine/layout-error.rs b/tests/ui/coroutine/layout-error.rs index 3e26cf17d29ec..f4d7b16326095 100644 --- a/tests/ui/coroutine/layout-error.rs +++ b/tests/ui/coroutine/layout-error.rs @@ -24,7 +24,7 @@ mod helper { F:, { async fn cb() { - let a = Foo; //~ ERROR cannot find value `Foo` in this scope + let a = Foo; //~ ERROR cannot find value `Foo` } Task::spawn(&POOL, || cb()); diff --git a/tests/ui/coroutine/layout-error.stderr b/tests/ui/coroutine/layout-error.stderr index ceadb62c99988..bb7d32d3ea025 100644 --- a/tests/ui/coroutine/layout-error.stderr +++ b/tests/ui/coroutine/layout-error.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `Foo` in this scope +error[E0425]: cannot find value `Foo` --> $DIR/layout-error.rs:27:21 | LL | let a = Foo; diff --git a/tests/ui/custom_attribute.rs b/tests/ui/custom_attribute.rs index 4957184229da0..6bbe272d0b642 100644 --- a/tests/ui/custom_attribute.rs +++ b/tests/ui/custom_attribute.rs @@ -1,9 +1,9 @@ #![feature(stmt_expr_attributes)] -#[foo] //~ ERROR cannot find attribute `foo` in this scope +#[foo] //~ ERROR cannot find attribute `foo` fn main() { - #[foo] //~ ERROR cannot find attribute `foo` in this scope + #[foo] //~ ERROR cannot find attribute `foo` let x = (); - #[foo] //~ ERROR cannot find attribute `foo` in this scope + #[foo] //~ ERROR cannot find attribute `foo` x } diff --git a/tests/ui/deduplicate-diagnostics.rs b/tests/ui/deduplicate-diagnostics.rs index 54bd5dd5098c1..c36175426bc0a 100644 --- a/tests/ui/deduplicate-diagnostics.rs +++ b/tests/ui/deduplicate-diagnostics.rs @@ -1,8 +1,8 @@ //@ revisions: duplicate deduplicate //@[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes -#[derive(Unresolved)] //~ ERROR cannot find derive macro `Unresolved` in this scope - //[duplicate]~| ERROR cannot find derive macro `Unresolved` in this scope +#[derive(Unresolved)] //~ ERROR cannot find derive macro `Unresolved` + //[duplicate]~| ERROR cannot find derive macro `Unresolved` struct S; #[deny("literal")] //~ ERROR malformed lint attribute input diff --git a/tests/ui/delegation/bad-resolve.rs b/tests/ui/delegation/bad-resolve.rs index f378e05304b29..184ec20bb5d86 100644 --- a/tests/ui/delegation/bad-resolve.rs +++ b/tests/ui/delegation/bad-resolve.rs @@ -29,11 +29,11 @@ impl Trait for S { //~| ERROR expected method or associated constant, found associated type `Trait::Type` reuse ::baz; //~^ ERROR method `baz` is not a member of trait `Trait` - //~| ERROR cannot find method or associated constant `baz` in trait `Trait` + //~| ERROR cannot find method or associated constant `baz` reuse ::bar; reuse foo { &self.0 } - //~^ ERROR cannot find function `foo` in this scope + //~^ ERROR cannot find function `foo` } mod prefix {} diff --git a/tests/ui/delegation/bad-resolve.stderr b/tests/ui/delegation/bad-resolve.stderr index 883ff523bcfea..8dd883e68be2c 100644 --- a/tests/ui/delegation/bad-resolve.stderr +++ b/tests/ui/delegation/bad-resolve.stderr @@ -39,7 +39,7 @@ LL | reuse ::Type; | = note: can't use a type alias as a constructor -error[E0576]: cannot find method or associated constant `baz` in trait `Trait` +error[E0576]: cannot find method or associated constant `baz` --> $DIR/bad-resolve.rs:30:25 | LL | fn bar() {} @@ -48,7 +48,7 @@ LL | fn bar() {} LL | reuse ::baz; | ^^^ help: an associated function with a similar name exists: `bar` -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/bad-resolve.rs:35:11 | LL | reuse foo { &self.0 } diff --git a/tests/ui/delegation/explicit-paths.rs b/tests/ui/delegation/explicit-paths.rs index a91ca4cb931ed..11637dda16102 100644 --- a/tests/ui/delegation/explicit-paths.rs +++ b/tests/ui/delegation/explicit-paths.rs @@ -27,7 +27,7 @@ mod fn_to_other { //~^ ERROR delegation to a trait method from a free function is not supported yet reuse to_reuse::foo3; reuse S::foo4; - //~^ ERROR cannot find function `foo4` in `S` + //~^ ERROR cannot find function `foo4` } mod inherent_impl_assoc_fn_to_other { @@ -38,7 +38,7 @@ mod inherent_impl_assoc_fn_to_other { reuse ::foo2; reuse to_reuse::foo3; reuse F::foo4 { &self.0 } - //~^ ERROR cannot find function `foo4` in `F` + //~^ ERROR cannot find function `foo4` } } @@ -52,7 +52,7 @@ mod trait_impl_assoc_fn_to_other { //~^ ERROR method `foo3` is not a member of trait `Trait` reuse F::foo4 { &self.0 } //~^ ERROR method `foo4` is not a member of trait `Trait` - //~| ERROR cannot find function `foo4` in `F` + //~| ERROR cannot find function `foo4` } } @@ -65,7 +65,7 @@ mod trait_assoc_fn_to_other { reuse ::foo2; reuse to_reuse::foo3; reuse F::foo4 { &F } - //~^ ERROR cannot find function `foo4` in `F` + //~^ ERROR cannot find function `foo4` } } diff --git a/tests/ui/delegation/explicit-paths.stderr b/tests/ui/delegation/explicit-paths.stderr index 30891c94c0e98..fce7be4bec2b6 100644 --- a/tests/ui/delegation/explicit-paths.stderr +++ b/tests/ui/delegation/explicit-paths.stderr @@ -16,13 +16,13 @@ LL | reuse F::foo4 { &self.0 } | | help: there is an associated function with a similar name: `foo1` | not a member of trait `Trait` -error[E0425]: cannot find function `foo4` in `S` +error[E0425]: cannot find function `foo4` --> $DIR/explicit-paths.rs:29:14 | LL | reuse S::foo4; | ^^^^ not found in `S` -error[E0425]: cannot find function `foo4` in `F` +error[E0425]: cannot find function `foo4` --> $DIR/explicit-paths.rs:40:18 | LL | reuse F::foo4 { &self.0 } @@ -34,7 +34,7 @@ note: function `fn_to_other::foo4` exists but is inaccessible LL | reuse S::foo4; | ^^^^^^^^^^^^^^ not accessible -error[E0425]: cannot find function `foo4` in `F` +error[E0425]: cannot find function `foo4` --> $DIR/explicit-paths.rs:53:18 | LL | reuse F::foo4 { &self.0 } @@ -46,7 +46,7 @@ note: function `fn_to_other::foo4` exists but is inaccessible LL | reuse S::foo4; | ^^^^^^^^^^^^^^ not accessible -error[E0425]: cannot find function `foo4` in `F` +error[E0425]: cannot find function `foo4` --> $DIR/explicit-paths.rs:67:18 | LL | reuse F::foo4 { &F } diff --git a/tests/ui/delegation/ice-issue-124342.rs b/tests/ui/delegation/ice-issue-124342.rs index ad62f6bd54af9..d1acee5135c39 100644 --- a/tests/ui/delegation/ice-issue-124342.rs +++ b/tests/ui/delegation/ice-issue-124342.rs @@ -5,8 +5,8 @@ mod to_reuse {} trait Trait { reuse to_reuse::foo { foo } - //~^ ERROR cannot find function `foo` in module `to_reuse` - //~| ERROR cannot find value `foo` in this scope + //~^ ERROR cannot find function `foo` + //~| ERROR cannot find value `foo` } fn main() {} diff --git a/tests/ui/delegation/ice-issue-124342.stderr b/tests/ui/delegation/ice-issue-124342.stderr index f9a3684d64932..d6cd20827be64 100644 --- a/tests/ui/delegation/ice-issue-124342.stderr +++ b/tests/ui/delegation/ice-issue-124342.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find function `foo` in module `to_reuse` +error[E0425]: cannot find function `foo` --> $DIR/ice-issue-124342.rs:7:21 | LL | reuse to_reuse::foo { foo } - | ^^^ not found in `to_reuse` + | ^^^ not found in module `to_reuse` -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/ice-issue-124342.rs:7:27 | LL | reuse to_reuse::foo { foo } diff --git a/tests/ui/delegation/target-expr.rs b/tests/ui/delegation/target-expr.rs index fd7ea943b9d5e..889cb8d3daff8 100644 --- a/tests/ui/delegation/target-expr.rs +++ b/tests/ui/delegation/target-expr.rs @@ -36,5 +36,5 @@ fn main() { self.0; //~^ ERROR expected value, found module `self` let z = x; - //~^ ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `x` } diff --git a/tests/ui/delegation/target-expr.stderr b/tests/ui/delegation/target-expr.stderr index b30f0c474c68b..f5858d99620a7 100644 --- a/tests/ui/delegation/target-expr.stderr +++ b/tests/ui/delegation/target-expr.stderr @@ -26,7 +26,7 @@ LL | fn main() { LL | self.0; | ^^^^ `self` value is a keyword only available in methods with a `self` parameter -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/target-expr.rs:38:13 | LL | let z = x; diff --git a/tests/ui/derived-errors/issue-31997.rs b/tests/ui/derived-errors/issue-31997.rs index ff619313afb5b..a4cbf2c46df89 100644 --- a/tests/ui/derived-errors/issue-31997.rs +++ b/tests/ui/derived-errors/issue-31997.rs @@ -11,7 +11,7 @@ fn closure(x: F) -> Result } fn foo() -> Result<(), ()> { - try!(closure(|| bar(core::ptr::null_mut()))); //~ ERROR cannot find function `bar` in this scope + try!(closure(|| bar(core::ptr::null_mut()))); //~ ERROR cannot find function `bar` Ok(()) } diff --git a/tests/ui/derived-errors/issue-31997.stderr b/tests/ui/derived-errors/issue-31997.stderr index 7d6415fef83c1..0c765fad72b40 100644 --- a/tests/ui/derived-errors/issue-31997.stderr +++ b/tests/ui/derived-errors/issue-31997.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/issue-31997.rs:14:21 | LL | try!(closure(|| bar(core::ptr::null_mut()))); diff --git a/tests/ui/derives/deriving-bounds.rs b/tests/ui/derives/deriving-bounds.rs index 95d440420b065..ed54eb0e64856 100644 --- a/tests/ui/derives/deriving-bounds.rs +++ b/tests/ui/derives/deriving-bounds.rs @@ -1,11 +1,11 @@ #[derive(Send)] -//~^ ERROR cannot find derive macro `Send` in this scope -//~| ERROR cannot find derive macro `Send` in this scope +//~^ ERROR cannot find derive macro `Send` +//~| ERROR cannot find derive macro `Send` struct Test; #[derive(Sync)] -//~^ ERROR cannot find derive macro `Sync` in this scope -//~| ERROR cannot find derive macro `Sync` in this scope +//~^ ERROR cannot find derive macro `Sync` +//~| ERROR cannot find derive macro `Sync` struct Test1; pub fn main() {} diff --git a/tests/ui/derives/deriving-meta-unknown-trait.rs b/tests/ui/derives/deriving-meta-unknown-trait.rs index 6463a7664de93..d2f92120cb297 100644 --- a/tests/ui/derives/deriving-meta-unknown-trait.rs +++ b/tests/ui/derives/deriving-meta-unknown-trait.rs @@ -1,6 +1,6 @@ #[derive(Eqr)] -//~^ ERROR cannot find derive macro `Eqr` in this scope -//~| ERROR cannot find derive macro `Eqr` in this scope +//~^ ERROR cannot find derive macro `Eqr` +//~| ERROR cannot find derive macro `Eqr` struct Foo; pub fn main() {} diff --git a/tests/ui/derives/deriving-primitive.rs b/tests/ui/derives/deriving-primitive.rs index 1173eca640fc3..a6de175c9cbc4 100644 --- a/tests/ui/derives/deriving-primitive.rs +++ b/tests/ui/derives/deriving-primitive.rs @@ -1,5 +1,5 @@ -#[derive(FromPrimitive)] //~ ERROR cannot find derive macro `FromPrimitive` in this scope - //~| ERROR cannot find derive macro `FromPrimitive` in this scope +#[derive(FromPrimitive)] //~ ERROR cannot find derive macro `FromPrimitive` + //~| ERROR cannot find derive macro `FromPrimitive` enum Foo {} fn main() {} diff --git a/tests/ui/diagnostic_namespace/requires_path.rs b/tests/ui/diagnostic_namespace/requires_path.rs index 4f3a1319cafff..8c0cdc0f89af0 100644 --- a/tests/ui/diagnostic_namespace/requires_path.rs +++ b/tests/ui/diagnostic_namespace/requires_path.rs @@ -1,5 +1,5 @@ #[diagnostic] -//~^ERROR cannot find attribute `diagnostic` in this scope +//~^ERROR cannot find attribute `diagnostic` pub struct Bar; diff --git a/tests/ui/did_you_mean/issue-103909.rs b/tests/ui/did_you_mean/issue-103909.rs index 20b67cd102d70..b7d5c32e5e087 100644 --- a/tests/ui/did_you_mean/issue-103909.rs +++ b/tests/ui/did_you_mean/issue-103909.rs @@ -3,7 +3,7 @@ use std::fs::File; fn main() { if Err(err) = File::open("hello.txt") { - //~^ ERROR: cannot find value `err` in this scope + //~^ ERROR: cannot find value `err` //~| ERROR: mismatched types } } diff --git a/tests/ui/did_you_mean/issue-103909.stderr b/tests/ui/did_you_mean/issue-103909.stderr index 8641017470ba0..a684a29ad62d9 100644 --- a/tests/ui/did_you_mean/issue-103909.stderr +++ b/tests/ui/did_you_mean/issue-103909.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `err` in this scope +error[E0425]: cannot find value `err` --> $DIR/issue-103909.rs:5:12 | LL | if Err(err) = File::open("hello.txt") { diff --git a/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.rs b/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.rs index 264cfa449942c..fa4f0bd8a95e2 100644 --- a/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.rs +++ b/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.rs @@ -7,8 +7,8 @@ enum Solidify { Set } enum UnorderedCollection { Set } fn setup() -> Set { Set } -//~^ ERROR cannot find type `Set` in this scope -//~| ERROR cannot find value `Set` in this scope +//~^ ERROR cannot find type `Set` +//~| ERROR cannot find value `Set` fn main() { setup(); diff --git a/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr b/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr index b1a15b8594a0a..65990ec80c35b 100644 --- a/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr +++ b/tests/ui/did_you_mean/issue-56028-there-is-an-enum-variant.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Set` in this scope +error[E0412]: cannot find type `Set` --> $DIR/issue-56028-there-is-an-enum-variant.rs:9:15 | LL | fn setup() -> Set { Set } @@ -16,7 +16,7 @@ LL | fn setup() -> PutDown { Set } | ~~~~~~~ and 3 other candidates -error[E0425]: cannot find value `Set` in this scope +error[E0425]: cannot find value `Set` --> $DIR/issue-56028-there-is-an-enum-variant.rs:9:21 | LL | fn setup() -> Set { Set } diff --git a/tests/ui/did_you_mean/println-typo.rs b/tests/ui/did_you_mean/println-typo.rs index 685b5e1f28403..679fda3719332 100644 --- a/tests/ui/did_you_mean/println-typo.rs +++ b/tests/ui/did_you_mean/println-typo.rs @@ -1,6 +1,6 @@ // https://internals.rust-lang.org/t/18227 fn main() { - prinltn!(); //~ ERROR cannot find macro `prinltn` in this scope + prinltn!(); //~ ERROR cannot find macro `prinltn` //^ a macro with a similar name exists: `println` } diff --git a/tests/ui/dropck/drop-on-non-struct.stderr b/tests/ui/dropck/drop-on-non-struct.stderr index e8fbe5e972642..06c7c6c0d75e4 100644 --- a/tests/ui/dropck/drop-on-non-struct.stderr +++ b/tests/ui/dropck/drop-on-non-struct.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Nonexistent` in this scope +error[E0412]: cannot find type `Nonexistent` --> $DIR/drop-on-non-struct.rs:9:15 | LL | impl Drop for Nonexistent { diff --git a/tests/ui/editions/async-block-2015.rs b/tests/ui/editions/async-block-2015.rs index 3daf4930c5b4b..3364eee59e8ef 100644 --- a/tests/ui/editions/async-block-2015.rs +++ b/tests/ui/editions/async-block-2015.rs @@ -5,7 +5,7 @@ async fn foo() { //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide let x = async {}; - //~^ ERROR cannot find struct, variant or union type `async` in this scope + //~^ ERROR cannot find struct, variant or union type `async` //~| NOTE `async` blocks are only allowed in Rust 2018 or later let y = async { //~ NOTE `async` blocks are only allowed in Rust 2018 or later let x = 42; diff --git a/tests/ui/editions/async-block-2015.stderr b/tests/ui/editions/async-block-2015.stderr index b792b8c1e0dd8..93962ceff3e2b 100644 --- a/tests/ui/editions/async-block-2015.stderr +++ b/tests/ui/editions/async-block-2015.stderr @@ -29,7 +29,7 @@ LL | 42 = help: pass `--edition 2021` to `rustc` = note: for more on editions, read https://doc.rust-lang.org/edition-guide -error[E0422]: cannot find struct, variant or union type `async` in this scope +error[E0422]: cannot find struct, variant or union type `async` --> $DIR/async-block-2015.rs:7:13 | LL | let x = async {}; diff --git a/tests/ui/enum/suggest-default-attribute.rs b/tests/ui/enum/suggest-default-attribute.rs index 1d7567e60a57c..6dbc263e0a7a3 100644 --- a/tests/ui/enum/suggest-default-attribute.rs +++ b/tests/ui/enum/suggest-default-attribute.rs @@ -1,6 +1,6 @@ pub enum Test { //~ HELP consider adding a derive #[default] - //~^ ERROR cannot find attribute `default` in this scope + //~^ ERROR cannot find attribute `default` First, Second, } diff --git a/tests/ui/error-codes/E0405.stderr b/tests/ui/error-codes/E0405.stderr index 1fb115c9e999b..f264ad58ec07a 100644 --- a/tests/ui/error-codes/E0405.stderr +++ b/tests/ui/error-codes/E0405.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `SomeTrait` in this scope +error[E0405]: cannot find trait `SomeTrait` --> $DIR/E0405.rs:3:6 | LL | impl SomeTrait for Foo {} diff --git a/tests/ui/error-codes/E0411.stderr b/tests/ui/error-codes/E0411.stderr index 16da10348a28f..3a2977d011d56 100644 --- a/tests/ui/error-codes/E0411.stderr +++ b/tests/ui/error-codes/E0411.stderr @@ -1,4 +1,4 @@ -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/E0411.rs:2:6 | LL | fn main() { diff --git a/tests/ui/error-codes/E0412.stderr b/tests/ui/error-codes/E0412.stderr index 7c1172642faff..105a36b30d316 100644 --- a/tests/ui/error-codes/E0412.stderr +++ b/tests/ui/error-codes/E0412.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Something` in this scope +error[E0412]: cannot find type `Something` --> $DIR/E0412.rs:1:6 | LL | impl Something {} diff --git a/tests/ui/error-codes/E0425.stderr b/tests/ui/error-codes/E0425.stderr index db78dc3f7abe3..fb21ca3302474 100644 --- a/tests/ui/error-codes/E0425.stderr +++ b/tests/ui/error-codes/E0425.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `elf` in this scope +error[E0425]: cannot find value `elf` --> $DIR/E0425.rs:3:9 | LL | elf; diff --git a/tests/ui/error-festival.stderr b/tests/ui/error-festival.stderr index 9d75671c4e6b4..b0983fbb6bf88 100644 --- a/tests/ui/error-festival.stderr +++ b/tests/ui/error-festival.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/error-festival.rs:14:5 | LL | y = 2; diff --git a/tests/ui/errors/remap-path-prefix.normal.stderr b/tests/ui/errors/remap-path-prefix.normal.stderr index 46d33d26052cb..32029becfa86e 100644 --- a/tests/ui/errors/remap-path-prefix.normal.stderr +++ b/tests/ui/errors/remap-path-prefix.normal.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `ferris` in this scope +error[E0425]: cannot find value `ferris` --> remapped/errors/remap-path-prefix.rs:19:5 | LL | ferris diff --git a/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr b/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr index 46d33d26052cb..32029becfa86e 100644 --- a/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr +++ b/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `ferris` in this scope +error[E0425]: cannot find value `ferris` --> remapped/errors/remap-path-prefix.rs:19:5 | LL | ferris diff --git a/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr b/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr index 0badea6e27bf3..02131f934d312 100644 --- a/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr +++ b/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `ferris` in this scope +error[E0425]: cannot find value `ferris` --> $DIR/remap-path-prefix.rs:19:5 | LL | ferris diff --git a/tests/ui/expr/if/bad-if-let-suggestion.rs b/tests/ui/expr/if/bad-if-let-suggestion.rs index b0d0676e1ea75..823013fd39c13 100644 --- a/tests/ui/expr/if/bad-if-let-suggestion.rs +++ b/tests/ui/expr/if/bad-if-let-suggestion.rs @@ -1,20 +1,20 @@ fn a() { if let x = 1 && i = 2 {} - //~^ ERROR cannot find value `i` in this scope + //~^ ERROR cannot find value `i` //~| ERROR mismatched types //~| ERROR expected expression, found `let` statement } fn b() { if (i + j) = i {} - //~^ ERROR cannot find value `i` in this scope - //~| ERROR cannot find value `i` in this scope - //~| ERROR cannot find value `j` in this scope + //~^ ERROR cannot find value `i` + //~| ERROR cannot find value `i` + //~| ERROR cannot find value `j` } fn c() { if x[0] = 1 {} - //~^ ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `x` } fn main() {} diff --git a/tests/ui/expr/if/bad-if-let-suggestion.stderr b/tests/ui/expr/if/bad-if-let-suggestion.stderr index 0d1f895bd82bf..0c9b53c2ce48d 100644 --- a/tests/ui/expr/if/bad-if-let-suggestion.stderr +++ b/tests/ui/expr/if/bad-if-let-suggestion.stderr @@ -14,13 +14,13 @@ help: you might have meant to compare for equality LL | if let x = 1 && i == 2 {} | + -error[E0425]: cannot find value `i` in this scope +error[E0425]: cannot find value `i` --> $DIR/bad-if-let-suggestion.rs:2:21 | LL | if let x = 1 && i = 2 {} | ^ not found in this scope -error[E0425]: cannot find value `i` in this scope +error[E0425]: cannot find value `i` --> $DIR/bad-if-let-suggestion.rs:9:9 | LL | fn a() { @@ -29,7 +29,7 @@ LL | fn a() { LL | if (i + j) = i {} | ^ help: a function with a similar name exists: `a` -error[E0425]: cannot find value `j` in this scope +error[E0425]: cannot find value `j` --> $DIR/bad-if-let-suggestion.rs:9:13 | LL | fn a() { @@ -38,7 +38,7 @@ LL | fn a() { LL | if (i + j) = i {} | ^ help: a function with a similar name exists: `a` -error[E0425]: cannot find value `i` in this scope +error[E0425]: cannot find value `i` --> $DIR/bad-if-let-suggestion.rs:9:18 | LL | fn a() { @@ -47,7 +47,7 @@ LL | fn a() { LL | if (i + j) = i {} | ^ help: a function with a similar name exists: `a` -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/bad-if-let-suggestion.rs:16:8 | LL | fn a() { diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure.rs b/tests/ui/expr/malformed_closure/ruby_style_closure.rs index fdec072b8a864..7f99d0bcc23c9 100644 --- a/tests/ui/expr/malformed_closure/ruby_style_closure.rs +++ b/tests/ui/expr/malformed_closure/ruby_style_closure.rs @@ -10,6 +10,6 @@ fn main() { let p = Some(45).and_then({ |x| println!("doubling {}", x); Some(x * 2) - //~^ ERROR: cannot find value `x` in this scope + //~^ ERROR: cannot find value `x` }); } diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure.stderr b/tests/ui/expr/malformed_closure/ruby_style_closure.stderr index b1607bbacc926..deff78a926edc 100644 --- a/tests/ui/expr/malformed_closure/ruby_style_closure.stderr +++ b/tests/ui/expr/malformed_closure/ruby_style_closure.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/ruby_style_closure.rs:12:14 | LL | Some(x * 2) diff --git a/tests/ui/extern/extern-with-type-bounds.rs b/tests/ui/extern/extern-with-type-bounds.rs index 99e9801fd4010..63856e4effbe9 100644 --- a/tests/ui/extern/extern-with-type-bounds.rs +++ b/tests/ui/extern/extern-with-type-bounds.rs @@ -16,7 +16,7 @@ extern "rust-intrinsic" { // Unresolved bounds should still error. fn align_of() -> usize; - //~^ ERROR cannot find trait `NoSuchTrait` in this scope + //~^ ERROR cannot find trait `NoSuchTrait` } fn main() {} diff --git a/tests/ui/extern/extern-with-type-bounds.stderr b/tests/ui/extern/extern-with-type-bounds.stderr index 42448d9e9246d..266b67cabeb91 100644 --- a/tests/ui/extern/extern-with-type-bounds.stderr +++ b/tests/ui/extern/extern-with-type-bounds.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `NoSuchTrait` in this scope +error[E0405]: cannot find trait `NoSuchTrait` --> $DIR/extern-with-type-bounds.rs:18:20 | LL | fn align_of() -> usize; diff --git a/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.rs b/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.rs index 17e08f511d71f..e25c9ea285ece 100644 --- a/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.rs +++ b/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.rs @@ -2,8 +2,8 @@ extern "C" { type Item = [T] where [T]: Sized; //~^ incorrect `type` inside `extern` block //~| `type`s inside `extern` blocks cannot have `where` clauses - //~| cannot find type `T` in this scope - //~| cannot find type `T` in this scope + //~| cannot find type `T` + //~| cannot find type `T` //~| extern types are experimental } diff --git a/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.stderr b/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.stderr index 039e50b5e12da..3064d24c4462c 100644 --- a/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.stderr +++ b/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.stderr @@ -20,13 +20,13 @@ LL | type Item = [T] where [T]: Sized; | = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/issue-112363-extern-item-where-clauses-debug-ice.rs:2:28 | LL | type Item = [T] where [T]: Sized; | ^ not found in this scope -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/issue-112363-extern-item-where-clauses-debug-ice.rs:2:18 | LL | type Item = [T] where [T]: Sized; diff --git a/tests/ui/extern/issue-80074.rs b/tests/ui/extern/issue-80074.rs index ba7b55a450f51..4d84f551beaf3 100644 --- a/tests/ui/extern/issue-80074.rs +++ b/tests/ui/extern/issue-80074.rs @@ -14,7 +14,7 @@ fn main() { //~^ WARN: macro `foo` is private //~| WARN: it will become a hard error in a future release! bar!(); - //~^ ERROR: cannot find macro `bar` in this scope + //~^ ERROR: cannot find macro `bar` m!(); - //~^ ERROR: cannot find macro `m` in this scope + //~^ ERROR: cannot find macro `m` } diff --git a/tests/ui/feature-gates/feature-gate-concat_idents2.rs b/tests/ui/feature-gates/feature-gate-concat_idents2.rs index 9660ffeafa518..0da02c72e5216 100644 --- a/tests/ui/feature-gates/feature-gate-concat_idents2.rs +++ b/tests/ui/feature-gates/feature-gate-concat_idents2.rs @@ -1,4 +1,4 @@ fn main() { concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough - //~| ERROR cannot find value `ab` in this scope + //~| ERROR cannot find value `ab` } diff --git a/tests/ui/feature-gates/feature-gate-concat_idents2.stderr b/tests/ui/feature-gates/feature-gate-concat_idents2.stderr index 2fe786ff4063d..261b3661ac7a5 100644 --- a/tests/ui/feature-gates/feature-gate-concat_idents2.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_idents2.stderr @@ -8,7 +8,7 @@ LL | concat_idents!(a, b); = help: add `#![feature(concat_idents)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0425]: cannot find value `ab` in this scope +error[E0425]: cannot find value `ab` --> $DIR/feature-gate-concat_idents2.rs:2:5 | LL | concat_idents!(a, b); diff --git a/tests/ui/feature-gates/feature-gate-custom_attribute.rs b/tests/ui/feature-gates/feature-gate-custom_attribute.rs index 936cab268d2c9..08acffe414614 100644 --- a/tests/ui/feature-gates/feature-gate-custom_attribute.rs +++ b/tests/ui/feature-gates/feature-gate-custom_attribute.rs @@ -1,18 +1,18 @@ // Check that literals in attributes parse just fine. -#[fake_attr] //~ ERROR cannot find attribute `fake_attr` in this scope -#[fake_attr(100)] //~ ERROR cannot find attribute `fake_attr` in this scope -#[fake_attr(1, 2, 3)] //~ ERROR cannot find attribute `fake_attr` in this scope -#[fake_attr("hello")] //~ ERROR cannot find attribute `fake_attr` in this scope -#[fake_attr(name = "hello")] //~ ERROR cannot find attribute `fake_attr` in this scope +#[fake_attr] //~ ERROR cannot find attribute `fake_attr` +#[fake_attr(100)] //~ ERROR cannot find attribute `fake_attr` +#[fake_attr(1, 2, 3)] //~ ERROR cannot find attribute `fake_attr` +#[fake_attr("hello")] //~ ERROR cannot find attribute `fake_attr` +#[fake_attr(name = "hello")] //~ ERROR cannot find attribute `fake_attr` #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR cannot find attribute `fake_attr` in th #[fake_attr(key = "hello", val = 10)] //~ ERROR cannot find attribute `fake_attr` in this scop -#[fake_attr(key("hello"), val(10))] //~ ERROR cannot find attribute `fake_attr` in this scope +#[fake_attr(key("hello"), val(10))] //~ ERROR cannot find attribute `fake_attr` #[fake_attr(enabled = true, disabled = false)] //~ ERROR cannot find attribute `fake_attr` in -#[fake_attr(true)] //~ ERROR cannot find attribute `fake_attr` in this scope -#[fake_attr(pi = 3.14159)] //~ ERROR cannot find attribute `fake_attr` in this scope -#[fake_attr(b"hi")] //~ ERROR cannot find attribute `fake_attr` in this scope -#[fake_doc(r"doc")] //~ ERROR cannot find attribute `fake_doc` in this scope +#[fake_attr(true)] //~ ERROR cannot find attribute `fake_attr` +#[fake_attr(pi = 3.14159)] //~ ERROR cannot find attribute `fake_attr` +#[fake_attr(b"hi")] //~ ERROR cannot find attribute `fake_attr` +#[fake_doc(r"doc")] //~ ERROR cannot find attribute `fake_doc` struct Q {} fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-custom_attribute2.rs b/tests/ui/feature-gates/feature-gate-custom_attribute2.rs index 724e53debeb01..3b1dcdd697da9 100644 --- a/tests/ui/feature-gates/feature-gate-custom_attribute2.rs +++ b/tests/ui/feature-gates/feature-gate-custom_attribute2.rs @@ -2,54 +2,54 @@ // lists are included when we are checking for unstable attributes. struct StLt<#[lt_struct] 'a>(&'a u32); -//~^ ERROR cannot find attribute `lt_struct` in this scope +//~^ ERROR cannot find attribute `lt_struct` struct StTy<#[ty_struct] I>(I); -//~^ ERROR cannot find attribute `ty_struct` in this scope +//~^ ERROR cannot find attribute `ty_struct` enum EnLt<#[lt_enum] 'b> { A(&'b u32), B } -//~^ ERROR cannot find attribute `lt_enum` in this scope +//~^ ERROR cannot find attribute `lt_enum` enum EnTy<#[ty_enum] J> { A(J), B } -//~^ ERROR cannot find attribute `ty_enum` in this scope +//~^ ERROR cannot find attribute `ty_enum` trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } -//~^ ERROR cannot find attribute `lt_trait` in this scope +//~^ ERROR cannot find attribute `lt_trait` trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); } -//~^ ERROR cannot find attribute `ty_trait` in this scope +//~^ ERROR cannot find attribute `ty_trait` type TyLt<#[lt_type] 'd> = &'d u32; -//~^ ERROR cannot find attribute `lt_type` in this scope +//~^ ERROR cannot find attribute `lt_type` type TyTy<#[ty_type] L> = (L, ); -//~^ ERROR cannot find attribute `ty_type` in this scope +//~^ ERROR cannot find attribute `ty_type` impl<#[lt_inherent] 'e> StLt<'e> { } -//~^ ERROR cannot find attribute `lt_inherent` in this scope +//~^ ERROR cannot find attribute `lt_inherent` impl<#[ty_inherent] M> StTy { } -//~^ ERROR cannot find attribute `ty_inherent` in this scope +//~^ ERROR cannot find attribute `ty_inherent` impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> { - //~^ ERROR cannot find attribute `lt_impl_for` in this scope + //~^ ERROR cannot find attribute `lt_impl_for` fn foo(&self, _: &'f [u32]) -> &'f u32 { loop { } } } impl<#[ty_impl_for] N> TrTy for StTy { - //~^ ERROR cannot find attribute `ty_impl_for` in this scope + //~^ ERROR cannot find attribute `ty_impl_for` fn foo(&self, _: N) { } } fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } -//~^ ERROR cannot find attribute `lt_fn` in this scope +//~^ ERROR cannot find attribute `lt_fn` fn f_ty<#[ty_fn] O>(_: O) { } -//~^ ERROR cannot find attribute `ty_fn` in this scope +//~^ ERROR cannot find attribute `ty_fn` impl StTy { fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } - //~^ ERROR cannot find attribute `lt_meth` in this scope + //~^ ERROR cannot find attribute `lt_meth` fn m_ty<#[ty_meth] P>(_: P) { } - //~^ ERROR cannot find attribute `ty_meth` in this scope + //~^ ERROR cannot find attribute `ty_meth` } fn hof_lt(_: Q) where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 - //~^ ERROR cannot find attribute `lt_hof` in this scope + //~^ ERROR cannot find attribute `lt_hof` { } diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr index b4b37f0e63847..bc4c6f5e1235e 100644 --- a/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr +++ b/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr @@ -10,7 +10,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found LL | async gen {}; | ^^^ expected one of 8 possible tokens -error[E0422]: cannot find struct, variant or union type `gen` in this scope +error[E0422]: cannot find struct, variant or union type `gen` --> $DIR/feature-gate-gen_blocks.rs:5:5 | LL | gen {}; diff --git a/tests/ui/feature-gates/feature-gate-rustc-attrs.rs b/tests/ui/feature-gates/feature-gate-rustc-attrs.rs index c985298a30aed..a1d2b00831f41 100644 --- a/tests/ui/feature-gates/feature-gate-rustc-attrs.rs +++ b/tests/ui/feature-gates/feature-gate-rustc-attrs.rs @@ -19,5 +19,5 @@ fn g() {} //~^ ERROR the `#[rustc_dummy]` attribute is just used for rustc unit tests #[rustc_unknown] //~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler -//~| ERROR cannot find attribute `rustc_unknown` in this scope +//~| ERROR cannot find attribute `rustc_unknown` fn main() {} diff --git a/tests/ui/feature-gates/issue-43106-gating-of-derive-2.rs b/tests/ui/feature-gates/issue-43106-gating-of-derive-2.rs index 3276309f745c2..0d9a6ea876d84 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-derive-2.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-derive-2.rs @@ -2,18 +2,18 @@ mod derive { #[derive(x3300)] - //~^ ERROR cannot find derive macro `x3300` in this scope - //~| ERROR cannot find derive macro `x3300` in this scope + //~^ ERROR cannot find derive macro `x3300` + //~| ERROR cannot find derive macro `x3300` union U { f: i32 } #[derive(x3300)] - //~^ ERROR cannot find derive macro `x3300` in this scope - //~| ERROR cannot find derive macro `x3300` in this scope + //~^ ERROR cannot find derive macro `x3300` + //~| ERROR cannot find derive macro `x3300` enum E { } #[derive(x3300)] - //~^ ERROR cannot find derive macro `x3300` in this scope - //~| ERROR cannot find derive macro `x3300` in this scope + //~^ ERROR cannot find derive macro `x3300` + //~| ERROR cannot find derive macro `x3300` struct S; } diff --git a/tests/ui/fmt/format-args-capture-issue-102057.rs b/tests/ui/fmt/format-args-capture-issue-102057.rs index b8089d49bcb3b..6e51afc643043 100644 --- a/tests/ui/fmt/format-args-capture-issue-102057.rs +++ b/tests/ui/fmt/format-args-capture-issue-102057.rs @@ -1,19 +1,19 @@ fn main() { format!("\x7Ba}"); - //~^ ERROR cannot find value `a` in this scope + //~^ ERROR cannot find value `a` format!("\x7Ba\x7D"); - //~^ ERROR cannot find value `a` in this scope + //~^ ERROR cannot find value `a` let a = 0; format!("\x7Ba} {b}"); - //~^ ERROR cannot find value `b` in this scope + //~^ ERROR cannot find value `b` format!("\x7Ba\x7D {b}"); - //~^ ERROR cannot find value `b` in this scope + //~^ ERROR cannot find value `b` format!("\x7Ba} \x7Bb}"); - //~^ ERROR cannot find value `b` in this scope + //~^ ERROR cannot find value `b` format!("\x7Ba\x7D \x7Bb}"); - //~^ ERROR cannot find value `b` in this scope + //~^ ERROR cannot find value `b` format!("\x7Ba\x7D \x7Bb\x7D"); - //~^ ERROR cannot find value `b` in this scope + //~^ ERROR cannot find value `b` } diff --git a/tests/ui/fmt/format-args-capture-issue-102057.stderr b/tests/ui/fmt/format-args-capture-issue-102057.stderr index f2d625e7f8dc8..339c66c4990c5 100644 --- a/tests/ui/fmt/format-args-capture-issue-102057.stderr +++ b/tests/ui/fmt/format-args-capture-issue-102057.stderr @@ -1,40 +1,40 @@ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/format-args-capture-issue-102057.rs:2:18 | LL | format!("\x7Ba}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/format-args-capture-issue-102057.rs:4:18 | LL | format!("\x7Ba\x7D"); | ^ not found in this scope -error[E0425]: cannot find value `b` in this scope +error[E0425]: cannot find value `b` --> $DIR/format-args-capture-issue-102057.rs:9:22 | LL | format!("\x7Ba} {b}"); | ^ help: a local variable with a similar name exists: `a` -error[E0425]: cannot find value `b` in this scope +error[E0425]: cannot find value `b` --> $DIR/format-args-capture-issue-102057.rs:11:25 | LL | format!("\x7Ba\x7D {b}"); | ^ help: a local variable with a similar name exists: `a` -error[E0425]: cannot find value `b` in this scope +error[E0425]: cannot find value `b` --> $DIR/format-args-capture-issue-102057.rs:13:25 | LL | format!("\x7Ba} \x7Bb}"); | ^ help: a local variable with a similar name exists: `a` -error[E0425]: cannot find value `b` in this scope +error[E0425]: cannot find value `b` --> $DIR/format-args-capture-issue-102057.rs:15:28 | LL | format!("\x7Ba\x7D \x7Bb}"); | ^ help: a local variable with a similar name exists: `a` -error[E0425]: cannot find value `b` in this scope +error[E0425]: cannot find value `b` --> $DIR/format-args-capture-issue-102057.rs:17:28 | LL | format!("\x7Ba\x7D \x7Bb\x7D"); diff --git a/tests/ui/fmt/format-args-capture-issue-94010.rs b/tests/ui/fmt/format-args-capture-issue-94010.rs index bd03e9c93ae2a..2e925df188ebb 100644 --- a/tests/ui/fmt/format-args-capture-issue-94010.rs +++ b/tests/ui/fmt/format-args-capture-issue-94010.rs @@ -1,7 +1,7 @@ fn main() { const FOO: i32 = 123; println!("{foo:X}"); - //~^ ERROR: cannot find value `foo` in this scope + //~^ ERROR: cannot find value `foo` println!("{:.foo$}", 0); - //~^ ERROR: cannot find value `foo` in this scope + //~^ ERROR: cannot find value `foo` } diff --git a/tests/ui/fmt/format-args-capture-issue-94010.stderr b/tests/ui/fmt/format-args-capture-issue-94010.stderr index ed90dc855360a..852957edd57b2 100644 --- a/tests/ui/fmt/format-args-capture-issue-94010.stderr +++ b/tests/ui/fmt/format-args-capture-issue-94010.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/format-args-capture-issue-94010.rs:3:16 | LL | const FOO: i32 = 123; @@ -6,7 +6,7 @@ LL | const FOO: i32 = 123; LL | println!("{foo:X}"); | ^^^ help: a constant with a similar name exists (notice the capitalization): `FOO` -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/format-args-capture-issue-94010.rs:5:18 | LL | const FOO: i32 = 123; diff --git a/tests/ui/fmt/format-args-capture-missing-variables.rs b/tests/ui/fmt/format-args-capture-missing-variables.rs index 46fc083cb7301..d1222c1d33447 100644 --- a/tests/ui/fmt/format-args-capture-missing-variables.rs +++ b/tests/ui/fmt/format-args-capture-missing-variables.rs @@ -1,12 +1,12 @@ fn main() { format!("{} {foo} {} {bar} {}", 1, 2, 3); - //~^ ERROR: cannot find value `foo` in this scope - //~^^ ERROR: cannot find value `bar` in this scope + //~^ ERROR: cannot find value `foo` + //~^^ ERROR: cannot find value `bar` - format!("{foo}"); //~ ERROR: cannot find value `foo` in this scope + format!("{foo}"); //~ ERROR: cannot find value `foo` format!("{valuea} {valueb}", valuea=5, valuec=7); - //~^ ERROR cannot find value `valueb` in this scope + //~^ ERROR cannot find value `valueb` //~^^ ERROR named argument never used format!(r##" @@ -14,7 +14,7 @@ fn main() { {foo} "##); - //~^^^ ERROR: cannot find value `foo` in this scope + //~^^^ ERROR: cannot find value `foo` - panic!("{foo} {bar}", bar=1); //~ ERROR: cannot find value `foo` in this scope + panic!("{foo} {bar}", bar=1); //~ ERROR: cannot find value `foo` } diff --git a/tests/ui/fmt/format-args-capture-missing-variables.stderr b/tests/ui/fmt/format-args-capture-missing-variables.stderr index d980e7be273e8..ed75fd54f20e7 100644 --- a/tests/ui/fmt/format-args-capture-missing-variables.stderr +++ b/tests/ui/fmt/format-args-capture-missing-variables.stderr @@ -6,37 +6,37 @@ LL | format!("{valuea} {valueb}", valuea=5, valuec=7); | | | formatting specifier missing -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/format-args-capture-missing-variables.rs:2:18 | LL | format!("{} {foo} {} {bar} {}", 1, 2, 3); | ^^^ not found in this scope -error[E0425]: cannot find value `bar` in this scope +error[E0425]: cannot find value `bar` --> $DIR/format-args-capture-missing-variables.rs:2:27 | LL | format!("{} {foo} {} {bar} {}", 1, 2, 3); | ^^^ not found in this scope -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/format-args-capture-missing-variables.rs:6:15 | LL | format!("{foo}"); | ^^^ not found in this scope -error[E0425]: cannot find value `valueb` in this scope +error[E0425]: cannot find value `valueb` --> $DIR/format-args-capture-missing-variables.rs:8:24 | LL | format!("{valuea} {valueb}", valuea=5, valuec=7); | ^^^^^^ not found in this scope -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/format-args-capture-missing-variables.rs:14:10 | LL | {foo} | ^^^ not found in this scope -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/format-args-capture-missing-variables.rs:19:14 | LL | panic!("{foo} {bar}", bar=1); diff --git a/tests/ui/fmt/ifmt-bad-arg.rs b/tests/ui/fmt/ifmt-bad-arg.rs index 68861d7bf3faf..7ca30cab494af 100644 --- a/tests/ui/fmt/ifmt-bad-arg.rs +++ b/tests/ui/fmt/ifmt-bad-arg.rs @@ -25,10 +25,10 @@ fn main() { //~^ ERROR: 6 positional arguments in format string, but there are 3 arguments format!("{} {foo} {} {bar} {}", 1, 2, 3); - //~^ ERROR: cannot find value `foo` in this scope - //~^^ ERROR: cannot find value `bar` in this scope + //~^ ERROR: cannot find value `foo` + //~^^ ERROR: cannot find value `bar` - format!("{foo}"); //~ ERROR: cannot find value `foo` in this scope + format!("{foo}"); //~ ERROR: cannot find value `foo` format!("", 1, 2); //~ ERROR: multiple unused formatting arguments format!("{}", 1, 2); //~ ERROR: argument never used format!("{1}", 1, 2); //~ ERROR: argument never used @@ -43,7 +43,7 @@ fn main() { // bad named arguments, #35082 format!("{valuea} {valueb}", valuea=5, valuec=7); - //~^ ERROR cannot find value `valueb` in this scope + //~^ ERROR cannot find value `valueb` //~^^ ERROR named argument never used // bad syntax of the format string @@ -60,7 +60,7 @@ fn main() { {foo} "##); - //~^^^ ERROR: cannot find value `foo` in this scope + //~^^^ ERROR: cannot find value `foo` // bad syntax in format string with multiple newlines, #53836 format!("first number: {} diff --git a/tests/ui/fmt/ifmt-bad-arg.stderr b/tests/ui/fmt/ifmt-bad-arg.stderr index 09ce3dca4117e..c51b7efc89337 100644 --- a/tests/ui/fmt/ifmt-bad-arg.stderr +++ b/tests/ui/fmt/ifmt-bad-arg.stderr @@ -266,31 +266,31 @@ LL | println!("{:.0$}"); = note: positional arguments are zero-based = note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/ifmt-bad-arg.rs:27:18 | LL | format!("{} {foo} {} {bar} {}", 1, 2, 3); | ^^^ not found in this scope -error[E0425]: cannot find value `bar` in this scope +error[E0425]: cannot find value `bar` --> $DIR/ifmt-bad-arg.rs:27:27 | LL | format!("{} {foo} {} {bar} {}", 1, 2, 3); | ^^^ not found in this scope -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/ifmt-bad-arg.rs:31:15 | LL | format!("{foo}"); | ^^^ not found in this scope -error[E0425]: cannot find value `valueb` in this scope +error[E0425]: cannot find value `valueb` --> $DIR/ifmt-bad-arg.rs:45:24 | LL | format!("{valuea} {valueb}", valuea=5, valuec=7); | ^^^^^^ not found in this scope -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/ifmt-bad-arg.rs:60:10 | LL | {foo} diff --git a/tests/ui/fmt/unicode-escape-spans.stderr b/tests/ui/fmt/unicode-escape-spans.stderr index 1d8473f01b822..11e4979a49825 100644 --- a/tests/ui/fmt/unicode-escape-spans.stderr +++ b/tests/ui/fmt/unicode-escape-spans.stderr @@ -1,58 +1,58 @@ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:3:25 | LL | format!("\u{000041}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:4:23 | LL | format!("\u{0041}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:5:21 | LL | format!("\u{41}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:6:20 | LL | format!("\u{0}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:9:22 | LL | format!("\u{0df}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:10:21 | LL | format!("\u{df}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:13:25 | LL | format!("\u{00211d}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:14:23 | LL | format!("\u{211d}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:17:24 | LL | format!("\u{1f4a3}{a}"); | ^ not found in this scope -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/unicode-escape-spans.rs:18:25 | LL | format!("\u{10ffff}{a}"); diff --git a/tests/ui/for/for-expn.rs b/tests/ui/for/for-expn.rs index b9c4bbedac9f7..d5cf2aa33994d 100644 --- a/tests/ui/for/for-expn.rs +++ b/tests/ui/for/for-expn.rs @@ -3,7 +3,7 @@ fn main() { // Odd formatting to make sure we get the right span. for t in & - foo //~ ERROR cannot find value `foo` in this scope + foo //~ ERROR cannot find value `foo` { } } diff --git a/tests/ui/for/for-expn.stderr b/tests/ui/for/for-expn.stderr index 00822324039f0..f4d5e7e3eb7ea 100644 --- a/tests/ui/for/for-expn.stderr +++ b/tests/ui/for/for-expn.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/for-expn.rs:6:7 | LL | foo diff --git a/tests/ui/functions-closures/fn-help-with-err-generic-is-not-function.rs b/tests/ui/functions-closures/fn-help-with-err-generic-is-not-function.rs index e48ab4aa96fb9..b9bb7f53b51ac 100644 --- a/tests/ui/functions-closures/fn-help-with-err-generic-is-not-function.rs +++ b/tests/ui/functions-closures/fn-help-with-err-generic-is-not-function.rs @@ -1,12 +1,12 @@ struct Struct(T); impl Struct -//~^ ERROR cannot find type `T` in this scope -//~| NOTE not found in this scope +//~^ ERROR cannot find type `T` +//~| NOTE not found //~| HELP you might be missing a type parameter where T: Copy, - //~^ ERROR cannot find type `T` in this scope - //~| NOTE not found in this scope + //~^ ERROR cannot find type `T` + //~| NOTE not found { fn method(v: Vec) { v.len(); } } diff --git a/tests/ui/functions-closures/fn-help-with-err-generic-is-not-function.stderr b/tests/ui/functions-closures/fn-help-with-err-generic-is-not-function.stderr index 9d4ea01152cc9..eef18f68084ed 100644 --- a/tests/ui/functions-closures/fn-help-with-err-generic-is-not-function.stderr +++ b/tests/ui/functions-closures/fn-help-with-err-generic-is-not-function.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/fn-help-with-err-generic-is-not-function.rs:2:13 | LL | impl Struct @@ -9,7 +9,7 @@ help: you might be missing a type parameter LL | impl Struct | +++ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/fn-help-with-err-generic-is-not-function.rs:7:5 | LL | T: Copy, diff --git a/tests/ui/functions-closures/fn-help-with-err.rs b/tests/ui/functions-closures/fn-help-with-err.rs index 612fe1b841918..01232d044339d 100644 --- a/tests/ui/functions-closures/fn-help-with-err.rs +++ b/tests/ui/functions-closures/fn-help-with-err.rs @@ -11,7 +11,7 @@ impl Bar for Foo {} fn main() { let arc = std::sync::Arc::new(oops); - //~^ ERROR cannot find value `oops` in this scope + //~^ ERROR cannot find value `oops` //~| NOTE not found arc.bar(); diff --git a/tests/ui/functions-closures/fn-help-with-err.stderr b/tests/ui/functions-closures/fn-help-with-err.stderr index e5fe4611434ea..91de164b013dd 100644 --- a/tests/ui/functions-closures/fn-help-with-err.stderr +++ b/tests/ui/functions-closures/fn-help-with-err.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `oops` in this scope +error[E0425]: cannot find value `oops` --> $DIR/fn-help-with-err.rs:13:35 | LL | let arc = std::sync::Arc::new(oops); diff --git a/tests/ui/generic-associated-types/equality-bound.rs b/tests/ui/generic-associated-types/equality-bound.rs index be05181f5d09e..facf838b99b3a 100644 --- a/tests/ui/generic-associated-types/equality-bound.rs +++ b/tests/ui/generic-associated-types/equality-bound.rs @@ -19,7 +19,7 @@ struct X {} impl FromIterator for X { fn from_iter(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A, //~^ ERROR equality constraints are not yet supported in `where` clauses - //~| ERROR cannot find type `A` in this scope + //~| ERROR cannot find type `A` { todo!() } @@ -30,7 +30,7 @@ struct Y {} impl FromIterator for Y { fn from_iter(_: T) -> Self where T: IntoIterator, T::Item = A, //~^ ERROR equality constraints are not yet supported in `where` clauses - //~| ERROR cannot find type `A` in this scope + //~| ERROR cannot find type `A` { todo!() } @@ -41,7 +41,7 @@ struct Z {} impl FromIterator for Z { fn from_iter(_: T) -> Self where IntoIterator::Item = A, //~^ ERROR equality constraints are not yet supported in `where` clauses - //~| ERROR cannot find type `A` in this scope + //~| ERROR cannot find type `A` { todo!() } @@ -52,7 +52,7 @@ struct K {} impl FromIterator for K { fn from_iter(_: T) -> Self where T::Item = A, //~^ ERROR equality constraints are not yet supported in `where` clauses - //~| ERROR cannot find type `A` in this scope + //~| ERROR cannot find type `A` { todo!() } @@ -63,7 +63,7 @@ struct L {} impl FromIterator for L { fn from_iter(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator, //~^ ERROR equality constraints are not yet supported in `where` clauses - //~| ERROR cannot find type `A` in this scope + //~| ERROR cannot find type `A` { todo!() } @@ -74,7 +74,7 @@ struct M {} impl FromIterator for M { fn from_iter(_: T) -> Self where T::Item = A, T: IntoIterator, //~^ ERROR equality constraints are not yet supported in `where` clauses - //~| ERROR cannot find type `A` in this scope + //~| ERROR cannot find type `A` { todo!() } diff --git a/tests/ui/generic-associated-types/equality-bound.stderr b/tests/ui/generic-associated-types/equality-bound.stderr index a054c06caebde..72200c462ac8f 100644 --- a/tests/ui/generic-associated-types/equality-bound.stderr +++ b/tests/ui/generic-associated-types/equality-bound.stderr @@ -110,7 +110,7 @@ LL - fn from_iter(_: T) -> Self where T::Item = A, T: IntoIterator, LL + fn from_iter(_: T) -> Self where T: IntoIterator, | -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/equality-bound.rs:20:79 | LL | fn from_iter(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A, @@ -119,7 +119,7 @@ LL | fn from_iter(_: T) -> Self where T: IntoIterator, IntoIterator::Item LL | struct K {} | -------- similarly named struct `K` defined here -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/equality-bound.rs:31:68 | LL | fn from_iter(_: T) -> Self where T: IntoIterator, T::Item = A, @@ -128,7 +128,7 @@ LL | fn from_iter(_: T) -> Self where T: IntoIterator, T::Item = A, LL | struct K {} | -------- similarly named struct `K` defined here -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/equality-bound.rs:42:76 | LL | fn from_iter(_: T) -> Self where IntoIterator::Item = A, @@ -137,7 +137,7 @@ LL | fn from_iter(_: T) -> Self where IntoIterator::Item = LL | struct K {} | -------- similarly named struct `K` defined here -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/equality-bound.rs:53:65 | LL | struct K {} @@ -146,7 +146,7 @@ LL | struct K {} LL | fn from_iter(_: T) -> Self where T::Item = A, | ^ help: a struct with a similar name exists: `K` -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/equality-bound.rs:64:62 | LL | struct K {} @@ -155,7 +155,7 @@ LL | struct K {} LL | fn from_iter(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator, | ^ help: a struct with a similar name exists: `K` -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/equality-bound.rs:75:51 | LL | struct K {} diff --git a/tests/ui/generics/issue-106694.rs b/tests/ui/generics/issue-106694.rs index c4b02ee81ec8f..5daa947bd466e 100644 --- a/tests/ui/generics/issue-106694.rs +++ b/tests/ui/generics/issue-106694.rs @@ -11,14 +11,14 @@ fn partially_correct_impl(_: impl &*const &Trait + Copy) {} fn foo_bad(_: impl &BadTrait) {} //~^ ERROR expected a trait, found type -//~^^ ERROR cannot find trait `BadTrait` in this scope +//~^^ ERROR cannot find trait `BadTrait` fn bar_bad(_: T) {} //~^ ERROR expected a trait, found type -//~^^ ERROR cannot find trait `BadTrait` in this scope +//~^^ ERROR cannot find trait `BadTrait` fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {} //~^ ERROR expected a trait, found type -//~^^ ERROR cannot find trait `BadTrait` in this scope +//~^^ ERROR cannot find trait `BadTrait` fn main() {} diff --git a/tests/ui/generics/issue-106694.stderr b/tests/ui/generics/issue-106694.stderr index 235b8982a99c6..435b05938c822 100644 --- a/tests/ui/generics/issue-106694.stderr +++ b/tests/ui/generics/issue-106694.stderr @@ -70,19 +70,19 @@ LL - fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {} LL + fn partially_correct_impl_bad(_: impl BadTrait + Copy) {} | -error[E0405]: cannot find trait `BadTrait` in this scope +error[E0405]: cannot find trait `BadTrait` --> $DIR/issue-106694.rs:12:21 | LL | fn foo_bad(_: impl &BadTrait) {} | ^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `BadTrait` in this scope +error[E0405]: cannot find trait `BadTrait` --> $DIR/issue-106694.rs:16:16 | LL | fn bar_bad(_: T) {} | ^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `BadTrait` in this scope +error[E0405]: cannot find trait `BadTrait` --> $DIR/issue-106694.rs:20:48 | LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {} diff --git a/tests/ui/hygiene/arguments.rs b/tests/ui/hygiene/arguments.rs index ab58301d468b0..7490bda535157 100644 --- a/tests/ui/hygiene/arguments.rs +++ b/tests/ui/hygiene/arguments.rs @@ -11,5 +11,5 @@ macro m($t:ty, $e:expr) { fn main() { struct S; - m!(S, S); //~ ERROR cannot find type `S` in this scope + m!(S, S); //~ ERROR cannot find type `S` } diff --git a/tests/ui/hygiene/arguments.stderr b/tests/ui/hygiene/arguments.stderr index 0d8d652b6f33d..e13adaabfe809 100644 --- a/tests/ui/hygiene/arguments.stderr +++ b/tests/ui/hygiene/arguments.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `S` in this scope +error[E0412]: cannot find type `S` --> $DIR/arguments.rs:14:8 | LL | m!(S, S); diff --git a/tests/ui/hygiene/cross-crate-glob-hygiene.rs b/tests/ui/hygiene/cross-crate-glob-hygiene.rs index 81cc6927c1d28..f97010fbf8caf 100644 --- a/tests/ui/hygiene/cross-crate-glob-hygiene.rs +++ b/tests/ui/hygiene/cross-crate-glob-hygiene.rs @@ -19,5 +19,5 @@ use m::*; fn main() { let x = my_struct!(create); - //~^ ERROR cannot find struct, variant or union type `MyStruct` in this scope + //~^ ERROR cannot find struct, variant or union type `MyStruct` } diff --git a/tests/ui/hygiene/cross-crate-glob-hygiene.stderr b/tests/ui/hygiene/cross-crate-glob-hygiene.stderr index 1abc739fc362d..e0612da5bd710 100644 --- a/tests/ui/hygiene/cross-crate-glob-hygiene.stderr +++ b/tests/ui/hygiene/cross-crate-glob-hygiene.stderr @@ -1,4 +1,4 @@ -error[E0422]: cannot find struct, variant or union type `MyStruct` in this scope +error[E0422]: cannot find struct, variant or union type `MyStruct` --> $DIR/cross-crate-glob-hygiene.rs:21:13 | LL | let x = my_struct!(create); diff --git a/tests/ui/hygiene/cross-crate-name-hiding-2.rs b/tests/ui/hygiene/cross-crate-name-hiding-2.rs index 2eae000b045e2..06019c5dd2bb9 100644 --- a/tests/ui/hygiene/cross-crate-name-hiding-2.rs +++ b/tests/ui/hygiene/cross-crate-name-hiding-2.rs @@ -11,5 +11,5 @@ my_struct!(define); fn main() { let x = MyStruct {}; - //~^ ERROR cannot find struct, variant or union type `MyStruct` in this scope + //~^ ERROR cannot find struct, variant or union type `MyStruct` } diff --git a/tests/ui/hygiene/cross-crate-name-hiding-2.stderr b/tests/ui/hygiene/cross-crate-name-hiding-2.stderr index a5d509fab996f..bede1625a0857 100644 --- a/tests/ui/hygiene/cross-crate-name-hiding-2.stderr +++ b/tests/ui/hygiene/cross-crate-name-hiding-2.stderr @@ -1,4 +1,4 @@ -error[E0422]: cannot find struct, variant or union type `MyStruct` in this scope +error[E0422]: cannot find struct, variant or union type `MyStruct` --> $DIR/cross-crate-name-hiding-2.rs:13:13 | LL | let x = MyStruct {}; diff --git a/tests/ui/hygiene/cross-crate-name-hiding.rs b/tests/ui/hygiene/cross-crate-name-hiding.rs index 586e7647df74c..38cc83805cbd7 100644 --- a/tests/ui/hygiene/cross-crate-name-hiding.rs +++ b/tests/ui/hygiene/cross-crate-name-hiding.rs @@ -9,5 +9,5 @@ use pub_hygiene::*; fn main() { let x = MyStruct {}; - //~^ ERROR cannot find struct, variant or union type `MyStruct` in this scope + //~^ ERROR cannot find struct, variant or union type `MyStruct` } diff --git a/tests/ui/hygiene/cross-crate-name-hiding.stderr b/tests/ui/hygiene/cross-crate-name-hiding.stderr index 4abd14f935581..f1947a2c1803b 100644 --- a/tests/ui/hygiene/cross-crate-name-hiding.stderr +++ b/tests/ui/hygiene/cross-crate-name-hiding.stderr @@ -1,4 +1,4 @@ -error[E0422]: cannot find struct, variant or union type `MyStruct` in this scope +error[E0422]: cannot find struct, variant or union type `MyStruct` --> $DIR/cross-crate-name-hiding.rs:11:13 | LL | let x = MyStruct {}; diff --git a/tests/ui/hygiene/for-loop.rs b/tests/ui/hygiene/for-loop.rs index 2e5ae43a9ce47..40a3d2fb433ca 100644 --- a/tests/ui/hygiene/for-loop.rs +++ b/tests/ui/hygiene/for-loop.rs @@ -3,6 +3,6 @@ fn main() { for _ in 0..10 { - iter.next(); //~ ERROR cannot find value `iter` in this scope + iter.next(); //~ ERROR cannot find value `iter` } } diff --git a/tests/ui/hygiene/for-loop.stderr b/tests/ui/hygiene/for-loop.stderr index 5f334fd89603c..62195b7ce8e1f 100644 --- a/tests/ui/hygiene/for-loop.stderr +++ b/tests/ui/hygiene/for-loop.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `iter` in this scope +error[E0425]: cannot find value `iter` --> $DIR/for-loop.rs:6:9 | LL | iter.next(); diff --git a/tests/ui/hygiene/generate-mod.rs b/tests/ui/hygiene/generate-mod.rs index 8826293542c97..d7c9d41b20c7c 100644 --- a/tests/ui/hygiene/generate-mod.rs +++ b/tests/ui/hygiene/generate-mod.rs @@ -16,8 +16,8 @@ macro genmod_transparent() { type A = FromOutside; struct Outer; mod inner { - type A = FromOutside; //~ ERROR cannot find type `FromOutside` in this scope - type Inner = Outer; //~ ERROR cannot find type `Outer` in this scope + type A = FromOutside; //~ ERROR cannot find type `FromOutside` + type Inner = Outer; //~ ERROR cannot find type `Outer` } } @@ -25,15 +25,15 @@ macro_rules! genmod_legacy { () => { type A = FromOutside; struct Outer; mod inner { - type A = FromOutside; //~ ERROR cannot find type `FromOutside` in this scope - type Inner = Outer; //~ ERROR cannot find type `Outer` in this scope + type A = FromOutside; //~ ERROR cannot find type `FromOutside` + type Inner = Outer; //~ ERROR cannot find type `Outer` } }} fn check() { struct FromOutside; - genmod!(FromOutside, Outer); //~ ERROR cannot find type `FromOutside` in this scope - //~| ERROR cannot find type `Outer` in this scope + genmod!(FromOutside, Outer); //~ ERROR cannot find type `FromOutside` + //~| ERROR cannot find type `Outer` } fn check_transparent() { diff --git a/tests/ui/hygiene/generate-mod.stderr b/tests/ui/hygiene/generate-mod.stderr index 32a2e145ca942..d090cc12dc93f 100644 --- a/tests/ui/hygiene/generate-mod.stderr +++ b/tests/ui/hygiene/generate-mod.stderr @@ -1,16 +1,16 @@ -error[E0412]: cannot find type `FromOutside` in this scope +error[E0412]: cannot find type `FromOutside` --> $DIR/generate-mod.rs:35:13 | LL | genmod!(FromOutside, Outer); | ^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `Outer` in this scope +error[E0412]: cannot find type `Outer` --> $DIR/generate-mod.rs:35:26 | LL | genmod!(FromOutside, Outer); | ^^^^^ not found in this scope -error[E0412]: cannot find type `FromOutside` in this scope +error[E0412]: cannot find type `FromOutside` --> $DIR/generate-mod.rs:19:18 | LL | type A = FromOutside; @@ -21,7 +21,7 @@ LL | genmod_transparent!(); | = note: this error originates in the macro `genmod_transparent` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `Outer` in this scope +error[E0412]: cannot find type `Outer` --> $DIR/generate-mod.rs:20:22 | LL | type Inner = Outer; @@ -32,7 +32,7 @@ LL | genmod_transparent!(); | = note: this error originates in the macro `genmod_transparent` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `FromOutside` in this scope +error[E0412]: cannot find type `FromOutside` --> $DIR/generate-mod.rs:28:18 | LL | type A = FromOutside; @@ -43,7 +43,7 @@ LL | genmod_legacy!(); | = note: this error originates in the macro `genmod_legacy` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `Outer` in this scope +error[E0412]: cannot find type `Outer` --> $DIR/generate-mod.rs:29:22 | LL | type Inner = Outer; diff --git a/tests/ui/hygiene/globs.rs b/tests/ui/hygiene/globs.rs index a3f466ef435d3..507ec03ee9e97 100644 --- a/tests/ui/hygiene/globs.rs +++ b/tests/ui/hygiene/globs.rs @@ -12,14 +12,14 @@ macro m($($t:tt)*) { $($t)* use foo::*; f(); - g(); //~ ERROR cannot find function `g` in this scope + g(); //~ ERROR cannot find function `g` } fn main() { m! { use bar::*; g(); - f(); //~ ERROR cannot find function `f` in this scope + f(); //~ ERROR cannot find function `f` } } @@ -58,11 +58,11 @@ macro n($i:ident) { } } - n!(f); //~ ERROR cannot find function `f` in this scope + n!(f); //~ ERROR cannot find function `f` n_with_super!(f); mod test2 { super::n! { - f //~ ERROR cannot find function `f` in this scope + f //~ ERROR cannot find function `f` } super::n_with_super! { f diff --git a/tests/ui/hygiene/globs.stderr b/tests/ui/hygiene/globs.stderr index 180172644402b..3b6e74009e087 100644 --- a/tests/ui/hygiene/globs.stderr +++ b/tests/ui/hygiene/globs.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `f` in this scope +error[E0425]: cannot find function `f` --> $DIR/globs.rs:22:9 | LL | pub fn g() {} @@ -16,7 +16,7 @@ help: consider importing this function LL + use foo::f; | -error[E0425]: cannot find function `g` in this scope +error[E0425]: cannot find function `g` --> $DIR/globs.rs:15:5 | LL | pub fn f() {} @@ -42,7 +42,7 @@ help: consider importing this function LL + use bar::g; | -error[E0425]: cannot find function `f` in this scope +error[E0425]: cannot find function `f` --> $DIR/globs.rs:61:12 | LL | n!(f); @@ -55,7 +55,7 @@ LL | n!(f); foo::f = note: this error originates in the macro `n` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find function `f` in this scope +error[E0425]: cannot find function `f` --> $DIR/globs.rs:65:17 | LL | n!(f); diff --git a/tests/ui/hygiene/no_implicit_prelude-2018.rs b/tests/ui/hygiene/no_implicit_prelude-2018.rs index 015bff870908e..598b3a3dad200 100644 --- a/tests/ui/hygiene/no_implicit_prelude-2018.rs +++ b/tests/ui/hygiene/no_implicit_prelude-2018.rs @@ -4,7 +4,7 @@ mod bar { fn f() { ::std::print!(""); // OK - print!(); //~ ERROR cannot find macro `print` in this scope + print!(); //~ ERROR cannot find macro `print` } } diff --git a/tests/ui/hygiene/pattern-macro.rs b/tests/ui/hygiene/pattern-macro.rs index e5d6a3aa1a0e6..e83287ec89d8c 100644 --- a/tests/ui/hygiene/pattern-macro.rs +++ b/tests/ui/hygiene/pattern-macro.rs @@ -2,5 +2,5 @@ macro_rules! foo { () => ( x ) } fn main() { let foo!() = 2; - x + 1; //~ ERROR cannot find value `x` in this scope + x + 1; //~ ERROR cannot find value `x` } diff --git a/tests/ui/hygiene/pattern-macro.stderr b/tests/ui/hygiene/pattern-macro.stderr index a9764cea49e59..cb9b743432b5c 100644 --- a/tests/ui/hygiene/pattern-macro.stderr +++ b/tests/ui/hygiene/pattern-macro.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/pattern-macro.rs:5:5 | LL | x + 1; diff --git a/tests/ui/hygiene/rustc-macro-transparency.rs b/tests/ui/hygiene/rustc-macro-transparency.rs index 5f36993af2f30..59c2faec40590 100644 --- a/tests/ui/hygiene/rustc-macro-transparency.rs +++ b/tests/ui/hygiene/rustc-macro-transparency.rs @@ -23,7 +23,7 @@ fn main() { Transparent; // OK SemiTransparent; // OK - Opaque; //~ ERROR cannot find value `Opaque` in this scope + Opaque; //~ ERROR cannot find value `Opaque` transparent; // OK semitransparent; //~ ERROR expected value, found macro `semitransparent` diff --git a/tests/ui/hygiene/rustc-macro-transparency.stderr b/tests/ui/hygiene/rustc-macro-transparency.stderr index 1d2a1e1249864..9b23bbb360a0d 100644 --- a/tests/ui/hygiene/rustc-macro-transparency.stderr +++ b/tests/ui/hygiene/rustc-macro-transparency.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `Opaque` in this scope +error[E0425]: cannot find value `Opaque` --> $DIR/rustc-macro-transparency.rs:26:5 | LL | Opaque; diff --git a/tests/ui/impl-trait/in-trait/ensure-rpitits-are-created-before-freezing.rs b/tests/ui/impl-trait/in-trait/ensure-rpitits-are-created-before-freezing.rs index 35a6acca52c7d..279b7f7a8b3d1 100644 --- a/tests/ui/impl-trait/in-trait/ensure-rpitits-are-created-before-freezing.rs +++ b/tests/ui/impl-trait/in-trait/ensure-rpitits-are-created-before-freezing.rs @@ -6,7 +6,7 @@ trait Iterable { // `ty::Error` in a trait ref will silence any missing item errors, but will also // prevent the `associated_items` query from being called before def ids are frozen. impl Iterable for Missing { -//~^ ERROR cannot find type `Missing` in this scope +//~^ ERROR cannot find type `Missing` fn iter(&self) -> Self::Item {} } diff --git a/tests/ui/impl-trait/in-trait/ensure-rpitits-are-created-before-freezing.stderr b/tests/ui/impl-trait/in-trait/ensure-rpitits-are-created-before-freezing.stderr index c172787e6ef21..86ec30da61830 100644 --- a/tests/ui/impl-trait/in-trait/ensure-rpitits-are-created-before-freezing.stderr +++ b/tests/ui/impl-trait/in-trait/ensure-rpitits-are-created-before-freezing.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/ensure-rpitits-are-created-before-freezing.rs:8:19 | LL | impl Iterable for Missing { diff --git a/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.rs b/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.rs index b9fe8d8bfc59e..9d593c98c53d8 100644 --- a/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.rs +++ b/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.rs @@ -6,7 +6,7 @@ use std::ops::Deref; pub trait Tr { fn w() -> impl Deref>; - //~^ ERROR cannot find type `Missing` in this scope + //~^ ERROR cannot find type `Missing` } impl Tr for () { diff --git a/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr b/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr index 73ada8d709610..82560f5eea3e7 100644 --- a/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr +++ b/tests/ui/impl-trait/in-trait/rpitit-shadowed-by-missing-adt.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/rpitit-shadowed-by-missing-adt.rs:8:35 | LL | fn w() -> impl Deref>; diff --git a/tests/ui/impl-trait/issue-103181-2.rs b/tests/ui/impl-trait/issue-103181-2.rs index 72729e851e36b..08a014b788f56 100644 --- a/tests/ui/impl-trait/issue-103181-2.rs +++ b/tests/ui/impl-trait/issue-103181-2.rs @@ -10,7 +10,7 @@ impl SendFuture for Fut { async fn broken_fut() { ident_error; - //~^ ERROR cannot find value `ident_error` in this scope + //~^ ERROR cannot find value `ident_error` } // triggers normalization of `::Output`, diff --git a/tests/ui/impl-trait/issue-103181-2.stderr b/tests/ui/impl-trait/issue-103181-2.stderr index cef4449dbb986..eef4df16b59ef 100644 --- a/tests/ui/impl-trait/issue-103181-2.stderr +++ b/tests/ui/impl-trait/issue-103181-2.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `ident_error` in this scope +error[E0425]: cannot find value `ident_error` --> $DIR/issue-103181-2.rs:12:5 | LL | ident_error; diff --git a/tests/ui/impl-trait/issue-54966.rs b/tests/ui/impl-trait/issue-54966.rs index 0ed3c4b3ca945..f25f929084bb4 100644 --- a/tests/ui/impl-trait/issue-54966.rs +++ b/tests/ui/impl-trait/issue-54966.rs @@ -1,6 +1,6 @@ // issue-54966: ICE returning an unknown type with impl FnMut fn generate_duration() -> Oper {} -//~^ ERROR cannot find type `Oper` in this scope +//~^ ERROR cannot find type `Oper` fn main() {} diff --git a/tests/ui/impl-trait/issue-54966.stderr b/tests/ui/impl-trait/issue-54966.stderr index 4024c5afa80b6..9b936c25d78a4 100644 --- a/tests/ui/impl-trait/issue-54966.stderr +++ b/tests/ui/impl-trait/issue-54966.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Oper` in this scope +error[E0412]: cannot find type `Oper` --> $DIR/issue-54966.rs:3:27 | LL | fn generate_duration() -> Oper {} diff --git a/tests/ui/impl-trait/issues/issue-82139.rs b/tests/ui/impl-trait/issues/issue-82139.rs index 3f0b0f1a8dee0..056402e242860 100644 --- a/tests/ui/impl-trait/issues/issue-82139.rs +++ b/tests/ui/impl-trait/issues/issue-82139.rs @@ -12,7 +12,7 @@ impl Trait for Struct { type Associated = impl Bound; fn func() -> Self::Associated { - Some(42).map(|_| j) //~ ERROR cannot find value `j` in this scope + Some(42).map(|_| j) //~ ERROR cannot find value `j` } } diff --git a/tests/ui/impl-trait/issues/issue-82139.stderr b/tests/ui/impl-trait/issues/issue-82139.stderr index b87084433120b..4c0c997bef1e0 100644 --- a/tests/ui/impl-trait/issues/issue-82139.stderr +++ b/tests/ui/impl-trait/issues/issue-82139.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `j` in this scope +error[E0425]: cannot find value `j` --> $DIR/issue-82139.rs:15:26 | LL | Some(42).map(|_| j) 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 6d41748853332..607603cf3487f 100644 --- a/tests/ui/impl-trait/opaque-used-in-extraneous-argument.stderr +++ b/tests/ui/impl-trait/opaque-used-in-extraneous-argument.stderr @@ -10,7 +10,7 @@ help: consider using the `'static` lifetime, but this is uncommon unless you're LL | fn frob() -> impl Fn + 'static {} | ~~~~~~~ -error[E0412]: cannot find type `P` in this scope +error[E0412]: cannot find type `P` --> $DIR/opaque-used-in-extraneous-argument.rs:5:22 | LL | fn frob() -> impl Fn + '_ {} @@ -21,7 +21,7 @@ help: you might be missing a type parameter LL | fn frob

() -> impl Fn + '_ {} | +++ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/opaque-used-in-extraneous-argument.rs:5:34 | LL | fn frob() -> impl Fn + '_ {} diff --git a/tests/ui/impl-trait/precise-capturing/bad-params.rs b/tests/ui/impl-trait/precise-capturing/bad-params.rs index 08eee67c0e579..cbd6ec3ef5506 100644 --- a/tests/ui/impl-trait/precise-capturing/bad-params.rs +++ b/tests/ui/impl-trait/precise-capturing/bad-params.rs @@ -1,10 +1,10 @@ #![feature(precise_capturing)] fn missing() -> impl Sized + use {} -//~^ ERROR cannot find type `T` in this scope +//~^ ERROR cannot find type `T` fn missing_self() -> impl Sized + use {} -//~^ ERROR cannot find type `Self` in this scope +//~^ ERROR cannot find type `Self` struct MyType; impl MyType { diff --git a/tests/ui/impl-trait/precise-capturing/bad-params.stderr b/tests/ui/impl-trait/precise-capturing/bad-params.stderr index e104f115aa3f2..bc1fc2e2d5879 100644 --- a/tests/ui/impl-trait/precise-capturing/bad-params.stderr +++ b/tests/ui/impl-trait/precise-capturing/bad-params.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/bad-params.rs:3:34 | LL | fn missing() -> impl Sized + use {} @@ -9,7 +9,7 @@ help: you might be missing a type parameter LL | fn missing() -> impl Sized + use {} | +++ -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/bad-params.rs:6:39 | LL | fn missing_self() -> impl Sized + use {} diff --git a/tests/ui/implied-bounds/references-err.rs b/tests/ui/implied-bounds/references-err.rs index 203d512e39812..e059c2285eb89 100644 --- a/tests/ui/implied-bounds/references-err.rs +++ b/tests/ui/implied-bounds/references-err.rs @@ -12,7 +12,7 @@ trait Trait { impl Trait for () { type Assoc = DoesNotExist; - //~^ ERROR cannot find type `DoesNotExist` in this scope + //~^ ERROR cannot find type `DoesNotExist` fn tokenize(&self) -> ::Identity { unimplemented!() diff --git a/tests/ui/implied-bounds/references-err.stderr b/tests/ui/implied-bounds/references-err.stderr index df83fce3bdef7..f350bd781be95 100644 --- a/tests/ui/implied-bounds/references-err.stderr +++ b/tests/ui/implied-bounds/references-err.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `DoesNotExist` in this scope +error[E0412]: cannot find type `DoesNotExist` --> $DIR/references-err.rs:14:18 | LL | type Assoc = DoesNotExist; diff --git a/tests/ui/imports/glob-conflict-cross-crate-1.rs b/tests/ui/imports/glob-conflict-cross-crate-1.rs index 5f0433d13fcfd..4ff05a0fb0bab 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-1.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-1.rs @@ -3,10 +3,10 @@ extern crate glob_conflict; fn main() { - glob_conflict::f(); //~ ERROR cannot find function `f` in crate `glob_conflict` + glob_conflict::f(); //~ ERROR cannot find function `f` //^ FIXME: `glob_conflict::f` should raise an // ambiguity error instead of a not found error. - glob_conflict::glob::f(); //~ ERROR cannot find function `f` in module `glob_conflict::glob` + glob_conflict::glob::f(); //~ ERROR cannot find function `f` //^ FIXME: `glob_conflict::glob::f` should raise an // ambiguity error instead of a not found error. } diff --git a/tests/ui/imports/glob-conflict-cross-crate-1.stderr b/tests/ui/imports/glob-conflict-cross-crate-1.stderr index 758087107f397..c3187af772e30 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-1.stderr +++ b/tests/ui/imports/glob-conflict-cross-crate-1.stderr @@ -1,14 +1,14 @@ -error[E0425]: cannot find function `f` in crate `glob_conflict` +error[E0425]: cannot find function `f` --> $DIR/glob-conflict-cross-crate-1.rs:6:20 | LL | glob_conflict::f(); - | ^ not found in `glob_conflict` + | ^ not found in crate `glob_conflict` -error[E0425]: cannot find function `f` in module `glob_conflict::glob` +error[E0425]: cannot find function `f` --> $DIR/glob-conflict-cross-crate-1.rs:9:26 | LL | glob_conflict::glob::f(); - | ^ not found in `glob_conflict::glob` + | ^ not found in module `glob_conflict::glob` error: aborting due to 2 previous errors diff --git a/tests/ui/imports/glob-conflict-cross-crate-2.rs b/tests/ui/imports/glob-conflict-cross-crate-2.rs index b764685dd5796..304fede3a6474 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-2.rs +++ b/tests/ui/imports/glob-conflict-cross-crate-2.rs @@ -5,6 +5,6 @@ extern crate glob_conflict_cross_crate_2_extern; use glob_conflict_cross_crate_2_extern::*; fn main() { - let _a: C = 1; //~ ERROR cannot find type `C` in this scope + let _a: C = 1; //~ ERROR cannot find type `C` //^ FIXME: `C` should be identified as an ambiguous item. } diff --git a/tests/ui/imports/glob-conflict-cross-crate-2.stderr b/tests/ui/imports/glob-conflict-cross-crate-2.stderr index aebb2d59d063a..ceaa0ba80fa13 100644 --- a/tests/ui/imports/glob-conflict-cross-crate-2.stderr +++ b/tests/ui/imports/glob-conflict-cross-crate-2.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `C` in this scope +error[E0412]: cannot find type `C` --> $DIR/glob-conflict-cross-crate-2.rs:8:13 | LL | let _a: C = 1; diff --git a/tests/ui/imports/glob-resolve1.rs b/tests/ui/imports/glob-resolve1.rs index 904b77117dafc..79067bd9cfc7a 100644 --- a/tests/ui/imports/glob-resolve1.rs +++ b/tests/ui/imports/glob-resolve1.rs @@ -23,15 +23,15 @@ mod bar { fn foo() {} fn main() { - fpriv(); //~ ERROR cannot find function `fpriv` in this scope - epriv(); //~ ERROR cannot find function `epriv` in this scope + fpriv(); //~ ERROR cannot find function `fpriv` + epriv(); //~ ERROR cannot find function `epriv` B; //~ ERROR expected value, found enum `B` - C; //~ ERROR cannot find value `C` in this scope - import(); //~ ERROR: cannot find function `import` in this scope + C; //~ ERROR cannot find value `C` + import(); //~ ERROR: cannot find function `import` - foo::(); //~ ERROR: cannot find type `A` in this scope - foo::(); //~ ERROR: cannot find type `C` in this scope - foo::(); //~ ERROR: cannot find type `D` in this scope + foo::(); //~ ERROR: cannot find type `A` + foo::(); //~ ERROR: cannot find type `C` + foo::(); //~ ERROR: cannot find type `D` } mod other { diff --git a/tests/ui/imports/glob-resolve1.stderr b/tests/ui/imports/glob-resolve1.stderr index 4401ef58732e8..8ed155860c049 100644 --- a/tests/ui/imports/glob-resolve1.stderr +++ b/tests/ui/imports/glob-resolve1.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `fpriv` in this scope +error[E0425]: cannot find function `fpriv` --> $DIR/glob-resolve1.rs:26:5 | LL | fpriv(); @@ -10,7 +10,7 @@ note: function `bar::fpriv` exists but is inaccessible LL | fn fpriv() {} | ^^^^^^^^^^ not accessible -error[E0425]: cannot find function `epriv` in this scope +error[E0425]: cannot find function `epriv` --> $DIR/glob-resolve1.rs:27:5 | LL | epriv(); @@ -40,7 +40,7 @@ help: you might have meant to use the following enum variant LL | B::B1; | ~~~~~ -error[E0425]: cannot find value `C` in this scope +error[E0425]: cannot find value `C` --> $DIR/glob-resolve1.rs:29:5 | LL | C; @@ -52,7 +52,7 @@ note: unit struct `bar::C` exists but is inaccessible LL | struct C; | ^^^^^^^^^ not accessible -error[E0425]: cannot find function `import` in this scope +error[E0425]: cannot find function `import` --> $DIR/glob-resolve1.rs:30:5 | LL | import(); @@ -63,7 +63,7 @@ help: consider importing this function LL + use other::import; | -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/glob-resolve1.rs:32:11 | LL | pub enum B { @@ -78,7 +78,7 @@ note: enum `bar::A` exists but is inaccessible LL | enum A { | ^^^^^^ not accessible -error[E0412]: cannot find type `C` in this scope +error[E0412]: cannot find type `C` --> $DIR/glob-resolve1.rs:33:11 | LL | pub enum B { @@ -93,7 +93,7 @@ note: struct `bar::C` exists but is inaccessible LL | struct C; | ^^^^^^^^^ not accessible -error[E0412]: cannot find type `D` in this scope +error[E0412]: cannot find type `D` --> $DIR/glob-resolve1.rs:34:11 | LL | pub enum B { diff --git a/tests/ui/imports/import-alias-issue-121168.edition2015.stderr b/tests/ui/imports/import-alias-issue-121168.edition2015.stderr index 47001fc1a5291..a93dc203e691b 100644 --- a/tests/ui/imports/import-alias-issue-121168.edition2015.stderr +++ b/tests/ui/imports/import-alias-issue-121168.edition2015.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/import-alias-issue-121168.rs:11:12 | LL | let _: Foo = todo!(); diff --git a/tests/ui/imports/import-alias-issue-121168.edition2018.stderr b/tests/ui/imports/import-alias-issue-121168.edition2018.stderr index e14e700c33d81..a8317fcbb5f92 100644 --- a/tests/ui/imports/import-alias-issue-121168.edition2018.stderr +++ b/tests/ui/imports/import-alias-issue-121168.edition2018.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/import-alias-issue-121168.rs:11:12 | LL | let _: Foo = todo!(); diff --git a/tests/ui/imports/import-alias-issue-121168.edition2021.stderr b/tests/ui/imports/import-alias-issue-121168.edition2021.stderr index e14e700c33d81..a8317fcbb5f92 100644 --- a/tests/ui/imports/import-alias-issue-121168.edition2021.stderr +++ b/tests/ui/imports/import-alias-issue-121168.edition2021.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/import-alias-issue-121168.rs:11:12 | LL | let _: Foo = todo!(); diff --git a/tests/ui/imports/import-alias-issue-121168.rs b/tests/ui/imports/import-alias-issue-121168.rs index 826a6765b0399..393b83f0943a2 100644 --- a/tests/ui/imports/import-alias-issue-121168.rs +++ b/tests/ui/imports/import-alias-issue-121168.rs @@ -8,7 +8,7 @@ extern crate import_alias_issue_121168_extern as nice_crate_name; fn use_foo_from_another_crate_without_importing_it_first() { - let _: Foo = todo!(); //~ ERROR cannot find type `Foo` in this scope + let _: Foo = todo!(); //~ ERROR cannot find type `Foo` } fn main() {} diff --git a/tests/ui/imports/import-glob-0.rs b/tests/ui/imports/import-glob-0.rs index 37a0d15456c67..36d8b2a221999 100644 --- a/tests/ui/imports/import-glob-0.rs +++ b/tests/ui/imports/import-glob-0.rs @@ -11,6 +11,6 @@ mod module_of_many_things { fn main() { f1(); f2(); - f999(); //~ ERROR cannot find function `f999` in this scope + f999(); //~ ERROR cannot find function `f999` f4(); } diff --git a/tests/ui/imports/import-glob-0.stderr b/tests/ui/imports/import-glob-0.stderr index 6a2837e770dc5..9e86ace214d08 100644 --- a/tests/ui/imports/import-glob-0.stderr +++ b/tests/ui/imports/import-glob-0.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `f999` in this scope +error[E0425]: cannot find function `f999` --> $DIR/import-glob-0.rs:14:5 | LL | f999(); diff --git a/tests/ui/imports/import-glob-circular.rs b/tests/ui/imports/import-glob-circular.rs index e47fa870c0639..4dc45389e67c4 100644 --- a/tests/ui/imports/import-glob-circular.rs +++ b/tests/ui/imports/import-glob-circular.rs @@ -13,7 +13,7 @@ mod circ2 { mod test { use circ1::*; - fn test() { f1066(); } //~ ERROR cannot find function `f1066` in this scope + fn test() { f1066(); } //~ ERROR cannot find function `f1066` } fn main() {} diff --git a/tests/ui/imports/import-glob-circular.stderr b/tests/ui/imports/import-glob-circular.stderr index 2eb268813d0f2..31c752a1cd96f 100644 --- a/tests/ui/imports/import-glob-circular.stderr +++ b/tests/ui/imports/import-glob-circular.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `f1066` in this scope +error[E0425]: cannot find function `f1066` --> $DIR/import-glob-circular.rs:16:17 | LL | fn test() { f1066(); } diff --git a/tests/ui/imports/inaccessible_type_aliases.rs b/tests/ui/imports/inaccessible_type_aliases.rs index c3d4214e282d7..5adf459a448f7 100644 --- a/tests/ui/imports/inaccessible_type_aliases.rs +++ b/tests/ui/imports/inaccessible_type_aliases.rs @@ -8,7 +8,7 @@ mod b { } fn main() { - let x: Foo = 100; //~ ERROR: cannot find type `Foo` in this scope - let y: Bar = 100; //~ ERROR: cannot find type `Bar` in this scope + let x: Foo = 100; //~ ERROR: cannot find type `Foo` + let y: Bar = 100; //~ ERROR: cannot find type `Bar` println!("x: {}, y: {}", x, y); } diff --git a/tests/ui/imports/inaccessible_type_aliases.stderr b/tests/ui/imports/inaccessible_type_aliases.stderr index ef224246061d9..d131f5def62c7 100644 --- a/tests/ui/imports/inaccessible_type_aliases.stderr +++ b/tests/ui/imports/inaccessible_type_aliases.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/inaccessible_type_aliases.rs:11:12 | LL | let x: Foo = 100; @@ -13,7 +13,7 @@ LL | type Foo = u64; LL | type Foo = u64; | ^^^^^^^^^^^^^^^ `b::Foo`: not accessible -error[E0412]: cannot find type `Bar` in this scope +error[E0412]: cannot find type `Bar` --> $DIR/inaccessible_type_aliases.rs:12:12 | LL | let y: Bar = 100; diff --git a/tests/ui/imports/issue-4366-2.rs b/tests/ui/imports/issue-4366-2.rs index c777b750252c2..9f243d879c327 100644 --- a/tests/ui/imports/issue-4366-2.rs +++ b/tests/ui/imports/issue-4366-2.rs @@ -13,7 +13,7 @@ mod a { pub mod sub { use a::b::*; fn sub() -> Bar { 1 } - //~^ ERROR cannot find type `Bar` in this scope + //~^ ERROR cannot find type `Bar` } } diff --git a/tests/ui/imports/issue-4366-2.stderr b/tests/ui/imports/issue-4366-2.stderr index 412423f4d595e..e96ff76d2c667 100644 --- a/tests/ui/imports/issue-4366-2.stderr +++ b/tests/ui/imports/issue-4366-2.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Bar` in this scope +error[E0412]: cannot find type `Bar` --> $DIR/issue-4366-2.rs:15:21 | LL | fn sub() -> Bar { 1 } diff --git a/tests/ui/imports/issue-4366.rs b/tests/ui/imports/issue-4366.rs index 9ec2e58ecadcb..aaec6c599d977 100644 --- a/tests/ui/imports/issue-4366.rs +++ b/tests/ui/imports/issue-4366.rs @@ -15,7 +15,7 @@ mod a { } pub mod sub { use a::b::*; - fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` in this scope + fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` } } diff --git a/tests/ui/imports/issue-4366.stderr b/tests/ui/imports/issue-4366.stderr index e63399d554ee3..35e5055d2d89c 100644 --- a/tests/ui/imports/issue-4366.stderr +++ b/tests/ui/imports/issue-4366.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/issue-4366.rs:18:29 | LL | fn sub() -> isize { foo(); 1 } diff --git a/tests/ui/imports/issue-59764.rs b/tests/ui/imports/issue-59764.rs index 5f7a496117a6a..12232eeef852d 100644 --- a/tests/ui/imports/issue-59764.rs +++ b/tests/ui/imports/issue-59764.rs @@ -131,5 +131,5 @@ makro!(bar); fn main() { bar(); - //~^ ERROR cannot find function `bar` in this scope [E0425] + //~^ ERROR cannot find function `bar` [E0425] } diff --git a/tests/ui/imports/issue-59764.stderr b/tests/ui/imports/issue-59764.stderr index 293c2a60d8033..c594002d3ff96 100644 --- a/tests/ui/imports/issue-59764.stderr +++ b/tests/ui/imports/issue-59764.stderr @@ -226,7 +226,7 @@ help: a macro with this name exists at the root of the crate LL | use issue_59764::makro; | ~~~~~~~~~~~~~~~~~~ -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/issue-59764.rs:133:5 | LL | bar(); diff --git a/tests/ui/issues-71798.rs b/tests/ui/issues-71798.rs index 14b6c0f35812f..500d137c3b85f 100644 --- a/tests/ui/issues-71798.rs +++ b/tests/ui/issues-71798.rs @@ -4,5 +4,5 @@ fn test_ref(x: &u32) -> impl std::future::Future + '_ { } fn main() { - let _ = test_ref & u; //~ ERROR cannot find value `u` in this scope + let _ = test_ref & u; //~ ERROR cannot find value `u` } diff --git a/tests/ui/issues-71798.stderr b/tests/ui/issues-71798.stderr index 52dd14ccb0a14..7911a0e039d0a 100644 --- a/tests/ui/issues-71798.stderr +++ b/tests/ui/issues-71798.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `u` in this scope +error[E0425]: cannot find value `u` --> $DIR/issues-71798.rs:7:24 | LL | let _ = test_ref & u; diff --git a/tests/ui/issues/issue-15167.rs b/tests/ui/issues/issue-15167.rs index a2653c10ea4f7..64828cc8cab2f 100644 --- a/tests/ui/issues/issue-15167.rs +++ b/tests/ui/issues/issue-15167.rs @@ -1,10 +1,10 @@ // macro f should not be able to inject a reference to 'n'. macro_rules! f { () => (n) } -//~^ ERROR cannot find value `n` in this scope -//~| ERROR cannot find value `n` in this scope -//~| ERROR cannot find value `n` in this scope -//~| ERROR cannot find value `n` in this scope +//~^ ERROR cannot find value `n` +//~| ERROR cannot find value `n` +//~| ERROR cannot find value `n` +//~| ERROR cannot find value `n` fn main() -> (){ for n in 0..1 { diff --git a/tests/ui/issues/issue-15167.stderr b/tests/ui/issues/issue-15167.stderr index 53082ea0ec6bb..88a9649b0bc99 100644 --- a/tests/ui/issues/issue-15167.stderr +++ b/tests/ui/issues/issue-15167.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `n` in this scope +error[E0425]: cannot find value `n` --> $DIR/issue-15167.rs:3:25 | LL | macro_rules! f { () => (n) } @@ -9,7 +9,7 @@ LL | println!("{}", f!()); | = note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `n` in this scope +error[E0425]: cannot find value `n` --> $DIR/issue-15167.rs:3:25 | LL | macro_rules! f { () => (n) } @@ -20,7 +20,7 @@ LL | println!("{}", f!()); | = note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `n` in this scope +error[E0425]: cannot find value `n` --> $DIR/issue-15167.rs:3:25 | LL | macro_rules! f { () => (n) } @@ -31,7 +31,7 @@ LL | println!("{}", f!()); | = note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `n` in this scope +error[E0425]: cannot find value `n` --> $DIR/issue-15167.rs:3:25 | LL | macro_rules! f { () => (n) } diff --git a/tests/ui/issues/issue-18058.rs b/tests/ui/issues/issue-18058.rs index cced66717e1bf..959359c7ccd6c 100644 --- a/tests/ui/issues/issue-18058.rs +++ b/tests/ui/issues/issue-18058.rs @@ -1,4 +1,4 @@ impl Undefined {} -//~^ ERROR cannot find type `Undefined` in this scope +//~^ ERROR cannot find type `Undefined` fn main() {} diff --git a/tests/ui/issues/issue-18058.stderr b/tests/ui/issues/issue-18058.stderr index c880bb0029192..2415ca371b7ed 100644 --- a/tests/ui/issues/issue-18058.stderr +++ b/tests/ui/issues/issue-18058.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Undefined` in this scope +error[E0412]: cannot find type `Undefined` --> $DIR/issue-18058.rs:1:6 | LL | impl Undefined {} diff --git a/tests/ui/issues/issue-19734.rs b/tests/ui/issues/issue-19734.rs index fe4a327aef49c..7b8394982290e 100644 --- a/tests/ui/issues/issue-19734.rs +++ b/tests/ui/issues/issue-19734.rs @@ -4,5 +4,5 @@ struct Type; impl Type { undef!(); - //~^ ERROR cannot find macro `undef` in this scope + //~^ ERROR cannot find macro `undef` } diff --git a/tests/ui/issues/issue-2281-part1.rs b/tests/ui/issues/issue-2281-part1.rs index 8340ade2239d1..a44fabaf47996 100644 --- a/tests/ui/issues/issue-2281-part1.rs +++ b/tests/ui/issues/issue-2281-part1.rs @@ -1 +1 @@ -fn main() { println!("{}", foobar); } //~ ERROR cannot find value `foobar` in this scope +fn main() { println!("{}", foobar); } //~ ERROR cannot find value `foobar` diff --git a/tests/ui/issues/issue-2281-part1.stderr b/tests/ui/issues/issue-2281-part1.stderr index 47a1ef8cc0277..ae1a6289b0bc0 100644 --- a/tests/ui/issues/issue-2281-part1.stderr +++ b/tests/ui/issues/issue-2281-part1.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `foobar` in this scope +error[E0425]: cannot find value `foobar` --> $DIR/issue-2281-part1.rs:1:28 | LL | fn main() { println!("{}", foobar); } diff --git a/tests/ui/issues/issue-30589.rs b/tests/ui/issues/issue-30589.rs index 94eb5839958af..eb89925901ab6 100644 --- a/tests/ui/issues/issue-30589.rs +++ b/tests/ui/issues/issue-30589.rs @@ -1,6 +1,6 @@ use std::fmt; -impl fmt::Display for DecoderError { //~ ERROR cannot find type `DecoderError` in this scope +impl fmt::Display for DecoderError { //~ ERROR cannot find type `DecoderError` fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Missing data: {}", self.0) } diff --git a/tests/ui/issues/issue-30589.stderr b/tests/ui/issues/issue-30589.stderr index 6f97a189cead9..fc74ec29ee5ef 100644 --- a/tests/ui/issues/issue-30589.stderr +++ b/tests/ui/issues/issue-30589.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `DecoderError` in this scope +error[E0412]: cannot find type `DecoderError` --> $DIR/issue-30589.rs:3:23 | LL | impl fmt::Display for DecoderError { diff --git a/tests/ui/issues/issue-32655.rs b/tests/ui/issues/issue-32655.rs index f52e092312968..f6b631d721ae1 100644 --- a/tests/ui/issues/issue-32655.rs +++ b/tests/ui/issues/issue-32655.rs @@ -1,6 +1,6 @@ macro_rules! foo ( () => ( - #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` in this scope + #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` struct T; ); ); @@ -12,7 +12,7 @@ macro_rules! bar ( foo!(); bar!( - #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` in this scope + #[derive_Clone] //~ ERROR cannot find attribute `derive_Clone` struct S; ); diff --git a/tests/ui/issues/issue-32950.rs b/tests/ui/issues/issue-32950.rs index 27d68a11c1f16..18b45ca632bc1 100644 --- a/tests/ui/issues/issue-32950.rs +++ b/tests/ui/issues/issue-32950.rs @@ -3,7 +3,7 @@ #[derive(Debug)] struct Baz( concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros - //~^ ERROR cannot find type `FooBar` in this scope + //~^ ERROR cannot find type `FooBar` ); fn main() {} diff --git a/tests/ui/issues/issue-32950.stderr b/tests/ui/issues/issue-32950.stderr index f6635d982e4ec..eb4d79cd0d645 100644 --- a/tests/ui/issues/issue-32950.stderr +++ b/tests/ui/issues/issue-32950.stderr @@ -4,7 +4,7 @@ error: `derive` cannot be used on items with type macros LL | concat_idents!(Foo, Bar) | ^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0412]: cannot find type `FooBar` in this scope +error[E0412]: cannot find type `FooBar` --> $DIR/issue-32950.rs:5:5 | LL | concat_idents!(Foo, Bar) diff --git a/tests/ui/issues/issue-33525.stderr b/tests/ui/issues/issue-33525.stderr index ee9f4d4c3016d..5112acf81fcf2 100644 --- a/tests/ui/issues/issue-33525.stderr +++ b/tests/ui/issues/issue-33525.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/issue-33525.rs:2:5 | LL | a; diff --git a/tests/ui/issues/issue-33571.rs b/tests/ui/issues/issue-33571.rs index 2713f47ad2ff6..c452b14e98616 100644 --- a/tests/ui/issues/issue-33571.rs +++ b/tests/ui/issues/issue-33571.rs @@ -1,6 +1,6 @@ #[derive(Clone, - Sync, //~ ERROR cannot find derive macro `Sync` in this scope - //~| ERROR cannot find derive macro `Sync` in this scope + Sync, //~ ERROR cannot find derive macro `Sync` + //~| ERROR cannot find derive macro `Sync` Copy)] enum Foo {} diff --git a/tests/ui/issues/issue-36836.rs b/tests/ui/issues/issue-36836.rs index 99c56213153e4..67597a779d052 100644 --- a/tests/ui/issues/issue-36836.rs +++ b/tests/ui/issues/issue-36836.rs @@ -10,6 +10,6 @@ trait Foo {} -impl Foo for Bar {} //~ ERROR cannot find type `Bar` in this scope +impl Foo for Bar {} //~ ERROR cannot find type `Bar` fn main() {} diff --git a/tests/ui/issues/issue-36836.stderr b/tests/ui/issues/issue-36836.stderr index e5c943c7c3d82..54b06df601228 100644 --- a/tests/ui/issues/issue-36836.stderr +++ b/tests/ui/issues/issue-36836.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Bar` in this scope +error[E0412]: cannot find type `Bar` --> $DIR/issue-36836.rs:13:17 | LL | impl Foo for Bar {} diff --git a/tests/ui/issues/issue-40845.rs b/tests/ui/issues/issue-40845.rs index a4ede6adfa3c2..76bbcca621001 100644 --- a/tests/ui/issues/issue-40845.rs +++ b/tests/ui/issues/issue-40845.rs @@ -1,6 +1,6 @@ -trait T { m!(); } //~ ERROR cannot find macro `m` in this scope +trait T { m!(); } //~ ERROR cannot find macro `m` struct S; -impl S { m!(); } //~ ERROR cannot find macro `m` in this scope +impl S { m!(); } //~ ERROR cannot find macro `m` fn main() {} diff --git a/tests/ui/issues/issue-46332.rs b/tests/ui/issues/issue-46332.rs index bed74e3138a66..c4af03438ed82 100644 --- a/tests/ui/issues/issue-46332.rs +++ b/tests/ui/issues/issue-46332.rs @@ -7,5 +7,5 @@ struct TyInt {} fn main() { TyUInt {}; - //~^ ERROR cannot find struct, variant or union type `TyUInt` in this scope + //~^ ERROR cannot find struct, variant or union type `TyUInt` } diff --git a/tests/ui/issues/issue-46332.stderr b/tests/ui/issues/issue-46332.stderr index 8c0c1dfa6ee86..6ea4d49df0232 100644 --- a/tests/ui/issues/issue-46332.stderr +++ b/tests/ui/issues/issue-46332.stderr @@ -1,4 +1,4 @@ -error[E0422]: cannot find struct, variant or union type `TyUInt` in this scope +error[E0422]: cannot find struct, variant or union type `TyUInt` --> $DIR/issue-46332.rs:9:5 | LL | struct TyUint {} diff --git a/tests/ui/issues/issue-53300.rs b/tests/ui/issues/issue-53300.rs index 09f0fe9d93553..39f746dc676e5 100644 --- a/tests/ui/issues/issue-53300.rs +++ b/tests/ui/issues/issue-53300.rs @@ -5,7 +5,7 @@ pub trait A { } fn addition() -> Wrapper {} -//~^ ERROR cannot find type `Wrapper` in this scope [E0412] +//~^ ERROR cannot find type `Wrapper` [E0412] fn main() { let res = addition(); diff --git a/tests/ui/issues/issue-53300.stderr b/tests/ui/issues/issue-53300.stderr index 293465ecb8140..ae35822dd9bdb 100644 --- a/tests/ui/issues/issue-53300.stderr +++ b/tests/ui/issues/issue-53300.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Wrapper` in this scope +error[E0412]: cannot find type `Wrapper` --> $DIR/issue-53300.rs:7:18 | LL | fn addition() -> Wrapper {} diff --git a/tests/ui/issues/issue-58712.rs b/tests/ui/issues/issue-58712.rs index 930bec6889bce..1ec787819d893 100644 --- a/tests/ui/issues/issue-58712.rs +++ b/tests/ui/issues/issue-58712.rs @@ -4,9 +4,9 @@ struct AddrVec { } impl AddrVec { - //~^ ERROR cannot find type `DeviceId` in this scope + //~^ ERROR cannot find type `DeviceId` pub fn device(&self) -> DeviceId { - //~^ ERROR cannot find type `DeviceId` in this scope + //~^ ERROR cannot find type `DeviceId` self.tail() } } diff --git a/tests/ui/issues/issue-58712.stderr b/tests/ui/issues/issue-58712.stderr index f4bd4d1e826a0..79615510afb78 100644 --- a/tests/ui/issues/issue-58712.stderr +++ b/tests/ui/issues/issue-58712.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `DeviceId` in this scope +error[E0412]: cannot find type `DeviceId` --> $DIR/issue-58712.rs:6:20 | LL | impl AddrVec { @@ -9,7 +9,7 @@ help: you might be missing a type parameter LL | impl AddrVec { | ++++++++++ -error[E0412]: cannot find type `DeviceId` in this scope +error[E0412]: cannot find type `DeviceId` --> $DIR/issue-58712.rs:8:29 | LL | pub fn device(&self) -> DeviceId { diff --git a/tests/ui/issues/issue-72839-error-overflow.stderr b/tests/ui/issues/issue-72839-error-overflow.stderr index 35be632f57975..fa6801086d3a4 100644 --- a/tests/ui/issues/issue-72839-error-overflow.stderr +++ b/tests/ui/issues/issue-72839-error-overflow.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `missing_var` in this scope +error[E0425]: cannot find value `missing_var` --> $DIR/issue-72839-error-overflow.rs:18:8 | LL | if missing_var % 8 == 0 {} diff --git a/tests/ui/issues/issue-77919.rs b/tests/ui/issues/issue-77919.rs index bf603314977f9..1fbf5418f45a3 100644 --- a/tests/ui/issues/issue-77919.rs +++ b/tests/ui/issues/issue-77919.rs @@ -6,8 +6,8 @@ trait TypeVal { } struct Five; struct Multiply { - _n: PhantomData, //~ ERROR cannot find type `PhantomData` in this scope + _n: PhantomData, //~ ERROR cannot find type `PhantomData` } impl TypeVal for Multiply where N: TypeVal {} -//~^ ERROR cannot find type `VAL` in this scope +//~^ ERROR cannot find type `VAL` //~| ERROR not all trait items implemented diff --git a/tests/ui/issues/issue-77919.stderr b/tests/ui/issues/issue-77919.stderr index dbbe70ff06990..a3e8fddec6372 100644 --- a/tests/ui/issues/issue-77919.stderr +++ b/tests/ui/issues/issue-77919.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `PhantomData` in this scope +error[E0412]: cannot find type `PhantomData` --> $DIR/issue-77919.rs:9:9 | LL | _n: PhantomData, @@ -9,7 +9,7 @@ help: consider importing this struct LL + use std::marker::PhantomData; | -error[E0412]: cannot find type `VAL` in this scope +error[E0412]: cannot find type `VAL` --> $DIR/issue-77919.rs:11:63 | LL | impl TypeVal for Multiply where N: TypeVal {} diff --git a/tests/ui/issues/issue-86756.rs b/tests/ui/issues/issue-86756.rs index 7f864eb285074..1a181754f8e64 100644 --- a/tests/ui/issues/issue-86756.rs +++ b/tests/ui/issues/issue-86756.rs @@ -3,7 +3,7 @@ trait Foo {} fn eq() { eq:: - //~^ ERROR cannot find type `dyn` in this scope + //~^ ERROR cannot find type `dyn` //~| ERROR missing generics for trait `Foo` //~| WARN trait objects without an explicit `dyn` are deprecated //~| WARN this is accepted in the current edition diff --git a/tests/ui/issues/issue-86756.stderr b/tests/ui/issues/issue-86756.stderr index d0906a6fa74f4..8556dc37b5215 100644 --- a/tests/ui/issues/issue-86756.stderr +++ b/tests/ui/issues/issue-86756.stderr @@ -6,7 +6,7 @@ LL | trait Foo {} | | | first use of `T` -error[E0412]: cannot find type `dyn` in this scope +error[E0412]: cannot find type `dyn` --> $DIR/issue-86756.rs:5:10 | LL | eq:: diff --git a/tests/ui/issues/issue-8767.rs b/tests/ui/issues/issue-8767.rs index 972101a0bc3ee..806e8e7213243 100644 --- a/tests/ui/issues/issue-8767.rs +++ b/tests/ui/issues/issue-8767.rs @@ -1,4 +1,4 @@ -impl B { //~ ERROR cannot find type `B` in this scope +impl B { //~ ERROR cannot find type `B` } fn main() { diff --git a/tests/ui/issues/issue-8767.stderr b/tests/ui/issues/issue-8767.stderr index 66141628e28d2..95058e03d8b47 100644 --- a/tests/ui/issues/issue-8767.stderr +++ b/tests/ui/issues/issue-8767.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `B` in this scope +error[E0412]: cannot find type `B` --> $DIR/issue-8767.rs:1:6 | LL | impl B { diff --git a/tests/ui/keyword/keyword-self-as-identifier.rs b/tests/ui/keyword/keyword-self-as-identifier.rs index 72e4f01e21edd..712d0b462b24b 100644 --- a/tests/ui/keyword/keyword-self-as-identifier.rs +++ b/tests/ui/keyword/keyword-self-as-identifier.rs @@ -1,3 +1,3 @@ fn main() { - let Self = 22; //~ ERROR cannot find unit struct, unit variant or constant `Self` in this scope + let Self = 22; //~ ERROR cannot find unit struct, unit variant or constant `Self` } diff --git a/tests/ui/keyword/keyword-self-as-identifier.stderr b/tests/ui/keyword/keyword-self-as-identifier.stderr index 098ef8d82a04f..12bfa6121fb04 100644 --- a/tests/ui/keyword/keyword-self-as-identifier.stderr +++ b/tests/ui/keyword/keyword-self-as-identifier.stderr @@ -1,4 +1,4 @@ -error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope +error[E0531]: cannot find unit struct, unit variant or constant `Self` --> $DIR/keyword-self-as-identifier.rs:2:9 | LL | let Self = 22; diff --git a/tests/ui/label/label_misspelled.rs b/tests/ui/label/label_misspelled.rs index e3180b06ecb2b..2134d9bfe6751 100644 --- a/tests/ui/label/label_misspelled.rs +++ b/tests/ui/label/label_misspelled.rs @@ -4,41 +4,41 @@ fn main() { 'while_loop: while true { //~ WARN denote infinite loops with //~^ WARN unused label while_loop; - //~^ ERROR cannot find value `while_loop` in this scope + //~^ ERROR cannot find value `while_loop` }; 'while_let: while let Some(_) = Some(()) { //~^ WARN unused label while_let; - //~^ ERROR cannot find value `while_let` in this scope + //~^ ERROR cannot find value `while_let` } 'for_loop: for _ in 0..3 { //~^ WARN unused label for_loop; - //~^ ERROR cannot find value `for_loop` in this scope + //~^ ERROR cannot find value `for_loop` }; 'LOOP: loop { //~^ WARN unused label LOOP; - //~^ ERROR cannot find value `LOOP` in this scope + //~^ ERROR cannot find value `LOOP` }; } fn foo() { 'LOOP: loop { break LOOP; - //~^ ERROR cannot find value `LOOP` in this scope + //~^ ERROR cannot find value `LOOP` }; 'while_loop: while true { //~ WARN denote infinite loops with break while_loop; - //~^ ERROR cannot find value `while_loop` in this scope + //~^ ERROR cannot find value `while_loop` }; 'while_let: while let Some(_) = Some(()) { break while_let; - //~^ ERROR cannot find value `while_let` in this scope + //~^ ERROR cannot find value `while_let` } 'for_loop: for _ in 0..3 { break for_loop; - //~^ ERROR cannot find value `for_loop` in this scope + //~^ ERROR cannot find value `for_loop` }; } diff --git a/tests/ui/label/label_misspelled.stderr b/tests/ui/label/label_misspelled.stderr index 4b5b9e92ca09a..0e0b3174bc379 100644 --- a/tests/ui/label/label_misspelled.stderr +++ b/tests/ui/label/label_misspelled.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `while_loop` in this scope +error[E0425]: cannot find value `while_loop` --> $DIR/label_misspelled.rs:6:9 | LL | 'while_loop: while true { @@ -7,7 +7,7 @@ LL | LL | while_loop; | ^^^^^^^^^^ not found in this scope -error[E0425]: cannot find value `while_let` in this scope +error[E0425]: cannot find value `while_let` --> $DIR/label_misspelled.rs:11:9 | LL | 'while_let: while let Some(_) = Some(()) { @@ -16,7 +16,7 @@ LL | LL | while_let; | ^^^^^^^^^ not found in this scope -error[E0425]: cannot find value `for_loop` in this scope +error[E0425]: cannot find value `for_loop` --> $DIR/label_misspelled.rs:16:9 | LL | 'for_loop: for _ in 0..3 { @@ -25,7 +25,7 @@ LL | LL | for_loop; | ^^^^^^^^ not found in this scope -error[E0425]: cannot find value `LOOP` in this scope +error[E0425]: cannot find value `LOOP` --> $DIR/label_misspelled.rs:21:9 | LL | 'LOOP: loop { @@ -34,7 +34,7 @@ LL | LL | LOOP; | ^^^^ not found in this scope -error[E0425]: cannot find value `LOOP` in this scope +error[E0425]: cannot find value `LOOP` --> $DIR/label_misspelled.rs:28:15 | LL | 'LOOP: loop { @@ -45,7 +45,7 @@ LL | break LOOP; | not found in this scope | help: use the similarly named label: `'LOOP` -error[E0425]: cannot find value `while_loop` in this scope +error[E0425]: cannot find value `while_loop` --> $DIR/label_misspelled.rs:32:15 | LL | 'while_loop: while true { @@ -56,7 +56,7 @@ LL | break while_loop; | not found in this scope | help: use the similarly named label: `'while_loop` -error[E0425]: cannot find value `while_let` in this scope +error[E0425]: cannot find value `while_let` --> $DIR/label_misspelled.rs:36:15 | LL | 'while_let: while let Some(_) = Some(()) { @@ -67,7 +67,7 @@ LL | break while_let; | not found in this scope | help: use the similarly named label: `'while_let` -error[E0425]: cannot find value `for_loop` in this scope +error[E0425]: cannot find value `for_loop` --> $DIR/label_misspelled.rs:40:15 | LL | 'for_loop: for _ in 0..3 { diff --git a/tests/ui/label/label_misspelled_2.rs b/tests/ui/label/label_misspelled_2.rs index 55bbe6b30a593..92e2ad9df6c1f 100644 --- a/tests/ui/label/label_misspelled_2.rs +++ b/tests/ui/label/label_misspelled_2.rs @@ -5,12 +5,12 @@ fn main() { break 'a; } 'b: for _ in 0..1 { - break b; //~ ERROR cannot find value `b` in this scope + break b; //~ ERROR cannot find value `b` } c: for _ in 0..1 { //~ ERROR malformed loop label break 'c; } d: for _ in 0..1 { //~ ERROR malformed loop label - break d; //~ ERROR cannot find value `d` in this scope + break d; //~ ERROR cannot find value `d` } } diff --git a/tests/ui/label/label_misspelled_2.stderr b/tests/ui/label/label_misspelled_2.stderr index 960646d9894d1..cf0e5cf4f93ac 100644 --- a/tests/ui/label/label_misspelled_2.stderr +++ b/tests/ui/label/label_misspelled_2.stderr @@ -10,7 +10,7 @@ error: malformed loop label LL | d: for _ in 0..1 { | ^ help: use the correct loop label format: `'d` -error[E0425]: cannot find value `b` in this scope +error[E0425]: cannot find value `b` --> $DIR/label_misspelled_2.rs:8:15 | LL | 'b: for _ in 0..1 { @@ -21,7 +21,7 @@ LL | break b; | not found in this scope | help: use the similarly named label: `'b` -error[E0425]: cannot find value `d` in this scope +error[E0425]: cannot find value `d` --> $DIR/label_misspelled_2.rs:14:15 | LL | d: for _ in 0..1 { diff --git a/tests/ui/lang-items/issue-83471.stderr b/tests/ui/lang-items/issue-83471.stderr index 244b2efeaf1e0..99e0f37e82499 100644 --- a/tests/ui/lang-items/issue-83471.stderr +++ b/tests/ui/lang-items/issue-83471.stderr @@ -41,7 +41,7 @@ LL | #[lang = "fn"] LL | trait Fn { | - this trait has 0 generic arguments -error[E0425]: cannot find function `a` in this scope +error[E0425]: cannot find function `a` --> $DIR/issue-83471.rs:21:5 | LL | a() diff --git a/tests/ui/layout/cannot-transmute-unnormalizable-type.rs b/tests/ui/layout/cannot-transmute-unnormalizable-type.rs index d2b6e1d8eba66..f7215dff2dd24 100644 --- a/tests/ui/layout/cannot-transmute-unnormalizable-type.rs +++ b/tests/ui/layout/cannot-transmute-unnormalizable-type.rs @@ -5,7 +5,7 @@ trait Trait { impl Trait for () where Missing: Trait, - //~^ ERROR cannot find type `Missing` in this scope + //~^ ERROR cannot find type `Missing` { type RefTarget = (); } diff --git a/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr b/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr index dd5119318ff4b..d562a588afc02 100644 --- a/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr +++ b/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/cannot-transmute-unnormalizable-type.rs:7:5 | LL | Missing: Trait, diff --git a/tests/ui/layout/issue-84108.rs b/tests/ui/layout/issue-84108.rs index 974d5310f6bb8..6b086df248f8d 100644 --- a/tests/ui/layout/issue-84108.rs +++ b/tests/ui/layout/issue-84108.rs @@ -4,10 +4,10 @@ #![crate_type = "lib"] static FOO: (dyn AsRef, u8) = ("hello", 42); -//~^ ERROR cannot find type `OsStr` in this scope +//~^ ERROR cannot find type `OsStr` const BAR: (&Path, [u8], usize) = ("hello", [], 42); -//~^ ERROR cannot find type `Path` in this scope +//~^ ERROR cannot find type `Path` //~| ERROR the size for values of type `[u8]` cannot be known at compilation time //~| ERROR the size for values of type `[u8]` cannot be known at compilation time //~| ERROR mismatched types diff --git a/tests/ui/layout/issue-84108.stderr b/tests/ui/layout/issue-84108.stderr index 8ddce285e23f8..07bdc6db686b1 100644 --- a/tests/ui/layout/issue-84108.stderr +++ b/tests/ui/layout/issue-84108.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `OsStr` in this scope +error[E0412]: cannot find type `OsStr` --> $DIR/issue-84108.rs:6:24 | LL | static FOO: (dyn AsRef, u8) = ("hello", 42); @@ -9,7 +9,7 @@ help: consider importing this struct LL + use std::ffi::OsStr; | -error[E0412]: cannot find type `Path` in this scope +error[E0412]: cannot find type `Path` --> $DIR/issue-84108.rs:9:14 | LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42); diff --git a/tests/ui/layout/malformed-unsized-type-in-union.rs b/tests/ui/layout/malformed-unsized-type-in-union.rs index 5d8ec576cf01b..2f04f74e5acac 100644 --- a/tests/ui/layout/malformed-unsized-type-in-union.rs +++ b/tests/ui/layout/malformed-unsized-type-in-union.rs @@ -1,7 +1,7 @@ // issue: 113760 union W { s: dyn Iterator } -//~^ ERROR cannot find type `Missing` in this scope +//~^ ERROR cannot find type `Missing` static ONCE: W = todo!(); diff --git a/tests/ui/layout/malformed-unsized-type-in-union.stderr b/tests/ui/layout/malformed-unsized-type-in-union.stderr index ad4f0cda19e5c..a2adb38cc1501 100644 --- a/tests/ui/layout/malformed-unsized-type-in-union.stderr +++ b/tests/ui/layout/malformed-unsized-type-in-union.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/malformed-unsized-type-in-union.rs:3:34 | LL | union W { s: dyn Iterator } diff --git a/tests/ui/layout/transmute-to-tail-with-err.rs b/tests/ui/layout/transmute-to-tail-with-err.rs index 6753ce15ed158..41f0f1d4cde0e 100644 --- a/tests/ui/layout/transmute-to-tail-with-err.rs +++ b/tests/ui/layout/transmute-to-tail-with-err.rs @@ -1,7 +1,7 @@ trait Trait {} struct Bar(Box>); -//~^ ERROR cannot find type `T` in this scope +//~^ ERROR cannot find type `T` fn main() { let x: Bar = unsafe { std::mem::transmute(()) }; diff --git a/tests/ui/layout/transmute-to-tail-with-err.stderr b/tests/ui/layout/transmute-to-tail-with-err.stderr index 433c6b38d0b42..aeb47186eb1db 100644 --- a/tests/ui/layout/transmute-to-tail-with-err.stderr +++ b/tests/ui/layout/transmute-to-tail-with-err.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/transmute-to-tail-with-err.rs:3:26 | LL | struct Bar(Box>); diff --git a/tests/ui/let-else/let-else-scope.rs b/tests/ui/let-else/let-else-scope.rs index 78a67769ef284..40d7d35e01b9c 100644 --- a/tests/ui/let-else/let-else-scope.rs +++ b/tests/ui/let-else/let-else-scope.rs @@ -1,5 +1,5 @@ fn main() { let Some(x) = Some(2) else { - panic!("{}", x); //~ ERROR cannot find value `x` in this scope + panic!("{}", x); //~ ERROR cannot find value `x` }; } diff --git a/tests/ui/let-else/let-else-scope.stderr b/tests/ui/let-else/let-else-scope.stderr index 335ee3dfb1ea7..2f8a99ddabb64 100644 --- a/tests/ui/let-else/let-else-scope.stderr +++ b/tests/ui/let-else/let-else-scope.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/let-else-scope.rs:3:22 | LL | panic!("{}", x); diff --git a/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr index e57933da558fd..bdeb4a62ed9d3 100644 --- a/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr +++ b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr @@ -6,7 +6,7 @@ LL | static STATIC_VAR_FIVE: &One(); | | | help: provide a definition for the static: `= ;` -error[E0412]: cannot find type `One` in this scope +error[E0412]: cannot find type `One` --> $DIR/issue-83907-invalid-fn-like-path.rs:3:26 | LL | static STATIC_VAR_FIVE: &One(); diff --git a/tests/ui/lint/internal/trivial-diagnostics.stderr b/tests/ui/lint/internal/trivial-diagnostics.stderr index d47a7dae023e2..233d24c49e806 100644 --- a/tests/ui/lint/internal/trivial-diagnostics.stderr +++ b/tests/ui/lint/internal/trivial-diagnostics.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `msg` in this scope +error[E0425]: cannot find value `msg` --> $DIR/trivial-diagnostics.rs:4:21 | LL | struct_span_err(msg).emit(); | ^^^ not found in this scope -error[E0425]: cannot find function `struct_span_err` in this scope +error[E0425]: cannot find function `struct_span_err` --> $DIR/trivial-diagnostics.rs:4:5 | LL | struct_span_err(msg).emit(); diff --git a/tests/ui/lint/issue-35075.rs b/tests/ui/lint/issue-35075.rs index 0e54131c24560..c1b2b0c3a8018 100644 --- a/tests/ui/lint/issue-35075.rs +++ b/tests/ui/lint/issue-35075.rs @@ -1,9 +1,9 @@ struct Bar { - inner: Foo //~ ERROR cannot find type `Foo` in this scope + inner: Foo //~ ERROR cannot find type `Foo` } enum Baz { - Foo(Foo) //~ ERROR cannot find type `Foo` in this scope + Foo(Foo) //~ ERROR cannot find type `Foo` } fn main() {} diff --git a/tests/ui/lint/issue-35075.stderr b/tests/ui/lint/issue-35075.stderr index 08bdaa728583d..1fe6a0efa99a3 100644 --- a/tests/ui/lint/issue-35075.stderr +++ b/tests/ui/lint/issue-35075.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/issue-35075.rs:2:12 | LL | inner: Foo @@ -9,7 +9,7 @@ help: there is an enum variant `Baz::Foo`; try using the variant's enum LL | inner: Baz | ~~~ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/issue-35075.rs:6:9 | LL | Foo(Foo) diff --git a/tests/ui/lint/recommend-literal.rs b/tests/ui/lint/recommend-literal.rs index 453cbf28569e9..da79ff9c38adf 100644 --- a/tests/ui/lint/recommend-literal.rs +++ b/tests/ui/lint/recommend-literal.rs @@ -1,42 +1,42 @@ type Real = double; -//~^ ERROR cannot find type `double` in this scope +//~^ ERROR cannot find type `double` //~| HELP perhaps you intended to use this type fn main() { let x: Real = 3.5; let y: long = 74802374902374923; - //~^ ERROR cannot find type `long` in this scope + //~^ ERROR cannot find type `long` //~| HELP perhaps you intended to use this type let v1: Boolean = true; - //~^ ERROR: cannot find type `Boolean` in this scope [E0412] + //~^ ERROR: cannot find type `Boolean` [E0412] //~| HELP perhaps you intended to use this type let v2: Bool = true; - //~^ ERROR: cannot find type `Bool` in this scope [E0412] + //~^ ERROR: cannot find type `Bool` [E0412] //~| HELP a builtin type with a similar name exists //~| HELP perhaps you intended to use this type } fn z(a: boolean) { - //~^ ERROR cannot find type `boolean` in this scope + //~^ ERROR cannot find type `boolean` //~| HELP perhaps you intended to use this type } fn a() -> byte { -//~^ ERROR cannot find type `byte` in this scope +//~^ ERROR cannot find type `byte` //~| HELP perhaps you intended to use this type 3 } struct Data { //~ HELP you might be missing a type parameter width: float, - //~^ ERROR cannot find type `float` in this scope + //~^ ERROR cannot find type `float` //~| HELP perhaps you intended to use this type depth: Option, - //~^ ERROR cannot find type `int` in this scope + //~^ ERROR cannot find type `int` //~| HELP perhaps you intended to use this type } trait Stuff {} impl Stuff for short {} -//~^ ERROR cannot find type `short` in this scope +//~^ ERROR cannot find type `short` //~| HELP perhaps you intended to use this type diff --git a/tests/ui/lint/recommend-literal.stderr b/tests/ui/lint/recommend-literal.stderr index 424ecadd4b8cc..185298f21e321 100644 --- a/tests/ui/lint/recommend-literal.stderr +++ b/tests/ui/lint/recommend-literal.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `double` in this scope +error[E0412]: cannot find type `double` --> $DIR/recommend-literal.rs:1:13 | LL | type Real = double; @@ -7,7 +7,7 @@ LL | type Real = double; | not found in this scope | help: perhaps you intended to use this type: `f64` -error[E0412]: cannot find type `long` in this scope +error[E0412]: cannot find type `long` --> $DIR/recommend-literal.rs:7:12 | LL | let y: long = 74802374902374923; @@ -16,7 +16,7 @@ LL | let y: long = 74802374902374923; | not found in this scope | help: perhaps you intended to use this type: `i64` -error[E0412]: cannot find type `Boolean` in this scope +error[E0412]: cannot find type `Boolean` --> $DIR/recommend-literal.rs:10:13 | LL | let v1: Boolean = true; @@ -25,7 +25,7 @@ LL | let v1: Boolean = true; | not found in this scope | help: perhaps you intended to use this type: `bool` -error[E0412]: cannot find type `Bool` in this scope +error[E0412]: cannot find type `Bool` --> $DIR/recommend-literal.rs:13:13 | LL | let v2: Bool = true; @@ -40,7 +40,7 @@ help: perhaps you intended to use this type LL | let v2: bool = true; | ~~~~ -error[E0412]: cannot find type `boolean` in this scope +error[E0412]: cannot find type `boolean` --> $DIR/recommend-literal.rs:19:9 | LL | fn z(a: boolean) { @@ -49,7 +49,7 @@ LL | fn z(a: boolean) { | not found in this scope | help: perhaps you intended to use this type: `bool` -error[E0412]: cannot find type `byte` in this scope +error[E0412]: cannot find type `byte` --> $DIR/recommend-literal.rs:24:11 | LL | fn a() -> byte { @@ -58,7 +58,7 @@ LL | fn a() -> byte { | not found in this scope | help: perhaps you intended to use this type: `u8` -error[E0412]: cannot find type `float` in this scope +error[E0412]: cannot find type `float` --> $DIR/recommend-literal.rs:31:12 | LL | width: float, @@ -67,7 +67,7 @@ LL | width: float, | not found in this scope | help: perhaps you intended to use this type: `f32` -error[E0412]: cannot find type `int` in this scope +error[E0412]: cannot find type `int` --> $DIR/recommend-literal.rs:34:19 | LL | depth: Option, @@ -82,7 +82,7 @@ help: you might be missing a type parameter LL | struct Data { | +++++ -error[E0412]: cannot find type `short` in this scope +error[E0412]: cannot find type `short` --> $DIR/recommend-literal.rs:40:16 | LL | impl Stuff for short {} diff --git a/tests/ui/lint/use_suggestion_json.stderr b/tests/ui/lint/use_suggestion_json.stderr index 4683e5dd8f3c2..6ab129e287a8d 100644 --- a/tests/ui/lint/use_suggestion_json.stderr +++ b/tests/ui/lint/use_suggestion_json.stderr @@ -1,6 +1,6 @@ { "$message_type": "diagnostic", - "message": "cannot find type `Iter` in this scope", + "message": "cannot find type `Iter`", "code": { "code": "E0412", "explanation": "A used type name is not in scope. @@ -380,7 +380,7 @@ mod foo { "rendered": null } ], - "rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `Iter` in this scope\u001b[0m + "rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `Iter`\u001b[0m \u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m$DIR/use_suggestion_json.rs:12:12\u001b[0m \u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m \u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let x: Iter;\u001b[0m diff --git a/tests/ui/loops/loop-break-value.rs b/tests/ui/loops/loop-break-value.rs index d509fc1657054..ad7e943159ba6 100644 --- a/tests/ui/loops/loop-break-value.rs +++ b/tests/ui/loops/loop-break-value.rs @@ -97,7 +97,7 @@ fn main() { 'LOOP: for _ in 0 .. 9 { break LOOP; - //~^ ERROR cannot find value `LOOP` in this scope + //~^ ERROR cannot find value `LOOP` } let _ = 'a: loop { diff --git a/tests/ui/loops/loop-break-value.stderr b/tests/ui/loops/loop-break-value.stderr index 0912bdbb221ec..f5a8c38a0bedb 100644 --- a/tests/ui/loops/loop-break-value.stderr +++ b/tests/ui/loops/loop-break-value.stderr @@ -16,7 +16,7 @@ LL | break; LL | let _ = 'a: loop { | ^^ label `'a` already in scope -error[E0425]: cannot find value `LOOP` in this scope +error[E0425]: cannot find value `LOOP` --> $DIR/loop-break-value.rs:99:15 | LL | 'LOOP: for _ in 0 .. 9 { diff --git a/tests/ui/lowering/span-bug-issue-121431.rs b/tests/ui/lowering/span-bug-issue-121431.rs index b855577bcfbff..0a54b523be720 100644 --- a/tests/ui/lowering/span-bug-issue-121431.rs +++ b/tests/ui/lowering/span-bug-issue-121431.rs @@ -1,4 +1,4 @@ fn bug() -> impl CallbackMarker< Item = [(); { |_: &mut ()| 3; 4 }] > {} -//~^ ERROR cannot find trait `CallbackMarker` in this scope +//~^ ERROR cannot find trait `CallbackMarker` fn main() {} diff --git a/tests/ui/lowering/span-bug-issue-121431.stderr b/tests/ui/lowering/span-bug-issue-121431.stderr index 595500b580640..adbe09b2d55b0 100644 --- a/tests/ui/lowering/span-bug-issue-121431.stderr +++ b/tests/ui/lowering/span-bug-issue-121431.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `CallbackMarker` in this scope +error[E0405]: cannot find trait `CallbackMarker` --> $DIR/span-bug-issue-121431.rs:1:21 | LL | fn bug() -> impl CallbackMarker< Item = [(); { |_: &mut ()| 3; 4 }] > {} diff --git a/tests/ui/macros/defined-later-issue-121061-2.rs b/tests/ui/macros/defined-later-issue-121061-2.rs index 3db76c281ec87..cde369a47491d 100644 --- a/tests/ui/macros/defined-later-issue-121061-2.rs +++ b/tests/ui/macros/defined-later-issue-121061-2.rs @@ -1,6 +1,6 @@ mod demo { fn hello() { - something_later!(); //~ ERROR cannot find macro `something_later` in this scope + something_later!(); //~ ERROR cannot find macro `something_later` } macro_rules! something_later { diff --git a/tests/ui/macros/defined-later-issue-121061.rs b/tests/ui/macros/defined-later-issue-121061.rs index 07c6d406f03c5..1b0a39f457606 100644 --- a/tests/ui/macros/defined-later-issue-121061.rs +++ b/tests/ui/macros/defined-later-issue-121061.rs @@ -1,5 +1,5 @@ fn main() { - something_later!(); //~ ERROR cannot find macro `something_later` in this scope + something_later!(); //~ ERROR cannot find macro `something_later` } macro_rules! something_later { diff --git a/tests/ui/macros/expand-full-no-resolution.rs b/tests/ui/macros/expand-full-no-resolution.rs index 4d90b8e2a531a..caa223f03a9e6 100644 --- a/tests/ui/macros/expand-full-no-resolution.rs +++ b/tests/ui/macros/expand-full-no-resolution.rs @@ -15,6 +15,6 @@ macro_rules! wrap { wrap!(); fn main() { - format_args!(a!()); //~ ERROR: cannot find macro `a` in this scope - env!(a!()); //~ ERROR: cannot find macro `a` in this scope + format_args!(a!()); //~ ERROR: cannot find macro `a` + env!(a!()); //~ ERROR: cannot find macro `a` } diff --git a/tests/ui/macros/issue-100199.rs b/tests/ui/macros/issue-100199.rs index b1bcc535d74af..a43af3db4f274 100644 --- a/tests/ui/macros/issue-100199.rs +++ b/tests/ui/macros/issue-100199.rs @@ -1,4 +1,4 @@ -#[issue_100199::struct_with_bound] //~ ERROR cannot find trait `MyTrait` in the crate root +#[issue_100199::struct_with_bound] //~ ERROR cannot find trait `MyTrait` struct Foo {} // The above must be on the first line so that it's span points to pos 0. // This used to trigger an ICE because the diagnostic emitter would get diff --git a/tests/ui/macros/issue-100199.stderr b/tests/ui/macros/issue-100199.stderr index 89c634ce4f0b5..170bd0cf0f017 100644 --- a/tests/ui/macros/issue-100199.stderr +++ b/tests/ui/macros/issue-100199.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `MyTrait` in the crate root +error[E0405]: cannot find trait `MyTrait` --> $DIR/issue-100199.rs:1:1 | LL | #[issue_100199::struct_with_bound] diff --git a/tests/ui/macros/issue-11692-1.rs b/tests/ui/macros/issue-11692-1.rs index b6f3bb8ef0549..5b1ec3e5650e2 100644 --- a/tests/ui/macros/issue-11692-1.rs +++ b/tests/ui/macros/issue-11692-1.rs @@ -1,3 +1,3 @@ fn main() { - print!(testo!()); //~ ERROR cannot find macro `testo` in this scope + print!(testo!()); //~ ERROR cannot find macro `testo` } diff --git a/tests/ui/macros/issue-11692-2.rs b/tests/ui/macros/issue-11692-2.rs index 5957ed338f4e7..71591974c1d97 100644 --- a/tests/ui/macros/issue-11692-2.rs +++ b/tests/ui/macros/issue-11692-2.rs @@ -1,3 +1,3 @@ fn main() { - concat!(test!()); //~ ERROR cannot find macro `test` in this scope + concat!(test!()); //~ ERROR cannot find macro `test` } diff --git a/tests/ui/macros/issue-118786.rs b/tests/ui/macros/issue-118786.rs index 97454c9de0798..ba48cbb68e7ac 100644 --- a/tests/ui/macros/issue-118786.rs +++ b/tests/ui/macros/issue-118786.rs @@ -6,7 +6,7 @@ macro_rules! make_macro { ($macro_name:tt) => { macro_rules! $macro_name { //~^ ERROR macro expansion ignores token `{` and any following - //~| ERROR cannot find macro `macro_rules` in this scope + //~| ERROR cannot find macro `macro_rules` () => {} } } diff --git a/tests/ui/macros/macro-backtrace-nested.stderr b/tests/ui/macros/macro-backtrace-nested.stderr index dadedfbe8f671..f50b02e5cf259 100644 --- a/tests/ui/macros/macro-backtrace-nested.stderr +++ b/tests/ui/macros/macro-backtrace-nested.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `fake` in this scope +error[E0425]: cannot find value `fake` --> $DIR/macro-backtrace-nested.rs:5:12 | LL | () => (fake) @@ -9,7 +9,7 @@ LL | 1 + call_nested_expr!(); | = note: this error originates in the macro `nested_expr` which comes from the expansion of the macro `call_nested_expr` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `fake` in this scope +error[E0425]: cannot find value `fake` --> $DIR/macro-backtrace-nested.rs:5:12 | LL | () => (fake) diff --git a/tests/ui/macros/macro-context.rs b/tests/ui/macros/macro-context.rs index d09fdf118e6f4..766da567eff7a 100644 --- a/tests/ui/macros/macro-context.rs +++ b/tests/ui/macros/macro-context.rs @@ -4,8 +4,8 @@ macro_rules! m { //~| ERROR macro expansion ignores token `typeof` //~| ERROR macro expansion ignores token `;` //~| ERROR macro expansion ignores token `;` - //~| ERROR cannot find type `i` in this scope - //~| ERROR cannot find value `i` in this scope + //~| ERROR cannot find type `i` + //~| ERROR cannot find value `i` //~| WARN trailing semicolon in macro //~| WARN this was previously } diff --git a/tests/ui/macros/macro-context.stderr b/tests/ui/macros/macro-context.stderr index 7785f41594627..5ebdf2af93841 100644 --- a/tests/ui/macros/macro-context.stderr +++ b/tests/ui/macros/macro-context.stderr @@ -42,7 +42,7 @@ LL | m!(); | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `i` in this scope +error[E0412]: cannot find type `i` --> $DIR/macro-context.rs:3:13 | LL | () => ( i ; typeof ); @@ -53,7 +53,7 @@ LL | let a: m!(); | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `i` in this scope +error[E0425]: cannot find value `i` --> $DIR/macro-context.rs:3:13 | LL | () => ( i ; typeof ); diff --git a/tests/ui/macros/macro-expand-within-generics-in-path.rs b/tests/ui/macros/macro-expand-within-generics-in-path.rs index 017d5152221bf..1ba32afee5c5f 100644 --- a/tests/ui/macros/macro-expand-within-generics-in-path.rs +++ b/tests/ui/macros/macro-expand-within-generics-in-path.rs @@ -14,6 +14,6 @@ macro_rules! p { m!(generic); //~^ ERROR: unexpected generic arguments in path -//~| ERROR: cannot find attribute `generic` in this scope +//~| ERROR: cannot find attribute `generic` fn main() {} diff --git a/tests/ui/macros/macro-metavar-expr-concat/hygiene.rs b/tests/ui/macros/macro-metavar-expr-concat/hygiene.rs index 24b0e36498a3e..17397dc3a3e89 100644 --- a/tests/ui/macros/macro-metavar-expr-concat/hygiene.rs +++ b/tests/ui/macros/macro-metavar-expr-concat/hygiene.rs @@ -3,7 +3,7 @@ macro_rules! join { ($lhs:ident, $rhs:ident) => { ${concat($lhs, $rhs)} - //~^ ERROR cannot find value `abcdef` in this scope + //~^ ERROR cannot find value `abcdef` }; } diff --git a/tests/ui/macros/macro-metavar-expr-concat/hygiene.stderr b/tests/ui/macros/macro-metavar-expr-concat/hygiene.stderr index ef2326dce857f..99229927502c9 100644 --- a/tests/ui/macros/macro-metavar-expr-concat/hygiene.stderr +++ b/tests/ui/macros/macro-metavar-expr-concat/hygiene.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `abcdef` in this scope +error[E0425]: cannot find value `abcdef` --> $DIR/hygiene.rs:5:10 | LL | ${concat($lhs, $rhs)} diff --git a/tests/ui/macros/macro-outer-attributes.rs b/tests/ui/macros/macro-outer-attributes.rs index 8c79683f49a96..186353f133f9b 100644 --- a/tests/ui/macros/macro-outer-attributes.rs +++ b/tests/ui/macros/macro-outer-attributes.rs @@ -15,6 +15,6 @@ test!(b, // test1!(#[bar]) #[rustc_dummy] fn main() { - a::bar(); //~ ERROR cannot find function `bar` in module `a` + a::bar(); //~ ERROR cannot find function `bar` b::bar(); } diff --git a/tests/ui/macros/macro-outer-attributes.stderr b/tests/ui/macros/macro-outer-attributes.stderr index 87c0655a422d6..db79d98f1fef2 100644 --- a/tests/ui/macros/macro-outer-attributes.stderr +++ b/tests/ui/macros/macro-outer-attributes.stderr @@ -1,8 +1,8 @@ -error[E0425]: cannot find function `bar` in module `a` +error[E0425]: cannot find function `bar` --> $DIR/macro-outer-attributes.rs:18:8 | LL | a::bar(); - | ^^^ not found in `a` + | ^^^ not found in module `a` | note: found an item that was configured out --> $DIR/macro-outer-attributes.rs:9:14 diff --git a/tests/ui/macros/macro-parameter-span.rs b/tests/ui/macros/macro-parameter-span.rs index 5609f84e141b6..8aa9b405aa35e 100644 --- a/tests/ui/macros/macro-parameter-span.rs +++ b/tests/ui/macros/macro-parameter-span.rs @@ -8,6 +8,6 @@ macro_rules! foo { // not to the macro variable '$id' fn main() { foo!( - x //~ ERROR cannot find value `x` in this scope + x //~ ERROR cannot find value `x` ); } diff --git a/tests/ui/macros/macro-parameter-span.stderr b/tests/ui/macros/macro-parameter-span.stderr index 247750a8ad705..ed61ede88bf75 100644 --- a/tests/ui/macros/macro-parameter-span.stderr +++ b/tests/ui/macros/macro-parameter-span.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/macro-parameter-span.rs:11:9 | LL | x diff --git a/tests/ui/macros/macro-path-prelude-fail-3.rs b/tests/ui/macros/macro-path-prelude-fail-3.rs index 68eb350a95614..959a0286fbbd9 100644 --- a/tests/ui/macros/macro-path-prelude-fail-3.rs +++ b/tests/ui/macros/macro-path-prelude-fail-3.rs @@ -1,3 +1,3 @@ fn main() { - inline!(); //~ ERROR cannot find macro `inline` in this scope + inline!(); //~ ERROR cannot find macro `inline` } diff --git a/tests/ui/macros/macro-reexport-removed.rs b/tests/ui/macros/macro-reexport-removed.rs index 4a054686d7767..e9e1c52da3749 100644 --- a/tests/ui/macros/macro-reexport-removed.rs +++ b/tests/ui/macros/macro-reexport-removed.rs @@ -2,7 +2,7 @@ #![feature(macro_reexport)] //~ ERROR feature has been removed -#[macro_reexport(macro_one)] //~ ERROR cannot find attribute `macro_reexport` in this scope +#[macro_reexport(macro_one)] //~ ERROR cannot find attribute `macro_reexport` extern crate two_macros; fn main() {} diff --git a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs index 1eda5f5bb6bc3..89acf6ffdddf5 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs +++ b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs @@ -21,15 +21,15 @@ macro_rules! curly__rhs_dollar__no_round { #[rustfmt::skip] // autoformatters can break a few of the error traces macro_rules! no_curly__no_rhs_dollar__round { ( $( $i:ident ),* ) => { count(i) }; - //~^ ERROR cannot find function `count` in this scope - //~| ERROR cannot find value `i` in this scope + //~^ ERROR cannot find function `count` + //~| ERROR cannot find value `i` } #[rustfmt::skip] // autoformatters can break a few of the error traces macro_rules! no_curly__no_rhs_dollar__no_round { ( $i:ident ) => { count(i) }; - //~^ ERROR cannot find function `count` in this scope - //~| ERROR cannot find value `i` in this scope + //~^ ERROR cannot find function `count` + //~| ERROR cannot find value `i` } #[rustfmt::skip] // autoformatters can break a few of the error traces @@ -41,7 +41,7 @@ macro_rules! no_curly__rhs_dollar__round { #[rustfmt::skip] // autoformatters can break a few of the error traces macro_rules! no_curly__rhs_dollar__no_round { ( $i:ident ) => { count($i) }; - //~^ ERROR cannot find function `count` in this scope + //~^ ERROR cannot find function `count` } // Other scenarios @@ -150,7 +150,7 @@ fn main() { no_curly__no_rhs_dollar__no_round!(a); no_curly__rhs_dollar__round!(a, b, c); no_curly__rhs_dollar__no_round!(a); - //~^ ERROR cannot find value `a` in this scope + //~^ ERROR cannot find value `a` extra_garbage_after_metavar!(a); metavar_depth_is_not_literal!(a); diff --git a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr index 8e4ba192d79f5..ac89659524ea0 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr +++ b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr @@ -313,7 +313,7 @@ LL | unknown_metavar!(a); | = note: this error originates in the macro `unknown_metavar` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `i` in this scope +error[E0425]: cannot find value `i` --> $DIR/syntax-errors.rs:23:36 | LL | ( $( $i:ident ),* ) => { count(i) }; @@ -324,7 +324,7 @@ LL | no_curly__no_rhs_dollar__round!(a, b, c); | = note: this error originates in the macro `no_curly__no_rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `i` in this scope +error[E0425]: cannot find value `i` --> $DIR/syntax-errors.rs:30:29 | LL | ( $i:ident ) => { count(i) }; @@ -335,13 +335,13 @@ LL | no_curly__no_rhs_dollar__no_round!(a); | = note: this error originates in the macro `no_curly__no_rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/syntax-errors.rs:152:37 | LL | no_curly__rhs_dollar__no_round!(a); | ^ not found in this scope -error[E0425]: cannot find function `count` in this scope +error[E0425]: cannot find function `count` --> $DIR/syntax-errors.rs:23:30 | LL | ( $( $i:ident ),* ) => { count(i) }; @@ -352,7 +352,7 @@ LL | no_curly__no_rhs_dollar__round!(a, b, c); | = note: this error originates in the macro `no_curly__no_rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find function `count` in this scope +error[E0425]: cannot find function `count` --> $DIR/syntax-errors.rs:30:23 | LL | ( $i:ident ) => { count(i) }; @@ -363,7 +363,7 @@ LL | no_curly__no_rhs_dollar__no_round!(a); | = note: this error originates in the macro `no_curly__no_rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find function `count` in this scope +error[E0425]: cannot find function `count` --> $DIR/syntax-errors.rs:43:23 | LL | ( $i:ident ) => { count($i) }; diff --git a/tests/ui/match/expr_before_ident_pat.rs b/tests/ui/match/expr_before_ident_pat.rs index 27ef3d05a2954..02f053a05bc70 100644 --- a/tests/ui/match/expr_before_ident_pat.rs +++ b/tests/ui/match/expr_before_ident_pat.rs @@ -8,6 +8,6 @@ macro_rules! funny { fn main() { funny!(a, a); - //~^ ERROR cannot find value `a` in this scope + //~^ ERROR cannot find value `a` //~| ERROR arbitrary expressions aren't allowed in patterns } diff --git a/tests/ui/match/expr_before_ident_pat.stderr b/tests/ui/match/expr_before_ident_pat.stderr index 1657c51545cb2..20382c70c5dea 100644 --- a/tests/ui/match/expr_before_ident_pat.stderr +++ b/tests/ui/match/expr_before_ident_pat.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/expr_before_ident_pat.rs:10:12 | LL | funny!(a, a); diff --git a/tests/ui/match/issue-82866.rs b/tests/ui/match/issue-82866.rs index 95cd62261f109..042a2611c0880 100644 --- a/tests/ui/match/issue-82866.rs +++ b/tests/ui/match/issue-82866.rs @@ -1,7 +1,7 @@ fn main() { match x { - //~^ ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `x` Some::(v) => (), - //~^ ERROR cannot find type `v` in this scope + //~^ ERROR cannot find type `v` } } diff --git a/tests/ui/match/issue-82866.stderr b/tests/ui/match/issue-82866.stderr index f9e3360a525ff..09d69408d3cdf 100644 --- a/tests/ui/match/issue-82866.stderr +++ b/tests/ui/match/issue-82866.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-82866.rs:2:11 | LL | match x { | ^ not found in this scope -error[E0412]: cannot find type `v` in this scope +error[E0412]: cannot find type `v` --> $DIR/issue-82866.rs:4:16 | LL | Some::(v) => (), diff --git a/tests/ui/match/issue-92100.rs b/tests/ui/match/issue-92100.rs index baac570dd8a9d..1fb151d2895d9 100644 --- a/tests/ui/match/issue-92100.rs +++ b/tests/ui/match/issue-92100.rs @@ -2,6 +2,6 @@ fn main() { match [1, 2] { - [a.., a] => {} //~ ERROR cannot find value `a` in this scope + [a.., a] => {} //~ ERROR cannot find value `a` } } diff --git a/tests/ui/match/issue-92100.stderr b/tests/ui/match/issue-92100.stderr index eb9f4ba1ad698..0a18f0d1e9baa 100644 --- a/tests/ui/match/issue-92100.stderr +++ b/tests/ui/match/issue-92100.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/issue-92100.rs:5:10 | LL | [a.., a] => {} diff --git a/tests/ui/match/match-join.rs b/tests/ui/match/match-join.rs index b0f2593c85364..3ba7b3363fd21 100644 --- a/tests/ui/match/match-join.rs +++ b/tests/ui/match/match-join.rs @@ -6,6 +6,6 @@ fn my_panic() -> ! { panic!(); } fn main() { match true { false => { my_panic(); } true => { } } - println!("{}", x); //~ ERROR cannot find value `x` in this scope + println!("{}", x); //~ ERROR cannot find value `x` let x: isize; } diff --git a/tests/ui/match/match-join.stderr b/tests/ui/match/match-join.stderr index 4feb1bef9ad59..b5cf1201217ac 100644 --- a/tests/ui/match/match-join.stderr +++ b/tests/ui/match/match-join.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/match-join.rs:9:20 | LL | println!("{}", x); diff --git a/tests/ui/methods/suggest-method-on-call-for-ambig-receiver.rs b/tests/ui/methods/suggest-method-on-call-for-ambig-receiver.rs index fc2c15ee8c66d..58ba6d8f261a1 100644 --- a/tests/ui/methods/suggest-method-on-call-for-ambig-receiver.rs +++ b/tests/ui/methods/suggest-method-on-call-for-ambig-receiver.rs @@ -8,7 +8,7 @@ fn separate_arms() { } Some(right) => { consume(right); - //~^ ERROR cannot find function `consume` in this scope + //~^ ERROR cannot find function `consume` } } } diff --git a/tests/ui/methods/suggest-method-on-call-for-ambig-receiver.stderr b/tests/ui/methods/suggest-method-on-call-for-ambig-receiver.stderr index 40d8301c24e5c..cefa5a4808fcf 100644 --- a/tests/ui/methods/suggest-method-on-call-for-ambig-receiver.stderr +++ b/tests/ui/methods/suggest-method-on-call-for-ambig-receiver.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `consume` in this scope +error[E0425]: cannot find function `consume` --> $DIR/suggest-method-on-call-for-ambig-receiver.rs:10:13 | LL | consume(right); diff --git a/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.rs b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.rs index 93b7ddf5e9e09..eb5812bce53b0 100644 --- a/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.rs +++ b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.rs @@ -2,5 +2,5 @@ fn main() { let hello = len(vec![]); - //~^ ERROR cannot find function `len` in this scope + //~^ ERROR cannot find function `len` } diff --git a/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr index 86c2f6431d1b8..2d3918bdeada7 100644 --- a/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr +++ b/tests/ui/methods/suggest-method-on-call-with-macro-rcvr.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `len` in this scope +error[E0425]: cannot find function `len` --> $DIR/suggest-method-on-call-with-macro-rcvr.rs:4:17 | LL | let hello = len(vec![]); diff --git a/tests/ui/mir/issue-83499-input-output-iteration-ice.rs b/tests/ui/mir/issue-83499-input-output-iteration-ice.rs index 0086d2ec18cfa..7ed6d561eaee5 100644 --- a/tests/ui/mir/issue-83499-input-output-iteration-ice.rs +++ b/tests/ui/mir/issue-83499-input-output-iteration-ice.rs @@ -6,5 +6,5 @@ fn main() {} fn foo(_: Bar, ...) -> impl {} //~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic -//~| ERROR cannot find type `Bar` in this scope +//~| ERROR cannot find type `Bar` //~| ERROR at least one trait must be specified diff --git a/tests/ui/mir/issue-83499-input-output-iteration-ice.stderr b/tests/ui/mir/issue-83499-input-output-iteration-ice.stderr index 4eb3adc8b4f1c..56588c6322fc5 100644 --- a/tests/ui/mir/issue-83499-input-output-iteration-ice.stderr +++ b/tests/ui/mir/issue-83499-input-output-iteration-ice.stderr @@ -10,7 +10,7 @@ error: at least one trait must be specified LL | fn foo(_: Bar, ...) -> impl {} | ^^^^ -error[E0412]: cannot find type `Bar` in this scope +error[E0412]: cannot find type `Bar` --> $DIR/issue-83499-input-output-iteration-ice.rs:7:11 | LL | fn foo(_: Bar, ...) -> impl {} diff --git a/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-1.rs b/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-1.rs index 0b2e63bfcf772..311dc77e1db7b 100644 --- a/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-1.rs +++ b/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-1.rs @@ -10,7 +10,7 @@ pub fn a() -> B { B } mod handlers { pub struct C(B); - //~^ ERROR cannot find type `B` in this scope + //~^ ERROR cannot find type `B` pub fn c() -> impl Fn() -> C { let a1 = (); || C((crate::a(), a1).into()) diff --git a/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-1.stderr b/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-1.stderr index 468da0227d3d0..feb80778b3bb0 100644 --- a/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-1.stderr +++ b/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-1.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `B` in this scope +error[E0412]: cannot find type `B` --> $DIR/mir-build-2021-closure-capture-ice-110453-1.rs:12:18 | LL | pub struct C(B); diff --git a/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-2.rs b/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-2.rs index d63ccc6651c7b..4e45d1eabc6c9 100644 --- a/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-2.rs +++ b/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-2.rs @@ -6,6 +6,6 @@ #![crate_type="lib"] pub fn dup(f: impl Fn(i32) -> i32) -> impl Fn(as_str) -> i32 { -//~^ ERROR cannot find type `as_str` in this scope +//~^ ERROR cannot find type `as_str` move |a| f(a * 2) } diff --git a/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-2.stderr b/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-2.stderr index 8fe4981eb3f24..5479e6b5fee8b 100644 --- a/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-2.stderr +++ b/tests/ui/mir/mir-build-2021-closure-capture-ice-110453-2.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `as_str` in this scope +error[E0412]: cannot find type `as_str` --> $DIR/mir-build-2021-closure-capture-ice-110453-2.rs:8:47 | LL | pub fn dup(f: impl Fn(i32) -> i32) -> impl Fn(as_str) -> i32 { diff --git a/tests/ui/mir/validate/error-body.rs b/tests/ui/mir/validate/error-body.rs index e77867ddfd421..4025d048afd03 100644 --- a/tests/ui/mir/validate/error-body.rs +++ b/tests/ui/mir/validate/error-body.rs @@ -3,7 +3,7 @@ fn _test() { let x = || 45; missing(); - //~^ ERROR cannot find function `missing` in this scope + //~^ ERROR cannot find function `missing` } fn main() {} diff --git a/tests/ui/mir/validate/error-body.stderr b/tests/ui/mir/validate/error-body.stderr index 1dfeaf0b7e2cb..a7536238bbd9f 100644 --- a/tests/ui/mir/validate/error-body.stderr +++ b/tests/ui/mir/validate/error-body.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `missing` in this scope +error[E0425]: cannot find function `missing` --> $DIR/error-body.rs:5:5 | LL | missing(); diff --git a/tests/ui/missing/missing-items/missing-const-parameter.rs b/tests/ui/missing/missing-items/missing-const-parameter.rs index a3af88f263331..c688a7ddb77e9 100644 --- a/tests/ui/missing/missing-items/missing-const-parameter.rs +++ b/tests/ui/missing/missing-items/missing-const-parameter.rs @@ -1,23 +1,23 @@ struct Struct; impl Struct<{ N }> {} -//~^ ERROR cannot find value `N` in this scope +//~^ ERROR cannot find value `N` //~| HELP you might be missing a const parameter fn func0(_: Struct<{ N }>) {} -//~^ ERROR cannot find value `N` in this scope +//~^ ERROR cannot find value `N` //~| HELP you might be missing a const parameter fn func1(_: [u8; N]) {} -//~^ ERROR cannot find value `N` in this scope +//~^ ERROR cannot find value `N` //~| HELP you might be missing a const parameter fn func2(_: [T; N]) {} -//~^ ERROR cannot find value `N` in this scope +//~^ ERROR cannot find value `N` //~| HELP you might be missing a const parameter struct Image([[u32; C]; R]); -//~^ ERROR cannot find value `C` in this scope +//~^ ERROR cannot find value `C` //~| HELP a const parameter with a similar name exists //~| HELP you might be missing a const parameter diff --git a/tests/ui/missing/missing-items/missing-const-parameter.stderr b/tests/ui/missing/missing-items/missing-const-parameter.stderr index d9fea1306514c..0b9c674f3ec15 100644 --- a/tests/ui/missing/missing-items/missing-const-parameter.stderr +++ b/tests/ui/missing/missing-items/missing-const-parameter.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `N` in this scope +error[E0425]: cannot find value `N` --> $DIR/missing-const-parameter.rs:3:15 | LL | impl Struct<{ N }> {} @@ -9,7 +9,7 @@ help: you might be missing a const parameter LL | impl Struct<{ N }> {} | +++++++++++++++++++++ -error[E0425]: cannot find value `N` in this scope +error[E0425]: cannot find value `N` --> $DIR/missing-const-parameter.rs:7:22 | LL | fn func0(_: Struct<{ N }>) {} @@ -20,7 +20,7 @@ help: you might be missing a const parameter LL | fn func0(_: Struct<{ N }>) {} | +++++++++++++++++++++ -error[E0425]: cannot find value `N` in this scope +error[E0425]: cannot find value `N` --> $DIR/missing-const-parameter.rs:11:18 | LL | fn func1(_: [u8; N]) {} @@ -31,7 +31,7 @@ help: you might be missing a const parameter LL | fn func1(_: [u8; N]) {} | +++++++++++++++++++++ -error[E0425]: cannot find value `N` in this scope +error[E0425]: cannot find value `N` --> $DIR/missing-const-parameter.rs:15:20 | LL | fn func2(_: [T; N]) {} @@ -42,7 +42,7 @@ help: you might be missing a const parameter LL | fn func2(_: [T; N]) {} | +++++++++++++++++++++ -error[E0425]: cannot find value `C` in this scope +error[E0425]: cannot find value `C` --> $DIR/missing-const-parameter.rs:19:37 | LL | struct Image([[u32; C]; R]); diff --git a/tests/ui/missing/missing-items/missing-type-parameter2.rs b/tests/ui/missing/missing-items/missing-type-parameter2.rs index e9b32fb7198d4..7c302127a5d54 100644 --- a/tests/ui/missing/missing-items/missing-type-parameter2.rs +++ b/tests/ui/missing/missing-items/missing-type-parameter2.rs @@ -1,19 +1,19 @@ struct X(); impl X {} -//~^ ERROR cannot find type `N` in this scope +//~^ ERROR cannot find type `N` //~| ERROR unresolved item provided when a constant was expected impl X {} -//~^ ERROR cannot find type `N` in this scope +//~^ ERROR cannot find type `N` //~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions //~| ERROR unresolved item provided when a constant was expected fn foo(_: T) where T: Send {} -//~^ ERROR cannot find type `T` in this scope -//~| ERROR cannot find type `T` in this scope +//~^ ERROR cannot find type `T` +//~| ERROR cannot find type `T` fn bar(_: A) {} -//~^ ERROR cannot find type `A` in this scope +//~^ ERROR cannot find type `A` fn main() { } diff --git a/tests/ui/missing/missing-items/missing-type-parameter2.stderr b/tests/ui/missing/missing-items/missing-type-parameter2.stderr index f33951c98bfb3..073bb9c9a9eee 100644 --- a/tests/ui/missing/missing-items/missing-type-parameter2.stderr +++ b/tests/ui/missing/missing-items/missing-type-parameter2.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `N` in this scope +error[E0412]: cannot find type `N` --> $DIR/missing-type-parameter2.rs:3:8 | LL | struct X(); @@ -16,7 +16,7 @@ help: you might be missing a type parameter LL | impl X {} | +++ -error[E0412]: cannot find type `N` in this scope +error[E0412]: cannot find type `N` --> $DIR/missing-type-parameter2.rs:6:28 | LL | impl X {} @@ -33,7 +33,7 @@ help: you might be missing a type parameter LL | impl X {} | +++ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/missing-type-parameter2.rs:11:20 | LL | struct X(); @@ -51,7 +51,7 @@ help: you might be missing a type parameter LL | fn foo(_: T) where T: Send {} | +++ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/missing-type-parameter2.rs:11:11 | LL | struct X(); @@ -69,7 +69,7 @@ help: you might be missing a type parameter LL | fn foo(_: T) where T: Send {} | +++ -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/missing-type-parameter2.rs:15:24 | LL | struct X(); diff --git a/tests/ui/missing/missing-macro-use.rs b/tests/ui/missing/missing-macro-use.rs index a761c9a5ffd27..d7ddda7332852 100644 --- a/tests/ui/missing/missing-macro-use.rs +++ b/tests/ui/missing/missing-macro-use.rs @@ -4,5 +4,5 @@ extern crate two_macros; pub fn main() { macro_two!(); - //~^ ERROR cannot find macro `macro_two` in this scope + //~^ ERROR cannot find macro `macro_two` } diff --git a/tests/ui/modules_and_files_visibility/mod_file_correct_spans.rs b/tests/ui/modules_and_files_visibility/mod_file_correct_spans.rs index c42d2eaa7bd6d..1e00523abc20b 100644 --- a/tests/ui/modules_and_files_visibility/mod_file_correct_spans.rs +++ b/tests/ui/modules_and_files_visibility/mod_file_correct_spans.rs @@ -4,5 +4,5 @@ mod mod_file_aux; fn main() { assert!(mod_file_aux::bar() == 10); - //~^ ERROR cannot find function `bar` in module `mod_file_aux` + //~^ ERROR cannot find function `bar` } diff --git a/tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr b/tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr index 3426505cd1105..889f88df42c0f 100644 --- a/tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr +++ b/tests/ui/modules_and_files_visibility/mod_file_correct_spans.stderr @@ -1,8 +1,8 @@ -error[E0425]: cannot find function `bar` in module `mod_file_aux` +error[E0425]: cannot find function `bar` --> $DIR/mod_file_correct_spans.rs:6:27 | LL | assert!(mod_file_aux::bar() == 10); - | ^^^ not found in `mod_file_aux` + | ^^^ not found in module `mod_file_aux` error: aborting due to 1 previous error diff --git a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs index 6b92f4101948a..32ce8fbeafcfb 100644 --- a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs +++ b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.rs @@ -8,8 +8,8 @@ mod m { pub fn main() { use namespaced_enums::Foo::*; - foo(); //~ ERROR cannot find function `foo` in this scope - m::foo(); //~ ERROR cannot find function `foo` in module `m` - bar(); //~ ERROR cannot find function `bar` in this scope - m::bar(); //~ ERROR cannot find function `bar` in module `m` + foo(); //~ ERROR cannot find function `foo` + m::foo(); //~ ERROR cannot find function `foo` + bar(); //~ ERROR cannot find function `bar` + m::bar(); //~ ERROR cannot find function `bar` } diff --git a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.stderr b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.stderr index 227d30282b1ea..5a325b6870f50 100644 --- a/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.stderr +++ b/tests/ui/namespace/namespaced-enum-glob-import-no-impls-xcrate.stderr @@ -1,22 +1,22 @@ -error[E0425]: cannot find function `foo` in module `m` +error[E0425]: cannot find function `foo` --> $DIR/namespaced-enum-glob-import-no-impls-xcrate.rs:12:8 | LL | m::foo(); - | ^^^ not found in `m` + | ^^^ not found in module `m` -error[E0425]: cannot find function `bar` in module `m` +error[E0425]: cannot find function `bar` --> $DIR/namespaced-enum-glob-import-no-impls-xcrate.rs:14:8 | LL | m::bar(); - | ^^^ not found in `m` + | ^^^ not found in module `m` -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/namespaced-enum-glob-import-no-impls-xcrate.rs:11:5 | LL | foo(); | ^^^ not found in this scope -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/namespaced-enum-glob-import-no-impls-xcrate.rs:13:5 | LL | bar(); diff --git a/tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs b/tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs index ab24f36f9a156..368c261b23ab8 100644 --- a/tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs +++ b/tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs @@ -18,8 +18,8 @@ mod m { pub fn main() { use m2::Foo::*; - foo(); //~ ERROR cannot find function `foo` in this scope - m::foo(); //~ ERROR cannot find function `foo` in module `m` - bar(); //~ ERROR cannot find function `bar` in this scope - m::bar(); //~ ERROR cannot find function `bar` in module `m` + foo(); //~ ERROR cannot find function `foo` + m::foo(); //~ ERROR cannot find function `foo` + bar(); //~ ERROR cannot find function `bar` + m::bar(); //~ ERROR cannot find function `bar` } diff --git a/tests/ui/namespace/namespaced-enum-glob-import-no-impls.stderr b/tests/ui/namespace/namespaced-enum-glob-import-no-impls.stderr index 111ac7ab0f0bb..66436d134a95a 100644 --- a/tests/ui/namespace/namespaced-enum-glob-import-no-impls.stderr +++ b/tests/ui/namespace/namespaced-enum-glob-import-no-impls.stderr @@ -1,22 +1,22 @@ -error[E0425]: cannot find function `foo` in module `m` +error[E0425]: cannot find function `foo` --> $DIR/namespaced-enum-glob-import-no-impls.rs:22:8 | LL | m::foo(); - | ^^^ not found in `m` + | ^^^ not found in module `m` -error[E0425]: cannot find function `bar` in module `m` +error[E0425]: cannot find function `bar` --> $DIR/namespaced-enum-glob-import-no-impls.rs:24:8 | LL | m::bar(); - | ^^^ not found in `m` + | ^^^ not found in module `m` -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/namespaced-enum-glob-import-no-impls.rs:21:5 | LL | foo(); | ^^^ not found in this scope -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/namespaced-enum-glob-import-no-impls.rs:23:5 | LL | bar(); diff --git a/tests/ui/nested-cfg-attrs.rs b/tests/ui/nested-cfg-attrs.rs index 0af28fc3d8ec6..05570dd9862a8 100644 --- a/tests/ui/nested-cfg-attrs.rs +++ b/tests/ui/nested-cfg-attrs.rs @@ -1,4 +1,4 @@ #[cfg_attr(all(), cfg_attr(all(), cfg(FALSE)))] fn f() {} -fn main() { f() } //~ ERROR cannot find function `f` in this scope +fn main() { f() } //~ ERROR cannot find function `f` diff --git a/tests/ui/nested-cfg-attrs.stderr b/tests/ui/nested-cfg-attrs.stderr index 16c2930714353..d91cbe5ccb009 100644 --- a/tests/ui/nested-cfg-attrs.stderr +++ b/tests/ui/nested-cfg-attrs.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `f` in this scope +error[E0425]: cannot find function `f` --> $DIR/nested-cfg-attrs.rs:4:13 | LL | fn main() { f() } diff --git a/tests/ui/object-safety/avoid-ice-on-warning.new.stderr b/tests/ui/object-safety/avoid-ice-on-warning.new.stderr index 517f910080de7..160a1e7218501 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning.new.stderr +++ b/tests/ui/object-safety/avoid-ice-on-warning.new.stderr @@ -4,7 +4,7 @@ error: return types are denoted using `->` LL | fn call_this(f: F) : Fn(&str) + call_that {} | ^ help: use `->` instead -error[E0405]: cannot find trait `call_that` in this scope +error[E0405]: cannot find trait `call_that` --> $DIR/avoid-ice-on-warning.rs:4:36 | LL | fn call_this(f: F) : Fn(&str) + call_that {} diff --git a/tests/ui/object-safety/avoid-ice-on-warning.old.stderr b/tests/ui/object-safety/avoid-ice-on-warning.old.stderr index 3939c06eabe5b..094fab336e7d7 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning.old.stderr +++ b/tests/ui/object-safety/avoid-ice-on-warning.old.stderr @@ -4,7 +4,7 @@ error: return types are denoted using `->` LL | fn call_this(f: F) : Fn(&str) + call_that {} | ^ help: use `->` instead -error[E0405]: cannot find trait `call_that` in this scope +error[E0405]: cannot find trait `call_that` --> $DIR/avoid-ice-on-warning.rs:4:36 | LL | fn call_this(f: F) : Fn(&str) + call_that {} diff --git a/tests/ui/object-safety/avoid-ice-on-warning.rs b/tests/ui/object-safety/avoid-ice-on-warning.rs index b90d8911d500b..468bced514cbe 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning.rs +++ b/tests/ui/object-safety/avoid-ice-on-warning.rs @@ -3,7 +3,7 @@ //@[new] edition:2021 fn call_this(f: F) : Fn(&str) + call_that {} //~^ ERROR return types are denoted using `->` -//~| ERROR cannot find trait `call_that` in this scope +//~| ERROR cannot find trait `call_that` //[old]~| WARN trait objects without an explicit `dyn` are deprecated //[old]~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! fn main() {} diff --git a/tests/ui/object-safety/erroneous_signature.rs b/tests/ui/object-safety/erroneous_signature.rs index cc1841cc4b2a1..cf98df869c2a0 100644 --- a/tests/ui/object-safety/erroneous_signature.rs +++ b/tests/ui/object-safety/erroneous_signature.rs @@ -1,11 +1,11 @@ trait Foo { fn err(&self) -> MissingType; - //~^ ERROR cannot find type `MissingType` in this scope + //~^ ERROR cannot find type `MissingType` } impl Foo for i32 { fn err(&self) -> MissingType { - //~^ ERROR cannot find type `MissingType` in this scope + //~^ ERROR cannot find type `MissingType` 0 } } diff --git a/tests/ui/object-safety/erroneous_signature.stderr b/tests/ui/object-safety/erroneous_signature.stderr index f3b14ffe34c3b..e682e265ba2c4 100644 --- a/tests/ui/object-safety/erroneous_signature.stderr +++ b/tests/ui/object-safety/erroneous_signature.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `MissingType` in this scope +error[E0412]: cannot find type `MissingType` --> $DIR/erroneous_signature.rs:2:22 | LL | fn err(&self) -> MissingType; | ^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `MissingType` in this scope +error[E0412]: cannot find type `MissingType` --> $DIR/erroneous_signature.rs:7:22 | LL | fn err(&self) -> MissingType { diff --git a/tests/ui/offset-of/offset-of-enum.rs b/tests/ui/offset-of/offset-of-enum.rs index cb2f04786ac5c..6a20d0dfaa2ef 100644 --- a/tests/ui/offset-of/offset-of-enum.rs +++ b/tests/ui/offset-of/offset-of-enum.rs @@ -14,5 +14,5 @@ fn main() { offset_of!(Alpha, Two.1); //~ ERROR no field named `1` on enum variant `Alpha::Two` offset_of!(Alpha, Two.foo); //~ ERROR no field named `foo` on enum variant `Alpha::Two` offset_of!(Alpha, NonExistent); //~ ERROR no variant named `NonExistent` found for enum `Alpha` - offset_of!(Beta, One); //~ ERROR cannot find type `Beta` in this scope + offset_of!(Beta, One); //~ ERROR cannot find type `Beta` } diff --git a/tests/ui/offset-of/offset-of-enum.stderr b/tests/ui/offset-of/offset-of-enum.stderr index 7e7ad41f5b6a9..b8040fd23b2c6 100644 --- a/tests/ui/offset-of/offset-of-enum.stderr +++ b/tests/ui/offset-of/offset-of-enum.stderr @@ -7,7 +7,7 @@ LL | offset_of!(Alpha::One, 0); | not a type | help: try using the variant's enum: `Alpha` -error[E0412]: cannot find type `Beta` in this scope +error[E0412]: cannot find type `Beta` --> $DIR/offset-of-enum.rs:17:16 | LL | offset_of!(Beta, One); diff --git a/tests/ui/offset-of/offset-of-self.rs b/tests/ui/offset-of/offset-of-self.rs index 1558e13b53095..1396f0de07c42 100644 --- a/tests/ui/offset-of/offset-of-self.rs +++ b/tests/ui/offset-of/offset-of-self.rs @@ -31,7 +31,7 @@ impl S { mod m { use std::mem::offset_of; fn off() { - offset_of!(self::S, v); //~ ERROR cannot find type `S` in module + offset_of!(self::S, v); //~ ERROR cannot find type `S` offset_of!(super::S, v); offset_of!(crate::S, v); } @@ -48,7 +48,7 @@ mod n { fn main() { offset_of!(self::S, v); - offset_of!(Self, v); //~ ERROR cannot find type `Self` in this scope + offset_of!(Self, v); //~ ERROR cannot find type `Self` offset_of!(S, self); //~ no field `self` on type `S` offset_of!(S, v.self); //~ no field `self` on type `u8` diff --git a/tests/ui/offset-of/offset-of-self.stderr b/tests/ui/offset-of/offset-of-self.stderr index 7c7576e066b6f..ed293f98bd6bc 100644 --- a/tests/ui/offset-of/offset-of-self.stderr +++ b/tests/ui/offset-of/offset-of-self.stderr @@ -4,11 +4,11 @@ error: offset_of expects dot-separated field and variant names LL | offset_of!(Self, Self::v); | ^^^^^^^ -error[E0412]: cannot find type `S` in module `self` +error[E0412]: cannot find type `S` --> $DIR/offset-of-self.rs:34:26 | LL | offset_of!(self::S, v); - | ^ not found in `self` + | ^ not found in module `self` | help: consider importing this struct | @@ -20,7 +20,7 @@ LL - offset_of!(self::S, v); LL + offset_of!(S, v); | -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/offset-of-self.rs:51:16 | LL | fn main() { diff --git a/tests/ui/panics/default-backtrace-ice.stderr b/tests/ui/panics/default-backtrace-ice.stderr index 23b863568bc74..3499d745ff417 100644 --- a/tests/ui/panics/default-backtrace-ice.stderr +++ b/tests/ui/panics/default-backtrace-ice.stderr @@ -1,4 +1,4 @@ -error: internal compiler error[E0425]: cannot find value `missing_ident` in this scope +error: internal compiler error[E0425]: cannot find value `missing_ident` --> $DIR/default-backtrace-ice.rs:21:13 | LL | fn main() { missing_ident; } diff --git a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs index 33671df949280..e31b6bf527563 100644 --- a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs +++ b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs @@ -10,7 +10,7 @@ fn foo() -> String { fn bar() -> String { #[attr] [1, 2, 3].iter().map(|c| c.to_string()).collect::() //~ ERROR expected `;`, found `#` - #[attr] //~ ERROR cannot find attribute `attr` in this scope + #[attr] //~ ERROR cannot find attribute `attr` String::new() } diff --git a/tests/ui/parser/circular_modules_main.stderr b/tests/ui/parser/circular_modules_main.stderr index 2de70789358b0..2b5481c32a019 100644 --- a/tests/ui/parser/circular_modules_main.stderr +++ b/tests/ui/parser/circular_modules_main.stderr @@ -4,11 +4,11 @@ error: circular modules: $DIR/circular_modules_main.rs -> $DIR/circular_modules_ LL | mod circular_modules_main; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0425]: cannot find function `hi_str` in module `circular_modules_main` +error[E0425]: cannot find function `hi_str` --> $DIR/circular_modules_hello.rs:7:43 | LL | println!("{}", circular_modules_main::hi_str()); - | ^^^^^^ not found in `circular_modules_main` + | ^^^^^^ not found in module `circular_modules_main` | help: consider importing this function | diff --git a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs index 53e3c6f960500..949c7b1db6fee 100644 --- a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs +++ b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs @@ -7,7 +7,7 @@ fn main() { fn banana(a: >::BAR) {} //~^ ERROR unexpected `const` parameter declaration -//~| ERROR cannot find type `T` in this scope +//~| ERROR cannot find type `T` fn chaenomeles() { path::path::Struct::() //~^ ERROR unexpected `const` parameter declaration diff --git a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr index 96885d11ee07f..85c39027698c1 100644 --- a/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr +++ b/tests/ui/parser/const-param-decl-on-type-instead-of-impl.stderr @@ -27,7 +27,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `path` LL | path::path::Struct::() | ^^^^ use of undeclared crate or module `path` -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/const-param-decl-on-type-instead-of-impl.rs:8:15 | LL | fn banana(a: >::BAR) {} diff --git a/tests/ui/parser/default-unmatched-assoc.rs b/tests/ui/parser/default-unmatched-assoc.rs index 168ea3e76f648..81c966e0beee8 100644 --- a/tests/ui/parser/default-unmatched-assoc.rs +++ b/tests/ui/parser/default-unmatched-assoc.rs @@ -1,7 +1,7 @@ fn main() {} trait Foo { - default!(); //~ ERROR cannot find macro `default` in this scope + default!(); //~ ERROR cannot find macro `default` default do //~^ ERROR `default` is not followed by an item //~| ERROR non-item in item list @@ -9,7 +9,7 @@ trait Foo { struct S; impl S { - default!(); //~ ERROR cannot find macro `default` in this scope + default!(); //~ ERROR cannot find macro `default` default do //~^ ERROR `default` is not followed by an item //~| ERROR non-item in item list diff --git a/tests/ui/parser/default-unmatched-extern.rs b/tests/ui/parser/default-unmatched-extern.rs index 8d0ea590f573f..d1527bba9caa2 100644 --- a/tests/ui/parser/default-unmatched-extern.rs +++ b/tests/ui/parser/default-unmatched-extern.rs @@ -1,7 +1,7 @@ fn main() {} extern "C" { - default!(); //~ ERROR cannot find macro `default` in this scope + default!(); //~ ERROR cannot find macro `default` default do //~^ ERROR `default` is not followed by an item //~| ERROR non-item in item list diff --git a/tests/ui/parser/dyn-trait-compatibility.rs b/tests/ui/parser/dyn-trait-compatibility.rs index 6341e05327754..56e77201ba15d 100644 --- a/tests/ui/parser/dyn-trait-compatibility.rs +++ b/tests/ui/parser/dyn-trait-compatibility.rs @@ -1,14 +1,14 @@ type A0 = dyn; -//~^ ERROR cannot find type `dyn` in this scope +//~^ ERROR cannot find type `dyn` type A1 = dyn::dyn; //~^ ERROR use of undeclared crate or module `dyn` type A2 = dyn; -//~^ ERROR cannot find type `dyn` in this scope -//~| ERROR cannot find type `dyn` in this scope -//~| ERROR cannot find type `dyn` in this scope +//~^ ERROR cannot find type `dyn` +//~| ERROR cannot find type `dyn` +//~| ERROR cannot find type `dyn` type A3 = dyn<::dyn>; -//~^ ERROR cannot find type `dyn` in this scope -//~| ERROR cannot find type `dyn` in this scope -//~| ERROR cannot find trait `dyn` in this scope +//~^ ERROR cannot find type `dyn` +//~| ERROR cannot find type `dyn` +//~| ERROR cannot find trait `dyn` fn main() {} diff --git a/tests/ui/parser/dyn-trait-compatibility.stderr b/tests/ui/parser/dyn-trait-compatibility.stderr index e34d855a9d4f9..3a12c7be756d2 100644 --- a/tests/ui/parser/dyn-trait-compatibility.stderr +++ b/tests/ui/parser/dyn-trait-compatibility.stderr @@ -1,40 +1,40 @@ -error[E0412]: cannot find type `dyn` in this scope +error[E0412]: cannot find type `dyn` --> $DIR/dyn-trait-compatibility.rs:1:11 | LL | type A0 = dyn; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0412]: cannot find type `dyn` --> $DIR/dyn-trait-compatibility.rs:5:11 | LL | type A2 = dyn; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0412]: cannot find type `dyn` --> $DIR/dyn-trait-compatibility.rs:5:15 | LL | type A2 = dyn; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0412]: cannot find type `dyn` --> $DIR/dyn-trait-compatibility.rs:5:20 | LL | type A2 = dyn; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0412]: cannot find type `dyn` --> $DIR/dyn-trait-compatibility.rs:9:11 | LL | type A3 = dyn<::dyn>; | ^^^ not found in this scope -error[E0405]: cannot find trait `dyn` in this scope +error[E0405]: cannot find trait `dyn` --> $DIR/dyn-trait-compatibility.rs:9:23 | LL | type A3 = dyn<::dyn>; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0412]: cannot find type `dyn` --> $DIR/dyn-trait-compatibility.rs:9:16 | LL | type A3 = dyn<::dyn>; diff --git a/tests/ui/parser/emoji-identifiers.rs b/tests/ui/parser/emoji-identifiers.rs index b50c046bcb204..faabab8a3c749 100644 --- a/tests/ui/parser/emoji-identifiers.rs +++ b/tests/ui/parser/emoji-identifiers.rs @@ -10,7 +10,7 @@ fn i_like_to_😅_a_lot() -> 👀 { //~ ERROR identifiers cannot contain emoji //~^ ERROR identifiers cannot contain emoji } fn main() { - let _ = i_like_to_😄_a_lot() ➖ 4; //~ ERROR cannot find function `i_like_to_😄_a_lot` in this scope + let _ = i_like_to_😄_a_lot() ➖ 4; //~ ERROR cannot find function `i_like_to_😄_a_lot` //~^ ERROR identifiers cannot contain emoji //~| ERROR unknown start of token: \u{2796} diff --git a/tests/ui/parser/emoji-identifiers.stderr b/tests/ui/parser/emoji-identifiers.stderr index 536afc53f0ceb..ab66692bcf64e 100644 --- a/tests/ui/parser/emoji-identifiers.stderr +++ b/tests/ui/parser/emoji-identifiers.stderr @@ -83,7 +83,7 @@ help: there is an associated function `full_of_✨` with a similar name LL | 👀::full_of_✨() | ~~~~~~~~~~ -error[E0425]: cannot find function `i_like_to_😄_a_lot` in this scope +error[E0425]: cannot find function `i_like_to_😄_a_lot` --> $DIR/emoji-identifiers.rs:13:13 | LL | fn i_like_to_😅_a_lot() -> 👀 { diff --git a/tests/ui/parser/fn-field-parse-error-ice.rs b/tests/ui/parser/fn-field-parse-error-ice.rs index 188257ea53a31..d5a2b37ace118 100644 --- a/tests/ui/parser/fn-field-parse-error-ice.rs +++ b/tests/ui/parser/fn-field-parse-error-ice.rs @@ -4,7 +4,7 @@ struct Baz { inner : dyn fn () //~^ ERROR expected `,`, or `}`, found keyword `fn` //~| ERROR expected identifier, found keyword `fn` - //~| ERROR cannot find type `dyn` in this scope + //~| ERROR cannot find type `dyn` } fn main() {} diff --git a/tests/ui/parser/fn-field-parse-error-ice.stderr b/tests/ui/parser/fn-field-parse-error-ice.stderr index 3bf68e8cc04fe..8c3903afd6ab6 100644 --- a/tests/ui/parser/fn-field-parse-error-ice.stderr +++ b/tests/ui/parser/fn-field-parse-error-ice.stderr @@ -17,7 +17,7 @@ help: escape `fn` to use it as an identifier LL | inner : dyn r#fn () | ++ -error[E0412]: cannot find type `dyn` in this scope +error[E0412]: cannot find type `dyn` --> $DIR/fn-field-parse-error-ice.rs:4:13 | LL | inner : dyn fn () diff --git a/tests/ui/parser/issues/issue-103143.rs b/tests/ui/parser/issues/issue-103143.rs index a584274c40514..e7b04df05fd94 100644 --- a/tests/ui/parser/issues/issue-103143.rs +++ b/tests/ui/parser/issues/issue-103143.rs @@ -1,5 +1,5 @@ fn main() { x::<#[a]y::> //~^ ERROR invalid const generic expression - //~| ERROR cannot find value `x` in this scope + //~| ERROR cannot find value `x` } diff --git a/tests/ui/parser/issues/issue-103143.stderr b/tests/ui/parser/issues/issue-103143.stderr index 4035c69afa712..c59dd3240796b 100644 --- a/tests/ui/parser/issues/issue-103143.stderr +++ b/tests/ui/parser/issues/issue-103143.stderr @@ -9,7 +9,7 @@ help: expressions must be enclosed in braces to be used as const generic argumen LL | x::<#[a]{ y:: }> | + + -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-103143.rs:2:5 | LL | x::<#[a]y::> diff --git a/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.rs b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.rs index 1c28c0632fa84..5e5c1cfa59ece 100644 --- a/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.rs +++ b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.rs @@ -3,6 +3,6 @@ struct Apple((Apple, Option(Banana ? Citron))); //~^ ERROR invalid `?` in type //~| ERROR expected one of `)` or `,`, found `Citron` -//~| ERROR cannot find type `Citron` in this scope [E0412] +//~| ERROR cannot find type `Citron` [E0412] //~| ERROR parenthesized type parameters may only be used with a `Fn` trait [E0214] //~| ERROR `Apple` has infinite size diff --git a/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr index b0d8b03ae08c3..63b07f26dda1e 100644 --- a/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr +++ b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr @@ -17,7 +17,7 @@ LL | struct Apple((Apple, Option(Banana ? Citron))); | | | help: missing `,` -error[E0412]: cannot find type `Citron` in this scope +error[E0412]: cannot find type `Citron` --> $DIR/issue-103748-ICE-wrong-braces.rs:3:38 | LL | struct Apple((Apple, Option(Banana ? Citron))); diff --git a/tests/ui/parser/issues/issue-112458.rs b/tests/ui/parser/issues/issue-112458.rs index 36895450cd94f..bc6cf32a90db4 100644 --- a/tests/ui/parser/issues/issue-112458.rs +++ b/tests/ui/parser/issues/issue-112458.rs @@ -1,4 +1,4 @@ fn main() { println!("{}", x.); //~ ERROR unexpected token: `)` - //~^ ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `x` } diff --git a/tests/ui/parser/issues/issue-112458.stderr b/tests/ui/parser/issues/issue-112458.stderr index 54a8f1d03b02a..05d0e18470f25 100644 --- a/tests/ui/parser/issues/issue-112458.stderr +++ b/tests/ui/parser/issues/issue-112458.stderr @@ -4,7 +4,7 @@ error: unexpected token: `)` LL | println!("{}", x.); | ^ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-112458.rs:2:20 | LL | println!("{}", x.); diff --git a/tests/ui/parser/issues/issue-118531-ice.rs b/tests/ui/parser/issues/issue-118531-ice.rs index 24794f06052c9..eeed679027b70 100644 --- a/tests/ui/parser/issues/issue-118531-ice.rs +++ b/tests/ui/parser/issues/issue-118531-ice.rs @@ -3,7 +3,7 @@ fn bar() -> String { [1, 2, 3].iter().map().collect::() //~ ERROR expected `;`, found `#` #[attr] //~ ERROR attributes on expressions are experimental [E0658] - //~^ ERROR cannot find attribute `attr` in this scope + //~^ ERROR cannot find attribute `attr` String::new() } diff --git a/tests/ui/parser/issues/issue-32505.rs b/tests/ui/parser/issues/issue-32505.rs index d95e7dc7d9eff..b91a95f376595 100644 --- a/tests/ui/parser/issues/issue-32505.rs +++ b/tests/ui/parser/issues/issue-32505.rs @@ -1,6 +1,6 @@ pub fn test() { foo(|_|) //~ ERROR expected expression, found `)` - //~^ ERROR cannot find function `foo` in this scope + //~^ ERROR cannot find function `foo` } fn main() { } diff --git a/tests/ui/parser/issues/issue-32505.stderr b/tests/ui/parser/issues/issue-32505.stderr index 0eaa5efd525fc..6e2065dbce7ba 100644 --- a/tests/ui/parser/issues/issue-32505.stderr +++ b/tests/ui/parser/issues/issue-32505.stderr @@ -11,7 +11,7 @@ help: you might have meant to open the body of the closure LL | foo(|_| {}) | ++ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/issue-32505.rs:2:5 | LL | foo(|_|) diff --git a/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.rs b/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.rs index 30f3781bf7743..ef61d902f2644 100644 --- a/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.rs +++ b/tests/ui/parser/issues/issue-65122-mac-invoc-in-mut-patterns.rs @@ -18,9 +18,9 @@ macro_rules! mac2 { fn foo() { mac1! { does_not_exist!() } - //~^ ERROR cannot find macro `does_not_exist` in this scope + //~^ ERROR cannot find macro `does_not_exist` mac2! { does_not_exist!() } - //~^ ERROR cannot find macro `does_not_exist` in this scope + //~^ ERROR cannot find macro `does_not_exist` } fn main() {} diff --git a/tests/ui/parser/kw-in-trait-bounds.rs b/tests/ui/parser/kw-in-trait-bounds.rs index 16d23672ca3c6..0baf0a45a4876 100644 --- a/tests/ui/parser/kw-in-trait-bounds.rs +++ b/tests/ui/parser/kw-in-trait-bounds.rs @@ -17,9 +17,9 @@ fn _g(_: impl struct, _: &dyn struct) //~^ ERROR expected identifier, found keyword `struct` //~| ERROR expected identifier, found keyword `struct` //~| ERROR expected identifier, found keyword `struct` -//~| ERROR cannot find trait `r#struct` in this scope -//~| ERROR cannot find trait `r#struct` in this scope -//~| ERROR cannot find trait `r#struct` in this scope +//~| ERROR cannot find trait `r#struct` +//~| ERROR cannot find trait `r#struct` +//~| ERROR cannot find trait `r#struct` //~| HELP a trait with a similar name exists //~| HELP a trait with a similar name exists //~| HELP a trait with a similar name exists @@ -29,7 +29,7 @@ fn _g(_: impl struct, _: &dyn struct) where B: struct, //~^ ERROR expected identifier, found keyword `struct` - //~| ERROR cannot find trait `r#struct` in this scope + //~| ERROR cannot find trait `r#struct` //~| HELP a trait with a similar name exists //~| HELP escape `struct` to use it as an identifier {} diff --git a/tests/ui/parser/kw-in-trait-bounds.stderr b/tests/ui/parser/kw-in-trait-bounds.stderr index 3c54e03195031..5527d4f3c8bcf 100644 --- a/tests/ui/parser/kw-in-trait-bounds.stderr +++ b/tests/ui/parser/kw-in-trait-bounds.stderr @@ -86,7 +86,7 @@ help: escape `struct` to use it as an identifier LL | B: r#struct, | ++ -error[E0405]: cannot find trait `r#struct` in this scope +error[E0405]: cannot find trait `r#struct` --> $DIR/kw-in-trait-bounds.rs:16:10 | LL | fn _g(_: impl struct, _: &dyn struct) @@ -95,7 +95,7 @@ LL | fn _g(_: impl struct, _: &dyn struct) LL | trait Struct {} | ------------ similarly named trait `Struct` defined here -error[E0405]: cannot find trait `r#struct` in this scope +error[E0405]: cannot find trait `r#struct` --> $DIR/kw-in-trait-bounds.rs:30:8 | LL | B: struct, @@ -104,7 +104,7 @@ LL | B: struct, LL | trait Struct {} | ------------ similarly named trait `Struct` defined here -error[E0405]: cannot find trait `r#struct` in this scope +error[E0405]: cannot find trait `r#struct` --> $DIR/kw-in-trait-bounds.rs:16:29 | LL | fn _g(_: impl struct, _: &dyn struct) @@ -113,7 +113,7 @@ LL | fn _g(_: impl struct, _: &dyn struct) LL | trait Struct {} | ------------ similarly named trait `Struct` defined here -error[E0405]: cannot find trait `r#struct` in this scope +error[E0405]: cannot find trait `r#struct` --> $DIR/kw-in-trait-bounds.rs:16:45 | LL | fn _g(_: impl struct, _: &dyn struct) diff --git a/tests/ui/parser/multibyte-char-use-seperator-issue-80134.rs b/tests/ui/parser/multibyte-char-use-seperator-issue-80134.rs index 7e7995d6724eb..09ec6a6b08bcc 100644 --- a/tests/ui/parser/multibyte-char-use-seperator-issue-80134.rs +++ b/tests/ui/parser/multibyte-char-use-seperator-issue-80134.rs @@ -3,8 +3,8 @@ fn main() { (()é); //~^ ERROR: expected one of `)`, `,`, `.`, `?`, or an operator - //~| ERROR: cannot find value `é` in this scope + //~| ERROR: cannot find value `é` (()氷); //~^ ERROR: expected one of `)`, `,`, `.`, `?`, or an operator - //~| ERROR: cannot find value `氷` in this scope + //~| ERROR: cannot find value `氷` } diff --git a/tests/ui/parser/multibyte-char-use-seperator-issue-80134.stderr b/tests/ui/parser/multibyte-char-use-seperator-issue-80134.stderr index 21e71aa121560..518707fecbf40 100644 --- a/tests/ui/parser/multibyte-char-use-seperator-issue-80134.stderr +++ b/tests/ui/parser/multibyte-char-use-seperator-issue-80134.stderr @@ -16,13 +16,13 @@ LL | (()氷); | expected one of `)`, `,`, `.`, `?`, or an operator | help: missing `,` -error[E0425]: cannot find value `é` in this scope +error[E0425]: cannot find value `é` --> $DIR/multibyte-char-use-seperator-issue-80134.rs:4:8 | LL | (()é); | ^ not found in this scope -error[E0425]: cannot find value `氷` in this scope +error[E0425]: cannot find value `氷` --> $DIR/multibyte-char-use-seperator-issue-80134.rs:7:8 | LL | (()氷); diff --git a/tests/ui/parser/not-a-pred.rs b/tests/ui/parser/not-a-pred.rs index 5518b554d8e53..09c6778f14c8b 100644 --- a/tests/ui/parser/not-a-pred.rs +++ b/tests/ui/parser/not-a-pred.rs @@ -10,6 +10,6 @@ fn main() { let a: isize = 10; let b: isize = 23; check (lt(a, b)); - //~^ ERROR cannot find function `check` in this scope [E0425] + //~^ ERROR cannot find function `check` [E0425] f(a, b); } diff --git a/tests/ui/parser/not-a-pred.stderr b/tests/ui/parser/not-a-pred.stderr index bcc64a687fd0c..fb27131f0f70b 100644 --- a/tests/ui/parser/not-a-pred.stderr +++ b/tests/ui/parser/not-a-pred.stderr @@ -22,7 +22,7 @@ error[E0573]: expected type, found local variable `b` LL | fn f(a: isize, b: isize) : lt(a, b) { } | ^ not a type -error[E0425]: cannot find function `check` in this scope +error[E0425]: cannot find function `check` --> $DIR/not-a-pred.rs:12:5 | LL | check (lt(a, b)); diff --git a/tests/ui/parser/pat-lt-bracket-5.rs b/tests/ui/parser/pat-lt-bracket-5.rs index 6d784494d56a3..1972752386430 100644 --- a/tests/ui/parser/pat-lt-bracket-5.rs +++ b/tests/ui/parser/pat-lt-bracket-5.rs @@ -1,5 +1,5 @@ fn main() { let v[0] = v[1]; //~^ error: expected a pattern, found an expression - //~| error: cannot find value `v` in this scope + //~| error: cannot find value `v` } diff --git a/tests/ui/parser/pat-lt-bracket-5.stderr b/tests/ui/parser/pat-lt-bracket-5.stderr index 18cf2df028216..6331a1602a5b8 100644 --- a/tests/ui/parser/pat-lt-bracket-5.stderr +++ b/tests/ui/parser/pat-lt-bracket-5.stderr @@ -4,7 +4,7 @@ error: expected a pattern, found an expression LL | let v[0] = v[1]; | ^^^^ arbitrary expressions are not allowed in patterns -error[E0425]: cannot find value `v` in this scope +error[E0425]: cannot find value `v` --> $DIR/pat-lt-bracket-5.rs:2:16 | LL | let v[0] = v[1]; diff --git a/tests/ui/parser/raw/raw-literal-keywords.rs b/tests/ui/parser/raw/raw-literal-keywords.rs index a986980fab97b..4679526a3e06a 100644 --- a/tests/ui/parser/raw/raw-literal-keywords.rs +++ b/tests/ui/parser/raw/raw-literal-keywords.rs @@ -11,15 +11,15 @@ fn test_union() { } fn test_if_2() { - let _ = r#if; //~ ERROR cannot find value `r#if` in this scope + let _ = r#if; //~ ERROR cannot find value `r#if` } fn test_struct_2() { - let _ = r#struct; //~ ERROR cannot find value `r#struct` in this scope + let _ = r#struct; //~ ERROR cannot find value `r#struct` } fn test_union_2() { - let _ = r#union; //~ ERROR cannot find value `union` in this scope + let _ = r#union; //~ ERROR cannot find value `union` } fn main() {} diff --git a/tests/ui/parser/raw/raw-literal-keywords.stderr b/tests/ui/parser/raw/raw-literal-keywords.stderr index f7b6c894a90fe..718b3016ce87b 100644 --- a/tests/ui/parser/raw/raw-literal-keywords.stderr +++ b/tests/ui/parser/raw/raw-literal-keywords.stderr @@ -16,19 +16,19 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found LL | r#union Test; | ^^^^ expected one of 8 possible tokens -error[E0425]: cannot find value `r#if` in this scope +error[E0425]: cannot find value `r#if` --> $DIR/raw-literal-keywords.rs:14:13 | LL | let _ = r#if; | ^^^^ not found in this scope -error[E0425]: cannot find value `r#struct` in this scope +error[E0425]: cannot find value `r#struct` --> $DIR/raw-literal-keywords.rs:18:13 | LL | let _ = r#struct; | ^^^^^^^^ not found in this scope -error[E0425]: cannot find value `union` in this scope +error[E0425]: cannot find value `union` --> $DIR/raw-literal-keywords.rs:22:13 | LL | let _ = r#union; diff --git a/tests/ui/parser/recover/recover-fn-ptr-with-generics.rs b/tests/ui/parser/recover/recover-fn-ptr-with-generics.rs index 76c56a715d2a4..64bb0f973b4a6 100644 --- a/tests/ui/parser/recover/recover-fn-ptr-with-generics.rs +++ b/tests/ui/parser/recover/recover-fn-ptr-with-generics.rs @@ -4,8 +4,8 @@ fn main() { type Identity = fn(T) -> T; //~^ ERROR function pointer types may not have generic parameters - //~| ERROR cannot find type `T` in this scope - //~| ERROR cannot find type `T` in this scope + //~| ERROR cannot find type `T` + //~| ERROR cannot find type `T` let _: fn(); //~^ ERROR function pointer types may not have generic parameters diff --git a/tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr b/tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr index 6b6cb2d6bdde7..8156185828786 100644 --- a/tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr +++ b/tests/ui/parser/recover/recover-fn-ptr-with-generics.stderr @@ -88,13 +88,13 @@ error: expected identifier, found `>` LL | type QuiteBroken = fn(); | ^ expected identifier -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/recover-fn-ptr-with-generics.rs:5:27 | LL | type Identity = fn(T) -> T; | ^ not found in this scope -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/recover-fn-ptr-with-generics.rs:5:33 | LL | type Identity = fn(T) -> T; diff --git a/tests/ui/parser/recover/recover-ref-dyn-mut.rs b/tests/ui/parser/recover/recover-ref-dyn-mut.rs index 3016275cc0fd2..e9067c3fe3662 100644 --- a/tests/ui/parser/recover/recover-ref-dyn-mut.rs +++ b/tests/ui/parser/recover/recover-ref-dyn-mut.rs @@ -5,5 +5,5 @@ fn main() { let r: &dyn mut Trait; //~^ ERROR: `mut` must precede `dyn` //~| HELP: place `mut` before `dyn` - //~| ERROR: cannot find trait `Trait` in this scope [E0405] + //~| ERROR: cannot find trait `Trait` [E0405] } diff --git a/tests/ui/parser/recover/recover-ref-dyn-mut.stderr b/tests/ui/parser/recover/recover-ref-dyn-mut.stderr index c048c8ea1b0dd..378b69a08c2f1 100644 --- a/tests/ui/parser/recover/recover-ref-dyn-mut.stderr +++ b/tests/ui/parser/recover/recover-ref-dyn-mut.stderr @@ -4,7 +4,7 @@ error: `mut` must precede `dyn` LL | let r: &dyn mut Trait; | ^^^^^^^^ help: place `mut` before `dyn`: `&mut dyn` -error[E0405]: cannot find trait `Trait` in this scope +error[E0405]: cannot find trait `Trait` --> $DIR/recover-ref-dyn-mut.rs:5:21 | LL | let r: &dyn mut Trait; diff --git a/tests/ui/parser/recover/recover-unticked-labels.fixed b/tests/ui/parser/recover/recover-unticked-labels.fixed index f003550cbc222..074b047db91f6 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.fixed +++ b/tests/ui/parser/recover/recover-unticked-labels.fixed @@ -1,7 +1,7 @@ //@ run-rustfix fn main() { - 'label: loop { break 'label }; //~ error: cannot find value `label` in this scope + 'label: loop { break 'label }; //~ error: cannot find value `label` 'label: loop { break 'label 0 }; //~ error: expected a label, found an identifier 'label: loop { continue 'label }; //~ error: expected a label, found an identifier } diff --git a/tests/ui/parser/recover/recover-unticked-labels.rs b/tests/ui/parser/recover/recover-unticked-labels.rs index 2b864f16b8412..629cc31509b35 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.rs +++ b/tests/ui/parser/recover/recover-unticked-labels.rs @@ -1,7 +1,7 @@ //@ run-rustfix fn main() { - 'label: loop { break label }; //~ error: cannot find value `label` in this scope + 'label: loop { break label }; //~ error: cannot find value `label` 'label: loop { break label 0 }; //~ error: expected a label, found an identifier 'label: loop { continue label }; //~ error: expected a label, found an identifier } diff --git a/tests/ui/parser/recover/recover-unticked-labels.stderr b/tests/ui/parser/recover/recover-unticked-labels.stderr index fbd108ca613c7..6314c19fe7d72 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.stderr +++ b/tests/ui/parser/recover/recover-unticked-labels.stderr @@ -14,7 +14,7 @@ LL | 'label: loop { continue label }; | | | help: labels start with a tick -error[E0425]: cannot find value `label` in this scope +error[E0425]: cannot find value `label` --> $DIR/recover-unticked-labels.rs:4:26 | LL | 'label: loop { break label }; diff --git a/tests/ui/parser/trailing-question-in-macro-type.rs b/tests/ui/parser/trailing-question-in-macro-type.rs index e2a681ddd1115..eb1f47d7df972 100644 --- a/tests/ui/parser/trailing-question-in-macro-type.rs +++ b/tests/ui/parser/trailing-question-in-macro-type.rs @@ -10,5 +10,5 @@ macro_rules! fn_expr { fn main() { fn_expr!{ o?.when(|&i| i > 0)?.when(|&i| i%2 == 0) }; - //~^ ERROR cannot find value `o` in this scope + //~^ ERROR cannot find value `o` } diff --git a/tests/ui/parser/trailing-question-in-macro-type.stderr b/tests/ui/parser/trailing-question-in-macro-type.stderr index e3d33bf251d66..361014b7c3d16 100644 --- a/tests/ui/parser/trailing-question-in-macro-type.stderr +++ b/tests/ui/parser/trailing-question-in-macro-type.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `o` in this scope +error[E0425]: cannot find value `o` --> $DIR/trailing-question-in-macro-type.rs:12:15 | LL | fn_expr!{ o?.when(|&i| i > 0)?.when(|&i| i%2 == 0) }; diff --git a/tests/ui/parser/unmatched-langle-1.rs b/tests/ui/parser/unmatched-langle-1.rs index fdf2ae398014b..16dc8943023fe 100644 --- a/tests/ui/parser/unmatched-langle-1.rs +++ b/tests/ui/parser/unmatched-langle-1.rs @@ -4,6 +4,6 @@ fn main() { foo::<<<>(); //~^ ERROR: unmatched angle brackets - //~| ERROR: cannot find function `foo` in this scope [E0425] - //~| ERROR: cannot find type `Ty` in this scope [E0412] + //~| ERROR: cannot find function `foo` [E0425] + //~| ERROR: cannot find type `Ty` [E0412] } diff --git a/tests/ui/parser/unmatched-langle-1.stderr b/tests/ui/parser/unmatched-langle-1.stderr index cdf74bdedc2e1..45edd1bd60491 100644 --- a/tests/ui/parser/unmatched-langle-1.stderr +++ b/tests/ui/parser/unmatched-langle-1.stderr @@ -4,13 +4,13 @@ error: unmatched angle brackets LL | foo::<<<>(); | ^^^ help: remove extra angle brackets -error[E0412]: cannot find type `Ty` in this scope +error[E0412]: cannot find type `Ty` --> $DIR/unmatched-langle-1.rs:5:14 | LL | foo::<<<>(); | ^^ not found in this scope -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/unmatched-langle-1.rs:5:5 | LL | foo::<<<>(); diff --git a/tests/ui/parser/where_with_bound.rs b/tests/ui/parser/where_with_bound.rs index 3ca45f1889c9c..c5a00a1001701 100644 --- a/tests/ui/parser/where_with_bound.rs +++ b/tests/ui/parser/where_with_bound.rs @@ -1,5 +1,5 @@ fn foo() where ::Item: ToString, T: Iterator { } //~^ ERROR generic parameters on `where` clauses are reserved for future use -//~| ERROR cannot find type `Item` in the crate root +//~| ERROR cannot find type `Item` fn main() {} diff --git a/tests/ui/parser/where_with_bound.stderr b/tests/ui/parser/where_with_bound.stderr index ff98b3f5fed61..73b7a5b3d60f9 100644 --- a/tests/ui/parser/where_with_bound.stderr +++ b/tests/ui/parser/where_with_bound.stderr @@ -4,7 +4,7 @@ error: generic parameters on `where` clauses are reserved for future use LL | fn foo() where ::Item: ToString, T: Iterator { } | ^^^ currently unsupported -error[E0412]: cannot find type `Item` in the crate root +error[E0412]: cannot find type `Item` --> $DIR/where_with_bound.rs:1:24 | LL | fn foo() where ::Item: ToString, T: Iterator { } diff --git a/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs index fe7655c2c4e1c..32c0e858fd296 100644 --- a/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs +++ b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.rs @@ -1,22 +1,22 @@ fn main() { match &[1, 2, 3][..] { [1, rest..] => println!("{rest}"), - //~^ ERROR cannot find value `rest` in this scope - //~| ERROR cannot find value `rest` in this scope + //~^ ERROR cannot find value `rest` + //~| ERROR cannot find value `rest` //~| ERROR `X..` patterns in slices are experimental _ => {} } match &[4, 5, 6][..] { [] => {} [_, ..tail] => println!("{tail}"), - //~^ ERROR cannot find value `tail` in this scope - //~| ERROR cannot find value `tail` in this scope + //~^ ERROR cannot find value `tail` + //~| ERROR cannot find value `tail` } match &[7, 8, 9][..] { [] => {} [_, ...tail] => println!("{tail}"), - //~^ ERROR cannot find value `tail` in this scope - //~| ERROR cannot find value `tail` in this scope + //~^ ERROR cannot find value `tail` + //~| ERROR cannot find value `tail` //~| ERROR range-to patterns with `...` are not allowed } } diff --git a/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr index 37c02eb6ada9c..283babbbef6fd 100644 --- a/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr +++ b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr @@ -4,7 +4,7 @@ error: range-to patterns with `...` are not allowed LL | [_, ...tail] => println!("{tail}"), | ^^^ help: use `..=` instead -error[E0425]: cannot find value `rest` in this scope +error[E0425]: cannot find value `rest` --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13 | LL | [1, rest..] => println!("{rest}"), @@ -15,13 +15,13 @@ help: if you meant to collect the rest of the slice in `rest`, use the at operat LL | [1, rest @ ..] => println!("{rest}"), | + -error[E0425]: cannot find value `rest` in this scope +error[E0425]: cannot find value `rest` --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:35 | LL | [1, rest..] => println!("{rest}"), | ^^^^ not found in this scope -error[E0425]: cannot find value `tail` in this scope +error[E0425]: cannot find value `tail` --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:11:15 | LL | [_, ..tail] => println!("{tail}"), @@ -32,13 +32,13 @@ help: if you meant to collect the rest of the slice in `tail`, use the at operat LL | [_, tail @ ..] => println!("{tail}"), | ~~~~~~~~~ -error[E0425]: cannot find value `tail` in this scope +error[E0425]: cannot find value `tail` --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:11:35 | LL | [_, ..tail] => println!("{tail}"), | ^^^^ not found in this scope -error[E0425]: cannot find value `tail` in this scope +error[E0425]: cannot find value `tail` --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:17:16 | LL | [_, ...tail] => println!("{tail}"), @@ -49,7 +49,7 @@ help: if you meant to collect the rest of the slice in `tail`, use the at operat LL | [_, tail @ ..] => println!("{tail}"), | ~~~~~~~~~ -error[E0425]: cannot find value `tail` in this scope +error[E0425]: cannot find value `tail` --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:17:36 | LL | [_, ...tail] => println!("{tail}"), diff --git a/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr b/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr index 1c560aa2ca813..cf827eb569aec 100644 --- a/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr +++ b/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `NonExistent` in this scope +error[E0412]: cannot find type `NonExistent` --> $DIR/issue-119493-type-error-ice.rs:5:16 | LL | struct Foo(NonExistent); | ^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `NonExistent` in this scope +error[E0412]: cannot find type `NonExistent` --> $DIR/issue-119493-type-error-ice.rs:5:16 | LL | struct Foo(NonExistent); diff --git a/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr b/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr index 7da384d613efb..affbd6f317ac0 100644 --- a/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr +++ b/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `S` in this scope +error[E0425]: cannot find value `S` --> $DIR/issue-119778-type-error-ice.rs:5:21 | LL | struct Foo([u8; S]); @@ -9,7 +9,7 @@ help: you might be missing a const parameter LL | struct Foo([u8; S]); | +++++++++++++++++++++ -error[E0425]: cannot find value `S` in this scope +error[E0425]: cannot find value `S` --> $DIR/issue-119778-type-error-ice.rs:5:21 | LL | struct Foo([u8; S]); diff --git a/tests/ui/privacy/privacy-ns1.rs b/tests/ui/privacy/privacy-ns1.rs index 1af5b857e9df6..4ef1ba5c1f52a 100644 --- a/tests/ui/privacy/privacy-ns1.rs +++ b/tests/ui/privacy/privacy-ns1.rs @@ -48,8 +48,8 @@ pub mod foo3 { fn test_glob3() { use foo3::*; - Bar(); //~ ERROR cannot find function, tuple struct or tuple variant `Bar` in this scope - let _x: Box; //~ ERROR cannot find type `Bar` in this scope + Bar(); //~ ERROR cannot find function, tuple struct or tuple variant `Bar` + let _x: Box; //~ ERROR cannot find type `Bar` } fn main() { diff --git a/tests/ui/privacy/privacy-ns1.stderr b/tests/ui/privacy/privacy-ns1.stderr index 9710cc48637bc..20152f35f81d4 100644 --- a/tests/ui/privacy/privacy-ns1.stderr +++ b/tests/ui/privacy/privacy-ns1.stderr @@ -16,7 +16,7 @@ help: consider importing this function instead LL + use foo2::Bar; | -error[E0425]: cannot find function, tuple struct or tuple variant `Bar` in this scope +error[E0425]: cannot find function, tuple struct or tuple variant `Bar` --> $DIR/privacy-ns1.rs:51:5 | LL | pub struct Baz; @@ -34,7 +34,7 @@ help: consider importing this function LL + use foo2::Bar; | -error[E0412]: cannot find type `Bar` in this scope +error[E0412]: cannot find type `Bar` --> $DIR/privacy-ns1.rs:52:17 | LL | pub struct Baz; diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs index 3f191cba74583..19fd4cdac9d04 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs @@ -16,5 +16,5 @@ fn bench(b: &mut test::Bencher) {} fn not_main() { Test; Bench; - NonExistent; //~ ERROR cannot find value `NonExistent` in this scope + NonExistent; //~ ERROR cannot find value `NonExistent` } diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr index 346cebf639d17..80f7e5e37ac2f 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs-test.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `NonExistent` in this scope +error[E0425]: cannot find value `NonExistent` --> $DIR/ambiguous-builtin-attrs-test.rs:19:5 | LL | NonExistent; diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs index c82663541a795..2917bff9e2181 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs.rs +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.rs @@ -31,7 +31,7 @@ fn non_macro_expanded_location<#[repr(C)] T>() { fn main() { Test; Bench; - NonExistent; //~ ERROR cannot find value `NonExistent` in this scope + NonExistent; //~ ERROR cannot find value `NonExistent` } use deny as allow; diff --git a/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr b/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr index 0f4ddc065a742..b4432d50a6410 100644 --- a/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr +++ b/tests/ui/proc-macro/ambiguous-builtin-attrs.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `NonExistent` in this scope +error[E0425]: cannot find value `NonExistent` --> $DIR/ambiguous-builtin-attrs.rs:34:5 | LL | NonExistent; diff --git a/tests/ui/proc-macro/attributes-on-modules-fail.rs b/tests/ui/proc-macro/attributes-on-modules-fail.rs index 9b2eb703eacca..a68a7911f6108 100644 --- a/tests/ui/proc-macro/attributes-on-modules-fail.rs +++ b/tests/ui/proc-macro/attributes-on-modules-fail.rs @@ -7,11 +7,11 @@ extern crate test_macros; mod m { pub struct X; - type A = Y; //~ ERROR cannot find type `Y` in this scope + type A = Y; //~ ERROR cannot find type `Y` } struct Y; -type A = X; //~ ERROR cannot find type `X` in this scope +type A = X; //~ ERROR cannot find type `X` #[derive(Copy)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s mod n {} diff --git a/tests/ui/proc-macro/attributes-on-modules-fail.stderr b/tests/ui/proc-macro/attributes-on-modules-fail.stderr index e69ab78723861..8f37ea2915ac3 100644 --- a/tests/ui/proc-macro/attributes-on-modules-fail.stderr +++ b/tests/ui/proc-macro/attributes-on-modules-fail.stderr @@ -46,7 +46,7 @@ LL | mod inner; = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0412]: cannot find type `Y` in this scope +error[E0412]: cannot find type `Y` --> $DIR/attributes-on-modules-fail.rs:10:14 | LL | type A = Y; @@ -57,7 +57,7 @@ help: consider importing this struct LL + use Y; | -error[E0412]: cannot find type `X` in this scope +error[E0412]: cannot find type `X` --> $DIR/attributes-on-modules-fail.rs:14:10 | LL | type A = X; diff --git a/tests/ui/proc-macro/break-token-spans.stderr b/tests/ui/proc-macro/break-token-spans.stderr index e69cc3b8cf598..17d2f63ef93ec 100644 --- a/tests/ui/proc-macro/break-token-spans.stderr +++ b/tests/ui/proc-macro/break-token-spans.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `f` in this scope +error[E0425]: cannot find function `f` --> $DIR/break-token-spans.rs:13:5 | LL | f :: < Vec < _ > > ( ) ; diff --git a/tests/ui/proc-macro/derive-helper-legacy-limits.rs b/tests/ui/proc-macro/derive-helper-legacy-limits.rs index ff09095a60f9d..ce8bdf8c245db 100644 --- a/tests/ui/proc-macro/derive-helper-legacy-limits.rs +++ b/tests/ui/proc-macro/derive-helper-legacy-limits.rs @@ -14,7 +14,7 @@ use derive as my_derive; struct S1; // Legacy helper detection doesn't see through `derive` renaming. -#[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope +#[empty_helper] //~ ERROR cannot find attribute `empty_helper` #[my_derive(Empty)] struct S2; diff --git a/tests/ui/proc-macro/derive-helper-legacy-spurious.rs b/tests/ui/proc-macro/derive-helper-legacy-spurious.rs index 2b5bb905e8302..1d20ac5004f60 100644 --- a/tests/ui/proc-macro/derive-helper-legacy-spurious.rs +++ b/tests/ui/proc-macro/derive-helper-legacy-spurious.rs @@ -1,12 +1,12 @@ //@ aux-build:test-macros.rs -#![dummy] //~ ERROR cannot find attribute `dummy` in this scope +#![dummy] //~ ERROR cannot find attribute `dummy` #[macro_use] extern crate test_macros; #[derive(Empty)] -#[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope +#[empty_helper] //~ ERROR cannot find attribute `empty_helper` struct Foo {} fn main() {} diff --git a/tests/ui/proc-macro/derive-helper-shadowing.rs b/tests/ui/proc-macro/derive-helper-shadowing.rs index 1c66a60b294b8..f1b7b13583ecf 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.rs +++ b/tests/ui/proc-macro/derive-helper-shadowing.rs @@ -11,7 +11,7 @@ use test_macros::empty_attr as empty_helper; macro_rules! gen_helper_use { () => { - #[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope + #[empty_helper] //~ ERROR cannot find attribute `empty_helper` struct W; } } @@ -35,7 +35,7 @@ struct S { gen_helper_use!(); - #[derive(GenHelperUse)] //~ ERROR cannot find attribute `empty_helper` in this scope + #[derive(GenHelperUse)] //~ ERROR cannot find attribute `empty_helper` struct Owo; use empty_helper as renamed; diff --git a/tests/ui/proc-macro/derive-still-gated.rs b/tests/ui/proc-macro/derive-still-gated.rs index bce7badeffe1d..b08dd2ef932bc 100644 --- a/tests/ui/proc-macro/derive-still-gated.rs +++ b/tests/ui/proc-macro/derive-still-gated.rs @@ -3,7 +3,7 @@ #[macro_use] extern crate test_macros; -#[derive_Empty] //~ ERROR cannot find attribute `derive_Empty` in this scope +#[derive_Empty] //~ ERROR cannot find attribute `derive_Empty` struct A; fn main() {} diff --git a/tests/ui/proc-macro/disappearing-resolution.rs b/tests/ui/proc-macro/disappearing-resolution.rs index b8bc2953576a6..3d700f44175df 100644 --- a/tests/ui/proc-macro/disappearing-resolution.rs +++ b/tests/ui/proc-macro/disappearing-resolution.rs @@ -15,7 +15,7 @@ use m::Empty; //~ ERROR derive macro import `Empty` is private // successfully resolve `Empty` from there, and then resolve `empty_helper` as its helper. // During validation `use m::Empty` introduces a `Res::Err` stub, so `Empty` resolves to it, // and `empty_helper` can no longer be resolved. -#[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope +#[empty_helper] //~ ERROR cannot find attribute `empty_helper` #[derive(Empty)] struct S; diff --git a/tests/ui/proc-macro/empty-where-clause.stderr b/tests/ui/proc-macro/empty-where-clause.stderr index 192a2b30f0dcd..8ef47abcd2e8b 100644 --- a/tests/ui/proc-macro/empty-where-clause.stderr +++ b/tests/ui/proc-macro/empty-where-clause.stderr @@ -1,16 +1,16 @@ -error[E0412]: cannot find type `MissingType1` in this scope +error[E0412]: cannot find type `MissingType1` --> $DIR/empty-where-clause.rs:8:12 | LL | field: MissingType1 | ^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `MissingType2` in this scope +error[E0412]: cannot find type `MissingType2` --> $DIR/empty-where-clause.rs:12:20 | LL | struct TupleStruct(MissingType2) where; | ^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `MissingType3` in this scope +error[E0412]: cannot find type `MissingType3` --> $DIR/empty-where-clause.rs:15:13 | LL | Variant(MissingType3) diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs index 2bfbf9dcccaaf..8d52f7f3dd9fd 100644 --- a/tests/ui/proc-macro/gen-macro-rules-hygiene.rs +++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.rs @@ -11,13 +11,13 @@ struct ItemUse; gen_macro_rules!(); //~^ ERROR use of undeclared label `'label_use` -//~| ERROR cannot find value `local_use` in this scope +//~| ERROR cannot find value `local_use` fn main() { 'label_use: loop { let local_use = 1; generated!(); ItemDef; // OK - local_def; //~ ERROR cannot find value `local_def` in this scope + local_def; //~ ERROR cannot find value `local_def` } } diff --git a/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr b/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr index df7c4f72eb0b6..ac16658ebca2b 100644 --- a/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr +++ b/tests/ui/proc-macro/gen-macro-rules-hygiene.stderr @@ -9,7 +9,7 @@ LL | generated!(); | = note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `local_use` in this scope +error[E0425]: cannot find value `local_use` --> $DIR/gen-macro-rules-hygiene.rs:12:1 | LL | gen_macro_rules!(); @@ -20,7 +20,7 @@ LL | generated!(); | = note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `local_def` in this scope +error[E0425]: cannot find value `local_def` --> $DIR/gen-macro-rules-hygiene.rs:21:9 | LL | local_def; diff --git a/tests/ui/proc-macro/generate-mod.rs b/tests/ui/proc-macro/generate-mod.rs index ab93666f28af1..b77ea3d8ffe1a 100644 --- a/tests/ui/proc-macro/generate-mod.rs +++ b/tests/ui/proc-macro/generate-mod.rs @@ -6,22 +6,22 @@ extern crate generate_mod; struct FromOutside; -generate_mod::check!(); //~ ERROR cannot find type `FromOutside` in this scope - //~| ERROR cannot find type `Outer` in this scope +generate_mod::check!(); //~ ERROR cannot find type `FromOutside` + //~| ERROR cannot find type `Outer` -#[generate_mod::check_attr] //~ ERROR cannot find type `FromOutside` in this scope - //~| ERROR cannot find type `OuterAttr` in this scope +#[generate_mod::check_attr] //~ ERROR cannot find type `FromOutside` + //~| ERROR cannot find type `OuterAttr` struct S; -#[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope - //~| ERROR cannot find type `OuterDerive` in this scope +#[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` + //~| ERROR cannot find type `OuterDerive` //~| WARN this was previously accepted //~| WARN this was previously accepted struct Z; fn inner_block() { - #[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope - //~| ERROR cannot find type `OuterDerive` in this scope + #[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` + //~| ERROR cannot find type `OuterDerive` //~| WARN this was previously accepted //~| WARN this was previously accepted struct InnerZ; diff --git a/tests/ui/proc-macro/generate-mod.stderr b/tests/ui/proc-macro/generate-mod.stderr index cbe6b14ca9af5..528ec6558e43e 100644 --- a/tests/ui/proc-macro/generate-mod.stderr +++ b/tests/ui/proc-macro/generate-mod.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `FromOutside` in this scope +error[E0412]: cannot find type `FromOutside` --> $DIR/generate-mod.rs:9:1 | LL | generate_mod::check!(); @@ -8,7 +8,7 @@ LL | generate_mod::check!(); FromOutside = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `Outer` in this scope +error[E0412]: cannot find type `Outer` --> $DIR/generate-mod.rs:9:1 | LL | generate_mod::check!(); @@ -18,7 +18,7 @@ LL | generate_mod::check!(); Outer = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `FromOutside` in this scope +error[E0412]: cannot find type `FromOutside` --> $DIR/generate-mod.rs:12:1 | LL | #[generate_mod::check_attr] @@ -28,7 +28,7 @@ LL | #[generate_mod::check_attr] FromOutside = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `OuterAttr` in this scope +error[E0412]: cannot find type `OuterAttr` --> $DIR/generate-mod.rs:12:1 | LL | #[generate_mod::check_attr] diff --git a/tests/ui/proc-macro/issue-118455-skip-err-builtin.rs b/tests/ui/proc-macro/issue-118455-skip-err-builtin.rs index baef020612891..75bdc4b111ea7 100644 --- a/tests/ui/proc-macro/issue-118455-skip-err-builtin.rs +++ b/tests/ui/proc-macro/issue-118455-skip-err-builtin.rs @@ -1,5 +1,5 @@ #![some_nonexistent_attribute] -//~^ ERROR cannot find attribute `some_nonexistent_attribute` in this scope +//~^ ERROR cannot find attribute `some_nonexistent_attribute` #[derive(Debug)] pub struct SomeUserCode; diff --git a/tests/ui/proc-macro/issue-38586.stderr b/tests/ui/proc-macro/issue-38586.stderr index 0049155645078..9c448ce569d06 100644 --- a/tests/ui/proc-macro/issue-38586.stderr +++ b/tests/ui/proc-macro/issue-38586.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/issue-38586.rs:6:10 | LL | #[derive(A)] diff --git a/tests/ui/proc-macro/issue-83510.rs b/tests/ui/proc-macro/issue-83510.rs index ea8a334f57c55..3e32e7b16bbba 100644 --- a/tests/ui/proc-macro/issue-83510.rs +++ b/tests/ui/proc-macro/issue-83510.rs @@ -3,9 +3,9 @@ extern crate issue_83510; issue_83510::dance_like_you_want_to_ice!(); -//~^ ERROR: cannot find type `Foo` in this scope +//~^ ERROR: cannot find type `Foo` //~| ERROR: expected trait, found struct `Box` -//~| ERROR: cannot find trait `Baz` in this scope +//~| ERROR: cannot find trait `Baz` //~| ERROR: inherent associated types are unstable fn main() {} diff --git a/tests/ui/proc-macro/issue-83510.stderr b/tests/ui/proc-macro/issue-83510.stderr index e59b77af3dc39..ca748dfca857c 100644 --- a/tests/ui/proc-macro/issue-83510.stderr +++ b/tests/ui/proc-macro/issue-83510.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/issue-83510.rs:5:1 | LL | issue_83510::dance_like_you_want_to_ice!(); @@ -14,7 +14,7 @@ LL | issue_83510::dance_like_you_want_to_ice!(); | = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0405]: cannot find trait `Baz` in this scope +error[E0405]: cannot find trait `Baz` --> $DIR/issue-83510.rs:5:1 | LL | issue_83510::dance_like_you_want_to_ice!(); diff --git a/tests/ui/proc-macro/keep-expr-tokens.stderr b/tests/ui/proc-macro/keep-expr-tokens.stderr index 1a1f83cc1569b..d67799de8222a 100644 --- a/tests/ui/proc-macro/keep-expr-tokens.stderr +++ b/tests/ui/proc-macro/keep-expr-tokens.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `bad` in this scope +error[E0425]: cannot find value `bad` --> $DIR/keep-expr-tokens.rs:19:62 | LL | (#[recollect_attr] #[recollect_attr] ((#[recollect_attr] bad))); | ^^^ not found in this scope -error[E0425]: cannot find function `missing_fn` in this scope +error[E0425]: cannot find function `missing_fn` --> $DIR/keep-expr-tokens.rs:17:17 | LL | for item in missing_fn() {} diff --git a/tests/ui/proc-macro/lints_in_proc_macros.rs b/tests/ui/proc-macro/lints_in_proc_macros.rs index 13ae7239a143d..22ebf4d66c172 100644 --- a/tests/ui/proc-macro/lints_in_proc_macros.rs +++ b/tests/ui/proc-macro/lints_in_proc_macros.rs @@ -7,7 +7,7 @@ use bang_proc_macro2::bang_proc_macro2; fn main() { let foobar = 42; bang_proc_macro2!(); - //~^ ERROR cannot find value `foobar2` in this scope + //~^ ERROR cannot find value `foobar2` //~| HELP a local variable with a similar name exists //~| SUGGESTION foobar println!("{}", x); diff --git a/tests/ui/proc-macro/lints_in_proc_macros.stderr b/tests/ui/proc-macro/lints_in_proc_macros.stderr index 244d218608be7..fba9f32e3f622 100644 --- a/tests/ui/proc-macro/lints_in_proc_macros.stderr +++ b/tests/ui/proc-macro/lints_in_proc_macros.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `foobar2` in this scope +error[E0425]: cannot find value `foobar2` --> $DIR/lints_in_proc_macros.rs:9:5 | LL | bang_proc_macro2!(); diff --git a/tests/ui/proc-macro/macro-namespace-reserved-2.rs b/tests/ui/proc-macro/macro-namespace-reserved-2.rs index 79f591d8cb61e..929cb46ae98c9 100644 --- a/tests/ui/proc-macro/macro-namespace-reserved-2.rs +++ b/tests/ui/proc-macro/macro-namespace-reserved-2.rs @@ -25,17 +25,17 @@ fn check_bang1() { my_macro!(); //~ ERROR can't use a procedural macro from the same crate that defines it } fn check_bang2() { - my_macro_attr!(); //~ ERROR cannot find macro `my_macro_attr` in this scope + my_macro_attr!(); //~ ERROR cannot find macro `my_macro_attr` crate::my_macro_attr!(); //~ ERROR can't use a procedural macro from the same crate that defines //~| ERROR expected macro, found attribute macro `crate::my_macro_attr` } fn check_bang3() { - MyTrait!(); //~ ERROR cannot find macro `MyTrait` in this scope + MyTrait!(); //~ ERROR cannot find macro `MyTrait` crate::MyTrait!(); //~ ERROR can't use a procedural macro from the same crate that defines it //~| ERROR expected macro, found derive macro `crate::MyTrait` } -#[my_macro] //~ ERROR cannot find attribute `my_macro` in this scope +#[my_macro] //~ ERROR cannot find attribute `my_macro` #[crate::my_macro] //~ ERROR can't use a procedural macro from the same crate that defines it //~| ERROR expected attribute, found macro `crate::my_macro` fn check_attr1() {} @@ -45,8 +45,8 @@ fn check_attr2() {} //~| ERROR expected attribute, found derive macro `MyTrait` fn check_attr3() {} -#[derive(my_macro)] //~ ERROR cannot find derive macro `my_macro` in this scope - //~| ERROR cannot find derive macro `my_macro` in this scope +#[derive(my_macro)] //~ ERROR cannot find derive macro `my_macro` + //~| ERROR cannot find derive macro `my_macro` #[derive(crate::my_macro)] //~ ERROR can't use a procedural macro from the same crate that defines //~| ERROR expected derive macro, found macro `crate::my_macro` struct CheckDerive1; diff --git a/tests/ui/proc-macro/macro-rules-derive.stderr b/tests/ui/proc-macro/macro-rules-derive.stderr index e7cd4474618fe..6457e84a514cb 100644 --- a/tests/ui/proc-macro/macro-rules-derive.stderr +++ b/tests/ui/proc-macro/macro-rules-derive.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `MissingType` in this scope +error[E0412]: cannot find type `MissingType` --> $DIR/macro-rules-derive.rs:10:20 | LL | field: MissingType diff --git a/tests/ui/proc-macro/mixed-site-span.rs b/tests/ui/proc-macro/mixed-site-span.rs index bab76a8c43319..005c7b31ab705 100644 --- a/tests/ui/proc-macro/mixed-site-span.rs +++ b/tests/ui/proc-macro/mixed-site-span.rs @@ -12,13 +12,13 @@ fn main() { let local_use = 1; proc_macro_rules!(); //~^ ERROR use of undeclared label `'label_use` - //~| ERROR cannot find value `local_use` in this scope + //~| ERROR cannot find value `local_use` ItemDef; // OK - local_def; //~ ERROR cannot find value `local_def` in this scope + local_def; //~ ERROR cannot find value `local_def` } } macro_rules! pass_dollar_crate { - () => (proc_macro_rules!($crate);) //~ ERROR cannot find type `ItemUse` in crate `$crate` + () => (proc_macro_rules!($crate);) //~ ERROR cannot find type `ItemUse` } pass_dollar_crate!(); diff --git a/tests/ui/proc-macro/mixed-site-span.stderr b/tests/ui/proc-macro/mixed-site-span.stderr index 1378608012464..3df298a4ec59a 100644 --- a/tests/ui/proc-macro/mixed-site-span.stderr +++ b/tests/ui/proc-macro/mixed-site-span.stderr @@ -6,7 +6,7 @@ LL | proc_macro_rules!(); | = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `local_use` in this scope +error[E0425]: cannot find value `local_use` --> $DIR/mixed-site-span.rs:13:9 | LL | proc_macro_rules!(); @@ -14,17 +14,17 @@ LL | proc_macro_rules!(); | = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `local_def` in this scope +error[E0425]: cannot find value `local_def` --> $DIR/mixed-site-span.rs:17:9 | LL | local_def; | ^^^^^^^^^ help: a local variable with a similar name exists: `local_use` -error[E0412]: cannot find type `ItemUse` in crate `$crate` +error[E0412]: cannot find type `ItemUse` --> $DIR/mixed-site-span.rs:24:1 | LL | pass_dollar_crate!(); - | ^^^^^^^^^^^^^^^^^^^^ not found in `$crate` + | ^^^^^^^^^^^^^^^^^^^^ not found in crate `$crate` | = note: this error originates in the macro `proc_macro_rules` which comes from the expansion of the macro `pass_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/proc-macro/parent-source-spans.rs b/tests/ui/proc-macro/parent-source-spans.rs index 12a1ab1a43d57..84f6c57d4aef7 100644 --- a/tests/ui/proc-macro/parent-source-spans.rs +++ b/tests/ui/proc-macro/parent-source-spans.rs @@ -27,9 +27,9 @@ macro three($($tokens:tt)*) { macro four($($tokens:tt)*) { parent_source_spans!($($tokens)*); - //~^ ERROR cannot find value `ok` in this scope - //~| ERROR cannot find value `ok` in this scope - //~| ERROR cannot find value `ok` in this scope + //~^ ERROR cannot find value `ok` + //~| ERROR cannot find value `ok` + //~| ERROR cannot find value `ok` } fn main() { diff --git a/tests/ui/proc-macro/parent-source-spans.stderr b/tests/ui/proc-macro/parent-source-spans.stderr index a3b27fd7bcc1b..b50142bc83bb3 100644 --- a/tests/ui/proc-macro/parent-source-spans.stderr +++ b/tests/ui/proc-macro/parent-source-spans.stderr @@ -136,7 +136,7 @@ error: second source: "hop" LL | three!("hip", "hop"); | ^^^^^ -error[E0425]: cannot find value `ok` in this scope +error[E0425]: cannot find value `ok` --> $DIR/parent-source-spans.rs:29:5 | LL | parent_source_spans!($($tokens)*); @@ -150,7 +150,7 @@ LL | one!("hello", "world"); | = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `ok` in this scope +error[E0425]: cannot find value `ok` --> $DIR/parent-source-spans.rs:29:5 | LL | parent_source_spans!($($tokens)*); @@ -164,7 +164,7 @@ LL | two!("yay", "rust"); | = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `ok` in this scope +error[E0425]: cannot find value `ok` --> $DIR/parent-source-spans.rs:29:5 | LL | parent_source_spans!($($tokens)*); diff --git a/tests/ui/proc-macro/proc-macro-attributes.rs b/tests/ui/proc-macro/proc-macro-attributes.rs index 6d5e7b67c782e..e7f6e83cd640e 100644 --- a/tests/ui/proc-macro/proc-macro-attributes.rs +++ b/tests/ui/proc-macro/proc-macro-attributes.rs @@ -6,7 +6,7 @@ extern crate derive_b; #[B] //~ ERROR `B` is ambiguous //~| WARN derive helper attribute is used before it is introduced //~| WARN this was previously accepted -#[C] //~ ERROR cannot find attribute `C` in this scope +#[C] //~ ERROR cannot find attribute `C` #[B(D)] //~ ERROR `B` is ambiguous //~| WARN derive helper attribute is used before it is introduced //~| WARN this was previously accepted diff --git a/tests/ui/proc-macro/resolve-error.rs b/tests/ui/proc-macro/resolve-error.rs index 2670d8884ae72..f4e9677ccebab 100644 --- a/tests/ui/proc-macro/resolve-error.rs +++ b/tests/ui/proc-macro/resolve-error.rs @@ -25,11 +25,11 @@ macro_rules! attr_proc_mac { struct Foo; // Interpreted as an unstable custom attribute -#[attr_proc_macra] //~ ERROR cannot find attribute `attr_proc_macra` in this scope +#[attr_proc_macra] //~ ERROR cannot find attribute `attr_proc_macra` struct Bar; // Interpreted as an unstable custom attribute -#[FooWithLongNan] //~ ERROR cannot find attribute `FooWithLongNan` in this scope +#[FooWithLongNan] //~ ERROR cannot find attribute `FooWithLongNan` struct Asdf; #[derive(Dlone)] diff --git a/tests/ui/proc-macro/span-from-proc-macro.stderr b/tests/ui/proc-macro/span-from-proc-macro.stderr index 7beed505a7efa..43af9280a8132 100644 --- a/tests/ui/proc-macro/span-from-proc-macro.stderr +++ b/tests/ui/proc-macro/span-from-proc-macro.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `MissingType` in this scope +error[E0412]: cannot find type `MissingType` --> $DIR/auxiliary/span-from-proc-macro.rs:37:20 | LL | pub fn error_from_attribute(_args: TokenStream, _input: TokenStream) -> TokenStream { @@ -12,7 +12,7 @@ LL | field: MissingType LL | #[error_from_attribute] | ----------------------- in this procedural macro expansion -error[E0412]: cannot find type `OtherMissingType` in this scope +error[E0412]: cannot find type `OtherMissingType` --> $DIR/auxiliary/span-from-proc-macro.rs:46:21 | LL | pub fn error_from_derive(_input: TokenStream) -> TokenStream { @@ -26,7 +26,7 @@ LL | Variant(OtherMissingType) LL | #[derive(ErrorFromDerive)] | --------------- in this derive macro expansion -error[E0425]: cannot find value `my_ident` in this scope +error[E0425]: cannot find value `my_ident` --> $DIR/auxiliary/span-from-proc-macro.rs:29:9 | LL | pub fn other_error_from_bang(_input: TokenStream) -> TokenStream { diff --git a/tests/ui/proc-macro/weird-hygiene.stderr b/tests/ui/proc-macro/weird-hygiene.stderr index 256e68e8970e6..d5d693b264b42 100644 --- a/tests/ui/proc-macro/weird-hygiene.stderr +++ b/tests/ui/proc-macro/weird-hygiene.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `hidden_ident` in this scope +error[E0425]: cannot find value `hidden_ident` --> $DIR/weird-hygiene.rs:23:43 | LL | Value = (stringify!($tokens + hidden_ident), 1).1 @@ -9,7 +9,7 @@ LL | other!(50); | = note: this error originates in the macro `inner` which comes from the expansion of the macro `other` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0425]: cannot find value `hidden_ident` in this scope +error[E0425]: cannot find value `hidden_ident` --> $DIR/weird-hygiene.rs:34:13 | LL | hidden_ident diff --git a/tests/ui/query-system/issue-83479.rs b/tests/ui/query-system/issue-83479.rs index 32676dfe9c8fa..b71c5b11adec1 100644 --- a/tests/ui/query-system/issue-83479.rs +++ b/tests/ui/query-system/issue-83479.rs @@ -2,12 +2,12 @@ type PairCoupledTypes: Trait< //~^ ERROR: bounds on `type`s in this context have no effect - //~| ERROR: cannot find trait `Trait` in this scope + //~| ERROR: cannot find trait `Trait` [u32; { static FOO: usize; //~ ERROR: free static item without body }], > = impl Trait< - //~^ ERROR: cannot find trait `Trait` in this scope + //~^ ERROR: cannot find trait `Trait` [u32; { static FOO: usize; //~ ERROR: free static item without body }], diff --git a/tests/ui/query-system/issue-83479.stderr b/tests/ui/query-system/issue-83479.stderr index 7cb41f5cbe51c..dd0bac2bc47a7 100644 --- a/tests/ui/query-system/issue-83479.stderr +++ b/tests/ui/query-system/issue-83479.stderr @@ -27,13 +27,13 @@ LL | static FOO: usize; | | | help: provide a definition for the static: `= ;` -error[E0405]: cannot find trait `Trait` in this scope +error[E0405]: cannot find trait `Trait` --> $DIR/issue-83479.rs:3:24 | LL | type PairCoupledTypes: Trait< | ^^^^^ not found in this scope -error[E0405]: cannot find trait `Trait` in this scope +error[E0405]: cannot find trait `Trait` --> $DIR/issue-83479.rs:9:10 | LL | > = impl Trait< diff --git a/tests/ui/recursion/recursive-reexports.rs b/tests/ui/recursion/recursive-reexports.rs index 26d15fb04734b..ef3992fe25069 100644 --- a/tests/ui/recursion/recursive-reexports.rs +++ b/tests/ui/recursion/recursive-reexports.rs @@ -2,6 +2,6 @@ extern crate recursive_reexports; -fn f() -> recursive_reexports::S {} //~ ERROR cannot find type `S` in crate `recursive_reexports` +fn f() -> recursive_reexports::S {} //~ ERROR cannot find type `S` fn main() {} diff --git a/tests/ui/recursion/recursive-reexports.stderr b/tests/ui/recursion/recursive-reexports.stderr index 71653d26a18d7..01176b83572d5 100644 --- a/tests/ui/recursion/recursive-reexports.stderr +++ b/tests/ui/recursion/recursive-reexports.stderr @@ -1,8 +1,8 @@ -error[E0412]: cannot find type `S` in crate `recursive_reexports` +error[E0412]: cannot find type `S` --> $DIR/recursive-reexports.rs:5:32 | LL | fn f() -> recursive_reexports::S {} - | ^ not found in `recursive_reexports` + | ^ not found in crate `recursive_reexports` error: aborting due to 1 previous error diff --git a/tests/ui/regions/outlives-with-missing.rs b/tests/ui/regions/outlives-with-missing.rs index 29d89718b5867..0d012fa6019ce 100644 --- a/tests/ui/regions/outlives-with-missing.rs +++ b/tests/ui/regions/outlives-with-missing.rs @@ -8,7 +8,7 @@ impl HandlerWrapper { pub fn set_handler(&self, handler: &H::Target) where T: Send + Sync + 'static, - //~^ ERROR cannot find type `T` in this scope + //~^ ERROR cannot find type `T` { } } diff --git a/tests/ui/regions/outlives-with-missing.stderr b/tests/ui/regions/outlives-with-missing.stderr index 0e3aaaf5fdbd0..4a06373e5c6d8 100644 --- a/tests/ui/regions/outlives-with-missing.stderr +++ b/tests/ui/regions/outlives-with-missing.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/outlives-with-missing.rs:10:9 | LL | impl HandlerWrapper { diff --git a/tests/ui/reserved/reserved-attr-on-macro.rs b/tests/ui/reserved/reserved-attr-on-macro.rs index 5c4657e0ec2e1..8c0f77176aa6c 100644 --- a/tests/ui/reserved/reserved-attr-on-macro.rs +++ b/tests/ui/reserved/reserved-attr-on-macro.rs @@ -1,5 +1,5 @@ #[rustc_attribute_should_be_reserved] -//~^ ERROR cannot find attribute `rustc_attribute_should_be_reserved` in this scope +//~^ ERROR cannot find attribute `rustc_attribute_should_be_reserved` //~| ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler macro_rules! foo { diff --git a/tests/ui/resolve/associated-fn-called-as-fn.stderr b/tests/ui/resolve/associated-fn-called-as-fn.stderr index 7d28b959a1a48..577492ee14f93 100644 --- a/tests/ui/resolve/associated-fn-called-as-fn.stderr +++ b/tests/ui/resolve/associated-fn-called-as-fn.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `collect_primary` in this scope +error[E0425]: cannot find function `collect_primary` --> $DIR/associated-fn-called-as-fn.rs:6:30 | LL | '0'..='9' => collect_primary(&c), @@ -9,7 +9,7 @@ help: you might have meant to call the associated function LL | '0'..='9' => Self::collect_primary(&c), | ++++++ -error[E0425]: cannot find function `collect_primary` in this scope +error[E0425]: cannot find function `collect_primary` --> $DIR/associated-fn-called-as-fn.rs:23:30 | LL | '0'..='9' => collect_primary(&c), diff --git a/tests/ui/resolve/bad-env-capture.stderr b/tests/ui/resolve/bad-env-capture.stderr index 59b1fabfd7c46..05d8ef748b531 100644 --- a/tests/ui/resolve/bad-env-capture.stderr +++ b/tests/ui/resolve/bad-env-capture.stderr @@ -6,13 +6,13 @@ LL | fn bar() { log(debug, x); } | = help: use the `|| { ... }` closure form instead -error[E0425]: cannot find value `debug` in this scope +error[E0425]: cannot find value `debug` --> $DIR/bad-env-capture.rs:4:20 | LL | fn bar() { log(debug, x); } | ^^^^^ not found in this scope -error[E0425]: cannot find function `log` in this scope +error[E0425]: cannot find function `log` --> $DIR/bad-env-capture.rs:4:16 | LL | fn bar() { log(debug, x); } diff --git a/tests/ui/resolve/bad-env-capture2.stderr b/tests/ui/resolve/bad-env-capture2.stderr index 811c259de6bd6..e6e750d6c023e 100644 --- a/tests/ui/resolve/bad-env-capture2.stderr +++ b/tests/ui/resolve/bad-env-capture2.stderr @@ -6,13 +6,13 @@ LL | fn bar() { log(debug, x); } | = help: use the `|| { ... }` closure form instead -error[E0425]: cannot find value `debug` in this scope +error[E0425]: cannot find value `debug` --> $DIR/bad-env-capture2.rs:3:20 | LL | fn bar() { log(debug, x); } | ^^^^^ not found in this scope -error[E0425]: cannot find function `log` in this scope +error[E0425]: cannot find function `log` --> $DIR/bad-env-capture2.rs:3:16 | LL | fn bar() { log(debug, x); } diff --git a/tests/ui/resolve/bad-env-capture3.stderr b/tests/ui/resolve/bad-env-capture3.stderr index eab37fde96e4c..bdcf19f717c60 100644 --- a/tests/ui/resolve/bad-env-capture3.stderr +++ b/tests/ui/resolve/bad-env-capture3.stderr @@ -6,13 +6,13 @@ LL | fn bar() { log(debug, x); } | = help: use the `|| { ... }` closure form instead -error[E0425]: cannot find value `debug` in this scope +error[E0425]: cannot find value `debug` --> $DIR/bad-env-capture3.rs:4:24 | LL | fn bar() { log(debug, x); } | ^^^^^ not found in this scope -error[E0425]: cannot find function `log` in this scope +error[E0425]: cannot find function `log` --> $DIR/bad-env-capture3.rs:4:20 | LL | fn bar() { log(debug, x); } diff --git a/tests/ui/resolve/bad-expr-path.rs b/tests/ui/resolve/bad-expr-path.rs index 31fc9cf2cb575..f4dff83330d94 100644 --- a/tests/ui/resolve/bad-expr-path.rs +++ b/tests/ui/resolve/bad-expr-path.rs @@ -2,7 +2,7 @@ mod m1 {} fn main(arguments: Vec) { //~ ERROR `main` function has wrong type log(debug, m1::arguments); - //~^ ERROR cannot find function `log` in this scope - //~| ERROR cannot find value `debug` in this scope - //~| ERROR cannot find value `arguments` in module `m1` + //~^ ERROR cannot find function `log` + //~| ERROR cannot find value `debug` + //~| ERROR cannot find value `arguments` } diff --git a/tests/ui/resolve/bad-expr-path.stderr b/tests/ui/resolve/bad-expr-path.stderr index 0392c1fa23993..44da9ae9bc3b0 100644 --- a/tests/ui/resolve/bad-expr-path.stderr +++ b/tests/ui/resolve/bad-expr-path.stderr @@ -1,14 +1,14 @@ -error[E0425]: cannot find value `debug` in this scope +error[E0425]: cannot find value `debug` --> $DIR/bad-expr-path.rs:4:9 | LL | log(debug, m1::arguments); | ^^^^^ not found in this scope -error[E0425]: cannot find value `arguments` in module `m1` +error[E0425]: cannot find value `arguments` --> $DIR/bad-expr-path.rs:4:20 | LL | log(debug, m1::arguments); - | ^^^^^^^^^ not found in `m1` + | ^^^^^^^^^ not found in module `m1` error[E0580]: `main` function has wrong type --> $DIR/bad-expr-path.rs:3:1 @@ -19,7 +19,7 @@ LL | fn main(arguments: Vec) { = note: expected signature `fn()` found signature `fn(Vec)` -error[E0425]: cannot find function `log` in this scope +error[E0425]: cannot find function `log` --> $DIR/bad-expr-path.rs:4:5 | LL | log(debug, m1::arguments); diff --git a/tests/ui/resolve/bad-expr-path2.rs b/tests/ui/resolve/bad-expr-path2.rs index eb88edb9071ef..952949fbb43d5 100644 --- a/tests/ui/resolve/bad-expr-path2.rs +++ b/tests/ui/resolve/bad-expr-path2.rs @@ -4,7 +4,7 @@ mod m1 { fn main(arguments: Vec) { //~ ERROR `main` function has wrong type log(debug, m1::arguments); - //~^ ERROR cannot find function `log` in this scope - //~| ERROR cannot find value `debug` in this scope + //~^ ERROR cannot find function `log` + //~| ERROR cannot find value `debug` //~| ERROR expected value, found module `m1::arguments` } diff --git a/tests/ui/resolve/bad-expr-path2.stderr b/tests/ui/resolve/bad-expr-path2.stderr index 9238b1f7023e5..c74efcd036b27 100644 --- a/tests/ui/resolve/bad-expr-path2.stderr +++ b/tests/ui/resolve/bad-expr-path2.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `debug` in this scope +error[E0425]: cannot find value `debug` --> $DIR/bad-expr-path2.rs:6:9 | LL | log(debug, m1::arguments); @@ -19,7 +19,7 @@ LL | fn main(arguments: Vec) { = note: expected signature `fn()` found signature `fn(Vec)` -error[E0425]: cannot find function `log` in this scope +error[E0425]: cannot find function `log` --> $DIR/bad-expr-path2.rs:6:5 | LL | log(debug, m1::arguments); diff --git a/tests/ui/resolve/crate-called-as-function.rs b/tests/ui/resolve/crate-called-as-function.rs index e8f52c0c029aa..3e70c6029b606 100644 --- a/tests/ui/resolve/crate-called-as-function.rs +++ b/tests/ui/resolve/crate-called-as-function.rs @@ -1,3 +1,3 @@ fn main() { - ::foo() //~ cannot find external crate `foo` in the crate root + ::foo() //~ cannot find external crate `foo` } diff --git a/tests/ui/resolve/crate-called-as-function.stderr b/tests/ui/resolve/crate-called-as-function.stderr index 1d6eb8ad6f5e0..ccfd9ff830418 100644 --- a/tests/ui/resolve/crate-called-as-function.stderr +++ b/tests/ui/resolve/crate-called-as-function.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find external crate `foo` in the crate root +error[E0425]: cannot find external crate `foo` --> $DIR/crate-called-as-function.rs:2:7 | LL | ::foo() diff --git a/tests/ui/resolve/crate-in-paths.rs b/tests/ui/resolve/crate-in-paths.rs index fad1add40afa9..1cbcfb7458c58 100644 --- a/tests/ui/resolve/crate-in-paths.rs +++ b/tests/ui/resolve/crate-in-paths.rs @@ -6,5 +6,5 @@ mod bar { fn main() { Foo; - //~^ ERROR cannot find value `Foo` in this scope [E0425] + //~^ ERROR cannot find value `Foo` [E0425] } diff --git a/tests/ui/resolve/crate-in-paths.stderr b/tests/ui/resolve/crate-in-paths.stderr index 9eb735a3aab53..b16a2e30d03de 100644 --- a/tests/ui/resolve/crate-in-paths.stderr +++ b/tests/ui/resolve/crate-in-paths.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `Foo` in this scope +error[E0425]: cannot find value `Foo` --> $DIR/crate-in-paths.rs:8:5 | LL | Foo; diff --git a/tests/ui/resolve/editions-crate-root-2015.rs b/tests/ui/resolve/editions-crate-root-2015.rs index 5f764d3ceef81..06e716c8245ac 100644 --- a/tests/ui/resolve/editions-crate-root-2015.rs +++ b/tests/ui/resolve/editions-crate-root-2015.rs @@ -9,10 +9,10 @@ mod inner { } fn bare_global(_: ::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + //~^ ERROR cannot find type `nonexistant` } fn bare_crate(_: crate::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + //~^ ERROR cannot find type `nonexistant` } } diff --git a/tests/ui/resolve/editions-crate-root-2015.stderr b/tests/ui/resolve/editions-crate-root-2015.stderr index 00cdd0c58f4ec..785528d20cce4 100644 --- a/tests/ui/resolve/editions-crate-root-2015.stderr +++ b/tests/ui/resolve/editions-crate-root-2015.stderr @@ -14,13 +14,13 @@ LL | fn crate_inner(_: crate::nonexistant::Foo) { | = help: consider adding `extern crate nonexistant` to use the `nonexistant` crate -error[E0412]: cannot find type `nonexistant` in the crate root +error[E0412]: cannot find type `nonexistant` --> $DIR/editions-crate-root-2015.rs:11:25 | LL | fn bare_global(_: ::nonexistant) { | ^^^^^^^^^^^ not found in the crate root -error[E0412]: cannot find type `nonexistant` in the crate root +error[E0412]: cannot find type `nonexistant` --> $DIR/editions-crate-root-2015.rs:14:29 | LL | fn bare_crate(_: crate::nonexistant) { diff --git a/tests/ui/resolve/editions-crate-root-2018.rs b/tests/ui/resolve/editions-crate-root-2018.rs index 0e964d20f9c0e..6888cefa18a48 100644 --- a/tests/ui/resolve/editions-crate-root-2018.rs +++ b/tests/ui/resolve/editions-crate-root-2018.rs @@ -2,17 +2,17 @@ mod inner { fn global_inner(_: ::nonexistant::Foo) { - //~^ ERROR failed to resolve: could not find `nonexistant` in the list of imported crates + //~^ ERROR failed to resolve: could not find `nonexistant` } fn crate_inner(_: crate::nonexistant::Foo) { - //~^ ERROR failed to resolve: could not find `nonexistant` in the crate root + //~^ ERROR failed to resolve: could not find `nonexistant` } fn bare_global(_: ::nonexistant) { - //~^ ERROR cannot find crate `nonexistant` in the list of imported crates + //~^ ERROR cannot find crate `nonexistant` } fn bare_crate(_: crate::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + //~^ ERROR cannot find type `nonexistant` } } diff --git a/tests/ui/resolve/editions-crate-root-2018.stderr b/tests/ui/resolve/editions-crate-root-2018.stderr index 967a5a2fca155..a51440f69359b 100644 --- a/tests/ui/resolve/editions-crate-root-2018.stderr +++ b/tests/ui/resolve/editions-crate-root-2018.stderr @@ -10,13 +10,13 @@ error[E0433]: failed to resolve: could not find `nonexistant` in the crate root LL | fn crate_inner(_: crate::nonexistant::Foo) { | ^^^^^^^^^^^ could not find `nonexistant` in the crate root -error[E0412]: cannot find crate `nonexistant` in the list of imported crates +error[E0412]: cannot find crate `nonexistant` --> $DIR/editions-crate-root-2018.rs:11:25 | LL | fn bare_global(_: ::nonexistant) { | ^^^^^^^^^^^ not found in the list of imported crates -error[E0412]: cannot find type `nonexistant` in the crate root +error[E0412]: cannot find type `nonexistant` --> $DIR/editions-crate-root-2018.rs:14:29 | LL | fn bare_crate(_: crate::nonexistant) { diff --git a/tests/ui/resolve/enums-are-namespaced-xc.stderr b/tests/ui/resolve/enums-are-namespaced-xc.stderr index 5af6cb04275b8..ce9df1779ede5 100644 --- a/tests/ui/resolve/enums-are-namespaced-xc.stderr +++ b/tests/ui/resolve/enums-are-namespaced-xc.stderr @@ -1,8 +1,8 @@ -error[E0425]: cannot find value `A` in crate `namespaced_enums` +error[E0425]: cannot find value `A` --> $DIR/enums-are-namespaced-xc.rs:5:31 | LL | let _ = namespaced_enums::A; - | ^ not found in `namespaced_enums` + | ^ not found in crate `namespaced_enums` | help: consider importing this unit variant | @@ -14,11 +14,11 @@ LL - let _ = namespaced_enums::A; LL + let _ = A; | -error[E0425]: cannot find function, tuple struct or tuple variant `B` in crate `namespaced_enums` +error[E0425]: cannot find function, tuple struct or tuple variant `B` --> $DIR/enums-are-namespaced-xc.rs:7:31 | LL | let _ = namespaced_enums::B(10); - | ^ not found in `namespaced_enums` + | ^ not found in crate `namespaced_enums` | help: consider importing this tuple variant | @@ -30,11 +30,11 @@ LL - let _ = namespaced_enums::B(10); LL + let _ = B(10); | -error[E0422]: cannot find struct, variant or union type `C` in crate `namespaced_enums` +error[E0422]: cannot find struct, variant or union type `C` --> $DIR/enums-are-namespaced-xc.rs:9:31 | LL | let _ = namespaced_enums::C { a: 10 }; - | ^ not found in `namespaced_enums` + | ^ not found in crate `namespaced_enums` | help: consider importing this variant | diff --git a/tests/ui/resolve/enums-pats-not-idents.rs b/tests/ui/resolve/enums-pats-not-idents.rs index 5b918eef6d65b..64e63309146f0 100644 --- a/tests/ui/resolve/enums-pats-not-idents.rs +++ b/tests/ui/resolve/enums-pats-not-idents.rs @@ -1,3 +1,3 @@ fn main() { - let a(1) = 13; //~ ERROR cannot find tuple struct or tuple variant `a` in this scope + let a(1) = 13; //~ ERROR cannot find tuple struct or tuple variant `a` } diff --git a/tests/ui/resolve/enums-pats-not-idents.stderr b/tests/ui/resolve/enums-pats-not-idents.stderr index 6bb6e152c800c..267792918de22 100644 --- a/tests/ui/resolve/enums-pats-not-idents.stderr +++ b/tests/ui/resolve/enums-pats-not-idents.stderr @@ -1,4 +1,4 @@ -error[E0531]: cannot find tuple struct or tuple variant `a` in this scope +error[E0531]: cannot find tuple struct or tuple variant `a` --> $DIR/enums-pats-not-idents.rs:2:9 | LL | let a(1) = 13; diff --git a/tests/ui/resolve/field-and-method-in-self-not-available-in-assoc-fn.rs b/tests/ui/resolve/field-and-method-in-self-not-available-in-assoc-fn.rs index b5f13959081b8..1f074aec25bc6 100644 --- a/tests/ui/resolve/field-and-method-in-self-not-available-in-assoc-fn.rs +++ b/tests/ui/resolve/field-and-method-in-self-not-available-in-assoc-fn.rs @@ -8,11 +8,11 @@ impl Foo { } fn new() -> Foo { - field; //~ ERROR cannot find value `field` in this scope - Foo { field } //~ ERROR cannot find value `field` in this scope + field; //~ ERROR cannot find value `field` + Foo { field } //~ ERROR cannot find value `field` } fn clone(&self) -> Foo { - Foo { field } //~ ERROR cannot find value `field` in this scope + Foo { field } //~ ERROR cannot find value `field` } } fn main() {} diff --git a/tests/ui/resolve/field-and-method-in-self-not-available-in-assoc-fn.stderr b/tests/ui/resolve/field-and-method-in-self-not-available-in-assoc-fn.stderr index 3c44c1c249ce2..e6b031a84b912 100644 --- a/tests/ui/resolve/field-and-method-in-self-not-available-in-assoc-fn.stderr +++ b/tests/ui/resolve/field-and-method-in-self-not-available-in-assoc-fn.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `field` in this scope +error[E0425]: cannot find value `field` --> $DIR/field-and-method-in-self-not-available-in-assoc-fn.rs:11:9 | LL | field: u32, @@ -10,7 +10,7 @@ LL | fn field(&self) -> u32 { LL | field; | ^^^^^ -error[E0425]: cannot find value `field` in this scope +error[E0425]: cannot find value `field` --> $DIR/field-and-method-in-self-not-available-in-assoc-fn.rs:12:15 | LL | field: u32, @@ -22,7 +22,7 @@ LL | fn field(&self) -> u32 { LL | Foo { field } | ^^^^^ -error[E0425]: cannot find value `field` in this scope +error[E0425]: cannot find value `field` --> $DIR/field-and-method-in-self-not-available-in-assoc-fn.rs:15:15 | LL | fn field(&self) -> u32 { diff --git a/tests/ui/resolve/filter-intrinsics.stderr b/tests/ui/resolve/filter-intrinsics.stderr index 9c9e92f6d4f83..20d5c01be8fa1 100644 --- a/tests/ui/resolve/filter-intrinsics.stderr +++ b/tests/ui/resolve/filter-intrinsics.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `transmute` in this scope +error[E0425]: cannot find function `transmute` --> $DIR/filter-intrinsics.rs:3:13 | LL | let _ = transmute::(); @@ -9,7 +9,7 @@ help: consider importing this function LL + use std::mem::transmute; | -error[E0425]: cannot find function `fabsf64` in this scope +error[E0425]: cannot find function `fabsf64` --> $DIR/filter-intrinsics.rs:8:13 | LL | let _ = fabsf64(1.0); diff --git a/tests/ui/resolve/issue-102946.rs b/tests/ui/resolve/issue-102946.rs index c6feca6f32f60..01d044b3f1a7e 100644 --- a/tests/ui/resolve/issue-102946.rs +++ b/tests/ui/resolve/issue-102946.rs @@ -1,5 +1,5 @@ impl Error for str::Utf8Error { - //~^ ERROR cannot find trait `Error` in this scope + //~^ ERROR cannot find trait `Error` //~| ERROR ambiguous associated type fn description(&self) {} } diff --git a/tests/ui/resolve/issue-102946.stderr b/tests/ui/resolve/issue-102946.stderr index b2cdcb25c3f96..7ad1bbcc831b0 100644 --- a/tests/ui/resolve/issue-102946.stderr +++ b/tests/ui/resolve/issue-102946.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Error` in this scope +error[E0405]: cannot find trait `Error` --> $DIR/issue-102946.rs:1:6 | LL | impl Error for str::Utf8Error { diff --git a/tests/ui/resolve/issue-103474.rs b/tests/ui/resolve/issue-103474.rs index 14f2259e1d4e8..ae13e2cedd549 100644 --- a/tests/ui/resolve/issue-103474.rs +++ b/tests/ui/resolve/issue-103474.rs @@ -4,12 +4,12 @@ impl S { fn second(&self) { first() - //~^ ERROR cannot find function `first` in this scope + //~^ ERROR cannot find function `first` } fn third(&self) { no_method_err() - //~^ ERROR cannot find function `no_method_err` in this scope + //~^ ERROR cannot find function `no_method_err` } } @@ -21,7 +21,7 @@ struct Foo { impl Foo { fn needs_self() { this.i - //~^ ERROR cannot find value `this` in this scope + //~^ ERROR cannot find value `this` } } diff --git a/tests/ui/resolve/issue-103474.stderr b/tests/ui/resolve/issue-103474.stderr index e48fb31eccc9a..88503b5f8aad7 100644 --- a/tests/ui/resolve/issue-103474.stderr +++ b/tests/ui/resolve/issue-103474.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `this` in this scope +error[E0425]: cannot find value `this` --> $DIR/issue-103474.rs:23:9 | LL | this.i @@ -13,7 +13,7 @@ help: if you meant to use `self`, you are also missing a `self` receiver argumen LL | fn needs_self(&self) { | +++++ -error[E0425]: cannot find function `first` in this scope +error[E0425]: cannot find function `first` --> $DIR/issue-103474.rs:6:9 | LL | first() @@ -24,7 +24,7 @@ help: consider using the method on `Self` LL | self.first() | +++++ -error[E0425]: cannot find function `no_method_err` in this scope +error[E0425]: cannot find function `no_method_err` --> $DIR/issue-103474.rs:11:9 | LL | no_method_err() diff --git a/tests/ui/resolve/issue-104700-inner_scope.stderr b/tests/ui/resolve/issue-104700-inner_scope.stderr index 051b234fc72d8..5b17e0b7dbc90 100644 --- a/tests/ui/resolve/issue-104700-inner_scope.stderr +++ b/tests/ui/resolve/issue-104700-inner_scope.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `bar` in this scope +error[E0425]: cannot find value `bar` --> $DIR/issue-104700-inner_scope.rs:7:8 | LL | if bar == 2 { @@ -10,7 +10,7 @@ help: the binding `bar` is available in a different scope in the same function LL | let bar = 2; | ^^^ -error[E0425]: cannot find function `test_func` in this scope +error[E0425]: cannot find function `test_func` --> $DIR/issue-104700-inner_scope.rs:10:5 | LL | test_func(1); diff --git a/tests/ui/resolve/issue-116164.rs b/tests/ui/resolve/issue-116164.rs index d30c8f514b3d6..66bf5a984f857 100644 --- a/tests/ui/resolve/issue-116164.rs +++ b/tests/ui/resolve/issue-116164.rs @@ -15,5 +15,5 @@ use crate::reexports::*; fn main() { ExOne; - //~^ ERROR: cannot find value `ExOne` in this scope + //~^ ERROR: cannot find value `ExOne` } diff --git a/tests/ui/resolve/issue-116164.stderr b/tests/ui/resolve/issue-116164.stderr index 8880242c19561..fc54cae01f96c 100644 --- a/tests/ui/resolve/issue-116164.stderr +++ b/tests/ui/resolve/issue-116164.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `ExOne` in this scope +error[E0425]: cannot find value `ExOne` --> $DIR/issue-116164.rs:17:5 | LL | ExOne; diff --git a/tests/ui/resolve/issue-118295.rs b/tests/ui/resolve/issue-118295.rs index b97681d956341..314d7d9aa4fe0 100644 --- a/tests/ui/resolve/issue-118295.rs +++ b/tests/ui/resolve/issue-118295.rs @@ -1,5 +1,5 @@ macro_rules! {} -//~^ ERROR cannot find macro `macro_rules` in this scope +//~^ ERROR cannot find macro `macro_rules` //~| NOTE maybe you have forgotten to define a name for this `macro_rules!` fn main() {} diff --git a/tests/ui/resolve/issue-14254.stderr b/tests/ui/resolve/issue-14254.stderr index 9284b4babc50f..5246e0f2a1c77 100644 --- a/tests/ui/resolve/issue-14254.stderr +++ b/tests/ui/resolve/issue-14254.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/issue-14254.rs:21:9 | LL | a; | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-14254.rs:30:9 | LL | x; @@ -15,7 +15,7 @@ help: you might have meant to use the available field LL | self.x; | +++++ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-14254.rs:32:9 | LL | y; @@ -26,13 +26,13 @@ help: you might have meant to use the available field LL | self.y; | +++++ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/issue-14254.rs:34:9 | LL | a; | ^ not found in this scope -error[E0425]: cannot find value `bah` in this scope +error[E0425]: cannot find value `bah` --> $DIR/issue-14254.rs:36:9 | LL | bah; @@ -43,13 +43,13 @@ help: you might have meant to refer to the associated function LL | Self::bah; | ++++++ -error[E0425]: cannot find value `b` in this scope +error[E0425]: cannot find value `b` --> $DIR/issue-14254.rs:38:9 | LL | b; | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-14254.rs:47:9 | LL | x; @@ -60,7 +60,7 @@ help: you might have meant to use the available field LL | self.x; | +++++ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-14254.rs:49:9 | LL | y; @@ -71,13 +71,13 @@ help: you might have meant to use the available field LL | self.y; | +++++ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/issue-14254.rs:51:9 | LL | a; | ^ not found in this scope -error[E0425]: cannot find value `bah` in this scope +error[E0425]: cannot find value `bah` --> $DIR/issue-14254.rs:53:9 | LL | bah; @@ -88,13 +88,13 @@ help: you might have meant to refer to the associated function LL | Self::bah; | ++++++ -error[E0425]: cannot find value `b` in this scope +error[E0425]: cannot find value `b` --> $DIR/issue-14254.rs:55:9 | LL | b; | ^ not found in this scope -error[E0425]: cannot find value `bah` in this scope +error[E0425]: cannot find value `bah` --> $DIR/issue-14254.rs:64:9 | LL | bah; @@ -105,7 +105,7 @@ help: you might have meant to refer to the associated function LL | Self::bah; | ++++++ -error[E0425]: cannot find value `bah` in this scope +error[E0425]: cannot find value `bah` --> $DIR/issue-14254.rs:73:9 | LL | bah; @@ -116,7 +116,7 @@ help: you might have meant to refer to the associated function LL | Self::bah; | ++++++ -error[E0425]: cannot find value `bah` in this scope +error[E0425]: cannot find value `bah` --> $DIR/issue-14254.rs:82:9 | LL | bah; @@ -127,7 +127,7 @@ help: you might have meant to refer to the associated function LL | Self::bah; | ++++++ -error[E0425]: cannot find value `bah` in this scope +error[E0425]: cannot find value `bah` --> $DIR/issue-14254.rs:91:9 | LL | bah; @@ -138,7 +138,7 @@ help: you might have meant to refer to the associated function LL | Self::bah; | ++++++ -error[E0425]: cannot find value `bah` in this scope +error[E0425]: cannot find value `bah` --> $DIR/issue-14254.rs:100:9 | LL | bah; @@ -149,7 +149,7 @@ help: you might have meant to refer to the associated function LL | Self::bah; | ++++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/issue-14254.rs:19:9 | LL | baz(); @@ -160,7 +160,7 @@ help: you might have meant to call the method LL | self.baz(); | +++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/issue-14254.rs:28:9 | LL | baz(); @@ -171,7 +171,7 @@ help: you might have meant to call the method LL | self.baz(); | +++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/issue-14254.rs:45:9 | LL | baz(); @@ -182,7 +182,7 @@ help: you might have meant to call the method LL | self.baz(); | +++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/issue-14254.rs:62:9 | LL | baz(); @@ -193,7 +193,7 @@ help: you might have meant to call the method LL | self.baz(); | +++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/issue-14254.rs:71:9 | LL | baz(); @@ -204,7 +204,7 @@ help: you might have meant to call the method LL | self.baz(); | +++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/issue-14254.rs:80:9 | LL | baz(); @@ -215,7 +215,7 @@ help: you might have meant to call the method LL | self.baz(); | +++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/issue-14254.rs:89:9 | LL | baz(); @@ -226,7 +226,7 @@ help: you might have meant to call the method LL | self.baz(); | +++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/issue-14254.rs:98:9 | LL | baz(); diff --git a/tests/ui/resolve/issue-17518.stderr b/tests/ui/resolve/issue-17518.stderr index 3eba715188b40..97760f23ad928 100644 --- a/tests/ui/resolve/issue-17518.stderr +++ b/tests/ui/resolve/issue-17518.stderr @@ -1,4 +1,4 @@ -error[E0422]: cannot find struct, variant or union type `E` in this scope +error[E0422]: cannot find struct, variant or union type `E` --> $DIR/issue-17518.rs:6:5 | LL | E { name: "foobar" }; diff --git a/tests/ui/resolve/issue-21221-1.stderr b/tests/ui/resolve/issue-21221-1.stderr index ccf03afaa19fe..2a7482ce6f043 100644 --- a/tests/ui/resolve/issue-21221-1.stderr +++ b/tests/ui/resolve/issue-21221-1.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Mul` in this scope +error[E0405]: cannot find trait `Mul` --> $DIR/issue-21221-1.rs:43:6 | LL | impl Mul for Foo { @@ -13,7 +13,7 @@ LL + use mul1::Mul; LL + use mul2::Mul; | -error[E0412]: cannot find type `Mul` in this scope +error[E0412]: cannot find type `Mul` --> $DIR/issue-21221-1.rs:58:16 | LL | fn getMul() -> Mul { @@ -28,13 +28,13 @@ LL + use mul1::Mul; LL + use mul2::Mul; | -error[E0405]: cannot find trait `ThisTraitReallyDoesntExistInAnyModuleReally` in this scope +error[E0405]: cannot find trait `ThisTraitReallyDoesntExistInAnyModuleReally` --> $DIR/issue-21221-1.rs:63:6 | LL | impl ThisTraitReallyDoesntExistInAnyModuleReally for Foo { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `Div` in this scope +error[E0405]: cannot find trait `Div` --> $DIR/issue-21221-1.rs:68:6 | LL | impl Div for Foo { diff --git a/tests/ui/resolve/issue-21221-2.stderr b/tests/ui/resolve/issue-21221-2.stderr index 5db327955eb10..e1983dbb7bc9a 100644 --- a/tests/ui/resolve/issue-21221-2.stderr +++ b/tests/ui/resolve/issue-21221-2.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `T` in this scope +error[E0405]: cannot find trait `T` --> $DIR/issue-21221-2.rs:18:6 | LL | impl T for Foo { } diff --git a/tests/ui/resolve/issue-21221-3.stderr b/tests/ui/resolve/issue-21221-3.stderr index ed3eb2dfb237f..6328bbb542697 100644 --- a/tests/ui/resolve/issue-21221-3.stderr +++ b/tests/ui/resolve/issue-21221-3.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `OuterTrait` in this scope +error[E0405]: cannot find trait `OuterTrait` --> $DIR/issue-21221-3.rs:15:6 | LL | impl OuterTrait for Foo {} diff --git a/tests/ui/resolve/issue-21221-4.stderr b/tests/ui/resolve/issue-21221-4.stderr index 482a3bd54a33e..1e1e06b2ef7ac 100644 --- a/tests/ui/resolve/issue-21221-4.stderr +++ b/tests/ui/resolve/issue-21221-4.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `T` in this scope +error[E0405]: cannot find trait `T` --> $DIR/issue-21221-4.rs:10:6 | LL | impl T for Foo {} diff --git a/tests/ui/resolve/issue-2356.rs b/tests/ui/resolve/issue-2356.rs index fe9bf4d443e72..6def92ba7d067 100644 --- a/tests/ui/resolve/issue-2356.rs +++ b/tests/ui/resolve/issue-2356.rs @@ -29,7 +29,7 @@ impl Clone for Cat { impl Default for Cat { fn default() -> Self { default(); - //~^ ERROR cannot find function `default` in this scope [E0425] + //~^ ERROR cannot find function `default` [E0425] loop {} } } diff --git a/tests/ui/resolve/issue-2356.stderr b/tests/ui/resolve/issue-2356.stderr index 5f75ae988702f..2e84581ad9fae 100644 --- a/tests/ui/resolve/issue-2356.stderr +++ b/tests/ui/resolve/issue-2356.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `whiskers` in this scope +error[E0425]: cannot find value `whiskers` --> $DIR/issue-2356.rs:39:5 | LL | whiskers: isize, @@ -20,7 +20,7 @@ help: add a `self` receiver parameter to make the associated `fn` a method LL | fn meow(&self) { | +++++ -error[E0425]: cannot find value `whiskers` in this scope +error[E0425]: cannot find value `whiskers` --> $DIR/issue-2356.rs:79:5 | LL | whiskers = 0; @@ -31,7 +31,7 @@ help: you might have meant to use the available field LL | self.whiskers = 0; | +++++ -error[E0425]: cannot find value `whiskers` in this scope +error[E0425]: cannot find value `whiskers` --> $DIR/issue-2356.rs:84:5 | LL | whiskers: isize, @@ -48,13 +48,13 @@ LL | fn main() { LL | self += 1; | ^^^^ `self` value is a keyword only available in methods with a `self` parameter -error[E0425]: cannot find function `shave` in this scope +error[E0425]: cannot find function `shave` --> $DIR/issue-2356.rs:17:5 | LL | shave(); | ^^^^^ not found in this scope -error[E0425]: cannot find function `clone` in this scope +error[E0425]: cannot find function `clone` --> $DIR/issue-2356.rs:24:5 | LL | clone(); @@ -65,7 +65,7 @@ help: you might have meant to call the method LL | self.clone(); | +++++ -error[E0425]: cannot find function `default` in this scope +error[E0425]: cannot find function `default` --> $DIR/issue-2356.rs:31:5 | LL | default(); @@ -76,7 +76,7 @@ help: you might have meant to call the associated function LL | Self::default(); | ++++++ -error[E0425]: cannot find function `shave` in this scope +error[E0425]: cannot find function `shave` --> $DIR/issue-2356.rs:41:5 | LL | shave(4); @@ -87,13 +87,13 @@ help: you might have meant to call the associated function LL | Self::shave(4); | ++++++ -error[E0425]: cannot find function `purr` in this scope +error[E0425]: cannot find function `purr` --> $DIR/issue-2356.rs:43:5 | LL | purr(); | ^^^^ not found in this scope -error[E0425]: cannot find function `static_method` in this scope +error[E0425]: cannot find function `static_method` --> $DIR/issue-2356.rs:52:9 | LL | static_method(); @@ -104,25 +104,25 @@ help: consider using the associated function on `Self` LL | Self::static_method(); | ++++++ -error[E0425]: cannot find function `purr` in this scope +error[E0425]: cannot find function `purr` --> $DIR/issue-2356.rs:54:9 | LL | purr(); | ^^^^ not found in this scope -error[E0425]: cannot find function `purr` in this scope +error[E0425]: cannot find function `purr` --> $DIR/issue-2356.rs:56:9 | LL | purr(); | ^^^^ not found in this scope -error[E0425]: cannot find function `purr` in this scope +error[E0425]: cannot find function `purr` --> $DIR/issue-2356.rs:58:9 | LL | purr(); | ^^^^ not found in this scope -error[E0425]: cannot find function `grow_older` in this scope +error[E0425]: cannot find function `grow_older` --> $DIR/issue-2356.rs:72:5 | LL | grow_older(); @@ -133,13 +133,13 @@ help: consider using the associated function on `Self` LL | Self::grow_older(); | ++++++ -error[E0425]: cannot find function `shave` in this scope +error[E0425]: cannot find function `shave` --> $DIR/issue-2356.rs:74:5 | LL | shave(); | ^^^^^ not found in this scope -error[E0425]: cannot find function `purr_louder` in this scope +error[E0425]: cannot find function `purr_louder` --> $DIR/issue-2356.rs:86:5 | LL | purr_louder(); diff --git a/tests/ui/resolve/issue-24968.stderr b/tests/ui/resolve/issue-24968.stderr index 82f5a1d5b57b3..2bf6c063c0b23 100644 --- a/tests/ui/resolve/issue-24968.stderr +++ b/tests/ui/resolve/issue-24968.stderr @@ -1,4 +1,4 @@ -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/issue-24968.rs:3:11 | LL | fn foo(_: Self) { @@ -6,7 +6,7 @@ LL | fn foo(_: Self) { | | | `Self` not allowed in a function -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/issue-24968.rs:8:12 | LL | fn foo2() { @@ -14,7 +14,7 @@ LL | fn foo2() { LL | let x: Self; | ^^^^ `Self` is only available in impls, traits, and type definitions -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/issue-24968.rs:14:5 | LL | type Foo @@ -23,7 +23,7 @@ LL | where LL | Self: Clone, | ^^^^ `Self` is only available in impls, traits, and type definitions -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/issue-24968.rs:18:12 | LL | const FOO: Self = 0; @@ -31,7 +31,7 @@ LL | const FOO: Self = 0; | | | `Self` not allowed in a constant item -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/issue-24968.rs:24:15 | LL | static FOO_S: Self = 0; diff --git a/tests/ui/resolve/issue-26545.rs b/tests/ui/resolve/issue-26545.rs index 5652ee7470605..436cf0e7d906e 100644 --- a/tests/ui/resolve/issue-26545.rs +++ b/tests/ui/resolve/issue-26545.rs @@ -5,7 +5,7 @@ mod foo { mod baz { fn foo() { B(()); - //~^ ERROR cannot find function, tuple struct or tuple variant `B` in this scope [E0425] + //~^ ERROR cannot find function, tuple struct or tuple variant `B` [E0425] } } diff --git a/tests/ui/resolve/issue-26545.stderr b/tests/ui/resolve/issue-26545.stderr index ced19ea1819cd..128e031bc8ae6 100644 --- a/tests/ui/resolve/issue-26545.stderr +++ b/tests/ui/resolve/issue-26545.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function, tuple struct or tuple variant `B` in this scope +error[E0425]: cannot find function, tuple struct or tuple variant `B` --> $DIR/issue-26545.rs:7:9 | LL | B(()); diff --git a/tests/ui/resolve/issue-31845.rs b/tests/ui/resolve/issue-31845.rs index f6dc11502ba18..33c1711375cf2 100644 --- a/tests/ui/resolve/issue-31845.rs +++ b/tests/ui/resolve/issue-31845.rs @@ -4,7 +4,7 @@ fn f() { fn g() {} mod foo { fn h() { - g(); //~ ERROR cannot find function `g` in this scope + g(); //~ ERROR cannot find function `g` } } } diff --git a/tests/ui/resolve/issue-31845.stderr b/tests/ui/resolve/issue-31845.stderr index e65b911151f07..5dc098cadb758 100644 --- a/tests/ui/resolve/issue-31845.stderr +++ b/tests/ui/resolve/issue-31845.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `g` in this scope +error[E0425]: cannot find function `g` --> $DIR/issue-31845.rs:7:12 | LL | g(); diff --git a/tests/ui/resolve/issue-35675.rs b/tests/ui/resolve/issue-35675.rs index 683761667d40a..682089a21a1fb 100644 --- a/tests/ui/resolve/issue-35675.rs +++ b/tests/ui/resolve/issue-35675.rs @@ -5,15 +5,15 @@ enum Fruit { } fn should_return_fruit() -> Apple { - //~^ ERROR cannot find type `Apple` in this scope + //~^ ERROR cannot find type `Apple` Apple(5) - //~^ ERROR cannot find function, tuple struct or tuple variant `Apple` in this scope + //~^ ERROR cannot find function, tuple struct or tuple variant `Apple` } fn should_return_fruit_too() -> Fruit::Apple { //~^ ERROR expected type, found variant `Fruit::Apple` Apple(5) - //~^ ERROR cannot find function, tuple struct or tuple variant `Apple` in this scope + //~^ ERROR cannot find function, tuple struct or tuple variant `Apple` } fn foo() -> Ok { @@ -22,7 +22,7 @@ fn foo() -> Ok { } fn bar() -> Variant3 { - //~^ ERROR cannot find type `Variant3` in this scope + //~^ ERROR cannot find type `Variant3` } fn qux() -> Some { diff --git a/tests/ui/resolve/issue-35675.stderr b/tests/ui/resolve/issue-35675.stderr index 44af65b0768a8..353dc93b8af12 100644 --- a/tests/ui/resolve/issue-35675.stderr +++ b/tests/ui/resolve/issue-35675.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Apple` in this scope +error[E0412]: cannot find type `Apple` --> $DIR/issue-35675.rs:7:29 | LL | fn should_return_fruit() -> Apple { @@ -9,7 +9,7 @@ help: there is an enum variant `Fruit::Apple`; try using the variant's enum LL | fn should_return_fruit() -> Fruit { | ~~~~~ -error[E0425]: cannot find function, tuple struct or tuple variant `Apple` in this scope +error[E0425]: cannot find function, tuple struct or tuple variant `Apple` --> $DIR/issue-35675.rs:9:5 | LL | Apple(5) @@ -29,7 +29,7 @@ LL | fn should_return_fruit_too() -> Fruit::Apple { | not a type | help: try using the variant's enum: `Fruit` -error[E0425]: cannot find function, tuple struct or tuple variant `Apple` in this scope +error[E0425]: cannot find function, tuple struct or tuple variant `Apple` --> $DIR/issue-35675.rs:15:5 | LL | Apple(5) @@ -49,7 +49,7 @@ LL | fn foo() -> Ok { | not a type | help: try using the variant's enum: `std::result::Result` -error[E0412]: cannot find type `Variant3` in this scope +error[E0412]: cannot find type `Variant3` --> $DIR/issue-35675.rs:24:13 | LL | fn bar() -> Variant3 { diff --git a/tests/ui/resolve/issue-42944.rs b/tests/ui/resolve/issue-42944.rs index 7e439c10b7b84..75b69735e5b97 100644 --- a/tests/ui/resolve/issue-42944.rs +++ b/tests/ui/resolve/issue-42944.rs @@ -14,7 +14,7 @@ mod bar { mod baz { fn foo() { Bx(()); - //~^ ERROR cannot find function, tuple struct or tuple variant `Bx` in this scope [E0425] + //~^ ERROR cannot find function, tuple struct or tuple variant `Bx` [E0425] } } diff --git a/tests/ui/resolve/issue-42944.stderr b/tests/ui/resolve/issue-42944.stderr index 4ffa9402c667e..8ee3179d85d10 100644 --- a/tests/ui/resolve/issue-42944.stderr +++ b/tests/ui/resolve/issue-42944.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function, tuple struct or tuple variant `Bx` in this scope +error[E0425]: cannot find function, tuple struct or tuple variant `Bx` --> $DIR/issue-42944.rs:16:9 | LL | Bx(()); diff --git a/tests/ui/resolve/issue-49074.rs b/tests/ui/resolve/issue-49074.rs index 752bb345b703e..7b3842ef5e92d 100644 --- a/tests/ui/resolve/issue-49074.rs +++ b/tests/ui/resolve/issue-49074.rs @@ -1,7 +1,7 @@ // Check that unknown attribute error is shown even if there are unresolved macros. #[marco_use] // typo -//~^ ERROR cannot find attribute `marco_use` in this scope +//~^ ERROR cannot find attribute `marco_use` mod foo { macro_rules! bar { () => (); @@ -9,5 +9,5 @@ mod foo { } fn main() { - bar!(); //~ ERROR cannot find macro `bar` in this scope + bar!(); //~ ERROR cannot find macro `bar` } diff --git a/tests/ui/resolve/issue-50599.stderr b/tests/ui/resolve/issue-50599.stderr index 24fb3d580b8fa..29265bca44724 100644 --- a/tests/ui/resolve/issue-50599.stderr +++ b/tests/ui/resolve/issue-50599.stderr @@ -1,8 +1,8 @@ -error[E0425]: cannot find value `LOG10_2` in module `std::f64` +error[E0425]: cannot find value `LOG10_2` --> $DIR/issue-50599.rs:3:48 | LL | const M: usize = (f64::from(N) * std::f64::LOG10_2) as usize; - | ^^^^^^^ not found in `std::f64` + | ^^^^^^^ not found in module `std::f64` | help: consider importing one of these constants | diff --git a/tests/ui/resolve/issue-5099.rs b/tests/ui/resolve/issue-5099.rs index b5abccb4b19f9..a8e7d05550bc9 100644 --- a/tests/ui/resolve/issue-5099.rs +++ b/tests/ui/resolve/issue-5099.rs @@ -1,12 +1,12 @@ trait B { fn a() -> A { - this.a //~ ERROR cannot find value `this` in this scope + this.a //~ ERROR cannot find value `this` } fn b(x: i32) { - this.b(x); //~ ERROR cannot find value `this` in this scope + this.b(x); //~ ERROR cannot find value `this` } fn c() { - let _ = || this.a; //~ ERROR cannot find value `this` in this scope + let _ = || this.a; //~ ERROR cannot find value `this` } } diff --git a/tests/ui/resolve/issue-5099.stderr b/tests/ui/resolve/issue-5099.stderr index e9b2a9c4d4844..62b02b3f6f152 100644 --- a/tests/ui/resolve/issue-5099.stderr +++ b/tests/ui/resolve/issue-5099.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `this` in this scope +error[E0425]: cannot find value `this` --> $DIR/issue-5099.rs:3:9 | LL | this.a @@ -13,7 +13,7 @@ help: if you meant to use `self`, you are also missing a `self` receiver argumen LL | fn a(&self) -> A { | +++++ -error[E0425]: cannot find value `this` in this scope +error[E0425]: cannot find value `this` --> $DIR/issue-5099.rs:6:9 | LL | this.b(x); @@ -28,7 +28,7 @@ help: if you meant to use `self`, you are also missing a `self` receiver argumen LL | fn b(&self, x: i32) { | ++++++ -error[E0425]: cannot find value `this` in this scope +error[E0425]: cannot find value `this` --> $DIR/issue-5099.rs:9:20 | LL | let _ = || this.a; diff --git a/tests/ui/resolve/issue-5927.rs b/tests/ui/resolve/issue-5927.rs index 14f95827be8ea..a483705fe72c8 100644 --- a/tests/ui/resolve/issue-5927.rs +++ b/tests/ui/resolve/issue-5927.rs @@ -1,7 +1,7 @@ fn main() { let z = match 3 { - x(1) => x(1) //~ ERROR cannot find tuple struct or tuple variant `x` in this scope - //~^ ERROR cannot find function `x` in this scope + x(1) => x(1) //~ ERROR cannot find tuple struct or tuple variant `x` + //~^ ERROR cannot find function `x` }; assert!(z == 3); } diff --git a/tests/ui/resolve/issue-5927.stderr b/tests/ui/resolve/issue-5927.stderr index d6cd6853dbdb5..131f94d6d6427 100644 --- a/tests/ui/resolve/issue-5927.stderr +++ b/tests/ui/resolve/issue-5927.stderr @@ -1,10 +1,10 @@ -error[E0531]: cannot find tuple struct or tuple variant `x` in this scope +error[E0531]: cannot find tuple struct or tuple variant `x` --> $DIR/issue-5927.rs:3:9 | LL | x(1) => x(1) | ^ not found in this scope -error[E0425]: cannot find function `x` in this scope +error[E0425]: cannot find function `x` --> $DIR/issue-5927.rs:3:17 | LL | x(1) => x(1) diff --git a/tests/ui/resolve/issue-60057.rs b/tests/ui/resolve/issue-60057.rs index b52343adaee71..be01c2c91d629 100644 --- a/tests/ui/resolve/issue-60057.rs +++ b/tests/ui/resolve/issue-60057.rs @@ -5,13 +5,13 @@ struct A { impl A { fn new(peach: u8) -> A { A { - banana: banana //~ ERROR cannot find value `banana` in this scope + banana: banana //~ ERROR cannot find value `banana` } } fn foo(&self, peach: u8) -> A { A { - banana: banana //~ ERROR cannot find value `banana` in this scope + banana: banana //~ ERROR cannot find value `banana` } } } diff --git a/tests/ui/resolve/issue-60057.stderr b/tests/ui/resolve/issue-60057.stderr index a2ab86443536c..609133c6da67f 100644 --- a/tests/ui/resolve/issue-60057.stderr +++ b/tests/ui/resolve/issue-60057.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `banana` in this scope +error[E0425]: cannot find value `banana` --> $DIR/issue-60057.rs:8:21 | LL | banana: u8, @@ -7,7 +7,7 @@ LL | banana: u8, LL | banana: banana | ^^^^^^ -error[E0425]: cannot find value `banana` in this scope +error[E0425]: cannot find value `banana` --> $DIR/issue-60057.rs:14:21 | LL | banana: banana diff --git a/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.rs b/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.rs index c377ecea94d0c..bbc96c875c66e 100644 --- a/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.rs +++ b/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.rs @@ -2,5 +2,5 @@ fn main() {} trait Foo { fn fn_with_type_named_same_as_local_in_param(b: b); - //~^ ERROR cannot find type `b` in this scope [E0412] + //~^ ERROR cannot find type `b` [E0412] } diff --git a/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr b/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr index 60ef13551a17c..78e47163ebfd2 100644 --- a/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr +++ b/tests/ui/resolve/issue-69401-trait-fn-no-body-ty-local.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `b` in this scope +error[E0412]: cannot find type `b` --> $DIR/issue-69401-trait-fn-no-body-ty-local.rs:4:53 | LL | fn fn_with_type_named_same_as_local_in_param(b: b); diff --git a/tests/ui/resolve/issue-80079.rs b/tests/ui/resolve/issue-80079.rs index 4dc61c320adce..2c6e431769a5a 100644 --- a/tests/ui/resolve/issue-80079.rs +++ b/tests/ui/resolve/issue-80079.rs @@ -8,5 +8,5 @@ extern crate issue_80079; use issue_80079::public; fn main() { - let _ = Foo; //~ ERROR cannot find value `Foo` in this scope + let _ = Foo; //~ ERROR cannot find value `Foo` } diff --git a/tests/ui/resolve/issue-80079.stderr b/tests/ui/resolve/issue-80079.stderr index e300ee964bee7..4f344d7f5ec98 100644 --- a/tests/ui/resolve/issue-80079.stderr +++ b/tests/ui/resolve/issue-80079.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `Foo` in this scope +error[E0425]: cannot find value `Foo` --> $DIR/issue-80079.rs:11:13 | LL | let _ = Foo; diff --git a/tests/ui/resolve/issue-85348.rs b/tests/ui/resolve/issue-85348.rs index 3a33c19340841..a23793a4fdb90 100644 --- a/tests/ui/resolve/issue-85348.rs +++ b/tests/ui/resolve/issue-85348.rs @@ -1,7 +1,7 @@ // Checks whether shadowing a const parameter leads to an ICE (#85348). impl ArrayWindowsExample { -//~^ ERROR: cannot find type `ArrayWindowsExample` in this scope [E0412] +//~^ ERROR: cannot find type `ArrayWindowsExample` [E0412] fn next() { let mut N; //~^ ERROR: let bindings cannot shadow const parameters [E0530] diff --git a/tests/ui/resolve/issue-85348.stderr b/tests/ui/resolve/issue-85348.stderr index 42b43f825d10c..ce2fc48922d68 100644 --- a/tests/ui/resolve/issue-85348.stderr +++ b/tests/ui/resolve/issue-85348.stderr @@ -7,7 +7,7 @@ LL | impl ArrayWindowsExample { LL | let mut N; | ^ cannot be named the same as a const parameter -error[E0412]: cannot find type `ArrayWindowsExample` in this scope +error[E0412]: cannot find type `ArrayWindowsExample` --> $DIR/issue-85348.rs:3:22 | LL | impl ArrayWindowsExample { diff --git a/tests/ui/resolve/issue-88472.rs b/tests/ui/resolve/issue-88472.rs index 6bf7caeddbfcd..4eff15d941c27 100644 --- a/tests/ui/resolve/issue-88472.rs +++ b/tests/ui/resolve/issue-88472.rs @@ -14,8 +14,8 @@ mod b { use crate::a::*; //~^ WARNING: unused import type Bar = Foo; - //~^ ERROR: cannot find type `Foo` in this scope [E0412] - //~| NOTE: not found in this scope + //~^ ERROR: cannot find type `Foo` [E0412] + //~| NOTE: not found } mod c { @@ -31,8 +31,8 @@ mod c { mod e { type Baz = Eee; - //~^ ERROR: cannot find type `Eee` in this scope [E0412] - //~| NOTE: not found in this scope + //~^ ERROR: cannot find type `Eee` [E0412] + //~| NOTE: not found } fn main() {} diff --git a/tests/ui/resolve/issue-88472.stderr b/tests/ui/resolve/issue-88472.stderr index 8431fc97766f7..dbb0daa06363b 100644 --- a/tests/ui/resolve/issue-88472.stderr +++ b/tests/ui/resolve/issue-88472.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/issue-88472.rs:16:16 | LL | type Bar = Foo; @@ -10,7 +10,7 @@ note: struct `a::Foo` exists but is inaccessible LL | struct Foo; | ^^^^^^^^^^^ not accessible -error[E0412]: cannot find type `Eee` in this scope +error[E0412]: cannot find type `Eee` --> $DIR/issue-88472.rs:33:16 | LL | type Baz = Eee; diff --git a/tests/ui/resolve/issue-90113.rs b/tests/ui/resolve/issue-90113.rs index f6658b45ed1a6..1418a831880f4 100644 --- a/tests/ui/resolve/issue-90113.rs +++ b/tests/ui/resolve/issue-90113.rs @@ -14,7 +14,7 @@ mod alias { fn foo(l: crate::alias::Foo) { match l { - Cons(..) => {} //~ ERROR: cannot find tuple struct or tuple variant `Cons` in this scope + Cons(..) => {} //~ ERROR: cannot find tuple struct or tuple variant `Cons` } } diff --git a/tests/ui/resolve/issue-90113.stderr b/tests/ui/resolve/issue-90113.stderr index d25c67825e3a1..6f36be4a18670 100644 --- a/tests/ui/resolve/issue-90113.stderr +++ b/tests/ui/resolve/issue-90113.stderr @@ -1,4 +1,4 @@ -error[E0531]: cannot find tuple struct or tuple variant `Cons` in this scope +error[E0531]: cannot find tuple struct or tuple variant `Cons` --> $DIR/issue-90113.rs:17:9 | LL | Cons(..) => {} diff --git a/tests/ui/resolve/levenshtein.stderr b/tests/ui/resolve/levenshtein.stderr index cf478210132ed..140d269ab84bc 100644 --- a/tests/ui/resolve/levenshtein.stderr +++ b/tests/ui/resolve/levenshtein.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `esize` in this scope +error[E0412]: cannot find type `esize` --> $DIR/levenshtein.rs:5:11 | LL | fn foo(c: esize) {} // Misspelled primitive type name. | ^^^^^ help: a builtin type with a similar name exists: `isize` -error[E0412]: cannot find type `Baz` in this scope +error[E0412]: cannot find type `Baz` --> $DIR/levenshtein.rs:10:10 | LL | enum Bar { } @@ -13,7 +13,7 @@ LL | LL | type A = Baz; // Misspelled type name. | ^^^ help: an enum with a similar name exists: `Bar` -error[E0412]: cannot find type `Opiton` in this scope +error[E0412]: cannot find type `Opiton` --> $DIR/levenshtein.rs:12:10 | LL | type B = Opiton; // Misspelled type name from the prelude. @@ -22,13 +22,13 @@ LL | type B = Opiton; // Misspelled type name from the prelude. | = note: similarly named enum `Option` defined here -error[E0412]: cannot find type `Baz` in this scope +error[E0412]: cannot find type `Baz` --> $DIR/levenshtein.rs:16:14 | LL | type A = Baz; // No suggestion here, Bar is not visible | ^^^ not found in this scope -error[E0425]: cannot find value `MAXITEM` in this scope +error[E0425]: cannot find value `MAXITEM` --> $DIR/levenshtein.rs:24:20 | LL | const MAX_ITEM: usize = 10; @@ -37,7 +37,7 @@ LL | const MAX_ITEM: usize = 10; LL | let v = [0u32; MAXITEM]; // Misspelled constant name. | ^^^^^^^ help: a constant with a similar name exists: `MAX_ITEM` -error[E0412]: cannot find type `first` in module `m` +error[E0412]: cannot find type `first` --> $DIR/levenshtein.rs:28:15 | LL | pub struct First; @@ -46,7 +46,7 @@ LL | pub struct First; LL | let b: m::first = m::second; // Misspelled item in module. | ^^^^^ help: a struct with a similar name exists (notice the capitalization): `First` -error[E0425]: cannot find value `second` in module `m` +error[E0425]: cannot find value `second` --> $DIR/levenshtein.rs:28:26 | LL | pub struct Second; @@ -55,7 +55,7 @@ LL | pub struct Second; LL | let b: m::first = m::second; // Misspelled item in module. | ^^^^^^ help: a unit struct with a similar name exists (notice the capitalization): `Second` -error[E0425]: cannot find function `foobar` in this scope +error[E0425]: cannot find function `foobar` --> $DIR/levenshtein.rs:26:5 | LL | fn foo_bar() {} diff --git a/tests/ui/resolve/no-implicit-prelude-nested.rs b/tests/ui/resolve/no-implicit-prelude-nested.rs index c314967da4fb7..06497d4be963e 100644 --- a/tests/ui/resolve/no-implicit-prelude-nested.rs +++ b/tests/ui/resolve/no-implicit-prelude-nested.rs @@ -8,26 +8,26 @@ mod foo { mod baz { struct Test; - impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope + impl Add for Test {} //~ ERROR cannot find trait `Add` impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone` - impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope - impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope - impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope + impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` + impl ToString for Test {} //~ ERROR cannot find trait `ToString` + impl Writer for Test {} //~ ERROR cannot find trait `Writer` fn foo() { - drop(2) //~ ERROR cannot find function `drop` in this scope + drop(2) //~ ERROR cannot find function `drop` } } struct Test; - impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope + impl Add for Test {} //~ ERROR cannot find trait `Add` impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone` - impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope - impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope - impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope + impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` + impl ToString for Test {} //~ ERROR cannot find trait `ToString` + impl Writer for Test {} //~ ERROR cannot find trait `Writer` fn foo() { - drop(2) //~ ERROR cannot find function `drop` in this scope + drop(2) //~ ERROR cannot find function `drop` } } @@ -35,14 +35,14 @@ fn qux() { #[no_implicit_prelude] mod qux_inner { struct Test; - impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope + impl Add for Test {} //~ ERROR cannot find trait `Add` impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone` - impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope - impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope - impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope + impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` + impl ToString for Test {} //~ ERROR cannot find trait `ToString` + impl Writer for Test {} //~ ERROR cannot find trait `Writer` fn foo() { - drop(2) //~ ERROR cannot find function `drop` in this scope + drop(2) //~ ERROR cannot find function `drop` } } } diff --git a/tests/ui/resolve/no-implicit-prelude-nested.stderr b/tests/ui/resolve/no-implicit-prelude-nested.stderr index 49cf72bfee2d6..e3e338cae9e73 100644 --- a/tests/ui/resolve/no-implicit-prelude-nested.stderr +++ b/tests/ui/resolve/no-implicit-prelude-nested.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Add` in this scope +error[E0405]: cannot find trait `Add` --> $DIR/no-implicit-prelude-nested.rs:11:14 | LL | impl Add for Test {} @@ -20,7 +20,7 @@ help: consider importing this trait instead LL + use std::clone::Clone; | -error[E0405]: cannot find trait `Iterator` in this scope +error[E0405]: cannot find trait `Iterator` --> $DIR/no-implicit-prelude-nested.rs:13:14 | LL | impl Iterator for Test {} @@ -31,7 +31,7 @@ help: consider importing this trait LL + use std::iter::Iterator; | -error[E0405]: cannot find trait `ToString` in this scope +error[E0405]: cannot find trait `ToString` --> $DIR/no-implicit-prelude-nested.rs:14:14 | LL | impl ToString for Test {} @@ -42,13 +42,13 @@ help: consider importing this trait LL + use std::string::ToString; | -error[E0405]: cannot find trait `Writer` in this scope +error[E0405]: cannot find trait `Writer` --> $DIR/no-implicit-prelude-nested.rs:15:14 | LL | impl Writer for Test {} | ^^^^^^ not found in this scope -error[E0425]: cannot find function `drop` in this scope +error[E0425]: cannot find function `drop` --> $DIR/no-implicit-prelude-nested.rs:18:13 | LL | drop(2) @@ -59,7 +59,7 @@ help: consider importing this function LL + use std::mem::drop; | -error[E0405]: cannot find trait `Add` in this scope +error[E0405]: cannot find trait `Add` --> $DIR/no-implicit-prelude-nested.rs:23:10 | LL | impl Add for Test {} @@ -81,7 +81,7 @@ help: consider importing this trait instead LL + use std::clone::Clone; | -error[E0405]: cannot find trait `Iterator` in this scope +error[E0405]: cannot find trait `Iterator` --> $DIR/no-implicit-prelude-nested.rs:25:10 | LL | impl Iterator for Test {} @@ -92,7 +92,7 @@ help: consider importing this trait LL + use std::iter::Iterator; | -error[E0405]: cannot find trait `ToString` in this scope +error[E0405]: cannot find trait `ToString` --> $DIR/no-implicit-prelude-nested.rs:26:10 | LL | impl ToString for Test {} @@ -103,13 +103,13 @@ help: consider importing this trait LL + use std::string::ToString; | -error[E0405]: cannot find trait `Writer` in this scope +error[E0405]: cannot find trait `Writer` --> $DIR/no-implicit-prelude-nested.rs:27:10 | LL | impl Writer for Test {} | ^^^^^^ not found in this scope -error[E0425]: cannot find function `drop` in this scope +error[E0425]: cannot find function `drop` --> $DIR/no-implicit-prelude-nested.rs:30:9 | LL | drop(2) @@ -120,7 +120,7 @@ help: consider importing this function LL + use std::mem::drop; | -error[E0405]: cannot find trait `Add` in this scope +error[E0405]: cannot find trait `Add` --> $DIR/no-implicit-prelude-nested.rs:38:14 | LL | impl Add for Test {} @@ -142,7 +142,7 @@ help: consider importing this trait instead LL + use std::clone::Clone; | -error[E0405]: cannot find trait `Iterator` in this scope +error[E0405]: cannot find trait `Iterator` --> $DIR/no-implicit-prelude-nested.rs:40:14 | LL | impl Iterator for Test {} @@ -153,7 +153,7 @@ help: consider importing this trait LL + use std::iter::Iterator; | -error[E0405]: cannot find trait `ToString` in this scope +error[E0405]: cannot find trait `ToString` --> $DIR/no-implicit-prelude-nested.rs:41:14 | LL | impl ToString for Test {} @@ -164,13 +164,13 @@ help: consider importing this trait LL + use std::string::ToString; | -error[E0405]: cannot find trait `Writer` in this scope +error[E0405]: cannot find trait `Writer` --> $DIR/no-implicit-prelude-nested.rs:42:14 | LL | impl Writer for Test {} | ^^^^^^ not found in this scope -error[E0425]: cannot find function `drop` in this scope +error[E0425]: cannot find function `drop` --> $DIR/no-implicit-prelude-nested.rs:45:13 | LL | drop(2) diff --git a/tests/ui/resolve/no-implicit-prelude.rs b/tests/ui/resolve/no-implicit-prelude.rs index 4b0ca4d524e62..3bf8d92142956 100644 --- a/tests/ui/resolve/no-implicit-prelude.rs +++ b/tests/ui/resolve/no-implicit-prelude.rs @@ -7,12 +7,12 @@ // fail with the same error message). struct Test; -impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope +impl Add for Test {} //~ ERROR cannot find trait `Add` impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone` -impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope -impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope -impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope +impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` +impl ToString for Test {} //~ ERROR cannot find trait `ToString` +impl Writer for Test {} //~ ERROR cannot find trait `Writer` fn main() { - drop(2) //~ ERROR cannot find function `drop` in this scope + drop(2) //~ ERROR cannot find function `drop` } diff --git a/tests/ui/resolve/no-implicit-prelude.stderr b/tests/ui/resolve/no-implicit-prelude.stderr index 5a759743f7258..ee933ae2dd60a 100644 --- a/tests/ui/resolve/no-implicit-prelude.stderr +++ b/tests/ui/resolve/no-implicit-prelude.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Add` in this scope +error[E0405]: cannot find trait `Add` --> $DIR/no-implicit-prelude.rs:10:6 | LL | impl Add for Test {} @@ -20,7 +20,7 @@ help: consider importing this trait instead LL + use std::clone::Clone; | -error[E0405]: cannot find trait `Iterator` in this scope +error[E0405]: cannot find trait `Iterator` --> $DIR/no-implicit-prelude.rs:12:6 | LL | impl Iterator for Test {} @@ -31,7 +31,7 @@ help: consider importing this trait LL + use std::iter::Iterator; | -error[E0405]: cannot find trait `ToString` in this scope +error[E0405]: cannot find trait `ToString` --> $DIR/no-implicit-prelude.rs:13:6 | LL | impl ToString for Test {} @@ -42,13 +42,13 @@ help: consider importing this trait LL + use std::string::ToString; | -error[E0405]: cannot find trait `Writer` in this scope +error[E0405]: cannot find trait `Writer` --> $DIR/no-implicit-prelude.rs:14:6 | LL | impl Writer for Test {} | ^^^^^^ not found in this scope -error[E0425]: cannot find function `drop` in this scope +error[E0425]: cannot find function `drop` --> $DIR/no-implicit-prelude.rs:17:5 | LL | drop(2) diff --git a/tests/ui/resolve/privacy-enum-ctor.rs b/tests/ui/resolve/privacy-enum-ctor.rs index f0d2cf8c04e90..8b160257680ca 100644 --- a/tests/ui/resolve/privacy-enum-ctor.rs +++ b/tests/ui/resolve/privacy-enum-ctor.rs @@ -55,17 +55,17 @@ fn main() { let _: E = E::Unit(); //~^ ERROR expected function, found enum variant `E::Unit` let _: Z = m::n::Z; - //~^ ERROR cannot find type `Z` in this scope + //~^ ERROR cannot find type `Z` //~| ERROR expected value, found enum `m::n::Z` //~| ERROR enum `Z` is private let _: Z = m::n::Z::Fn; - //~^ ERROR cannot find type `Z` in this scope + //~^ ERROR cannot find type `Z` //~| ERROR enum `Z` is private let _: Z = m::n::Z::Struct; - //~^ ERROR cannot find type `Z` in this scope + //~^ ERROR cannot find type `Z` //~| ERROR expected value, found struct variant `m::n::Z::Struct` //~| ERROR enum `Z` is private let _: Z = m::n::Z::Unit {}; - //~^ ERROR cannot find type `Z` in this scope + //~^ ERROR cannot find type `Z` //~| ERROR enum `Z` is private } diff --git a/tests/ui/resolve/privacy-enum-ctor.stderr b/tests/ui/resolve/privacy-enum-ctor.stderr index ee3aecddcc342..ea0e99b90e4cc 100644 --- a/tests/ui/resolve/privacy-enum-ctor.stderr +++ b/tests/ui/resolve/privacy-enum-ctor.stderr @@ -134,7 +134,7 @@ LL + use std::f32::consts::E; LL + use std::f64::consts::E; | -error[E0412]: cannot find type `Z` in this scope +error[E0412]: cannot find type `Z` --> $DIR/privacy-enum-ctor.rs:57:12 | LL | pub enum E { @@ -175,7 +175,7 @@ help: alternatively, the following enum variant is available LL | let _: Z = (m::Z::Fn(/* fields */)); | ~~~~~~~~~~~~~~~~~~~~~~~~ -error[E0412]: cannot find type `Z` in this scope +error[E0412]: cannot find type `Z` --> $DIR/privacy-enum-ctor.rs:61:12 | LL | pub enum E { @@ -190,7 +190,7 @@ note: enum `m::Z` exists but is inaccessible LL | pub(in m) enum Z { | ^^^^^^^^^^^^^^^^ not accessible -error[E0412]: cannot find type `Z` in this scope +error[E0412]: cannot find type `Z` --> $DIR/privacy-enum-ctor.rs:64:12 | LL | pub enum E { @@ -205,7 +205,7 @@ note: enum `m::Z` exists but is inaccessible LL | pub(in m) enum Z { | ^^^^^^^^^^^^^^^^ not accessible -error[E0412]: cannot find type `Z` in this scope +error[E0412]: cannot find type `Z` --> $DIR/privacy-enum-ctor.rs:68:12 | LL | pub enum E { diff --git a/tests/ui/resolve/raw-ident-in-path.rs b/tests/ui/resolve/raw-ident-in-path.rs index 7f1163bebde67..05d18a9f1c679 100644 --- a/tests/ui/resolve/raw-ident-in-path.rs +++ b/tests/ui/resolve/raw-ident-in-path.rs @@ -1,5 +1,5 @@ // Regression test for issue #63882. -type A = crate::r#break; //~ ERROR cannot find type `r#break` in the crate root +type A = crate::r#break; //~ ERROR cannot find type `r#break` fn main() {} diff --git a/tests/ui/resolve/raw-ident-in-path.stderr b/tests/ui/resolve/raw-ident-in-path.stderr index 7d2aa69113638..d1bad7ea1844f 100644 --- a/tests/ui/resolve/raw-ident-in-path.stderr +++ b/tests/ui/resolve/raw-ident-in-path.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `r#break` in the crate root +error[E0412]: cannot find type `r#break` --> $DIR/raw-ident-in-path.rs:3:17 | LL | type A = crate::r#break; diff --git a/tests/ui/resolve/resolve-assoc-suggestions.stderr b/tests/ui/resolve/resolve-assoc-suggestions.stderr index 3d9d4ffaa10c8..401d7dc5beb54 100644 --- a/tests/ui/resolve/resolve-assoc-suggestions.stderr +++ b/tests/ui/resolve/resolve-assoc-suggestions.stderr @@ -1,16 +1,16 @@ -error[E0412]: cannot find type `field` in this scope +error[E0412]: cannot find type `field` --> $DIR/resolve-assoc-suggestions.rs:16:16 | LL | let _: field; | ^^^^^ not found in this scope -error[E0531]: cannot find tuple struct or tuple variant `field` in this scope +error[E0531]: cannot find tuple struct or tuple variant `field` --> $DIR/resolve-assoc-suggestions.rs:18:13 | LL | let field(..); | ^^^^^ not found in this scope -error[E0425]: cannot find value `field` in this scope +error[E0425]: cannot find value `field` --> $DIR/resolve-assoc-suggestions.rs:20:9 | LL | field; @@ -21,7 +21,7 @@ help: you might have meant to use the available field LL | self.field; | +++++ -error[E0412]: cannot find type `Type` in this scope +error[E0412]: cannot find type `Type` --> $DIR/resolve-assoc-suggestions.rs:23:16 | LL | let _: Type; @@ -32,31 +32,31 @@ help: you might have meant to use the associated type LL | let _: Self::Type; | ++++++ -error[E0531]: cannot find tuple struct or tuple variant `Type` in this scope +error[E0531]: cannot find tuple struct or tuple variant `Type` --> $DIR/resolve-assoc-suggestions.rs:25:13 | LL | let Type(..); | ^^^^ not found in this scope -error[E0425]: cannot find value `Type` in this scope +error[E0425]: cannot find value `Type` --> $DIR/resolve-assoc-suggestions.rs:27:9 | LL | Type; | ^^^^ not found in this scope -error[E0412]: cannot find type `method` in this scope +error[E0412]: cannot find type `method` --> $DIR/resolve-assoc-suggestions.rs:30:16 | LL | let _: method; | ^^^^^^ not found in this scope -error[E0531]: cannot find tuple struct or tuple variant `method` in this scope +error[E0531]: cannot find tuple struct or tuple variant `method` --> $DIR/resolve-assoc-suggestions.rs:32:13 | LL | let method(..); | ^^^^^^ not found in this scope -error[E0425]: cannot find value `method` in this scope +error[E0425]: cannot find value `method` --> $DIR/resolve-assoc-suggestions.rs:34:9 | LL | method; diff --git a/tests/ui/resolve/resolve-primitive-fallback.rs b/tests/ui/resolve/resolve-primitive-fallback.rs index 05cabd9e3cd01..f4d06ec208688 100644 --- a/tests/ui/resolve/resolve-primitive-fallback.rs +++ b/tests/ui/resolve/resolve-primitive-fallback.rs @@ -6,5 +6,5 @@ fn main() { // Make sure primitive type fallback doesn't work with global paths let _: ::u8; - //~^ ERROR cannot find type `u8` in the crate root + //~^ ERROR cannot find type `u8` } diff --git a/tests/ui/resolve/resolve-primitive-fallback.stderr b/tests/ui/resolve/resolve-primitive-fallback.stderr index e3a5d4edcf102..8abf2ba228ebc 100644 --- a/tests/ui/resolve/resolve-primitive-fallback.stderr +++ b/tests/ui/resolve/resolve-primitive-fallback.stderr @@ -4,7 +4,7 @@ error[E0423]: expected value, found builtin type `u16` LL | std::mem::size_of(u16); | ^^^ not a value -error[E0412]: cannot find type `u8` in the crate root +error[E0412]: cannot find type `u8` --> $DIR/resolve-primitive-fallback.rs:8:14 | LL | let _: ::u8; diff --git a/tests/ui/resolve/resolve-self-in-impl-2.rs b/tests/ui/resolve/resolve-self-in-impl-2.rs index f586760c8b096..7ce4c5ededad3 100644 --- a/tests/ui/resolve/resolve-self-in-impl-2.rs +++ b/tests/ui/resolve/resolve-self-in-impl-2.rs @@ -2,6 +2,6 @@ struct S(T); trait Tr {} impl Self for S {} //~ ERROR expected trait, found self type `Self` -impl Self::N for S {} //~ ERROR cannot find trait `N` in `Self` +impl Self::N for S {} //~ ERROR cannot find trait `N` fn main() {} diff --git a/tests/ui/resolve/resolve-self-in-impl-2.stderr b/tests/ui/resolve/resolve-self-in-impl-2.stderr index 3791fe90a6bae..3627bf1d45227 100644 --- a/tests/ui/resolve/resolve-self-in-impl-2.stderr +++ b/tests/ui/resolve/resolve-self-in-impl-2.stderr @@ -4,7 +4,7 @@ error[E0411]: expected trait, found self type `Self` LL | impl Self for S {} | ^^^^ `Self` is only available in impls, traits, and type definitions -error[E0405]: cannot find trait `N` in `Self` +error[E0405]: cannot find trait `N` --> $DIR/resolve-self-in-impl-2.rs:5:12 | LL | impl Self::N for S {} diff --git a/tests/ui/resolve/resolve-speculative-adjustment.stderr b/tests/ui/resolve/resolve-speculative-adjustment.stderr index fb15472bdae8d..bea202013863b 100644 --- a/tests/ui/resolve/resolve-speculative-adjustment.stderr +++ b/tests/ui/resolve/resolve-speculative-adjustment.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `field` in this scope +error[E0425]: cannot find value `field` --> $DIR/resolve-speculative-adjustment.rs:17:13 | LL | field; | ^^^^^ not found in this scope -error[E0425]: cannot find value `field` in this scope +error[E0425]: cannot find value `field` --> $DIR/resolve-speculative-adjustment.rs:23:9 | LL | field; @@ -15,7 +15,7 @@ help: you might have meant to use the available field LL | self.field; | +++++ -error[E0425]: cannot find function `method` in this scope +error[E0425]: cannot find function `method` --> $DIR/resolve-speculative-adjustment.rs:25:9 | LL | method(); @@ -26,7 +26,7 @@ help: you might have meant to call the method LL | self.method(); | +++++ -error[E0425]: cannot find function `method` in this scope +error[E0425]: cannot find function `method` --> $DIR/resolve-speculative-adjustment.rs:19:13 | LL | method(); diff --git a/tests/ui/resolve/resolve-unknown-trait.rs b/tests/ui/resolve/resolve-unknown-trait.rs index 290893bbbec40..b8b41279bef00 100644 --- a/tests/ui/resolve/resolve-unknown-trait.rs +++ b/tests/ui/resolve/resolve-unknown-trait.rs @@ -1,10 +1,10 @@ trait NewTrait : SomeNonExistentTrait {} -//~^ ERROR cannot find trait `SomeNonExistentTrait` in this scope +//~^ ERROR cannot find trait `SomeNonExistentTrait` impl SomeNonExistentTrait for isize {} -//~^ ERROR cannot find trait `SomeNonExistentTrait` in this scope +//~^ ERROR cannot find trait `SomeNonExistentTrait` fn f() {} -//~^ ERROR cannot find trait `SomeNonExistentTrait` in this scope +//~^ ERROR cannot find trait `SomeNonExistentTrait` fn main() {} diff --git a/tests/ui/resolve/resolve-unknown-trait.stderr b/tests/ui/resolve/resolve-unknown-trait.stderr index e19cfe617d4f2..e27b954efbcd6 100644 --- a/tests/ui/resolve/resolve-unknown-trait.stderr +++ b/tests/ui/resolve/resolve-unknown-trait.stderr @@ -1,16 +1,16 @@ -error[E0405]: cannot find trait `SomeNonExistentTrait` in this scope +error[E0405]: cannot find trait `SomeNonExistentTrait` --> $DIR/resolve-unknown-trait.rs:1:18 | LL | trait NewTrait : SomeNonExistentTrait {} | ^^^^^^^^^^^^^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `SomeNonExistentTrait` in this scope +error[E0405]: cannot find trait `SomeNonExistentTrait` --> $DIR/resolve-unknown-trait.rs:4:6 | LL | impl SomeNonExistentTrait for isize {} | ^^^^^^^^^^^^^^^^^^^^ not found in this scope -error[E0405]: cannot find trait `SomeNonExistentTrait` in this scope +error[E0405]: cannot find trait `SomeNonExistentTrait` --> $DIR/resolve-unknown-trait.rs:7:8 | LL | fn f() {} diff --git a/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed b/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed index 607c9af492713..ac8a4d283c827 100644 --- a/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed +++ b/tests/ui/resolve/suggest-import-without-clobbering-attrs.fixed @@ -12,5 +12,5 @@ mod y { fn main() { z(); - //~^ ERROR cannot find function `z` in this scope + //~^ ERROR cannot find function `z` } diff --git a/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs b/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs index 6cc53fb108658..b879183c6549a 100644 --- a/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs +++ b/tests/ui/resolve/suggest-import-without-clobbering-attrs.rs @@ -11,5 +11,5 @@ mod y { fn main() { z(); - //~^ ERROR cannot find function `z` in this scope + //~^ ERROR cannot find function `z` } diff --git a/tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr b/tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr index de65d695dd23d..ce457c6c7247d 100644 --- a/tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr +++ b/tests/ui/resolve/suggest-import-without-clobbering-attrs.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `z` in this scope +error[E0425]: cannot find function `z` --> $DIR/suggest-import-without-clobbering-attrs.rs:13:5 | LL | z(); diff --git a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs index ecd3f58811904..acc4b08a1fa62 100644 --- a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs +++ b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs @@ -4,15 +4,15 @@ struct A { impl A { fn new(cofig: String) -> Self { - Self { config } //~ Error cannot find value `config` in this scope + Self { config } //~ Error cannot find value `config` } fn do_something(cofig: String) { - println!("{config}"); //~ Error cannot find value `config` in this scope + println!("{config}"); //~ Error cannot find value `config` } fn self_is_available(self, cofig: String) { - println!("{config}"); //~ Error cannot find value `config` in this scope + println!("{config}"); //~ Error cannot find value `config` } } @@ -33,9 +33,9 @@ impl B for Box { bah; //~^ ERROR cannot find value `bah` BAR; - //~^ ERROR cannot find value `BAR` in this scope + //~^ ERROR cannot find value `BAR` let foo: Baz = "".to_string(); - //~^ ERROR cannot find type `Baz` in this scope + //~^ ERROR cannot find type `Baz` } } diff --git a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr index 0306c8af87d85..4b53f7d9a3b1b 100644 --- a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr +++ b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `config` in this scope +error[E0425]: cannot find value `config` --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:7:16 | LL | config: String, @@ -7,7 +7,7 @@ LL | config: String, LL | Self { config } | ^^^^^^ help: a local variable with a similar name exists: `cofig` -error[E0425]: cannot find value `config` in this scope +error[E0425]: cannot find value `config` --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:11:20 | LL | config: String, @@ -16,7 +16,7 @@ LL | config: String, LL | println!("{config}"); | ^^^^^^ help: a local variable with a similar name exists: `cofig` -error[E0425]: cannot find value `config` in this scope +error[E0425]: cannot find value `config` --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:15:20 | LL | println!("{config}"); @@ -31,7 +31,7 @@ help: a local variable with a similar name exists LL | println!("{cofig}"); | ~~~~~ -error[E0425]: cannot find value `bah` in this scope +error[E0425]: cannot find value `bah` --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:33:9 | LL | bah; @@ -49,7 +49,7 @@ help: a function with a similar name exists LL | ba; | ~~ -error[E0425]: cannot find value `BAR` in this scope +error[E0425]: cannot find value `BAR` --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:35:9 | LL | BAR; @@ -67,7 +67,7 @@ help: a constant with a similar name exists LL | BARR; | ~~~~ -error[E0412]: cannot find type `Baz` in this scope +error[E0412]: cannot find type `Baz` --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:37:18 | LL | let foo: Baz = "".to_string(); @@ -85,7 +85,7 @@ help: a type alias with a similar name exists LL | let foo: Bar = "".to_string(); | ~~~ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:31:9 | LL | baz(); diff --git a/tests/ui/resolve/typo-suggestion-named-underscore.rs b/tests/ui/resolve/typo-suggestion-named-underscore.rs index a2b05db035150..e39369ffcccae 100644 --- a/tests/ui/resolve/typo-suggestion-named-underscore.rs +++ b/tests/ui/resolve/typo-suggestion-named-underscore.rs @@ -2,7 +2,7 @@ const _: () = (); fn main() { a // Shouldn't suggest underscore - //~^ ERROR: cannot find value `a` in this scope + //~^ ERROR: cannot find value `a` } trait Unknown {} @@ -11,4 +11,4 @@ trait Unknown {} use Unknown as _; fn foo(x: T) {} // Shouldn't suggest underscore -//~^ ERROR: cannot find trait `A` in this scope +//~^ ERROR: cannot find trait `A` diff --git a/tests/ui/resolve/typo-suggestion-named-underscore.stderr b/tests/ui/resolve/typo-suggestion-named-underscore.stderr index 65d1b084a3a7b..ed7fb40d1196d 100644 --- a/tests/ui/resolve/typo-suggestion-named-underscore.stderr +++ b/tests/ui/resolve/typo-suggestion-named-underscore.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `a` in this scope +error[E0425]: cannot find value `a` --> $DIR/typo-suggestion-named-underscore.rs:4:5 | LL | a // Shouldn't suggest underscore | ^ not found in this scope -error[E0405]: cannot find trait `A` in this scope +error[E0405]: cannot find trait `A` --> $DIR/typo-suggestion-named-underscore.rs:13:11 | LL | fn foo(x: T) {} // Shouldn't suggest underscore diff --git a/tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr b/tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr index 8addc0303fb91..2d2d0fd4b8e0b 100644 --- a/tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr +++ b/tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Nonexist` in this scope +error[E0405]: cannot find trait `Nonexist` --> $DIR/unboxed-closure-sugar-nonexistent-trait.rs:1:8 | LL | fn f isize>(x: F) {} diff --git a/tests/ui/resolve/unresolved_static_type_field.rs b/tests/ui/resolve/unresolved_static_type_field.rs index 494ad083f1a87..784926e267795 100644 --- a/tests/ui/resolve/unresolved_static_type_field.rs +++ b/tests/ui/resolve/unresolved_static_type_field.rs @@ -7,7 +7,7 @@ struct Foo { impl Foo { fn bar() { f(cx); - //~^ ERROR cannot find value `cx` in this scope + //~^ ERROR cannot find value `cx` } } diff --git a/tests/ui/resolve/unresolved_static_type_field.stderr b/tests/ui/resolve/unresolved_static_type_field.stderr index e3de0a3fb74b3..d86f4cf0e7ed4 100644 --- a/tests/ui/resolve/unresolved_static_type_field.stderr +++ b/tests/ui/resolve/unresolved_static_type_field.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `cx` in this scope +error[E0425]: cannot find value `cx` --> $DIR/unresolved_static_type_field.rs:9:11 | LL | cx: bool, diff --git a/tests/ui/resolve/use_suggestion.stderr b/tests/ui/resolve/use_suggestion.stderr index 1155f5caa1739..1d8acaf67fac9 100644 --- a/tests/ui/resolve/use_suggestion.stderr +++ b/tests/ui/resolve/use_suggestion.stderr @@ -9,7 +9,7 @@ help: consider importing this struct LL + use std::collections::HashMap; | -error[E0412]: cannot find type `HashMap` in this scope +error[E0412]: cannot find type `HashMap` --> $DIR/use_suggestion.rs:5:13 | LL | let y1: HashMap; @@ -20,7 +20,7 @@ help: consider importing this struct LL + use std::collections::HashMap; | -error[E0412]: cannot find type `GooMap` in this scope +error[E0412]: cannot find type `GooMap` --> $DIR/use_suggestion.rs:6:13 | LL | let y2: GooMap; diff --git a/tests/ui/resolve/use_suggestion_placement.stderr b/tests/ui/resolve/use_suggestion_placement.stderr index 3611f9ae6b4ed..08bd4269649ed 100644 --- a/tests/ui/resolve/use_suggestion_placement.stderr +++ b/tests/ui/resolve/use_suggestion_placement.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Path` in this scope +error[E0412]: cannot find type `Path` --> $DIR/use_suggestion_placement.rs:18:16 | LL | type Bar = Path; @@ -9,7 +9,7 @@ help: consider importing this struct LL + use std::path::Path; | -error[E0425]: cannot find value `A` in this scope +error[E0425]: cannot find value `A` --> $DIR/use_suggestion_placement.rs:23:13 | LL | let _ = A; @@ -20,7 +20,7 @@ help: consider importing this constant LL + use m::A; | -error[E0412]: cannot find type `HashMap` in this scope +error[E0412]: cannot find type `HashMap` --> $DIR/use_suggestion_placement.rs:28:23 | LL | type Dict = HashMap; diff --git a/tests/ui/resolve/visibility-indeterminate.rs b/tests/ui/resolve/visibility-indeterminate.rs index 17e5fec4701b9..9bb9af404e0cc 100644 --- a/tests/ui/resolve/visibility-indeterminate.rs +++ b/tests/ui/resolve/visibility-indeterminate.rs @@ -1,6 +1,6 @@ //@ edition:2018 -foo!(); //~ ERROR cannot find macro `foo` in this scope +foo!(); //~ ERROR cannot find macro `foo` pub(in ::bar) struct Baz {} //~ ERROR cannot determine resolution for the visibility diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/bindings.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/bindings.stderr index 2463b7f3eacc7..5aa1888f8cc5d 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/bindings.stderr +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/bindings.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/bindings.rs:6:14 | LL | _ => y, | ^ not found in this scope -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/bindings.rs:8:5 | LL | y diff --git a/tests/ui/rmeta/rmeta.rs b/tests/ui/rmeta/rmeta.rs index 4d8cff8e60e8c..089bcfb5f6424 100644 --- a/tests/ui/rmeta/rmeta.rs +++ b/tests/ui/rmeta/rmeta.rs @@ -4,5 +4,5 @@ // Check that building a metadata crate finds an error. fn main() { - let _ = Foo; //~ ERROR cannot find value `Foo` in this scope + let _ = Foo; //~ ERROR cannot find value `Foo` } diff --git a/tests/ui/rmeta/rmeta.stderr b/tests/ui/rmeta/rmeta.stderr index 85452ea41d313..14048dc899826 100644 --- a/tests/ui/rmeta/rmeta.stderr +++ b/tests/ui/rmeta/rmeta.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `Foo` in this scope +error[E0425]: cannot find value `Foo` --> $DIR/rmeta.rs:7:13 | LL | let _ = Foo; diff --git a/tests/ui/rust-2018/issue-52202-use-suggestions.rs b/tests/ui/rust-2018/issue-52202-use-suggestions.rs index ce9a5edf007f9..0392df4678a44 100644 --- a/tests/ui/rust-2018/issue-52202-use-suggestions.rs +++ b/tests/ui/rust-2018/issue-52202-use-suggestions.rs @@ -9,5 +9,5 @@ mod plumbing { fn main() { let _d = Drain {}; - //~^ ERROR cannot find struct, variant or union type `Drain` in this scope + //~^ ERROR cannot find struct, variant or union type `Drain` } diff --git a/tests/ui/rust-2018/issue-52202-use-suggestions.stderr b/tests/ui/rust-2018/issue-52202-use-suggestions.stderr index ee1a336ea98f6..c6a600de55233 100644 --- a/tests/ui/rust-2018/issue-52202-use-suggestions.stderr +++ b/tests/ui/rust-2018/issue-52202-use-suggestions.stderr @@ -1,4 +1,4 @@ -error[E0422]: cannot find struct, variant or union type `Drain` in this scope +error[E0422]: cannot find struct, variant or union type `Drain` --> $DIR/issue-52202-use-suggestions.rs:11:14 | LL | let _d = Drain {}; diff --git a/tests/ui/rustdoc/cfg-rustdoc.stderr b/tests/ui/rustdoc/cfg-rustdoc.stderr index 340a8e22482ce..42c388dcb6d64 100644 --- a/tests/ui/rustdoc/cfg-rustdoc.stderr +++ b/tests/ui/rustdoc/cfg-rustdoc.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `Foo` in this scope +error[E0425]: cannot find value `Foo` --> $DIR/cfg-rustdoc.rs:5:13 | LL | let f = Foo; diff --git a/tests/ui/self/class-missing-self.rs b/tests/ui/self/class-missing-self.rs index 8ad347d20e6e4..4d973d3a2aeed 100644 --- a/tests/ui/self/class-missing-self.rs +++ b/tests/ui/self/class-missing-self.rs @@ -6,8 +6,8 @@ impl Cat { fn sleep(&self) { loop{} } fn meow(&self) { println!("Meow"); - meows += 1; //~ ERROR cannot find value `meows` in this scope - sleep(); //~ ERROR cannot find function `sleep` in this + meows += 1; //~ ERROR cannot find value `meows` + sleep(); //~ ERROR cannot find function `sleep` } } diff --git a/tests/ui/self/class-missing-self.stderr b/tests/ui/self/class-missing-self.stderr index ca7a896200fc3..0caf630bfc021 100644 --- a/tests/ui/self/class-missing-self.stderr +++ b/tests/ui/self/class-missing-self.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `meows` in this scope +error[E0425]: cannot find value `meows` --> $DIR/class-missing-self.rs:9:7 | LL | meows += 1; @@ -9,7 +9,7 @@ help: you might have meant to use the available field LL | self.meows += 1; | +++++ -error[E0425]: cannot find function `sleep` in this scope +error[E0425]: cannot find function `sleep` --> $DIR/class-missing-self.rs:10:7 | LL | sleep(); diff --git a/tests/ui/self/elision/nested-item.rs b/tests/ui/self/elision/nested-item.rs index 4bcb645c60eef..6cc379747ab8e 100644 --- a/tests/ui/self/elision/nested-item.rs +++ b/tests/ui/self/elision/nested-item.rs @@ -6,7 +6,7 @@ fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { //~^ ERROR `self` parameter is only allowed in associated functions //~| ERROR `self` parameter is only allowed in associated functions //~| ERROR missing lifetime specifier - //~| ERROR cannot find type `Wrap` in this scope + //~| ERROR cannot find type `Wrap` &() } diff --git a/tests/ui/self/elision/nested-item.stderr b/tests/ui/self/elision/nested-item.stderr index 7bad26fa13303..feeb560d995cc 100644 --- a/tests/ui/self/elision/nested-item.stderr +++ b/tests/ui/self/elision/nested-item.stderr @@ -35,7 +35,7 @@ LL - fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { LL + fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> () { | -error[E0412]: cannot find type `Wrap` in this scope +error[E0412]: cannot find type `Wrap` --> $DIR/nested-item.rs:5:15 | LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { diff --git a/tests/ui/self/self_type_keyword-2.rs b/tests/ui/self/self_type_keyword-2.rs index cfb87f5186d32..0af2c42b0bf23 100644 --- a/tests/ui/self/self_type_keyword-2.rs +++ b/tests/ui/self/self_type_keyword-2.rs @@ -2,12 +2,12 @@ use self::Self as Foo; //~ ERROR unresolved import `self::Self` pub fn main() { let Self = 5; - //~^ ERROR cannot find unit struct, unit variant or constant `Self` in this scope + //~^ ERROR cannot find unit struct, unit variant or constant `Self` match 15 { Self => (), - //~^ ERROR cannot find unit struct, unit variant or constant `Self` in this scope + //~^ ERROR cannot find unit struct, unit variant or constant `Self` Foo { x: Self } => (), - //~^ ERROR cannot find unit struct, unit variant or constant `Self` in this scope + //~^ ERROR cannot find unit struct, unit variant or constant `Self` } } diff --git a/tests/ui/self/self_type_keyword-2.stderr b/tests/ui/self/self_type_keyword-2.stderr index 4e931f91f70c4..7e96bcc89eebf 100644 --- a/tests/ui/self/self_type_keyword-2.stderr +++ b/tests/ui/self/self_type_keyword-2.stderr @@ -4,19 +4,19 @@ error[E0432]: unresolved import `self::Self` LL | use self::Self as Foo; | ^^^^^^^^^^^^^^^^^ no `Self` in the root -error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope +error[E0531]: cannot find unit struct, unit variant or constant `Self` --> $DIR/self_type_keyword-2.rs:4:9 | LL | let Self = 5; | ^^^^ not found in this scope -error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope +error[E0531]: cannot find unit struct, unit variant or constant `Self` --> $DIR/self_type_keyword-2.rs:8:9 | LL | Self => (), | ^^^^ not found in this scope -error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope +error[E0531]: cannot find unit struct, unit variant or constant `Self` --> $DIR/self_type_keyword-2.rs:10:18 | LL | Foo { x: Self } => (), diff --git a/tests/ui/self/self_type_keyword.rs b/tests/ui/self/self_type_keyword.rs index 96d24715edb10..a0cda4ee49002 100644 --- a/tests/ui/self/self_type_keyword.rs +++ b/tests/ui/self/self_type_keyword.rs @@ -19,7 +19,7 @@ pub fn main() { ref mut Self => (), //~^ ERROR expected identifier, found keyword `Self` Self!() => (), - //~^ ERROR cannot find macro `Self` in this scope + //~^ ERROR cannot find macro `Self` Foo { Self } => (), //~^ ERROR expected identifier, found keyword `Self` //~| ERROR mismatched types diff --git a/tests/ui/self/self_type_keyword.stderr b/tests/ui/self/self_type_keyword.stderr index 4909a9cdc7f5c..8886fcfdc60cc 100644 --- a/tests/ui/self/self_type_keyword.stderr +++ b/tests/ui/self/self_type_keyword.stderr @@ -60,7 +60,7 @@ error: cannot find macro `Self` in this scope LL | Self!() => (), | ^^^^ -error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope +error[E0531]: cannot find unit struct, unit variant or constant `Self` --> $DIR/self_type_keyword.rs:16:13 | LL | mut Self => (), diff --git a/tests/ui/self/suggest-self-2.rs b/tests/ui/self/suggest-self-2.rs index 1e001827e475f..74573e111f2b5 100644 --- a/tests/ui/self/suggest-self-2.rs +++ b/tests/ui/self/suggest-self-2.rs @@ -3,19 +3,19 @@ struct Foo {} impl Foo { fn foo(&self) { bar(self); - //~^ ERROR cannot find function `bar` in this scope + //~^ ERROR cannot find function `bar` //~| HELP try calling `bar` as a method bar(&&self, 102); - //~^ ERROR cannot find function `bar` in this scope + //~^ ERROR cannot find function `bar` //~| HELP try calling `bar` as a method bar(&mut self, 102, &"str"); - //~^ ERROR cannot find function `bar` in this scope + //~^ ERROR cannot find function `bar` //~| HELP try calling `bar` as a method bar(); - //~^ ERROR cannot find function `bar` in this scope + //~^ ERROR cannot find function `bar` self.bar(); //~^ ERROR no method named `bar` found for reference diff --git a/tests/ui/self/suggest-self-2.stderr b/tests/ui/self/suggest-self-2.stderr index 4bd025ea07630..dbb3c2ab9235d 100644 --- a/tests/ui/self/suggest-self-2.stderr +++ b/tests/ui/self/suggest-self-2.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/suggest-self-2.rs:5:9 | LL | bar(self); @@ -6,7 +6,7 @@ LL | bar(self); | | | help: try calling `bar` as a method: `self.bar()` -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/suggest-self-2.rs:9:9 | LL | bar(&&self, 102); @@ -14,7 +14,7 @@ LL | bar(&&self, 102); | | | help: try calling `bar` as a method: `self.bar(102)` -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/suggest-self-2.rs:13:9 | LL | bar(&mut self, 102, &"str"); @@ -22,7 +22,7 @@ LL | bar(&mut self, 102, &"str"); | | | help: try calling `bar` as a method: `self.bar(102, &"str")` -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/suggest-self-2.rs:17:9 | LL | bar(); diff --git a/tests/ui/self/suggest-self.rs b/tests/ui/self/suggest-self.rs index 1cc17116ea7f7..3d292a02e5310 100644 --- a/tests/ui/self/suggest-self.rs +++ b/tests/ui/self/suggest-self.rs @@ -19,17 +19,17 @@ impl Foo { fn foo(&self) -> i32 { this.x - //~^ ERROR cannot find value `this` in this scope + //~^ ERROR cannot find value `this` } fn bar(&self) -> i32 { this.foo() - //~^ ERROR cannot find value `this` in this scope + //~^ ERROR cannot find value `this` } fn baz(&self) -> i32 { my.bar() - //~^ ERROR cannot find value `my` in this scope + //~^ ERROR cannot find value `my` } } diff --git a/tests/ui/self/suggest-self.stderr b/tests/ui/self/suggest-self.stderr index 0d38b9d87c5e8..8625a83694698 100644 --- a/tests/ui/self/suggest-self.stderr +++ b/tests/ui/self/suggest-self.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `this` in this scope +error[E0425]: cannot find value `this` --> $DIR/suggest-self.rs:21:9 | LL | this.x @@ -7,7 +7,7 @@ LL | this.x | not found in this scope | help: you might have meant to use `self` here instead -error[E0425]: cannot find value `this` in this scope +error[E0425]: cannot find value `this` --> $DIR/suggest-self.rs:26:9 | LL | this.foo() @@ -16,7 +16,7 @@ LL | this.foo() | not found in this scope | help: you might have meant to use `self` here instead -error[E0425]: cannot find value `my` in this scope +error[E0425]: cannot find value `my` --> $DIR/suggest-self.rs:31:9 | LL | my.bar() diff --git a/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs b/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs index d0bf5078165b7..7d5cfbc9c6bd2 100644 --- a/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs +++ b/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs @@ -1,7 +1,7 @@ fn main() { let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes; //~^ ERROR expected a pattern, found an expression -//~| ERROR cannot find type `T` in this scope +//~| ERROR cannot find type `T` //~| ERROR const and type arguments are not allowed on builtin type `str` //~| ERROR expected unit struct, unit variant or constant, found associated function `str< //~| ERROR type annotations needed diff --git a/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr b/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr index fc431eb14127f..1b3c6641e194d 100644 --- a/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr +++ b/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr @@ -4,7 +4,7 @@ error: expected a pattern, found an expression LL | let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes; | ^^^^^^^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs:2:55 | LL | let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes; diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs index 66a432be35737..dc5c4f7627522 100644 --- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs +++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs @@ -8,7 +8,7 @@ impl Numberer { pub(crate) async fn new( //~^ ERROR `async fn` is not permitted in Rust 2015 interval: Duration, - //~^ ERROR cannot find type `Duration` in this scope + //~^ ERROR cannot find type `Duration` ) -> Numberer { Numberer {} } diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr index 60433e1c28467..bf8191e5fb425 100644 --- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr +++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr @@ -7,7 +7,7 @@ LL | pub(crate) async fn new( = help: pass `--edition 2021` to `rustc` = note: for more on editions, read https://doc.rust-lang.org/edition-guide -error[E0412]: cannot find type `Duration` in this scope +error[E0412]: cannot find type `Duration` --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs:10:19 | LL | interval: Duration, diff --git a/tests/ui/span/suggestion-raw-68962.stderr b/tests/ui/span/suggestion-raw-68962.stderr index 2e25f5cbdf58d..2a76514405770 100644 --- a/tests/ui/span/suggestion-raw-68962.stderr +++ b/tests/ui/span/suggestion-raw-68962.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `fina` in this scope +error[E0425]: cannot find value `fina` --> $DIR/suggestion-raw-68962.rs:7:5 | LL | fina; | ^^^^ help: a local variable with a similar name exists: `r#final` -error[E0425]: cannot find function `f` in this scope +error[E0425]: cannot find function `f` --> $DIR/suggestion-raw-68962.rs:10:5 | LL | fn r#fn() {} diff --git a/tests/ui/span/typo-suggestion.stderr b/tests/ui/span/typo-suggestion.stderr index 61d4e06119c4f..5d7c41319a7e4 100644 --- a/tests/ui/span/typo-suggestion.stderr +++ b/tests/ui/span/typo-suggestion.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `bar` in this scope +error[E0425]: cannot find value `bar` --> $DIR/typo-suggestion.rs:5:26 | LL | println!("Hello {}", bar); | ^^^ not found in this scope -error[E0425]: cannot find value `fob` in this scope +error[E0425]: cannot find value `fob` --> $DIR/typo-suggestion.rs:8:26 | LL | println!("Hello {}", fob); diff --git a/tests/ui/specialization/issue-68830-spurious-diagnostics.rs b/tests/ui/specialization/issue-68830-spurious-diagnostics.rs index a7487b8aecb9c..7ff92bff26a25 100644 --- a/tests/ui/specialization/issue-68830-spurious-diagnostics.rs +++ b/tests/ui/specialization/issue-68830-spurious-diagnostics.rs @@ -5,7 +5,7 @@ #![allow(incomplete_features)] struct BadStruct { - err: MissingType //~ ERROR: cannot find type `MissingType` in this scope + err: MissingType //~ ERROR: cannot find type `MissingType` } trait MyTrait { diff --git a/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr b/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr index 13f6ae0805dad..dff73f6f09d1c 100644 --- a/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr +++ b/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `MissingType` in this scope +error[E0412]: cannot find type `MissingType` --> $DIR/issue-68830-spurious-diagnostics.rs:8:10 | LL | err: MissingType diff --git a/tests/ui/specialization/min_specialization/impl-on-nonexisting.rs b/tests/ui/specialization/min_specialization/impl-on-nonexisting.rs index 77a64320d6f37..b3e08f5a86770 100644 --- a/tests/ui/specialization/min_specialization/impl-on-nonexisting.rs +++ b/tests/ui/specialization/min_specialization/impl-on-nonexisting.rs @@ -2,6 +2,6 @@ trait Trait {} impl Trait for NonExistent {} -//~^ ERROR cannot find type `NonExistent` in this scope +//~^ ERROR cannot find type `NonExistent` fn main() {} diff --git a/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr b/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr index 85b492c0503b2..934a502091972 100644 --- a/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr +++ b/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `NonExistent` in this scope +error[E0412]: cannot find type `NonExistent` --> $DIR/impl-on-nonexisting.rs:4:16 | LL | impl Trait for NonExistent {} diff --git a/tests/ui/stability-attribute/issue-109177.rs b/tests/ui/stability-attribute/issue-109177.rs index 52880a43bcc3d..f7d4afd256ee6 100644 --- a/tests/ui/stability-attribute/issue-109177.rs +++ b/tests/ui/stability-attribute/issue-109177.rs @@ -5,7 +5,7 @@ extern crate similar_unstable_method; fn main() { // FIXME: this function should not suggest the `foo` function. similar_unstable_method::foo1(); - //~^ ERROR cannot find function `foo1` in crate `similar_unstable_method` [E0425] + //~^ ERROR cannot find function `foo1` [E0425] let foo = similar_unstable_method::Foo; foo.foo1(); diff --git a/tests/ui/stability-attribute/issue-109177.stderr b/tests/ui/stability-attribute/issue-109177.stderr index 9c2ac591ace05..d0ed578887197 100644 --- a/tests/ui/stability-attribute/issue-109177.stderr +++ b/tests/ui/stability-attribute/issue-109177.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `foo1` in crate `similar_unstable_method` +error[E0425]: cannot find function `foo1` --> $DIR/issue-109177.rs:7:30 | LL | similar_unstable_method::foo1(); diff --git a/tests/ui/stability-attribute/unresolved_stability_lint.rs b/tests/ui/stability-attribute/unresolved_stability_lint.rs index 818d228bc91c5..2af8ce01e34e2 100644 --- a/tests/ui/stability-attribute/unresolved_stability_lint.rs +++ b/tests/ui/stability-attribute/unresolved_stability_lint.rs @@ -3,6 +3,6 @@ #[unstable(feature = "foo", issue = "none")] impl Foo for () {} -//~^ ERROR cannot find trait `Foo` in this scope +//~^ ERROR cannot find trait `Foo` fn main() {} diff --git a/tests/ui/stability-attribute/unresolved_stability_lint.stderr b/tests/ui/stability-attribute/unresolved_stability_lint.stderr index 51780d2088099..f7c29495f7f44 100644 --- a/tests/ui/stability-attribute/unresolved_stability_lint.stderr +++ b/tests/ui/stability-attribute/unresolved_stability_lint.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Foo` in this scope +error[E0405]: cannot find trait `Foo` --> $DIR/unresolved_stability_lint.rs:5:6 | LL | impl Foo for () {} diff --git a/tests/ui/structs/ice-struct-tail-normalization-113272.rs b/tests/ui/structs/ice-struct-tail-normalization-113272.rs index 85d3d1b4886f7..eab99be4b13ee 100644 --- a/tests/ui/structs/ice-struct-tail-normalization-113272.rs +++ b/tests/ui/structs/ice-struct-tail-normalization-113272.rs @@ -3,7 +3,7 @@ trait Trait { } impl Trait for () where Missing: Trait {} -//~^ ERROR cannot find type `Missing` in this scope +//~^ ERROR cannot find type `Missing` //~| ERROR not all trait items implemented, missing: `RefTarget` struct Other { diff --git a/tests/ui/structs/ice-struct-tail-normalization-113272.stderr b/tests/ui/structs/ice-struct-tail-normalization-113272.stderr index a205eb80f5c0a..be8be757ef753 100644 --- a/tests/ui/structs/ice-struct-tail-normalization-113272.stderr +++ b/tests/ui/structs/ice-struct-tail-normalization-113272.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/ice-struct-tail-normalization-113272.rs:5:25 | LL | impl Trait for () where Missing: Trait {} diff --git a/tests/ui/structs/struct-fields-shorthand-unresolved.rs b/tests/ui/structs/struct-fields-shorthand-unresolved.rs index caad149160c89..14700e827a074 100644 --- a/tests/ui/structs/struct-fields-shorthand-unresolved.rs +++ b/tests/ui/structs/struct-fields-shorthand-unresolved.rs @@ -7,6 +7,6 @@ fn main() { let x = 0; let foo = Foo { x, - y //~ ERROR cannot find value `y` in this scope + y //~ ERROR cannot find value `y` }; } diff --git a/tests/ui/structs/struct-fields-shorthand-unresolved.stderr b/tests/ui/structs/struct-fields-shorthand-unresolved.stderr index b485c17c1b270..e99312f77ec40 100644 --- a/tests/ui/structs/struct-fields-shorthand-unresolved.stderr +++ b/tests/ui/structs/struct-fields-shorthand-unresolved.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/struct-fields-shorthand-unresolved.rs:10:9 | LL | y diff --git a/tests/ui/structs/unresolved-struct-with-fru.rs b/tests/ui/structs/unresolved-struct-with-fru.rs index c9fdca4577279..3b84b807c51cc 100644 --- a/tests/ui/structs/unresolved-struct-with-fru.rs +++ b/tests/ui/structs/unresolved-struct-with-fru.rs @@ -7,6 +7,6 @@ fn main() { let _ = || { let s2 = Oops { a: 2, ..s1 }; - //~^ ERROR cannot find struct, variant or union type `Oops` in this scope + //~^ ERROR cannot find struct, variant or union type `Oops` }; } diff --git a/tests/ui/structs/unresolved-struct-with-fru.stderr b/tests/ui/structs/unresolved-struct-with-fru.stderr index 9902c3ed35711..df44538bbddda 100644 --- a/tests/ui/structs/unresolved-struct-with-fru.stderr +++ b/tests/ui/structs/unresolved-struct-with-fru.stderr @@ -1,4 +1,4 @@ -error[E0422]: cannot find struct, variant or union type `Oops` in this scope +error[E0422]: cannot find struct, variant or union type `Oops` --> $DIR/unresolved-struct-with-fru.rs:9:18 | LL | let s2 = Oops { a: 2, ..s1 }; diff --git a/tests/ui/suggestions/assoc-const-without-self.rs b/tests/ui/suggestions/assoc-const-without-self.rs index 95070ec601cd4..020b1c2f9a8e3 100644 --- a/tests/ui/suggestions/assoc-const-without-self.rs +++ b/tests/ui/suggestions/assoc-const-without-self.rs @@ -4,7 +4,7 @@ impl Foo { const A_CONST: usize = 1; fn foo() -> usize { - A_CONST //~ ERROR cannot find value `A_CONST` in this scope + A_CONST //~ ERROR cannot find value `A_CONST` } } diff --git a/tests/ui/suggestions/assoc-const-without-self.stderr b/tests/ui/suggestions/assoc-const-without-self.stderr index 5a9fba8a0e47b..b31ea8c6b1ef1 100644 --- a/tests/ui/suggestions/assoc-const-without-self.stderr +++ b/tests/ui/suggestions/assoc-const-without-self.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `A_CONST` in this scope +error[E0425]: cannot find value `A_CONST` --> $DIR/assoc-const-without-self.rs:7:9 | LL | A_CONST diff --git a/tests/ui/suggestions/assoc-type-in-method-return.rs b/tests/ui/suggestions/assoc-type-in-method-return.rs index 9bde65998d744..e9341304d7990 100644 --- a/tests/ui/suggestions/assoc-type-in-method-return.rs +++ b/tests/ui/suggestions/assoc-type-in-method-return.rs @@ -1,7 +1,7 @@ trait A { type Bla; fn to_bla(&self) -> Bla; - //~^ ERROR cannot find type `Bla` in this scope + //~^ ERROR cannot find type `Bla` } fn main() {} diff --git a/tests/ui/suggestions/assoc-type-in-method-return.stderr b/tests/ui/suggestions/assoc-type-in-method-return.stderr index f83da79097009..5a53eeb8d6134 100644 --- a/tests/ui/suggestions/assoc-type-in-method-return.stderr +++ b/tests/ui/suggestions/assoc-type-in-method-return.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Bla` in this scope +error[E0412]: cannot find type `Bla` --> $DIR/assoc-type-in-method-return.rs:3:25 | LL | fn to_bla(&self) -> Bla; diff --git a/tests/ui/suggestions/assoc_fn_without_self.rs b/tests/ui/suggestions/assoc_fn_without_self.rs index 35c16ef3e9f7c..c9c62b8bba313 100644 --- a/tests/ui/suggestions/assoc_fn_without_self.rs +++ b/tests/ui/suggestions/assoc_fn_without_self.rs @@ -11,18 +11,18 @@ impl S { fn b() { fn c() { - foo(); //~ ERROR cannot find function `foo` in this scope + foo(); //~ ERROR cannot find function `foo` } - foo(); //~ ERROR cannot find function `foo` in this scope - bar(); //~ ERROR cannot find function `bar` in this scope - baz(2, 3); //~ ERROR cannot find function `baz` in this scope + foo(); //~ ERROR cannot find function `foo` + bar(); //~ ERROR cannot find function `bar` + baz(2, 3); //~ ERROR cannot find function `baz` } fn d(&self) { fn c() { - foo(); //~ ERROR cannot find function `foo` in this scope + foo(); //~ ERROR cannot find function `foo` } - foo(); //~ ERROR cannot find function `foo` in this scope - bar(); //~ ERROR cannot find function `bar` in this scope - baz(2, 3); //~ ERROR cannot find function `baz` in this scope + foo(); //~ ERROR cannot find function `foo` + bar(); //~ ERROR cannot find function `bar` + baz(2, 3); //~ ERROR cannot find function `baz` } } diff --git a/tests/ui/suggestions/assoc_fn_without_self.stderr b/tests/ui/suggestions/assoc_fn_without_self.stderr index 9cee7c7ee5ee8..ba6dea8f7deb5 100644 --- a/tests/ui/suggestions/assoc_fn_without_self.stderr +++ b/tests/ui/suggestions/assoc_fn_without_self.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/assoc_fn_without_self.rs:16:9 | LL | foo(); @@ -9,7 +9,7 @@ help: consider using the associated function on `Self` LL | Self::foo(); | ++++++ -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/assoc_fn_without_self.rs:17:9 | LL | fn bar(&self) {} @@ -18,7 +18,7 @@ LL | fn bar(&self) {} LL | bar(); | ^^^ not found in this scope -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/assoc_fn_without_self.rs:18:9 | LL | baz(2, 3); @@ -29,13 +29,13 @@ help: consider using the associated function on `Self` LL | Self::baz(2, 3); | ++++++ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/assoc_fn_without_self.rs:14:13 | LL | foo(); | ^^^ not found in this scope -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/assoc_fn_without_self.rs:24:9 | LL | foo(); @@ -46,7 +46,7 @@ help: consider using the associated function on `Self` LL | Self::foo(); | ++++++ -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/assoc_fn_without_self.rs:25:9 | LL | bar(); @@ -57,7 +57,7 @@ help: consider using the method on `Self` LL | self.bar(); | +++++ -error[E0425]: cannot find function `baz` in this scope +error[E0425]: cannot find function `baz` --> $DIR/assoc_fn_without_self.rs:26:9 | LL | baz(2, 3); @@ -68,7 +68,7 @@ help: consider using the associated function on `Self` LL | Self::baz(2, 3); | ++++++ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/assoc_fn_without_self.rs:22:13 | LL | foo(); diff --git a/tests/ui/suggestions/attribute-typos.rs b/tests/ui/suggestions/attribute-typos.rs index 7c8231bbb24f8..b8bc785a93833 100644 --- a/tests/ui/suggestions/attribute-typos.rs +++ b/tests/ui/suggestions/attribute-typos.rs @@ -1,11 +1,11 @@ -#[deprcated] //~ ERROR cannot find attribute `deprcated` in this scope +#[deprcated] //~ ERROR cannot find attribute `deprcated` fn foo() {} -#[tests] //~ ERROR cannot find attribute `tests` in this scope +#[tests] //~ ERROR cannot find attribute `tests` fn bar() {} #[rustc_err] -//~^ ERROR cannot find attribute `rustc_err` in this scope +//~^ ERROR cannot find attribute `rustc_err` //~| ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler fn main() {} diff --git a/tests/ui/suggestions/bool_typo_err_suggest.rs b/tests/ui/suggestions/bool_typo_err_suggest.rs index deab0fb05b76b..7a32c55dc862c 100644 --- a/tests/ui/suggestions/bool_typo_err_suggest.rs +++ b/tests/ui/suggestions/bool_typo_err_suggest.rs @@ -3,10 +3,10 @@ fn main() { let x = True; - //~^ ERROR cannot find value `True` in this scope + //~^ ERROR cannot find value `True` //~| HELP you may want to use a bool value instead let y = False; - //~^ ERROR cannot find value `False` in this scope + //~^ ERROR cannot find value `False` //~| HELP you may want to use a bool value instead } diff --git a/tests/ui/suggestions/bool_typo_err_suggest.stderr b/tests/ui/suggestions/bool_typo_err_suggest.stderr index 8d59ed63e5432..0c41080e7c07b 100644 --- a/tests/ui/suggestions/bool_typo_err_suggest.stderr +++ b/tests/ui/suggestions/bool_typo_err_suggest.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `True` in this scope +error[E0425]: cannot find value `True` --> $DIR/bool_typo_err_suggest.rs:5:13 | LL | let x = True; @@ -9,7 +9,7 @@ help: you may want to use a bool value instead LL | let x = true; | ~~~~ -error[E0425]: cannot find value `False` in this scope +error[E0425]: cannot find value `False` --> $DIR/bool_typo_err_suggest.rs:9:13 | LL | let y = False; diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs index 281975dcc2f3b..43badc7a8f881 100644 --- a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs +++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs @@ -9,7 +9,7 @@ mod local { } pub fn test(_: Foo) {} -//~^ ERROR cannot find type `Foo` in this scope +//~^ ERROR cannot find type `Foo` pub fn test2(_: Bar) {} -//~^ ERROR cannot find type `Bar` in this scope +//~^ ERROR cannot find type `Bar` diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr index 7fb4d95ff9bf5..071d17c614763 100644 --- a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr +++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/dont-suggest-foreign-doc-hidden.rs:11:16 | LL | pub fn test(_: Foo) {} @@ -9,7 +9,7 @@ help: consider importing this struct LL + use local::Foo; | -error[E0412]: cannot find type `Bar` in this scope +error[E0412]: cannot find type `Bar` --> $DIR/dont-suggest-foreign-doc-hidden.rs:14:17 | LL | pub fn test2(_: Bar) {} diff --git a/tests/ui/suggestions/fn-to-method-deeply-nested.rs b/tests/ui/suggestions/fn-to-method-deeply-nested.rs index 58ee3d6409a7e..b271aa9ab02bb 100644 --- a/tests/ui/suggestions/fn-to-method-deeply-nested.rs +++ b/tests/ui/suggestions/fn-to-method-deeply-nested.rs @@ -1,13 +1,13 @@ fn main() -> Result<(), ()> { a(b(c(d(e( - //~^ ERROR cannot find function `a` in this scope - //~| ERROR cannot find function `b` in this scope - //~| ERROR cannot find function `c` in this scope - //~| ERROR cannot find function `d` in this scope - //~| ERROR cannot find function `e` in this scope + //~^ ERROR cannot find function `a` + //~| ERROR cannot find function `b` + //~| ERROR cannot find function `c` + //~| ERROR cannot find function `d` + //~| ERROR cannot find function `e` z???????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????? - //~^^^ ERROR cannot find value `z` in this scope + //~^^^ ERROR cannot find value `z` ))))) } diff --git a/tests/ui/suggestions/fn-to-method-deeply-nested.stderr b/tests/ui/suggestions/fn-to-method-deeply-nested.stderr index ce813ea7abae8..9c7850a7e497c 100644 --- a/tests/ui/suggestions/fn-to-method-deeply-nested.stderr +++ b/tests/ui/suggestions/fn-to-method-deeply-nested.stderr @@ -1,34 +1,34 @@ -error[E0425]: cannot find value `z` in this scope +error[E0425]: cannot find value `z` --> $DIR/fn-to-method-deeply-nested.rs:8:9 | LL | z???????????????????????????????????????????????????????????????????????????????????????? | ^ not found in this scope -error[E0425]: cannot find function `e` in this scope +error[E0425]: cannot find function `e` --> $DIR/fn-to-method-deeply-nested.rs:2:13 | LL | a(b(c(d(e( | ^ not found in this scope -error[E0425]: cannot find function `d` in this scope +error[E0425]: cannot find function `d` --> $DIR/fn-to-method-deeply-nested.rs:2:11 | LL | a(b(c(d(e( | ^ not found in this scope -error[E0425]: cannot find function `c` in this scope +error[E0425]: cannot find function `c` --> $DIR/fn-to-method-deeply-nested.rs:2:9 | LL | a(b(c(d(e( | ^ not found in this scope -error[E0425]: cannot find function `b` in this scope +error[E0425]: cannot find function `b` --> $DIR/fn-to-method-deeply-nested.rs:2:7 | LL | a(b(c(d(e( | ^ not found in this scope -error[E0425]: cannot find function `a` in this scope +error[E0425]: cannot find function `a` --> $DIR/fn-to-method-deeply-nested.rs:2:5 | LL | a(b(c(d(e( diff --git a/tests/ui/suggestions/fn-to-method.rs b/tests/ui/suggestions/fn-to-method.rs index 9a35c3efc41b7..5594b80a188e2 100644 --- a/tests/ui/suggestions/fn-to-method.rs +++ b/tests/ui/suggestions/fn-to-method.rs @@ -6,14 +6,14 @@ impl Foo { fn main() { let x = cmp(&1, &2); - //~^ ERROR cannot find function `cmp` in this scope + //~^ ERROR cannot find function `cmp` //~| HELP use the `.` operator to call the method `Ord::cmp` on `&{integer}` let y = len([1, 2, 3]); - //~^ ERROR cannot find function `len` in this scope + //~^ ERROR cannot find function `len` //~| HELP use the `.` operator to call the method `len` on `&[{integer}]` let z = bar(Foo); - //~^ ERROR cannot find function `bar` in this scope + //~^ ERROR cannot find function `bar` //~| HELP use the `.` operator to call the method `bar` on `Foo` } diff --git a/tests/ui/suggestions/fn-to-method.stderr b/tests/ui/suggestions/fn-to-method.stderr index 36c17e60d3572..1a29cf163ae00 100644 --- a/tests/ui/suggestions/fn-to-method.stderr +++ b/tests/ui/suggestions/fn-to-method.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `cmp` in this scope +error[E0425]: cannot find function `cmp` --> $DIR/fn-to-method.rs:8:13 | LL | let x = cmp(&1, &2); @@ -9,7 +9,7 @@ help: use the `.` operator to call the method `Ord::cmp` on `&{integer}` LL | let x = (&1).cmp(&2); | ~ ~~~~~~~~~ -error[E0425]: cannot find function `len` in this scope +error[E0425]: cannot find function `len` --> $DIR/fn-to-method.rs:12:13 | LL | let y = len([1, 2, 3]); @@ -21,7 +21,7 @@ LL - let y = len([1, 2, 3]); LL + let y = [1, 2, 3].len(); | -error[E0425]: cannot find function `bar` in this scope +error[E0425]: cannot find function `bar` --> $DIR/fn-to-method.rs:16:13 | LL | let z = bar(Foo); diff --git a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs index efa296db47cf9..5292ba3b9dae3 100644 --- a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs +++ b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs @@ -2,7 +2,7 @@ fn main() { std::ptr::from_ref(num).cast_mut().as_deref(); - //~^ ERROR cannot find value `num` in this scope + //~^ ERROR cannot find value `num` //~| ERROR no method named `as_deref` found for raw pointer `*mut _` in the current scope //~| WARN type annotations needed //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! diff --git a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr index d610a3b7cadd2..ea0f50d4df22f 100644 --- a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr +++ b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `num` in this scope +error[E0425]: cannot find value `num` --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:24 | LL | std::ptr::from_ref(num).cast_mut().as_deref(); diff --git a/tests/ui/suggestions/if-let-typo.rs b/tests/ui/suggestions/if-let-typo.rs index 375bd3f03c920..ed889ad007853 100644 --- a/tests/ui/suggestions/if-let-typo.rs +++ b/tests/ui/suggestions/if-let-typo.rs @@ -1,11 +1,11 @@ fn main() { let foo = Some(0); let bar = None; - if Some(x) = foo {} //~ ERROR cannot find value `x` in this scope + if Some(x) = foo {} //~ ERROR cannot find value `x` //~^ ERROR mismatched types if Some(foo) = bar {} //~ ERROR mismatched types if 3 = foo {} //~ ERROR mismatched types if Some(3) = foo {} //~ ERROR mismatched types //~^ ERROR invalid left-hand side of assignment - if x = 5 {} //~ ERROR cannot find value `x` in this scope + if x = 5 {} //~ ERROR cannot find value `x` } diff --git a/tests/ui/suggestions/if-let-typo.stderr b/tests/ui/suggestions/if-let-typo.stderr index 02148b7f7adfd..cc73bfd187735 100644 --- a/tests/ui/suggestions/if-let-typo.stderr +++ b/tests/ui/suggestions/if-let-typo.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/if-let-typo.rs:4:13 | LL | if Some(x) = foo {} @@ -9,7 +9,7 @@ help: you might have meant to use pattern matching LL | if let Some(x) = foo {} | +++ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/if-let-typo.rs:10:8 | LL | if x = 5 {} diff --git a/tests/ui/suggestions/issue-104086-suggest-let.rs b/tests/ui/suggestions/issue-104086-suggest-let.rs index d22ad27d0e031..5c415afee6d37 100644 --- a/tests/ui/suggestions/issue-104086-suggest-let.rs +++ b/tests/ui/suggestions/issue-104086-suggest-let.rs @@ -1,30 +1,30 @@ fn main() { x = x = x; - //~^ ERROR cannot find value `x` in this scope - //~| ERROR cannot find value `x` in this scope - //~| ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `x` + //~| ERROR cannot find value `x` + //~| ERROR cannot find value `x` x = y = y = y; - //~^ ERROR cannot find value `y` in this scope - //~| ERROR cannot find value `y` in this scope - //~| ERROR cannot find value `y` in this scope - //~| ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `y` + //~| ERROR cannot find value `y` + //~| ERROR cannot find value `y` + //~| ERROR cannot find value `x` x = y = y; - //~^ ERROR cannot find value `x` in this scope - //~| ERROR cannot find value `y` in this scope - //~| ERROR cannot find value `y` in this scope + //~^ ERROR cannot find value `x` + //~| ERROR cannot find value `y` + //~| ERROR cannot find value `y` x = x = y; - //~^ ERROR cannot find value `x` in this scope - //~| ERROR cannot find value `x` in this scope - //~| ERROR cannot find value `y` in this scope + //~^ ERROR cannot find value `x` + //~| ERROR cannot find value `x` + //~| ERROR cannot find value `y` x = x; // will suggest add `let` - //~^ ERROR cannot find value `x` in this scope - //~| ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `x` + //~| ERROR cannot find value `x` x = y // will suggest add `let` - //~^ ERROR cannot find value `x` in this scope - //~| ERROR cannot find value `y` in this scope + //~^ ERROR cannot find value `x` + //~| ERROR cannot find value `y` } diff --git a/tests/ui/suggestions/issue-104086-suggest-let.stderr b/tests/ui/suggestions/issue-104086-suggest-let.stderr index fb4ea3121ac67..ca54d93b1b424 100644 --- a/tests/ui/suggestions/issue-104086-suggest-let.stderr +++ b/tests/ui/suggestions/issue-104086-suggest-let.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:2:5 | LL | x = x = x; @@ -9,19 +9,19 @@ help: you might have meant to introduce a new binding LL | let x = x = x; | +++ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:2:9 | LL | x = x = x; | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:2:13 | LL | x = x = x; | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:7:5 | LL | x = y = y = y; @@ -32,25 +32,25 @@ help: you might have meant to introduce a new binding LL | let x = y = y = y; | +++ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-104086-suggest-let.rs:7:9 | LL | x = y = y = y; | ^ not found in this scope -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-104086-suggest-let.rs:7:13 | LL | x = y = y = y; | ^ not found in this scope -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-104086-suggest-let.rs:7:17 | LL | x = y = y = y; | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:13:5 | LL | x = y = y; @@ -61,19 +61,19 @@ help: you might have meant to introduce a new binding LL | let x = y = y; | +++ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-104086-suggest-let.rs:13:9 | LL | x = y = y; | ^ not found in this scope -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-104086-suggest-let.rs:13:13 | LL | x = y = y; | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:18:5 | LL | x = x = y; @@ -84,19 +84,19 @@ help: you might have meant to introduce a new binding LL | let x = x = y; | +++ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:18:9 | LL | x = x = y; | ^ not found in this scope -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-104086-suggest-let.rs:18:13 | LL | x = x = y; | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:23:5 | LL | x = x; // will suggest add `let` @@ -107,13 +107,13 @@ help: you might have meant to introduce a new binding LL | let x = x; // will suggest add `let` | +++ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:23:9 | LL | x = x; // will suggest add `let` | ^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/issue-104086-suggest-let.rs:27:5 | LL | x = y // will suggest add `let` @@ -124,7 +124,7 @@ help: you might have meant to introduce a new binding LL | let x = y // will suggest add `let` | +++ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/issue-104086-suggest-let.rs:27:9 | LL | x = y // will suggest add `let` diff --git a/tests/ui/suggestions/issue-104287.rs b/tests/ui/suggestions/issue-104287.rs index 37b3339fa923e..3d4c8c5d4d357 100644 --- a/tests/ui/suggestions/issue-104287.rs +++ b/tests/ui/suggestions/issue-104287.rs @@ -9,5 +9,5 @@ fn main() { let x = S; foo::<()>(x); //~^ ERROR method takes 0 generic arguments but 1 generic argument was supplied - //~| ERROR cannot find function `foo` in this scope + //~| ERROR cannot find function `foo` } diff --git a/tests/ui/suggestions/issue-104287.stderr b/tests/ui/suggestions/issue-104287.stderr index ed59b2e7a2d3b..7696b0dd7f569 100644 --- a/tests/ui/suggestions/issue-104287.stderr +++ b/tests/ui/suggestions/issue-104287.stderr @@ -12,7 +12,7 @@ note: method defined here, with 0 generic parameters LL | fn foo(&self) {} | ^^^ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/issue-104287.rs:10:5 | LL | foo::<()>(x); diff --git a/tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr b/tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr index ce0087fbfcbab..fd88444e8f9f9 100644 --- a/tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr +++ b/tests/ui/suggestions/issue-66968-suggest-sorted-words.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `a_variable_longer_name` in this scope +error[E0425]: cannot find value `a_variable_longer_name` --> $DIR/issue-66968-suggest-sorted-words.rs:3:20 | LL | println!("{}", a_variable_longer_name); diff --git a/tests/ui/suggestions/method-access-to-range-literal-typo.stderr b/tests/ui/suggestions/method-access-to-range-literal-typo.stderr index b1fb0254cd9cf..28ae1a6b57f16 100644 --- a/tests/ui/suggestions/method-access-to-range-literal-typo.stderr +++ b/tests/ui/suggestions/method-access-to-range-literal-typo.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/method-access-to-range-literal-typo.rs:26:22 | LL | self.option..foo().get(0) diff --git a/tests/ui/suggestions/no-extern-crate-in-type.stderr b/tests/ui/suggestions/no-extern-crate-in-type.stderr index 384b17d1e2b48..8dce68802f55d 100644 --- a/tests/ui/suggestions/no-extern-crate-in-type.stderr +++ b/tests/ui/suggestions/no-extern-crate-in-type.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/no-extern-crate-in-type.rs:5:22 | LL | type Output = Option; diff --git a/tests/ui/suggestions/non_ascii_ident.rs b/tests/ui/suggestions/non_ascii_ident.rs index 9c89714751826..45d9b1bdf0b12 100644 --- a/tests/ui/suggestions/non_ascii_ident.rs +++ b/tests/ui/suggestions/non_ascii_ident.rs @@ -1,7 +1,7 @@ fn main() { // There shall be no suggestions here. In particular not `Ok`. - let _ = 读文; //~ ERROR cannot find value `读文` in this scope + let _ = 读文; //~ ERROR cannot find value `读文` let f = 0f32; // Important line to make this an ICE regression test - 读文(f); //~ ERROR cannot find function `读文` in this scope + 读文(f); //~ ERROR cannot find function `读文` } diff --git a/tests/ui/suggestions/non_ascii_ident.stderr b/tests/ui/suggestions/non_ascii_ident.stderr index fdcc64aef3681..f084eba3afc84 100644 --- a/tests/ui/suggestions/non_ascii_ident.stderr +++ b/tests/ui/suggestions/non_ascii_ident.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `读文` in this scope +error[E0425]: cannot find value `读文` --> $DIR/non_ascii_ident.rs:3:13 | LL | let _ = 读文; | ^^^^ not found in this scope -error[E0425]: cannot find function `读文` in this scope +error[E0425]: cannot find function `读文` --> $DIR/non_ascii_ident.rs:6:5 | LL | 读文(f); diff --git a/tests/ui/suggestions/raw-name-use-suggestion.rs b/tests/ui/suggestions/raw-name-use-suggestion.rs index 0a8073c0be2ea..c5ccc7566111d 100644 --- a/tests/ui/suggestions/raw-name-use-suggestion.rs +++ b/tests/ui/suggestions/raw-name-use-suggestion.rs @@ -5,5 +5,5 @@ mod foo { fn main() { foo::let(); //~ ERROR expected identifier, found keyword `let` - r#break(); //~ ERROR cannot find function `r#break` in this scope + r#break(); //~ ERROR cannot find function `r#break` } diff --git a/tests/ui/suggestions/raw-name-use-suggestion.stderr b/tests/ui/suggestions/raw-name-use-suggestion.stderr index fb070ffc33230..2ebfc27a9e3ba 100644 --- a/tests/ui/suggestions/raw-name-use-suggestion.stderr +++ b/tests/ui/suggestions/raw-name-use-suggestion.stderr @@ -20,7 +20,7 @@ help: escape `let` to use it as an identifier LL | foo::r#let(); | ++ -error[E0425]: cannot find function `r#break` in this scope +error[E0425]: cannot find function `r#break` --> $DIR/raw-name-use-suggestion.rs:8:5 | LL | r#break(); diff --git a/tests/ui/suggestions/silenced-binding-typo.stderr b/tests/ui/suggestions/silenced-binding-typo.stderr index a1e8b9e30d4b7..d57909036d70d 100644 --- a/tests/ui/suggestions/silenced-binding-typo.stderr +++ b/tests/ui/suggestions/silenced-binding-typo.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/silenced-binding-typo.rs:4:14 | LL | let _x = 42; diff --git a/tests/ui/suggestions/suggest-let-for-assignment.fixed b/tests/ui/suggestions/suggest-let-for-assignment.fixed index 80b9333827ec9..5010e290c8342 100644 --- a/tests/ui/suggestions/suggest-let-for-assignment.fixed +++ b/tests/ui/suggestions/suggest-let-for-assignment.fixed @@ -1,23 +1,23 @@ //@ run-rustfix fn main() { - let demo = 1; //~ ERROR cannot find value `demo` in this scope - dbg!(demo); //~ ERROR cannot find value `demo` in this scope + let demo = 1; //~ ERROR cannot find value `demo` + dbg!(demo); //~ ERROR cannot find value `demo` - let x = "x"; //~ ERROR cannot find value `x` in this scope - println!("x: {}", x); //~ ERROR cannot find value `x` in this scope + let x = "x"; //~ ERROR cannot find value `x` + println!("x: {}", x); //~ ERROR cannot find value `x` - let some_variable = 6; //~ cannot find value `let_some_variable` in this scope - println!("some_variable: {}", some_variable); //~ ERROR cannot find value `some_variable` in this scope + let some_variable = 6; //~ cannot find value `let_some_variable` + println!("some_variable: {}", some_variable); //~ ERROR cannot find value `some_variable` - let other_variable = 6; //~ cannot find value `letother_variable` in this scope - println!("other_variable: {}", other_variable); //~ ERROR cannot find value `other_variable` in this scope + let other_variable = 6; //~ cannot find value `letother_variable` + println!("other_variable: {}", other_variable); //~ ERROR cannot find value `other_variable` if x == "x" { - //~^ ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `x` println!("x is 1"); } - let y = 1 + 2; //~ ERROR cannot find value `y` in this scope - println!("y: {}", y); //~ ERROR cannot find value `y` in this scope + let y = 1 + 2; //~ ERROR cannot find value `y` + println!("y: {}", y); //~ ERROR cannot find value `y` } diff --git a/tests/ui/suggestions/suggest-let-for-assignment.rs b/tests/ui/suggestions/suggest-let-for-assignment.rs index 22560083d34c9..59005a29d5e88 100644 --- a/tests/ui/suggestions/suggest-let-for-assignment.rs +++ b/tests/ui/suggestions/suggest-let-for-assignment.rs @@ -1,23 +1,23 @@ //@ run-rustfix fn main() { - demo = 1; //~ ERROR cannot find value `demo` in this scope - dbg!(demo); //~ ERROR cannot find value `demo` in this scope + demo = 1; //~ ERROR cannot find value `demo` + dbg!(demo); //~ ERROR cannot find value `demo` - x = "x"; //~ ERROR cannot find value `x` in this scope - println!("x: {}", x); //~ ERROR cannot find value `x` in this scope + x = "x"; //~ ERROR cannot find value `x` + println!("x: {}", x); //~ ERROR cannot find value `x` - let_some_variable = 6; //~ cannot find value `let_some_variable` in this scope - println!("some_variable: {}", some_variable); //~ ERROR cannot find value `some_variable` in this scope + let_some_variable = 6; //~ cannot find value `let_some_variable` + println!("some_variable: {}", some_variable); //~ ERROR cannot find value `some_variable` - letother_variable = 6; //~ cannot find value `letother_variable` in this scope - println!("other_variable: {}", other_variable); //~ ERROR cannot find value `other_variable` in this scope + letother_variable = 6; //~ cannot find value `letother_variable` + println!("other_variable: {}", other_variable); //~ ERROR cannot find value `other_variable` if x == "x" { - //~^ ERROR cannot find value `x` in this scope + //~^ ERROR cannot find value `x` println!("x is 1"); } - y = 1 + 2; //~ ERROR cannot find value `y` in this scope - println!("y: {}", y); //~ ERROR cannot find value `y` in this scope + y = 1 + 2; //~ ERROR cannot find value `y` + println!("y: {}", y); //~ ERROR cannot find value `y` } diff --git a/tests/ui/suggestions/suggest-let-for-assignment.stderr b/tests/ui/suggestions/suggest-let-for-assignment.stderr index 8d97dbeb14a7a..9dbb02b8afda5 100644 --- a/tests/ui/suggestions/suggest-let-for-assignment.stderr +++ b/tests/ui/suggestions/suggest-let-for-assignment.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `demo` in this scope +error[E0425]: cannot find value `demo` --> $DIR/suggest-let-for-assignment.rs:4:5 | LL | demo = 1; @@ -9,13 +9,13 @@ help: you might have meant to introduce a new binding LL | let demo = 1; | +++ -error[E0425]: cannot find value `demo` in this scope +error[E0425]: cannot find value `demo` --> $DIR/suggest-let-for-assignment.rs:5:10 | LL | dbg!(demo); | ^^^^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/suggest-let-for-assignment.rs:7:5 | LL | x = "x"; @@ -26,13 +26,13 @@ help: you might have meant to introduce a new binding LL | let x = "x"; | +++ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/suggest-let-for-assignment.rs:8:23 | LL | println!("x: {}", x); | ^ not found in this scope -error[E0425]: cannot find value `let_some_variable` in this scope +error[E0425]: cannot find value `let_some_variable` --> $DIR/suggest-let-for-assignment.rs:10:5 | LL | let_some_variable = 6; @@ -43,13 +43,13 @@ help: you might have meant to introduce a new binding LL | let some_variable = 6; | ~~~~~~~~~~~~~~~~~ -error[E0425]: cannot find value `some_variable` in this scope +error[E0425]: cannot find value `some_variable` --> $DIR/suggest-let-for-assignment.rs:11:35 | LL | println!("some_variable: {}", some_variable); | ^^^^^^^^^^^^^ not found in this scope -error[E0425]: cannot find value `letother_variable` in this scope +error[E0425]: cannot find value `letother_variable` --> $DIR/suggest-let-for-assignment.rs:13:5 | LL | letother_variable = 6; @@ -60,19 +60,19 @@ help: you might have meant to introduce a new binding LL | let other_variable = 6; | ~~~~~~~~~~~~~~~~~~ -error[E0425]: cannot find value `other_variable` in this scope +error[E0425]: cannot find value `other_variable` --> $DIR/suggest-let-for-assignment.rs:14:36 | LL | println!("other_variable: {}", other_variable); | ^^^^^^^^^^^^^^ not found in this scope -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/suggest-let-for-assignment.rs:16:8 | LL | if x == "x" { | ^ not found in this scope -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/suggest-let-for-assignment.rs:21:5 | LL | y = 1 + 2; @@ -83,7 +83,7 @@ help: you might have meant to introduce a new binding LL | let y = 1 + 2; | +++ -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/suggest-let-for-assignment.rs:22:23 | LL | println!("y: {}", y); diff --git a/tests/ui/suggestions/suggest_print_over_printf.rs b/tests/ui/suggestions/suggest_print_over_printf.rs index 124ddec50cbbe..8272172abaa5a 100644 --- a/tests/ui/suggestions/suggest_print_over_printf.rs +++ b/tests/ui/suggestions/suggest_print_over_printf.rs @@ -3,6 +3,6 @@ fn main() { let x = 4; printf("%d", x); - //~^ ERROR cannot find function `printf` in this scope + //~^ ERROR cannot find function `printf` //~| HELP you may have meant to use the `print` macro } diff --git a/tests/ui/suggestions/suggest_print_over_printf.stderr b/tests/ui/suggestions/suggest_print_over_printf.stderr index 8a79745133c93..b81fc80599ec4 100644 --- a/tests/ui/suggestions/suggest_print_over_printf.stderr +++ b/tests/ui/suggestions/suggest_print_over_printf.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `printf` in this scope +error[E0425]: cannot find function `printf` --> $DIR/suggest_print_over_printf.rs:5:5 | LL | printf("%d", x); diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.rs b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.rs index 99f943d71e9e5..353961ab00ea1 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.rs @@ -4,7 +4,7 @@ enum A { fn main() { let _: Vec = A::B; - //~^ ERROR cannot find trait `B` in this scope + //~^ ERROR cannot find trait `B` //~| HELP you might have meant to write a path instead of an associated type bound //~| ERROR struct takes at least 1 generic argument but 0 generic arguments were supplied //~| HELP add missing generic argument diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr index 56b6a69a283f4..c675f98c51033 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr +++ b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `B` in this scope +error[E0405]: cannot find trait `B` --> $DIR/type-ascription-instead-of-path-in-type.rs:6:18 | LL | let _: Vec = A::B; diff --git a/tests/ui/suggestions/type-not-found-in-adt-field.rs b/tests/ui/suggestions/type-not-found-in-adt-field.rs index 4cbfe58d35703..3fe05ac1bd09b 100644 --- a/tests/ui/suggestions/type-not-found-in-adt-field.rs +++ b/tests/ui/suggestions/type-not-found-in-adt-field.rs @@ -1,9 +1,9 @@ struct Struct { - m: Vec>, //~ ERROR cannot find type `Someunknownname` in this scope - //~^ NOTE not found in this scope + m: Vec>, //~ ERROR cannot find type `Someunknownname` + //~^ NOTE not found } struct OtherStruct { //~ HELP you might be missing a type parameter - m: K, //~ ERROR cannot find type `K` in this scope - //~^ NOTE not found in this scope + m: K, //~ ERROR cannot find type `K` + //~^ NOTE not found } fn main() {} diff --git a/tests/ui/suggestions/type-not-found-in-adt-field.stderr b/tests/ui/suggestions/type-not-found-in-adt-field.stderr index 934ba87bbaa88..77c4c5b73d757 100644 --- a/tests/ui/suggestions/type-not-found-in-adt-field.stderr +++ b/tests/ui/suggestions/type-not-found-in-adt-field.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `Someunknownname` in this scope +error[E0412]: cannot find type `Someunknownname` --> $DIR/type-not-found-in-adt-field.rs:2:12 | LL | m: Vec>, | ^^^^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `K` in this scope +error[E0412]: cannot find type `K` --> $DIR/type-not-found-in-adt-field.rs:6:8 | LL | m: K, diff --git a/tests/ui/suggestions/while-let-typo.rs b/tests/ui/suggestions/while-let-typo.rs index 21b254054bbc0..06a277b0b9ec0 100644 --- a/tests/ui/suggestions/while-let-typo.rs +++ b/tests/ui/suggestions/while-let-typo.rs @@ -1,9 +1,9 @@ fn main() { let foo = Some(0); let bar = None; - while Some(x) = foo {} //~ ERROR cannot find value `x` in this scope + while Some(x) = foo {} //~ ERROR cannot find value `x` while Some(foo) = bar {} //~ ERROR mismatched types while 3 = foo {} //~ ERROR mismatched types while Some(3) = foo {} //~ ERROR invalid left-hand side of assignment - while x = 5 {} //~ ERROR cannot find value `x` in this scope + while x = 5 {} //~ ERROR cannot find value `x` } diff --git a/tests/ui/suggestions/while-let-typo.stderr b/tests/ui/suggestions/while-let-typo.stderr index 69a7e5761d421..abc9fe2c5045c 100644 --- a/tests/ui/suggestions/while-let-typo.stderr +++ b/tests/ui/suggestions/while-let-typo.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/while-let-typo.rs:4:16 | LL | while Some(x) = foo {} @@ -9,7 +9,7 @@ help: you might have meant to use pattern matching LL | while let Some(x) = foo {} | +++ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/while-let-typo.rs:8:11 | LL | while x = 5 {} diff --git a/tests/ui/tool-attributes/tool-attributes-misplaced-1.rs b/tests/ui/tool-attributes/tool-attributes-misplaced-1.rs index bf45ba2ed8227..03f5482f000f4 100644 --- a/tests/ui/tool-attributes/tool-attributes-misplaced-1.rs +++ b/tests/ui/tool-attributes/tool-attributes-misplaced-1.rs @@ -1,18 +1,18 @@ type A = rustfmt; //~ ERROR expected type, found tool module `rustfmt` type B = rustfmt::skip; //~ ERROR expected type, found tool attribute `rustfmt::skip` -#[derive(rustfmt)] //~ ERROR cannot find derive macro `rustfmt` in this scope - //~| ERROR cannot find derive macro `rustfmt` in this scope +#[derive(rustfmt)] //~ ERROR cannot find derive macro `rustfmt` + //~| ERROR cannot find derive macro `rustfmt` struct S; // Interpreted as an unstable custom attribute -#[rustfmt] //~ ERROR cannot find attribute `rustfmt` in this scope +#[rustfmt] //~ ERROR cannot find attribute `rustfmt` fn check() {} #[rustfmt::skip] // OK fn main() { rustfmt; //~ ERROR expected value, found tool module `rustfmt` - rustfmt!(); //~ ERROR cannot find macro `rustfmt` in this scope + rustfmt!(); //~ ERROR cannot find macro `rustfmt` rustfmt::skip; //~ ERROR expected value, found tool attribute `rustfmt::skip` } diff --git a/tests/ui/track-diagnostics/track.stderr b/tests/ui/track-diagnostics/track.stderr index 436f9ecf93dec..462c741d41897 100644 --- a/tests/ui/track-diagnostics/track.stderr +++ b/tests/ui/track-diagnostics/track.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `rust` in this scope +error[E0425]: cannot find value `rust` --> $DIR/track.rs:LL:CC | LL | break rust diff --git a/tests/ui/track-diagnostics/track3.stderr b/tests/ui/track-diagnostics/track3.stderr index dc468d7e8eeb1..f7c451365279d 100644 --- a/tests/ui/track-diagnostics/track3.stderr +++ b/tests/ui/track-diagnostics/track3.stderr @@ -1,4 +1,4 @@ -error[E0422]: cannot find struct, variant or union type `Blah` in this scope +error[E0422]: cannot find struct, variant or union type `Blah` --> $DIR/track3.rs:LL:CC | LL | let _unimported = Blah { field: u8 }; diff --git a/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.rs b/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.rs index 5ca4f49c3bac5..765740c089181 100644 --- a/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.rs +++ b/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.rs @@ -3,8 +3,8 @@ trait Trait {} impl Trait for bool {} struct MySlice Idx>(bool, T); -//~^ ERROR cannot find type `Idx` in this scope -//~| ERROR cannot find type `Idx` in this scope +//~^ ERROR cannot find type `Idx` +//~| ERROR cannot find type `Idx` type MySliceBool = MySlice<[bool]>; const MYSLICE_GOOD: &MySliceBool = &MySlice(true, [false]); //~^ ERROR the size for values of type `[bool]` cannot be known at compilation time diff --git a/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.stderr b/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.stderr index 0be80e9479f0b..29e77d55b5869 100644 --- a/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.stderr +++ b/tests/ui/trait-bounds/ice-unsized-struct-arg-issue-121612.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `Idx` in this scope +error[E0412]: cannot find type `Idx` --> $DIR/ice-unsized-struct-arg-issue-121612.rs:5:30 | LL | struct MySlice Idx>(bool, T); | ^^^ not found in this scope -error[E0412]: cannot find type `Idx` in this scope +error[E0412]: cannot find type `Idx` --> $DIR/ice-unsized-struct-arg-issue-121612.rs:5:38 | LL | struct MySlice Idx>(bool, T); diff --git a/tests/ui/trait-bounds/ice-unsized-tuple-const-issue-121443.rs b/tests/ui/trait-bounds/ice-unsized-tuple-const-issue-121443.rs index c3a2ab82adc6a..636fb68c4c369 100644 --- a/tests/ui/trait-bounds/ice-unsized-tuple-const-issue-121443.rs +++ b/tests/ui/trait-bounds/ice-unsized-tuple-const-issue-121443.rs @@ -6,7 +6,7 @@ type Fn = dyn FnOnce() -> u8; const TEST: Fn = some_fn; -//~^ ERROR cannot find value `some_fn` in this scope +//~^ ERROR cannot find value `some_fn` //~| ERROR the size for values of type `(dyn FnOnce() -> u8 + 'static)` cannot be known at compilation time //~| ERROR the size for values of type `(dyn FnOnce() -> u8 + 'static)` cannot be known at compilation time const TEST2: (Fn, u8) = (TEST, 0); diff --git a/tests/ui/trait-bounds/ice-unsized-tuple-const-issue-121443.stderr b/tests/ui/trait-bounds/ice-unsized-tuple-const-issue-121443.stderr index 0e92979ccd507..a6db24897dc50 100644 --- a/tests/ui/trait-bounds/ice-unsized-tuple-const-issue-121443.stderr +++ b/tests/ui/trait-bounds/ice-unsized-tuple-const-issue-121443.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `some_fn` in this scope +error[E0425]: cannot find value `some_fn` --> $DIR/ice-unsized-tuple-const-issue-121443.rs:8:18 | LL | const TEST: Fn = some_fn; diff --git a/tests/ui/trait-bounds/impl-bound-with-references-error.rs b/tests/ui/trait-bounds/impl-bound-with-references-error.rs index 5ba35da83839e..1eb4360cbb5a6 100644 --- a/tests/ui/trait-bounds/impl-bound-with-references-error.rs +++ b/tests/ui/trait-bounds/impl-bound-with-references-error.rs @@ -10,7 +10,7 @@ impl From for LabelText //~^ ERROR conflicting implementations of trait `From` for type `LabelText` [E0119] where T: Into>, - //~^ ERROR cannot find type `Cow` in this scope [E0412] + //~^ ERROR cannot find type `Cow` [E0412] { fn from(text: T) -> Self { LabelText::Plain(text.into()) //~ ERROR expected function, found `LabelText` diff --git a/tests/ui/trait-bounds/impl-bound-with-references-error.stderr b/tests/ui/trait-bounds/impl-bound-with-references-error.stderr index b3ac5544e38f5..ed2da8268a04a 100644 --- a/tests/ui/trait-bounds/impl-bound-with-references-error.stderr +++ b/tests/ui/trait-bounds/impl-bound-with-references-error.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Cow` in this scope +error[E0412]: cannot find type `Cow` --> $DIR/impl-bound-with-references-error.rs:12:13 | LL | T: Into>, diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr index e2a72697501f2..c076219d9631d 100644 --- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr +++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Trait` in `A` +error[E0405]: cannot find trait `Trait` --> $DIR/shadowed-path-in-trait-bound-suggestion.rs:9:24 | LL | pub struct A(pub H); diff --git a/tests/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs b/tests/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs index 8e43b7249f7c0..4d5e96cae02ec 100644 --- a/tests/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs +++ b/tests/ui/traits/associated_type_bound/assoc_type_bound_with_struct.rs @@ -18,6 +18,6 @@ fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: String { //~ ERROR expec fn issue_95327() where ::Assoc: String {} //~^ ERROR expected trait, found struct -//~| ERROR cannot find trait `Unresolved` in this scope +//~| ERROR cannot find trait `Unresolved` fn main() {} diff --git a/tests/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr b/tests/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr index 0020f9e416df2..f5503f5c09044 100644 --- a/tests/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr +++ b/tests/ui/traits/associated_type_bound/assoc_type_bound_with_struct.stderr @@ -70,7 +70,7 @@ help: a trait with a similar name exists LL | fn qux<'a, T: Bar>(_: &'a T) where <&'a T as Bar>::Baz: ToString { | ~~~~~~~~ -error[E0405]: cannot find trait `Unresolved` in this scope +error[E0405]: cannot find trait `Unresolved` --> $DIR/assoc_type_bound_with_struct.rs:19:31 | LL | fn issue_95327() where ::Assoc: String {} diff --git a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs index d5ba3847ac38c..cccb0c8099927 100644 --- a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs +++ b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs @@ -15,7 +15,7 @@ where fn coerce_lifetime2() { >::ref_foo(unknown); - //~^ ERROR cannot find value `unknown` in this scope + //~^ ERROR cannot find value `unknown` //~| ERROR the trait bound `for<'a> &'a mut Vec<&'a u32>: Foo<'static, i32>` is not satisfied } diff --git a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr index fecb05cade758..5d1d3671e194f 100644 --- a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr +++ b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `unknown` in this scope +error[E0425]: cannot find value `unknown` --> $DIR/dont-autoderef-ty-with-escaping-var.rs:17:35 | LL | >::ref_foo(unknown); diff --git a/tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.rs b/tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.rs index a08407683d8fe..f5d76683e6ab5 100644 --- a/tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.rs +++ b/tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.rs @@ -1,5 +1,5 @@ fn function() { - foo == 2; //~ ERROR cannot find value `foo` in this scope [E0425] + foo == 2; //~ ERROR cannot find value `foo` [E0425] } fn main() {} diff --git a/tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.stderr b/tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.stderr index 2da731dcc4b14..09d593b03916e 100644 --- a/tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.stderr +++ b/tests/ui/traits/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `foo` in this scope +error[E0425]: cannot find value `foo` --> $DIR/dont-match-error-ty-with-calller-supplied-obligation-issue-121941.rs:2:5 | LL | foo == 2; diff --git a/tests/ui/traits/ignore-err-impls.rs b/tests/ui/traits/ignore-err-impls.rs index 67e880b006a7f..ccfa1fc535c0d 100644 --- a/tests/ui/traits/ignore-err-impls.rs +++ b/tests/ui/traits/ignore-err-impls.rs @@ -4,6 +4,6 @@ trait Generic {} impl<'a, T> Generic<&'a T> for S {} impl Generic for S {} -//~^ ERROR cannot find type `Type` in this scope +//~^ ERROR cannot find type `Type` fn main() {} diff --git a/tests/ui/traits/ignore-err-impls.stderr b/tests/ui/traits/ignore-err-impls.stderr index 955e2d7804981..fa8899d4d6731 100644 --- a/tests/ui/traits/ignore-err-impls.stderr +++ b/tests/ui/traits/ignore-err-impls.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Type` in this scope +error[E0412]: cannot find type `Type` --> $DIR/ignore-err-impls.rs:6:14 | LL | impl Generic for S {} diff --git a/tests/ui/traits/issue-22384.rs b/tests/ui/traits/issue-22384.rs index 98988f27ecce5..04d90acfba8bc 100644 --- a/tests/ui/traits/issue-22384.rs +++ b/tests/ui/traits/issue-22384.rs @@ -4,5 +4,5 @@ trait Trait { fn main() { <::foobar as Trait>::foo(); - //~^ ERROR cannot find associated type `foobar` in trait `Copy` + //~^ ERROR cannot find associated type `foobar` } diff --git a/tests/ui/traits/issue-22384.stderr b/tests/ui/traits/issue-22384.stderr index f53c95c2b677e..4cc4dc71e6e04 100644 --- a/tests/ui/traits/issue-22384.stderr +++ b/tests/ui/traits/issue-22384.stderr @@ -1,8 +1,8 @@ -error[E0576]: cannot find associated type `foobar` in trait `Copy` +error[E0576]: cannot find associated type `foobar` --> $DIR/issue-22384.rs:6:21 | LL | <::foobar as Trait>::foo(); - | ^^^^^^ not found in `Copy` + | ^^^^^^ not found in trait `Copy` error: aborting due to 1 previous error diff --git a/tests/ui/traits/issue-50480.rs b/tests/ui/traits/issue-50480.rs index ccd35a850f2d7..a5c2f144e086e 100644 --- a/tests/ui/traits/issue-50480.rs +++ b/tests/ui/traits/issue-50480.rs @@ -1,10 +1,10 @@ #[derive(Clone, Copy)] //~^ ERROR the trait `Copy` cannot be implemented for this type struct Foo(N, NotDefined, ::Item, Vec, String); -//~^ ERROR cannot find type `NotDefined` in this scope -//~| ERROR cannot find type `NotDefined` in this scope -//~| ERROR cannot find type `N` in this scope -//~| ERROR cannot find type `N` in this scope +//~^ ERROR cannot find type `NotDefined` +//~| ERROR cannot find type `NotDefined` +//~| ERROR cannot find type `N` +//~| ERROR cannot find type `N` //~| ERROR `i32` is not an iterator //~| ERROR `i32` is not an iterator @@ -12,8 +12,8 @@ struct Foo(N, NotDefined, ::Item, Vec, String); //~^ ERROR the trait `Copy` cannot be implemented for this type //~| ERROR `i32` is not an iterator struct Bar(T, N, NotDefined, ::Item, Vec, String); -//~^ ERROR cannot find type `NotDefined` in this scope -//~| ERROR cannot find type `N` in this scope +//~^ ERROR cannot find type `NotDefined` +//~| ERROR cannot find type `N` //~| ERROR `i32` is not an iterator //~| ERROR `i32` is not an iterator diff --git a/tests/ui/traits/issue-50480.stderr b/tests/ui/traits/issue-50480.stderr index 330b23b5755d7..b9fd86dd2f574 100644 --- a/tests/ui/traits/issue-50480.stderr +++ b/tests/ui/traits/issue-50480.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `N` in this scope +error[E0412]: cannot find type `N` --> $DIR/issue-50480.rs:3:12 | LL | struct Foo(N, NotDefined, ::Item, Vec, String); @@ -9,13 +9,13 @@ help: you might be missing a type parameter LL | struct Foo(N, NotDefined, ::Item, Vec, String); | +++ -error[E0412]: cannot find type `NotDefined` in this scope +error[E0412]: cannot find type `NotDefined` --> $DIR/issue-50480.rs:3:15 | LL | struct Foo(N, NotDefined, ::Item, Vec, String); | ^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `N` in this scope +error[E0412]: cannot find type `N` --> $DIR/issue-50480.rs:3:12 | LL | struct Foo(N, NotDefined, ::Item, Vec, String); @@ -26,7 +26,7 @@ help: you might be missing a type parameter LL | struct Foo(N, NotDefined, ::Item, Vec, String); | +++ -error[E0412]: cannot find type `NotDefined` in this scope +error[E0412]: cannot find type `NotDefined` --> $DIR/issue-50480.rs:3:15 | LL | struct Foo(N, NotDefined, ::Item, Vec, String); @@ -37,7 +37,7 @@ help: you might be missing a type parameter LL | struct Foo(N, NotDefined, ::Item, Vec, String); | ++++++++++++ -error[E0412]: cannot find type `N` in this scope +error[E0412]: cannot find type `N` --> $DIR/issue-50480.rs:14:18 | LL | struct Bar(T, N, NotDefined, ::Item, Vec, String); @@ -54,7 +54,7 @@ help: you might be missing a type parameter LL | struct Bar(T, N, NotDefined, ::Item, Vec, String); | +++ -error[E0412]: cannot find type `NotDefined` in this scope +error[E0412]: cannot find type `NotDefined` --> $DIR/issue-50480.rs:14:21 | LL | struct Bar(T, N, NotDefined, ::Item, Vec, String); diff --git a/tests/ui/traits/issue-75627.stderr b/tests/ui/traits/issue-75627.stderr index 137985ee04641..82ad7b4e1b3da 100644 --- a/tests/ui/traits/issue-75627.stderr +++ b/tests/ui/traits/issue-75627.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/issue-75627.rs:3:26 | LL | unsafe impl Send for Foo {} diff --git a/tests/ui/traits/issue-78372.rs b/tests/ui/traits/issue-78372.rs index b97835bbc57fd..d123e4515dbee 100644 --- a/tests/ui/traits/issue-78372.rs +++ b/tests/ui/traits/issue-78372.rs @@ -1,7 +1,7 @@ use std::ops::DispatchFromDyn; //~ ERROR use of unstable library feature 'dispatch_from_dyn' -struct Smaht(PhantomData); //~ ERROR cannot find type `PhantomData` in this scope -impl DispatchFromDyn> for T {} //~ ERROR cannot find type `U` in this scope -//~^ ERROR cannot find type `MISC` in this scope +struct Smaht(PhantomData); //~ ERROR cannot find type `PhantomData` +impl DispatchFromDyn> for T {} //~ ERROR cannot find type `U` +//~^ ERROR cannot find type `MISC` //~| ERROR use of unstable library feature 'dispatch_from_dyn' //~| ERROR the trait `DispatchFromDyn` may only be implemented for a coercion between structures trait Foo: X {} diff --git a/tests/ui/traits/issue-78372.stderr b/tests/ui/traits/issue-78372.stderr index cdcb0cdf2593d..5daf86367ba7d 100644 --- a/tests/ui/traits/issue-78372.stderr +++ b/tests/ui/traits/issue-78372.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `PhantomData` in this scope +error[E0412]: cannot find type `PhantomData` --> $DIR/issue-78372.rs:2:23 | LL | struct Smaht(PhantomData); @@ -9,7 +9,7 @@ help: consider importing this struct LL + use std::marker::PhantomData; | -error[E0412]: cannot find type `U` in this scope +error[E0412]: cannot find type `U` --> $DIR/issue-78372.rs:3:31 | LL | impl DispatchFromDyn> for T {} @@ -26,7 +26,7 @@ help: you might be missing a type parameter LL | impl DispatchFromDyn> for T {} | +++ -error[E0412]: cannot find type `MISC` in this scope +error[E0412]: cannot find type `MISC` --> $DIR/issue-78372.rs:3:34 | LL | impl DispatchFromDyn> for T {} diff --git a/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs b/tests/ui/traits/next-solver/dont-normalize-proj-with-error.rs index 2f7ea3bb09548..692e93053cc27 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 @@ -15,7 +15,7 @@ impl Mirror for Wrapper { fn mirror(_: W) -> Box { todo!() } fn type_error() -> TypeError { todo!() } -//~^ ERROR cannot find type `TypeError` in this scope +//~^ ERROR cannot find type `TypeError` fn main() { let x = mirror(type_error()); 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 576ede52aff2d..dc5628392ce7a 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,4 +1,4 @@ -error[E0412]: cannot find type `TypeError` in this scope +error[E0412]: cannot find type `TypeError` --> $DIR/dont-normalize-proj-with-error.rs:17:20 | LL | fn type_error() -> TypeError { todo!() } diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.rs b/tests/ui/traits/next-solver/issue-118950-root-region.rs index 9f6dea5d5bf86..501b906f3f491 100644 --- a/tests/ui/traits/next-solver/issue-118950-root-region.rs +++ b/tests/ui/traits/next-solver/issue-118950-root-region.rs @@ -18,6 +18,6 @@ impl Overlap for T {} impl Overlap fn(Assoc<'a, T>)> for T where Missing: Overlap {} //~^ ERROR conflicting implementations of trait `Overlap` for type `fn(_)` -//~| ERROR cannot find type `Missing` in this scope +//~| ERROR cannot find type `Missing` fn main() {} diff --git a/tests/ui/traits/next-solver/issue-118950-root-region.stderr b/tests/ui/traits/next-solver/issue-118950-root-region.stderr index 17da1f5247963..2af6db20ddcf3 100644 --- a/tests/ui/traits/next-solver/issue-118950-root-region.stderr +++ b/tests/ui/traits/next-solver/issue-118950-root-region.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/issue-118950-root-region.rs:19:55 | LL | impl Overlap fn(Assoc<'a, T>)> for T where Missing: Overlap {} diff --git a/tests/ui/traits/no-fallback-multiple-impls.rs b/tests/ui/traits/no-fallback-multiple-impls.rs index 7ed3796f08b76..aea6d86bfb4dd 100644 --- a/tests/ui/traits/no-fallback-multiple-impls.rs +++ b/tests/ui/traits/no-fallback-multiple-impls.rs @@ -10,7 +10,7 @@ impl Fallback for usize {} fn main() { missing(); - //~^ ERROR cannot find function `missing` in this scope + //~^ ERROR cannot find function `missing` 0.foo(); // But then we shouldn't report an inference ambiguity here... } diff --git a/tests/ui/traits/no-fallback-multiple-impls.stderr b/tests/ui/traits/no-fallback-multiple-impls.stderr index e38c432ca98c8..c2eae3e91a043 100644 --- a/tests/ui/traits/no-fallback-multiple-impls.stderr +++ b/tests/ui/traits/no-fallback-multiple-impls.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `missing` in this scope +error[E0425]: cannot find function `missing` --> $DIR/no-fallback-multiple-impls.rs:12:5 | LL | missing(); diff --git a/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.rs b/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.rs index c6bf0dc1f720f..b7b91a5325731 100644 --- a/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.rs +++ b/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.rs @@ -7,7 +7,7 @@ where (||1usize)() }> V: IntoIterator //~^^^ ERROR defaults for generic parameters are not allowed in `for<...>` binders -//~^^ ERROR cannot find type `V` in this scope +//~^^ ERROR cannot find type `V` { } diff --git a/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.stderr b/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.stderr index edc55a3c8e68f..48a5126eedd39 100644 --- a/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.stderr +++ b/tests/ui/traits/non_lifetime_binders/binder-defaults-112547.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `V` in this scope +error[E0412]: cannot find type `V` --> $DIR/binder-defaults-112547.rs:8:4 | LL | }> V: IntoIterator diff --git a/tests/ui/traits/non_lifetime_binders/binder-defaults-118697.rs b/tests/ui/traits/non_lifetime_binders/binder-defaults-118697.rs index 2dc9fb98b153d..fbb1bcbb9d92d 100644 --- a/tests/ui/traits/non_lifetime_binders/binder-defaults-118697.rs +++ b/tests/ui/traits/non_lifetime_binders/binder-defaults-118697.rs @@ -3,7 +3,7 @@ type T = dyn for Fn(()); //~^ ERROR defaults for generic parameters are not allowed in `for<...>` binders -//~| ERROR cannot find type `A` in this scope +//~| ERROR cannot find type `A` //~| ERROR late-bound type parameter not allowed on trait object types fn main() {} diff --git a/tests/ui/traits/non_lifetime_binders/binder-defaults-118697.stderr b/tests/ui/traits/non_lifetime_binders/binder-defaults-118697.stderr index 6b93f52dbfcaa..d0369eda5935e 100644 --- a/tests/ui/traits/non_lifetime_binders/binder-defaults-118697.stderr +++ b/tests/ui/traits/non_lifetime_binders/binder-defaults-118697.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `A` in this scope +error[E0412]: cannot find type `A` --> $DIR/binder-defaults-118697.rs:4:22 | LL | type T = dyn for Fn(()); diff --git a/tests/ui/traits/trait-selection-ice-84727.rs b/tests/ui/traits/trait-selection-ice-84727.rs index 08a282892a59c..c899a6928de2a 100644 --- a/tests/ui/traits/trait-selection-ice-84727.rs +++ b/tests/ui/traits/trait-selection-ice-84727.rs @@ -3,9 +3,9 @@ struct Cell { foreground: Color, - //~^ ERROR cannot find type `Color` in this scope + //~^ ERROR cannot find type `Color` background: Color, - //~^ ERROR cannot find type `Color` in this scope + //~^ ERROR cannot find type `Color` } trait Over { @@ -16,7 +16,7 @@ impl Over, Cell> for Cell where Self: Over, Cell>, - //~^ ERROR cannot find type `Color` in this scope + //~^ ERROR cannot find type `Color` { fn over(self) -> Cell { //~^ ERROR mismatched types @@ -30,7 +30,7 @@ where Cell: Over, Cell>, { fn over(self) -> Cell { - //~^ ERROR cannot find type `NewBg` in this scope + //~^ ERROR cannot find type `NewBg` self.over(); } } diff --git a/tests/ui/traits/trait-selection-ice-84727.stderr b/tests/ui/traits/trait-selection-ice-84727.stderr index d4bc4163897c4..bfd4c1689d5d6 100644 --- a/tests/ui/traits/trait-selection-ice-84727.stderr +++ b/tests/ui/traits/trait-selection-ice-84727.stderr @@ -1,22 +1,22 @@ -error[E0412]: cannot find type `Color` in this scope +error[E0412]: cannot find type `Color` --> $DIR/trait-selection-ice-84727.rs:5:17 | LL | foreground: Color, | ^^^^^ not found in this scope -error[E0412]: cannot find type `Color` in this scope +error[E0412]: cannot find type `Color` --> $DIR/trait-selection-ice-84727.rs:7:17 | LL | background: Color, | ^^^^^ not found in this scope -error[E0412]: cannot find type `Color` in this scope +error[E0412]: cannot find type `Color` --> $DIR/trait-selection-ice-84727.rs:18:16 | LL | Self: Over, Cell>, | ^^^^^ not found in this scope -error[E0412]: cannot find type `NewBg` in this scope +error[E0412]: cannot find type `NewBg` --> $DIR/trait-selection-ice-84727.rs:32:27 | LL | fn over(self) -> Cell { diff --git a/tests/ui/transmutability/issue-101739-1.rs b/tests/ui/transmutability/issue-101739-1.rs index 0695d7d409fe0..81e848ce262d9 100644 --- a/tests/ui/transmutability/issue-101739-1.rs +++ b/tests/ui/transmutability/issue-101739-1.rs @@ -5,7 +5,7 @@ mod assert { pub fn is_transmutable() where - Dst: BikeshedIntrinsicFrom, //~ ERROR cannot find type `Dst` in this scope + Dst: BikeshedIntrinsicFrom, //~ ERROR cannot find type `Dst` //~^ the constant `ASSUME_ALIGNMENT` is not of type `Assume` //~| ERROR: mismatched types { diff --git a/tests/ui/transmutability/issue-101739-1.stderr b/tests/ui/transmutability/issue-101739-1.stderr index 6f79bf7b42468..e587848c2a5c8 100644 --- a/tests/ui/transmutability/issue-101739-1.stderr +++ b/tests/ui/transmutability/issue-101739-1.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Dst` in this scope +error[E0412]: cannot find type `Dst` --> $DIR/issue-101739-1.rs:8:9 | LL | Dst: BikeshedIntrinsicFrom, diff --git a/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr b/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr index 9fa376bf4332b..d58974efb143d 100644 --- a/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr +++ b/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Dst` in this scope +error[E0412]: cannot find type `Dst` --> $DIR/unknown_dst.rs:18:36 | LL | assert::is_transmutable::(); diff --git a/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr b/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr index f2c7d9e1bcc15..685220e5ce80b 100644 --- a/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr +++ b/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Src` in this scope +error[E0412]: cannot find type `Src` --> $DIR/unknown_src.rs:18:31 | LL | assert::is_transmutable::(); diff --git a/tests/ui/transmutability/malformed-program-gracefulness/unknown_src_field.stderr b/tests/ui/transmutability/malformed-program-gracefulness/unknown_src_field.stderr index cabc7bcfef762..c1995bfb02a1b 100644 --- a/tests/ui/transmutability/malformed-program-gracefulness/unknown_src_field.stderr +++ b/tests/ui/transmutability/malformed-program-gracefulness/unknown_src_field.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/unknown_src_field.rs:18:27 | LL | #[repr(C)] struct Dst(Missing); diff --git a/tests/ui/tuple/tuple-struct-fields/test.rs b/tests/ui/tuple/tuple-struct-fields/test.rs index 00677090d78c5..e2c0f438ef6c1 100644 --- a/tests/ui/tuple/tuple-struct-fields/test.rs +++ b/tests/ui/tuple/tuple-struct-fields/test.rs @@ -3,7 +3,7 @@ mod foo { struct S1(pub(in foo) (), pub(T), pub(crate) (), pub(((), T))); struct S2(pub((foo)) ()); //~^ ERROR expected one of `)` or `,`, found `(` - //~| ERROR cannot find type `foo` in this scope + //~| ERROR cannot find type `foo` } fn main() {} diff --git a/tests/ui/tuple/tuple-struct-fields/test.stderr b/tests/ui/tuple/tuple-struct-fields/test.stderr index bfa0b32fd458a..b5cce9a480924 100644 --- a/tests/ui/tuple/tuple-struct-fields/test.stderr +++ b/tests/ui/tuple/tuple-struct-fields/test.stderr @@ -6,7 +6,7 @@ LL | struct S2(pub((foo)) ()); | | | help: missing `,` -error[E0412]: cannot find type `foo` in this scope +error[E0412]: cannot find type `foo` --> $DIR/test.rs:4:20 | LL | struct S2(pub((foo)) ()); diff --git a/tests/ui/tuple/tuple-struct-fields/test2.rs b/tests/ui/tuple/tuple-struct-fields/test2.rs index 2b2a2c127e985..8b7a4713fc9f3 100644 --- a/tests/ui/tuple/tuple-struct-fields/test2.rs +++ b/tests/ui/tuple/tuple-struct-fields/test2.rs @@ -8,8 +8,8 @@ macro_rules! define_struct { } mod foo { - define_struct! { (foo) } //~ ERROR cannot find type `foo` in this scope - //~| ERROR cannot find type `foo` in this scope + define_struct! { (foo) } //~ ERROR cannot find type `foo` + //~| ERROR cannot find type `foo` } fn main() {} diff --git a/tests/ui/tuple/tuple-struct-fields/test2.stderr b/tests/ui/tuple/tuple-struct-fields/test2.stderr index 784411aba8f8a..97e67307d849b 100644 --- a/tests/ui/tuple/tuple-struct-fields/test2.stderr +++ b/tests/ui/tuple/tuple-struct-fields/test2.stderr @@ -11,13 +11,13 @@ LL | define_struct! { (foo) } | = note: this error originates in the macro `define_struct` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `foo` in this scope +error[E0412]: cannot find type `foo` --> $DIR/test2.rs:11:23 | LL | define_struct! { (foo) } | ^^^ not found in this scope -error[E0412]: cannot find type `foo` in this scope +error[E0412]: cannot find type `foo` --> $DIR/test2.rs:11:23 | LL | define_struct! { (foo) } diff --git a/tests/ui/tuple/tuple-struct-fields/test3.rs b/tests/ui/tuple/tuple-struct-fields/test3.rs index 98d19426e7733..9ebbb266b6b04 100644 --- a/tests/ui/tuple/tuple-struct-fields/test3.rs +++ b/tests/ui/tuple/tuple-struct-fields/test3.rs @@ -8,8 +8,8 @@ macro_rules! define_struct { } mod foo { - define_struct! { foo } //~ ERROR cannot find type `foo` in this scope - //~| ERROR cannot find type `foo` in this scope + define_struct! { foo } //~ ERROR cannot find type `foo` + //~| ERROR cannot find type `foo` } fn main() {} diff --git a/tests/ui/tuple/tuple-struct-fields/test3.stderr b/tests/ui/tuple/tuple-struct-fields/test3.stderr index 00b07c0315292..6c0a05be33a5e 100644 --- a/tests/ui/tuple/tuple-struct-fields/test3.stderr +++ b/tests/ui/tuple/tuple-struct-fields/test3.stderr @@ -11,13 +11,13 @@ LL | define_struct! { foo } | = note: this error originates in the macro `define_struct` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0412]: cannot find type `foo` in this scope +error[E0412]: cannot find type `foo` --> $DIR/test3.rs:11:22 | LL | define_struct! { foo } | ^^^ not found in this scope -error[E0412]: cannot find type `foo` in this scope +error[E0412]: cannot find type `foo` --> $DIR/test3.rs:11:22 | LL | define_struct! { foo } diff --git a/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs b/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs index 6a74d1dc4ef38..f7f808d22003d 100644 --- a/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs +++ b/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.rs @@ -2,7 +2,7 @@ pub type Tait = impl Iterator; //~^ ERROR use of undeclared lifetime name `'db` -//~| ERROR cannot find type `LocalKey` in this scope +//~| ERROR cannot find type `LocalKey` //~| ERROR unconstrained opaque type //~| ERROR unconstrained opaque type diff --git a/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr b/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr index ca15b134a9947..eca7205add50d 100644 --- a/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr +++ b/tests/ui/type-alias-impl-trait/nested-impl-trait-in-tait.stderr @@ -14,7 +14,7 @@ help: consider introducing lifetime `'db` here LL | pub type Tait<'db> = impl Iterator; | +++++ -error[E0412]: cannot find type `LocalKey` in this scope +error[E0412]: cannot find type `LocalKey` --> $DIR/nested-impl-trait-in-tait.rs:3:44 | LL | pub type Tait = impl Iterator; diff --git a/tests/ui/type-alias/issue-62364-self-ty-arg.rs b/tests/ui/type-alias/issue-62364-self-ty-arg.rs index bebb4a9021aab..ec7b6baff49b3 100644 --- a/tests/ui/type-alias/issue-62364-self-ty-arg.rs +++ b/tests/ui/type-alias/issue-62364-self-ty-arg.rs @@ -3,6 +3,6 @@ struct Struct { } type Alias<'a> = Struct<&'a Self>; -//~^ ERROR cannot find type `Self` in this scope [E0411] +//~^ ERROR cannot find type `Self` [E0411] fn main() {} diff --git a/tests/ui/type-alias/issue-62364-self-ty-arg.stderr b/tests/ui/type-alias/issue-62364-self-ty-arg.stderr index 26d93dcc27276..3389dfe27c414 100644 --- a/tests/ui/type-alias/issue-62364-self-ty-arg.stderr +++ b/tests/ui/type-alias/issue-62364-self-ty-arg.stderr @@ -1,4 +1,4 @@ -error[E0411]: cannot find type `Self` in this scope +error[E0411]: cannot find type `Self` --> $DIR/issue-62364-self-ty-arg.rs:5:29 | LL | type Alias<'a> = Struct<&'a Self>; diff --git a/tests/ui/type/issue-7607-1.rs b/tests/ui/type/issue-7607-1.rs index 5221f2c529bc6..984617c0e653f 100644 --- a/tests/ui/type/issue-7607-1.rs +++ b/tests/ui/type/issue-7607-1.rs @@ -2,7 +2,7 @@ struct Foo { x: isize } -impl Fo { //~ ERROR cannot find type `Fo` in this scope +impl Fo { //~ ERROR cannot find type `Fo` fn foo() {} } diff --git a/tests/ui/type/issue-7607-1.stderr b/tests/ui/type/issue-7607-1.stderr index db4c8f25dbc43..1b4fb5077b534 100644 --- a/tests/ui/type/issue-7607-1.stderr +++ b/tests/ui/type/issue-7607-1.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Fo` in this scope +error[E0412]: cannot find type `Fo` --> $DIR/issue-7607-1.rs:5:6 | LL | impl Fo { diff --git a/tests/ui/type/type-path-err-node-types.rs b/tests/ui/type/type-path-err-node-types.rs index b3795772e6fe2..c3a61b1ceda56 100644 --- a/tests/ui/type/type-path-err-node-types.rs +++ b/tests/ui/type/type-path-err-node-types.rs @@ -4,7 +4,7 @@ trait Tr {} fn local_type() { - let _: Nonexistent; //~ ERROR cannot find type `Nonexistent` in this scope + let _: Nonexistent; //~ ERROR cannot find type `Nonexistent` } fn ufcs_trait() { diff --git a/tests/ui/type/type-path-err-node-types.stderr b/tests/ui/type/type-path-err-node-types.stderr index 8b12aa1a393b2..9a56eda807706 100644 --- a/tests/ui/type/type-path-err-node-types.stderr +++ b/tests/ui/type/type-path-err-node-types.stderr @@ -1,16 +1,16 @@ -error[E0412]: cannot find type `Nonexistent` in this scope +error[E0412]: cannot find type `Nonexistent` --> $DIR/type-path-err-node-types.rs:7:12 | LL | let _: Nonexistent; | ^^^^^^^^^^^ not found in this scope -error[E0576]: cannot find method or associated constant `nonexistent` in trait `Tr` +error[E0576]: cannot find method or associated constant `nonexistent` --> $DIR/type-path-err-node-types.rs:11:21 | LL | >::nonexistent(); - | ^^^^^^^^^^^ not found in `Tr` + | ^^^^^^^^^^^ not found in trait `Tr` -error[E0425]: cannot find value `nonexistent` in this scope +error[E0425]: cannot find value `nonexistent` --> $DIR/type-path-err-node-types.rs:19:5 | LL | nonexistent.nonexistent::(); diff --git a/tests/ui/typeck/apit-with-error-type-in-sig.rs b/tests/ui/typeck/apit-with-error-type-in-sig.rs index 35990fc16c89a..7a24948bdd314 100644 --- a/tests/ui/typeck/apit-with-error-type-in-sig.rs +++ b/tests/ui/typeck/apit-with-error-type-in-sig.rs @@ -1,5 +1,5 @@ type Foo = Bar; -//~^ ERROR cannot find type `Bar` in this scope +//~^ ERROR cannot find type `Bar` fn check(f: impl FnOnce(Foo), val: Foo) { f(val); diff --git a/tests/ui/typeck/apit-with-error-type-in-sig.stderr b/tests/ui/typeck/apit-with-error-type-in-sig.stderr index 6ed9b1f9b8cba..d470891413eb8 100644 --- a/tests/ui/typeck/apit-with-error-type-in-sig.stderr +++ b/tests/ui/typeck/apit-with-error-type-in-sig.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Bar` in this scope +error[E0412]: cannot find type `Bar` --> $DIR/apit-with-error-type-in-sig.rs:1:12 | LL | type Foo = Bar; diff --git a/tests/ui/typeck/autoderef-with-param-env-error.rs b/tests/ui/typeck/autoderef-with-param-env-error.rs index ec96c61c63e3a..5c76bb4480514 100644 --- a/tests/ui/typeck/autoderef-with-param-env-error.rs +++ b/tests/ui/typeck/autoderef-with-param-env-error.rs @@ -1,7 +1,7 @@ fn foo() where T: Send, - //~^ cannot find type `T` in this scope + //~^ cannot find type `T` { let s = "abc".to_string(); } diff --git a/tests/ui/typeck/autoderef-with-param-env-error.stderr b/tests/ui/typeck/autoderef-with-param-env-error.stderr index e06be398aa07a..bf07ba74c6a39 100644 --- a/tests/ui/typeck/autoderef-with-param-env-error.stderr +++ b/tests/ui/typeck/autoderef-with-param-env-error.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0412]: cannot find type `T` --> $DIR/autoderef-with-param-env-error.rs:3:5 | LL | T: Send, diff --git a/tests/ui/typeck/check-args-on-fn-err-2.rs b/tests/ui/typeck/check-args-on-fn-err-2.rs index af57dbe33177d..31d38975b4a60 100644 --- a/tests/ui/typeck/check-args-on-fn-err-2.rs +++ b/tests/ui/typeck/check-args-on-fn-err-2.rs @@ -1,5 +1,5 @@ fn main() { a((), 1i32 == 2u32); - //~^ ERROR cannot find function `a` in this scope + //~^ ERROR cannot find function `a` //~| ERROR mismatched types } diff --git a/tests/ui/typeck/check-args-on-fn-err-2.stderr b/tests/ui/typeck/check-args-on-fn-err-2.stderr index 301bb88dbacf6..6f85cc7ef3365 100644 --- a/tests/ui/typeck/check-args-on-fn-err-2.stderr +++ b/tests/ui/typeck/check-args-on-fn-err-2.stderr @@ -11,7 +11,7 @@ help: change the type of the numeric literal from `u32` to `i32` LL | a((), 1i32 == 2i32); | ~~~ -error[E0425]: cannot find function `a` in this scope +error[E0425]: cannot find function `a` --> $DIR/check-args-on-fn-err-2.rs:2:5 | LL | a((), 1i32 == 2u32); diff --git a/tests/ui/typeck/check-args-on-fn-err.rs b/tests/ui/typeck/check-args-on-fn-err.rs index 04b98ddd95295..87ec4c314876a 100644 --- a/tests/ui/typeck/check-args-on-fn-err.rs +++ b/tests/ui/typeck/check-args-on-fn-err.rs @@ -1,6 +1,6 @@ fn main() { unknown(1, |glyf| { - //~^ ERROR: cannot find function `unknown` in this scope + //~^ ERROR: cannot find function `unknown` let actual = glyf; }); } diff --git a/tests/ui/typeck/check-args-on-fn-err.stderr b/tests/ui/typeck/check-args-on-fn-err.stderr index be0798ab107c0..3c4689877b6af 100644 --- a/tests/ui/typeck/check-args-on-fn-err.stderr +++ b/tests/ui/typeck/check-args-on-fn-err.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `unknown` in this scope +error[E0425]: cannot find function `unknown` --> $DIR/check-args-on-fn-err.rs:2:5 | LL | unknown(1, |glyf| { diff --git a/tests/ui/typeck/issue-104510-ice.rs b/tests/ui/typeck/issue-104510-ice.rs index 627af1fe95230..a105675075fd4 100644 --- a/tests/ui/typeck/issue-104510-ice.rs +++ b/tests/ui/typeck/issue-104510-ice.rs @@ -2,7 +2,7 @@ //@ only-x86_64 struct W(Oops); -//~^ ERROR cannot find type `Oops` in this scope +//~^ ERROR cannot find type `Oops` unsafe fn test() { let j = W(()); diff --git a/tests/ui/typeck/issue-104510-ice.stderr b/tests/ui/typeck/issue-104510-ice.stderr index 143139b2c089c..bfbc8dd5ff227 100644 --- a/tests/ui/typeck/issue-104510-ice.stderr +++ b/tests/ui/typeck/issue-104510-ice.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Oops` in this scope +error[E0412]: cannot find type `Oops` --> $DIR/issue-104510-ice.rs:4:21 | LL | struct W(Oops); diff --git a/tests/ui/typeck/issue-104513-ice.rs b/tests/ui/typeck/issue-104513-ice.rs index aaeee9cef48ac..5659cd49ed904 100644 --- a/tests/ui/typeck/issue-104513-ice.rs +++ b/tests/ui/typeck/issue-104513-ice.rs @@ -1,6 +1,6 @@ struct S; fn f() { - let _: S = S; //~ ERROR cannot find trait `Oops` in this scope + let _: S = S; //~ ERROR cannot find trait `Oops` //~^ ERROR `impl Trait` is not allowed in the type of variable bindings } fn main() {} diff --git a/tests/ui/typeck/issue-104513-ice.stderr b/tests/ui/typeck/issue-104513-ice.stderr index 37d38a76a4034..80a0168e08f27 100644 --- a/tests/ui/typeck/issue-104513-ice.stderr +++ b/tests/ui/typeck/issue-104513-ice.stderr @@ -1,4 +1,4 @@ -error[E0405]: cannot find trait `Oops` in this scope +error[E0405]: cannot find trait `Oops` --> $DIR/issue-104513-ice.rs:3:19 | LL | let _: S = S; diff --git a/tests/ui/typeck/issue-105946.rs b/tests/ui/typeck/issue-105946.rs index f53f31138f811..305f524e18521 100644 --- a/tests/ui/typeck/issue-105946.rs +++ b/tests/ui/typeck/issue-105946.rs @@ -4,7 +4,7 @@ fn digit() -> str { } fn main() { let [_y..] = [Box::new(1), Box::new(2)]; - //~^ ERROR: cannot find value `_y` in this scope [E0425] + //~^ ERROR: cannot find value `_y` [E0425] //~| ERROR: `X..` patterns in slices are experimental [E0658] //~| ERROR: pattern requires 1 element but array has 2 [E0527] } diff --git a/tests/ui/typeck/issue-105946.stderr b/tests/ui/typeck/issue-105946.stderr index 33d4e0b141ab3..6c6d4c456bb66 100644 --- a/tests/ui/typeck/issue-105946.stderr +++ b/tests/ui/typeck/issue-105946.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find value `_y` in this scope +error[E0425]: cannot find value `_y` --> $DIR/issue-105946.rs:6:10 | LL | let [_y..] = [Box::new(1), Box::new(2)]; diff --git a/tests/ui/typeck/issue-106929.rs b/tests/ui/typeck/issue-106929.rs index 91342229ae1a5..beaa6aae52a63 100644 --- a/tests/ui/typeck/issue-106929.rs +++ b/tests/ui/typeck/issue-106929.rs @@ -7,7 +7,7 @@ impl Client { fn f() { let c = Client; post(c, ()); - //~^ ERROR cannot find function `post` in this scope + //~^ ERROR cannot find function `post` } fn main() {} diff --git a/tests/ui/typeck/issue-106929.stderr b/tests/ui/typeck/issue-106929.stderr index 375c9372ec288..34ce63bb604ef 100644 --- a/tests/ui/typeck/issue-106929.stderr +++ b/tests/ui/typeck/issue-106929.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `post` in this scope +error[E0425]: cannot find function `post` --> $DIR/issue-106929.rs:9:5 | LL | post(c, ()); diff --git a/tests/ui/typeck/issue-114423-ice-regression-in-suggestion.rs b/tests/ui/typeck/issue-114423-ice-regression-in-suggestion.rs index da2dae1c46b06..642b821234e60 100644 --- a/tests/ui/typeck/issue-114423-ice-regression-in-suggestion.rs +++ b/tests/ui/typeck/issue-114423-ice-regression-in-suggestion.rs @@ -5,11 +5,11 @@ struct RGB { fn main() { let (r, alone_in_path, b): (f32, f32, f32) = (e.clone(), e.clone()); - //~^ ERROR cannot find value `e` in this scope - //~| ERROR cannot find value `e` in this scope + //~^ ERROR cannot find value `e` + //~| ERROR cannot find value `e` //~| ERROR mismatched types let _ = RGB { r, g, b }; - //~^ ERROR cannot find value `g` in this scope + //~^ ERROR cannot find value `g` //~| ERROR struct `RGB` has no field named `r` //~| ERROR mismatched types } diff --git a/tests/ui/typeck/issue-114423-ice-regression-in-suggestion.stderr b/tests/ui/typeck/issue-114423-ice-regression-in-suggestion.stderr index 4ccfacfb00521..0e4d79fe958c8 100644 --- a/tests/ui/typeck/issue-114423-ice-regression-in-suggestion.stderr +++ b/tests/ui/typeck/issue-114423-ice-regression-in-suggestion.stderr @@ -1,16 +1,16 @@ -error[E0425]: cannot find value `e` in this scope +error[E0425]: cannot find value `e` --> $DIR/issue-114423-ice-regression-in-suggestion.rs:7:51 | LL | let (r, alone_in_path, b): (f32, f32, f32) = (e.clone(), e.clone()); | ^ not found in this scope -error[E0425]: cannot find value `e` in this scope +error[E0425]: cannot find value `e` --> $DIR/issue-114423-ice-regression-in-suggestion.rs:7:62 | LL | let (r, alone_in_path, b): (f32, f32, f32) = (e.clone(), e.clone()); | ^ not found in this scope -error[E0425]: cannot find value `g` in this scope +error[E0425]: cannot find value `g` --> $DIR/issue-114423-ice-regression-in-suggestion.rs:11:22 | LL | let _ = RGB { r, g, b }; diff --git a/tests/ui/typeck/issue-83693.rs b/tests/ui/typeck/issue-83693.rs index 02a0bb30d7ce1..ec23cc58cd7e7 100644 --- a/tests/ui/typeck/issue-83693.rs +++ b/tests/ui/typeck/issue-83693.rs @@ -4,16 +4,16 @@ #![crate_type="lib"] impl F { -//~^ ERROR: cannot find type `F` in this scope [E0412] +//~^ ERROR: cannot find type `F` [E0412] fn call() { ::call - //~^ ERROR: cannot find type `TestResult` in this scope [E0412] + //~^ ERROR: cannot find type `TestResult` [E0412] //~| associated item constraints are not allowed here [E0229] } } fn call() { ::call - //~^ ERROR: cannot find type `x` in this scope [E0412] + //~^ ERROR: cannot find type `x` [E0412] //~| ERROR: associated item constraints are not allowed here [E0229] } diff --git a/tests/ui/typeck/issue-83693.stderr b/tests/ui/typeck/issue-83693.stderr index 34bca426116e5..ff0f90929d55d 100644 --- a/tests/ui/typeck/issue-83693.stderr +++ b/tests/ui/typeck/issue-83693.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `F` in this scope +error[E0412]: cannot find type `F` --> $DIR/issue-83693.rs:6:6 | LL | impl F { @@ -7,13 +7,13 @@ LL | impl F { | = note: similarly named trait `Fn` defined here -error[E0412]: cannot find type `TestResult` in this scope +error[E0412]: cannot find type `TestResult` --> $DIR/issue-83693.rs:9:22 | LL | ::call | ^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `x` in this scope +error[E0412]: cannot find type `x` --> $DIR/issue-83693.rs:16:6 | LL | ::call diff --git a/tests/ui/typeck/issue-88844.rs b/tests/ui/typeck/issue-88844.rs index 116c75aabdbdf..34e6d254091de 100644 --- a/tests/ui/typeck/issue-88844.rs +++ b/tests/ui/typeck/issue-88844.rs @@ -4,7 +4,7 @@ struct Struct { value: i32 } //~^ NOTE: similarly named struct `Struct` defined here impl Stuct { -//~^ ERROR: cannot find type `Stuct` in this scope [E0412] +//~^ ERROR: cannot find type `Stuct` [E0412] //~| HELP: a struct with a similar name exists fn new() -> Self { Self { value: 42 } diff --git a/tests/ui/typeck/issue-88844.stderr b/tests/ui/typeck/issue-88844.stderr index 68473f65dcf53..5c62e428fe7ac 100644 --- a/tests/ui/typeck/issue-88844.stderr +++ b/tests/ui/typeck/issue-88844.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Stuct` in this scope +error[E0412]: cannot find type `Stuct` --> $DIR/issue-88844.rs:6:6 | LL | struct Struct { value: i32 } diff --git a/tests/ui/typeck/issue-90319.rs b/tests/ui/typeck/issue-90319.rs index 57e6ac7cf34f5..3140bb519a6ed 100644 --- a/tests/ui/typeck/issue-90319.rs +++ b/tests/ui/typeck/issue-90319.rs @@ -11,7 +11,7 @@ fn get() -> T { } fn main() { - let thing = get::();//~ERROR cannot find type `Thing` in this scope [E0412] + let thing = get::();//~ERROR cannot find type `Thing` [E0412] let wrapper = Wrapper(thing); Trait::method(&wrapper); } diff --git a/tests/ui/typeck/issue-90319.stderr b/tests/ui/typeck/issue-90319.stderr index fa18056e802d4..20ef8811b8921 100644 --- a/tests/ui/typeck/issue-90319.stderr +++ b/tests/ui/typeck/issue-90319.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Thing` in this scope +error[E0412]: cannot find type `Thing` --> $DIR/issue-90319.rs:14:23 | LL | let thing = get::(); diff --git a/tests/ui/typeck/issue-91267.rs b/tests/ui/typeck/issue-91267.rs index 1bffa09e64360..c4f3f7b30dabd 100644 --- a/tests/ui/typeck/issue-91267.rs +++ b/tests/ui/typeck/issue-91267.rs @@ -2,7 +2,7 @@ fn main() { type_ascribe!(0, u8=e>) - //~^ ERROR: cannot find type `e` in this scope [E0412] + //~^ ERROR: cannot find type `e` [E0412] //~| ERROR: associated item constraints are not allowed here [E0229] //~| ERROR: mismatched types [E0308] } diff --git a/tests/ui/typeck/issue-91267.stderr b/tests/ui/typeck/issue-91267.stderr index d16b1997e9f7d..5363e47c9e03a 100644 --- a/tests/ui/typeck/issue-91267.stderr +++ b/tests/ui/typeck/issue-91267.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `e` in this scope +error[E0412]: cannot find type `e` --> $DIR/issue-91267.rs:4:30 | LL | type_ascribe!(0, u8=e>) diff --git a/tests/ui/typeck/nonexistent-field-not-ambiguous.rs b/tests/ui/typeck/nonexistent-field-not-ambiguous.rs index 1cd192b783cdb..78a53923a389b 100644 --- a/tests/ui/typeck/nonexistent-field-not-ambiguous.rs +++ b/tests/ui/typeck/nonexistent-field-not-ambiguous.rs @@ -1,6 +1,6 @@ struct Foo { val: MissingType, - //~^ ERROR cannot find type `MissingType` in this scope + //~^ ERROR cannot find type `MissingType` } fn main() { diff --git a/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr b/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr index 82207a731b962..36c33db44faea 100644 --- a/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr +++ b/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `MissingType` in this scope +error[E0412]: cannot find type `MissingType` --> $DIR/nonexistent-field-not-ambiguous.rs:2:10 | LL | val: MissingType, diff --git a/tests/ui/typeck/quiet-type-err-let-binding.rs b/tests/ui/typeck/quiet-type-err-let-binding.rs index a6eab536a6b09..9435c7308ea27 100644 --- a/tests/ui/typeck/quiet-type-err-let-binding.rs +++ b/tests/ui/typeck/quiet-type-err-let-binding.rs @@ -11,7 +11,7 @@ fn test2(s: String) { } fn main() { - let x = foo(); //~ERROR cannot find function `foo` in this scope + let x = foo(); //~ERROR cannot find function `foo` test(&x); test2(x); // Does not complain about `x` being a `&str`. } diff --git a/tests/ui/typeck/quiet-type-err-let-binding.stderr b/tests/ui/typeck/quiet-type-err-let-binding.stderr index f27ca1dd58206..0eba3448cabcf 100644 --- a/tests/ui/typeck/quiet-type-err-let-binding.stderr +++ b/tests/ui/typeck/quiet-type-err-let-binding.stderr @@ -1,4 +1,4 @@ -error[E0425]: cannot find function `foo` in this scope +error[E0425]: cannot find function `foo` --> $DIR/quiet-type-err-let-binding.rs:14:13 | LL | let x = foo(); diff --git a/tests/ui/ufcs/ufcs-partially-resolved.rs b/tests/ui/ufcs/ufcs-partially-resolved.rs index 712668728c9e7..dd19943d255b8 100644 --- a/tests/ui/ufcs/ufcs-partially-resolved.rs +++ b/tests/ui/ufcs/ufcs-partially-resolved.rs @@ -16,10 +16,10 @@ enum E { Y } type A = u32; fn main() { - let _: ::N; //~ ERROR cannot find associated type `N` in trait `Tr` + let _: ::N; //~ ERROR cannot find associated type `N` let _: ::N; //~ ERROR expected trait, found enum `E` let _: ::N; //~ ERROR expected trait, found type alias `A` - ::N; //~ ERROR cannot find method or associated constant `N` in trait `Tr` + ::N; //~ ERROR cannot find method or associated constant `N` ::N; //~ ERROR expected trait, found enum `E` ::N; //~ ERROR expected trait, found type alias `A` let _: ::Y; // OK @@ -27,10 +27,10 @@ fn main() { ::Y; // OK ::Y; //~ ERROR expected trait, found enum `E` - let _: ::N::NN; //~ ERROR cannot find associated type `N` in trait `Tr` + let _: ::N::NN; //~ ERROR cannot find associated type `N` let _: ::N::NN; //~ ERROR expected trait, found enum `E` let _: ::N::NN; //~ ERROR expected trait, found type alias `A` - ::N::NN; //~ ERROR cannot find associated type `N` in trait `Tr` + ::N::NN; //~ ERROR cannot find associated type `N` ::N::NN; //~ ERROR expected trait, found enum `E` ::N::NN; //~ ERROR expected trait, found type alias `A` let _: ::Y::NN; //~ ERROR ambiguous associated type @@ -38,12 +38,12 @@ fn main() { ::Y::NN; //~ ERROR no associated item named `NN` found for type `u16` ::Y::NN; //~ ERROR expected trait, found enum `E` - let _: ::NN; //~ ERROR cannot find trait `N` in trait `Tr` - let _: ::NN; //~ ERROR cannot find trait `N` in enum `E` - let _: ::NN; //~ ERROR cannot find trait `N` in `A` - ::NN; //~ ERROR cannot find trait `N` in trait `Tr` - ::NN; //~ ERROR cannot find trait `N` in enum `E` - ::NN; //~ ERROR cannot find trait `N` in `A` + let _: ::NN; //~ ERROR cannot find trait `N` + let _: ::NN; //~ ERROR cannot find trait `N` + let _: ::NN; //~ ERROR cannot find trait `N` + ::NN; //~ ERROR cannot find trait `N` + ::NN; //~ ERROR cannot find trait `N` + ::NN; //~ ERROR cannot find trait `N` let _: ::NN; //~ ERROR expected trait, found associated type `Tr::Y let _: ::NN; //~ ERROR expected trait, found variant `E::Y` ::NN; //~ ERROR expected trait, found associated type `Tr::Y` diff --git a/tests/ui/ufcs/ufcs-partially-resolved.stderr b/tests/ui/ufcs/ufcs-partially-resolved.stderr index eef55c8dc686f..82d472ead7b73 100644 --- a/tests/ui/ufcs/ufcs-partially-resolved.stderr +++ b/tests/ui/ufcs/ufcs-partially-resolved.stderr @@ -1,4 +1,4 @@ -error[E0576]: cannot find associated type `N` in trait `Tr` +error[E0576]: cannot find associated type `N` --> $DIR/ufcs-partially-resolved.rs:19:24 | LL | type Y = u16; @@ -27,7 +27,7 @@ help: you might have meant to use `#![feature(trait_alias)]` instead of a `type` LL | trait A = u32; | -error[E0576]: cannot find method or associated constant `N` in trait `Tr` +error[E0576]: cannot find method or associated constant `N` --> $DIR/ufcs-partially-resolved.rs:22:17 | LL | fn Y() {} @@ -74,7 +74,7 @@ LL | ::Y; | = note: similarly named trait `Eq` defined here -error[E0576]: cannot find associated type `N` in trait `Tr` +error[E0576]: cannot find associated type `N` --> $DIR/ufcs-partially-resolved.rs:30:24 | LL | type Y = u16; @@ -103,7 +103,7 @@ help: you might have meant to use `#![feature(trait_alias)]` instead of a `type` LL | trait A = u32; | -error[E0576]: cannot find associated type `N` in trait `Tr` +error[E0576]: cannot find associated type `N` --> $DIR/ufcs-partially-resolved.rs:33:17 | LL | type Y = u16; @@ -150,37 +150,37 @@ LL | ::Y::NN; | = note: similarly named trait `Eq` defined here -error[E0405]: cannot find trait `N` in trait `Tr` +error[E0405]: cannot find trait `N` --> $DIR/ufcs-partially-resolved.rs:41:23 | LL | let _: ::NN; - | ^ not found in `Tr` + | ^ not found in trait `Tr` -error[E0405]: cannot find trait `N` in enum `E` +error[E0405]: cannot find trait `N` --> $DIR/ufcs-partially-resolved.rs:42:22 | LL | let _: ::NN; - | ^ not found in `E` + | ^ not found in enum `E` -error[E0405]: cannot find trait `N` in `A` +error[E0405]: cannot find trait `N` --> $DIR/ufcs-partially-resolved.rs:43:22 | LL | let _: ::NN; | ^ not found in `A` -error[E0405]: cannot find trait `N` in trait `Tr` +error[E0405]: cannot find trait `N` --> $DIR/ufcs-partially-resolved.rs:44:16 | LL | ::NN; - | ^ not found in `Tr` + | ^ not found in trait `Tr` -error[E0405]: cannot find trait `N` in enum `E` +error[E0405]: cannot find trait `N` --> $DIR/ufcs-partially-resolved.rs:45:15 | LL | ::NN; - | ^ not found in `E` + | ^ not found in enum `E` -error[E0405]: cannot find trait `N` in `A` +error[E0405]: cannot find trait `N` --> $DIR/ufcs-partially-resolved.rs:46:15 | LL | ::NN; diff --git a/tests/ui/unboxed-closures/unboxed-closures-type-mismatch-closure-from-another-scope.stderr b/tests/ui/unboxed-closures/unboxed-closures-type-mismatch-closure-from-another-scope.stderr index 5f22c781345ff..7ed432240bc8a 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-type-mismatch-closure-from-another-scope.stderr +++ b/tests/ui/unboxed-closures/unboxed-closures-type-mismatch-closure-from-another-scope.stderr @@ -1,10 +1,10 @@ -error[E0425]: cannot find value `x` in this scope +error[E0425]: cannot find value `x` --> $DIR/unboxed-closures-type-mismatch-closure-from-another-scope.rs:2:21 | LL | let x = match **x { | ^ not found in this scope -error[E0425]: cannot find value `y` in this scope +error[E0425]: cannot find value `y` --> $DIR/unboxed-closures-type-mismatch-closure-from-another-scope.rs:9:26 | LL | closure(&mut p, &y); diff --git a/tests/ui/union/unresolved-field-isnt-copy.rs b/tests/ui/union/unresolved-field-isnt-copy.rs index 7a6d79b2faa88..957b4fe4ec799 100644 --- a/tests/ui/union/unresolved-field-isnt-copy.rs +++ b/tests/ui/union/unresolved-field-isnt-copy.rs @@ -2,7 +2,7 @@ pub union Foo { x: *const Missing, - //~^ ERROR cannot find type `Missing` in this scope + //~^ ERROR cannot find type `Missing` } fn main() {} diff --git a/tests/ui/union/unresolved-field-isnt-copy.stderr b/tests/ui/union/unresolved-field-isnt-copy.stderr index ee5d1e37b141c..26d207104be9f 100644 --- a/tests/ui/union/unresolved-field-isnt-copy.stderr +++ b/tests/ui/union/unresolved-field-isnt-copy.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/unresolved-field-isnt-copy.rs:4:15 | LL | x: *const Missing, diff --git a/tests/ui/unresolved/unresolved-candidates.rs b/tests/ui/unresolved/unresolved-candidates.rs index 38b227f609b26..7e614a9bc430e 100644 --- a/tests/ui/unresolved/unresolved-candidates.rs +++ b/tests/ui/unresolved/unresolved-candidates.rs @@ -7,7 +7,7 @@ mod b { } mod c { - impl Trait for () {} //~ ERROR cannot find trait `Trait` in this scope + impl Trait for () {} //~ ERROR cannot find trait `Trait` } fn main() {} diff --git a/tests/ui/unresolved/unresolved-candidates.stderr b/tests/ui/unresolved/unresolved-candidates.stderr index 7ef2f6b1a2922..03b13e7b92ade 100644 --- a/tests/ui/unresolved/unresolved-candidates.stderr +++ b/tests/ui/unresolved/unresolved-candidates.stderr @@ -9,7 +9,7 @@ help: consider importing this trait instead LL | use a::Trait; | ~~~~~~~~ -error[E0405]: cannot find trait `Trait` in this scope +error[E0405]: cannot find trait `Trait` --> $DIR/unresolved-candidates.rs:10:10 | LL | impl Trait for () {} diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs index 3f43fbfc0cf41..bd6422cb37a8d 100644 --- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs +++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs @@ -1,5 +1,5 @@ trait Trait { - //~^ ERROR cannot find value `bar` in this scope + //~^ ERROR cannot find value `bar` //~| ERROR cycle detected when computing type of `Trait::N` //~| ERROR the trait `Trait` cannot be made into an object //~| ERROR the trait `Trait` cannot be made into an object @@ -23,7 +23,7 @@ trait Trait { //~| WARN trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! bar - //~^ ERROR cannot find value `bar` in this scope + //~^ ERROR cannot find value `bar` } } diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr index f2456f99e6233..9f9984ad1c075 100644 --- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr +++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr @@ -7,7 +7,7 @@ LL | trait Trait { LL | fn fnc(&self) -> Trait { | ^ already used -error[E0425]: cannot find value `bar` in this scope +error[E0425]: cannot find value `bar` --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:30 | LL | trait Trait { @@ -19,7 +19,7 @@ error[E0423]: expected value, found builtin type `u32` LL | fn fnc(&self) -> Trait { | ^^^ not a value -error[E0425]: cannot find value `bar` in this scope +error[E0425]: cannot find value `bar` --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:25:9 | LL | bar diff --git a/tests/ui/wf/issue-110157.rs b/tests/ui/wf/issue-110157.rs index 1a3d13e93b0de..65136b79df7c7 100644 --- a/tests/ui/wf/issue-110157.rs +++ b/tests/ui/wf/issue-110157.rs @@ -4,9 +4,9 @@ impl<'tcx, F, I> Iterator for NeedsDropTypes<'tcx, F> //~^ ERROR not all trait items implemented where F: Fn(&Missing) -> Result, - //~^ ERROR cannot find type `Missing` in this scope + //~^ ERROR cannot find type `Missing` I: Iterator, - //~^ ERROR cannot find type `Missing` in this scope + //~^ ERROR cannot find type `Missing` {} fn main() {} diff --git a/tests/ui/wf/issue-110157.stderr b/tests/ui/wf/issue-110157.stderr index e750ea47d515c..0785a10306cc4 100644 --- a/tests/ui/wf/issue-110157.stderr +++ b/tests/ui/wf/issue-110157.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/issue-110157.rs:6:12 | LL | F: Fn(&Missing) -> Result, | ^^^^^^^ not found in this scope -error[E0412]: cannot find type `Missing` in this scope +error[E0412]: cannot find type `Missing` --> $DIR/issue-110157.rs:8:24 | LL | I: Iterator, diff --git a/tests/ui/where-clauses/ignore-err-clauses.rs b/tests/ui/where-clauses/ignore-err-clauses.rs index c76f0e1a8b2b5..83c4bc7fa7178 100644 --- a/tests/ui/where-clauses/ignore-err-clauses.rs +++ b/tests/ui/where-clauses/ignore-err-clauses.rs @@ -4,7 +4,7 @@ fn dbl(x: T) -> ::Output where T: Copy + Add, UUU: Copy, - //~^ ERROR cannot find type `UUU` in this scope + //~^ ERROR cannot find type `UUU` { x + x } diff --git a/tests/ui/where-clauses/ignore-err-clauses.stderr b/tests/ui/where-clauses/ignore-err-clauses.stderr index 4cf553da4c5fc..146915f991580 100644 --- a/tests/ui/where-clauses/ignore-err-clauses.stderr +++ b/tests/ui/where-clauses/ignore-err-clauses.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `UUU` in this scope +error[E0412]: cannot find type `UUU` --> $DIR/ignore-err-clauses.rs:6:5 | LL | UUU: Copy, diff --git a/tests/ui/where-clauses/normalization-of-unknown-type.stderr b/tests/ui/where-clauses/normalization-of-unknown-type.stderr index 11b83224352b8..69690e16f31b1 100644 --- a/tests/ui/where-clauses/normalization-of-unknown-type.stderr +++ b/tests/ui/where-clauses/normalization-of-unknown-type.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0412]: cannot find type `Foo` --> $DIR/normalization-of-unknown-type.rs:24:5 | LL | Foo: Filter,