From aa8010b29e3fc4356e15e85c71c305499aa1f947 Mon Sep 17 00:00:00 2001 From: xonx4l Date: Sat, 8 Nov 2025 00:11:35 +0530 Subject: [PATCH 1/4] EO412_replacement_with_EO425 --- .../src/error_codes/E0412.md | 65 +------------------ compiler/rustc_resolve/src/late.rs | 8 +-- .../rustc_resolve/src/late/diagnostics.rs | 2 +- .../clippy/tests/ui/crashes/ice-6252.stderr | 6 +- tests/rustdoc-ui/impl-fn-nesting.stderr | 10 +-- tests/ui/annotate-snippet/missing-type.stderr | 4 +- .../extern-fn-arg-names.stderr | 4 +- tests/ui/argument-suggestions/issue-109831.rs | 2 +- .../argument-suggestions/issue-109831.stderr | 4 +- tests/ui/asm/issue-113788.rs | 2 +- tests/ui/asm/issue-113788.stderr | 4 +- tests/ui/associated-consts/issue-93835.stderr | 4 +- .../return-type-notation/not-a-method.stderr | 6 +- .../associated-types-eq-1.stderr | 4 +- .../in-trait/return-not-existing-pair.rs | 2 +- .../in-trait/return-not-existing-pair.stderr | 4 +- ...eturn-not-existing-type-wrapping-rpitit.rs | 2 +- ...n-not-existing-type-wrapping-rpitit.stderr | 4 +- .../issue-72590-type-error-sized.stderr | 6 +- .../unconstrained-lifetimes.stderr | 4 +- .../ui/borrowck/bad-drop-side-effects.stderr | 4 +- tests/ui/c-variadic/issue-86053-1.stderr | 4 +- tests/ui/cast/casts-issue-46365.stderr | 4 +- .../ice-cast-type-with-error-124848.stderr | 4 +- tests/ui/closures/issue-78720.stderr | 4 +- tests/ui/closures/issue-90871.stderr | 4 +- .../cmse-nonsecure-call/generics.stderr | 4 +- tests/ui/coercion/type-errors.stderr | 8 +-- .../coherence/coherence-error-suppression.rs | 2 +- .../coherence-error-suppression.stderr | 4 +- .../illegal-copy-bad-projection.stderr | 4 +- ...ence-error-for-undefined-type-18058.stderr | 4 +- .../ui-testing-optout.stderr | 8 +-- ...const_arg_trivial_macro_expansion-2.stderr | 6 +- .../early/invalid-const-arguments.stderr | 8 +-- ...e-a-closure-or-coroutine-ice-113776.stderr | 4 +- ...es-of-no-entry-found-for-key-119275.stderr | 4 +- .../unevaluated-const-ice-119731.stderr | 8 +-- .../mgca/projection-error.stderr | 6 +- ...arent_generics_of_nested_in_default.stderr | 6 +- ...ion-error-with-const-generics-77919.stderr | 6 +- .../const-generics/type_not_in_scope.stderr | 4 +- tests/ui/const-generics/unknown_adt.stderr | 4 +- ...e-type-mismatch-when-copying-112824.stderr | 4 +- ...rroneous_type_in_const_return_value.stderr | 4 +- .../consts/erroneous_type_in_promoted.stderr | 4 +- tests/ui/consts/error-is-freeze.stderr | 4 +- .../ice-bad-input-type-for-cast-83056.stderr | 4 +- ...ssue-56028-there-is-an-enum-variant.stderr | 6 +- ...gg-stable-import-first-issue-140240.stderr | 4 +- tests/ui/dropck/drop-on-non-struct.stderr | 4 +- .../erroneous_signature.stderr | 6 +- .../ice-from-type-error-issue-148515.stderr | 8 +-- tests/ui/error-codes/E0412.rs | 2 +- tests/ui/error-codes/E0412.stderr | 6 +- ...extern-item-where-clauses-debug-ice.stderr | 8 +-- tests/ui/fn/trait-fn-generic-mismatch.stderr | 4 +- ...lp-with-err-generic-is-not-function.stderr | 6 +- .../equality-bound.stderr | 16 ++--- tests/ui/hygiene/arguments.stderr | 4 +- tests/ui/hygiene/generate-mod.stderr | 14 ++-- ...rpitits-are-created-before-freezing.stderr | 4 +- .../ui/impl-trait/in-trait/refine-err.stderr | 4 +- .../rpitit-shadowed-by-missing-adt.stderr | 4 +- tests/ui/impl-trait/issues/issue-54966.stderr | 4 +- .../opaque-used-in-extraneous-argument.stderr | 6 +- tests/ui/implied-bounds/references-err.stderr | 4 +- .../glob-conflict-cross-crate-2.stderr | 4 +- tests/ui/imports/glob-resolve1.stderr | 10 +-- ...port-alias-issue-121168.edition2015.stderr | 4 +- ...port-alias-issue-121168.edition2018.stderr | 4 +- ...port-alias-issue-121168.edition2021.stderr | 4 +- .../imports/inaccessible_type_aliases.stderr | 6 +- tests/ui/imports/issue-4366-2.stderr | 6 +- tests/ui/issues/issue-30589.stderr | 4 +- tests/ui/issues/issue-36836.stderr | 4 +- tests/ui/issues/issue-53300.rs | 2 +- tests/ui/issues/issue-53300.stderr | 4 +- ...annot-transmute-unnormalizable-type.stderr | 6 +- tests/ui/layout/issue-84108.stderr | 6 +- .../malformed-unsized-type-in-union.stderr | 6 +- .../layout/thaw-transmute-invalid-enum.stderr | 6 +- .../layout/transmute-to-tail-with-err.stderr | 6 +- ...elided-lifetime-in-const-param-type.stderr | 6 +- .../issue-83907-invalid-fn-like-path.stderr | 4 +- tests/ui/lint/issue-35075.stderr | 6 +- tests/ui/lint/recommend-literal.rs | 4 +- tests/ui/lint/recommend-literal.stderr | 20 +++--- tests/ui/lint/use_suggestion_json.stderr | 12 ++-- tests/ui/macros/macro-context.stderr | 6 +- tests/ui/match/issue-82866.stderr | 6 +- .../mir/gvn-nonsensical-coroutine-layout.rs | 2 +- .../gvn-nonsensical-coroutine-layout.stderr | 6 +- ...ue-83499-input-output-iteration-ice.stderr | 4 +- tests/ui/mir/meaningless-bound.stderr | 4 +- ...d-2021-closure-capture-ice-110453-1.stderr | 4 +- ...d-2021-closure-capture-ice-110453-2.stderr | 4 +- .../missing-type-parameter2.stderr | 14 ++-- tests/ui/offset-of/offset-of-enum.stderr | 6 +- tests/ui/offset-of/offset-of-self.stderr | 4 +- .../ty-variance-issue-124423.stderr | 4 +- tests/ui/parser/associated-path-shl.stderr | 12 ++-- ...-param-decl-on-type-instead-of-impl.stderr | 4 +- .../ui/parser/dyn-trait-compatibility.stderr | 14 ++-- .../ui/parser/fn-field-parse-error-ice.stderr | 4 +- .../recover-fn-ptr-with-generics.stderr | 6 +- tests/ui/parser/unmatched-langle-1.rs | 2 +- tests/ui/parser/unmatched-langle-1.stderr | 6 +- tests/ui/parser/where_with_bound.stderr | 4 +- .../issue-119493-type-error-ice.stderr | 8 +-- tests/ui/privacy/privacy-ns1.stderr | 6 +- .../ui/privacy/sysroot-private.default.stderr | 4 +- ...sroot-private.rustc_private_enabled.stderr | 4 +- .../attributes-on-modules-fail.stderr | 8 +-- tests/ui/proc-macro/empty-where-clause.stderr | 8 +-- tests/ui/proc-macro/generate-mod.stderr | 10 +-- tests/ui/proc-macro/issue-83510.stderr | 4 +- tests/ui/proc-macro/macro-rules-derive.stderr | 4 +- tests/ui/proc-macro/mixed-site-span.stderr | 6 +- .../ui/proc-macro/span-from-proc-macro.stderr | 6 +- tests/ui/recursion/recursive-reexports.stderr | 4 +- tests/ui/regions/outlives-with-missing.stderr | 4 +- .../dont-compute-arg-names-for-non-fn.stderr | 4 +- .../resolve/editions-crate-root-2015.stderr | 8 +-- .../resolve/editions-crate-root-2018.stderr | 8 +-- tests/ui/resolve/issue-21221-1.rs | 2 +- tests/ui/resolve/issue-21221-1.stderr | 4 +- tests/ui/resolve/issue-35675.stderr | 8 +-- .../issue-69401-trait-fn-no-body-ty-local.rs | 2 +- ...sue-69401-trait-fn-no-body-ty-local.stderr | 4 +- tests/ui/resolve/issue-85348.rs | 2 +- tests/ui/resolve/issue-85348.stderr | 4 +- tests/ui/resolve/issue-88472.rs | 4 +- tests/ui/resolve/issue-88472.stderr | 6 +- tests/ui/resolve/levenshtein.stderr | 14 ++-- .../missing-type-in-scope-58712.stderr | 6 +- tests/ui/resolve/privacy-enum-ctor.stderr | 10 +-- tests/ui/resolve/raw-ident-in-path.stderr | 4 +- .../resolve/resolve-assoc-suggestions.stderr | 10 +-- .../resolve/resolve-primitive-fallback.stderr | 4 +- ...e-with-name-similar-to-struct-field.stderr | 6 +- tests/ui/resolve/use_suggestion.stderr | 8 +-- .../resolve/use_suggestion_placement.stderr | 8 +-- tests/ui/self/elision/nested-item.stderr | 4 +- ...s-in-pattern-with-ty-err-doesnt-ice.stderr | 4 +- ...incompatible-closure-captures-96258.stderr | 6 +- .../issue-68830-spurious-diagnostics.stderr | 4 +- .../impl-on-nonexisting.stderr | 4 +- ...ce-struct-tail-normalization-113272.stderr | 4 +- .../assoc-type-in-method-return.stderr | 4 +- .../dont-suggest-foreign-doc-hidden.rs | 8 +-- .../dont-suggest-foreign-doc-hidden.stderr | 10 +-- .../no-extern-crate-in-type.stderr | 4 +- .../type-not-found-in-adt-field.stderr | 6 +- ...ice-unsized-struct-arg-issue-121612.stderr | 6 +- .../impl-bound-with-references-error.rs | 2 +- .../impl-bound-with-references-error.stderr | 4 +- ...icate-generic-parameter-error-86756.stderr | 4 +- .../error-reporting/apit-with-bad-path.stderr | 4 +- .../where-clause-with-bad-path.stderr | 4 +- tests/ui/traits/ignore-err-impls.stderr | 4 +- tests/ui/traits/issue-50480.stderr | 14 ++-- tests/ui/traits/issue-75627.stderr | 4 +- tests/ui/traits/issue-78372.stderr | 8 +-- .../dont-normalize-proj-with-error.stderr | 4 +- .../issue-118950-root-region.stderr | 4 +- .../binder-defaults-112547.stderr | 4 +- .../binder-defaults-118697.stderr | 4 +- .../traits/trait-selection-ice-84727.stderr | 10 +-- .../ui/transmutability/issue-101739-1.stderr | 4 +- .../unknown_dst.stderr | 4 +- .../unknown_dst_field.stderr | 6 +- .../unknown_src.stderr | 4 +- .../unknown_src_field.stderr | 6 +- .../ui/tuple/tuple-struct-fields/test.stderr | 4 +- .../ui/tuple/tuple-struct-fields/test2.stderr | 6 +- .../ui/tuple/tuple-struct-fields/test3.stderr | 6 +- .../define_opaques_attr/invalid_path.stderr | 4 +- .../nested-impl-trait-in-tait.stderr | 4 +- tests/ui/type/issue-7607-1.stderr | 4 +- tests/ui/type/type-path-err-node-types.stderr | 4 +- .../typeck/apit-with-error-type-in-sig.stderr | 4 +- .../autoderef-with-param-env-error.stderr | 4 +- ...mpl-for-nonexistent-type-error-8767.stderr | 4 +- tests/ui/typeck/issue-104510-ice.stderr | 4 +- tests/ui/typeck/issue-83693.rs | 6 +- tests/ui/typeck/issue-83693.stderr | 8 +-- tests/ui/typeck/issue-88844.rs | 2 +- tests/ui/typeck/issue-88844.stderr | 4 +- tests/ui/typeck/issue-90319.rs | 2 +- tests/ui/typeck/issue-90319.stderr | 4 +- tests/ui/typeck/issue-91267.rs | 2 +- tests/ui/typeck/issue-91267.stderr | 4 +- .../nonexistent-field-not-ambiguous.stderr | 4 +- ...ugg-swap-equality-in-macro-issue-139050.rs | 2 +- ...swap-equality-in-macro-issue-139050.stderr | 4 +- .../union/unresolved-field-isnt-copy.stderr | 4 +- ...type-resolve-error-two-structs-deep.stderr | 4 +- tests/ui/wf/issue-110157.stderr | 6 +- .../where-clauses/ignore-err-clauses.stderr | 4 +- .../normalization-of-unknown-type.stderr | 4 +- 201 files changed, 531 insertions(+), 590 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0412.md b/compiler/rustc_error_codes/src/error_codes/E0412.md index d9ebc852bbab7..41696ce9f3c85 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0412.md +++ b/compiler/rustc_error_codes/src/error_codes/E0412.md @@ -1,64 +1,5 @@ -A used type name is not in scope. +This error code is no longer emitted by the compiler. -Erroneous code examples: +Unresolved types are now reported under the unified error code E0425 ("cannot find ... in this scope"). -```compile_fail,E0412 -impl Something {} // error: type name `Something` is not in scope - -// or: - -trait Foo { - fn bar(N); // error: type name `N` is not in scope -} - -// or: - -fn foo(x: T) {} // type name `T` is not in scope -``` - -To fix this error, please verify you didn't misspell the type name, you did -declare it or imported it into the scope. Examples: - -``` -struct Something; - -impl Something {} // ok! - -// or: - -trait Foo { - type N; - - fn bar(_: Self::N); // ok! -} - -// or: - -fn foo(x: T) {} // ok! -``` - -Another case that causes this error is when a type is imported into a parent -module. To fix this, you can follow the suggestion and use File directly or -`use super::File;` which will import the types from the parent namespace. An -example that causes this error is below: - -```compile_fail,E0412 -use std::fs::File; - -mod foo { - fn some_function(f: File) {} -} -``` - -``` -use std::fs::File; - -mod foo { - // either - use super::File; - // or - // use std::fs::File; - fn foo(f: File) {} -} -# fn main() {} // don't insert it for us; that'll break imports -``` +See the explanation for E0425 for guidance on common causes and fixes. diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index f462ba06ce66d..36cfce1b98400 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -622,7 +622,7 @@ impl PathSource<'_, '_, '_> { (PathSource::Trait(_), true) => E0404, (PathSource::Trait(_), false) => E0405, (PathSource::Type | PathSource::DefineOpaques, true) => E0573, - (PathSource::Type | PathSource::DefineOpaques, false) => E0412, + (PathSource::Type | PathSource::DefineOpaques, false) => E0425, (PathSource::Struct(_), true) => E0574, (PathSource::Struct(_), false) => E0422, (PathSource::Expr(..), true) | (PathSource::Delegation, true) => E0423, @@ -3158,7 +3158,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { result } - /// When evaluating a `trait` use its associated types' idents for suggestions in E0412. + /// When evaluating a `trait` use its associated types' idents for suggestions in EO425. fn resolve_trait_items(&mut self, trait_items: &'ast [Box]) { let trait_assoc_items = replace(&mut self.diag_metadata.current_trait_assoc_items, Some(trait_items)); @@ -4342,7 +4342,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { // There are two different error messages user might receive at // this point: - // - E0412 cannot find type `{}` in this scope + // - E0425 cannot find `{}` in this scope // - E0433 failed to resolve: use of undeclared type or module `{}` // // The first one is emitted for paths in type-position, and the @@ -4350,7 +4350,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { // // Thus (since we're in expression-position at this point), not to // confuse the user, we want to keep the *message* from E0433 (so - // `parent_err`), but we want *hints* from E0412 (so `err`). + // `parent_err`), but we want *hints* from the unified E0425 (so `err`). // // And that's what happens below - we're just mixing both messages // into a single one. diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 1d00a6b81fabc..7be2c8a5d8419 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -1125,7 +1125,7 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { } } } - } else if err_code == E0412 { + // cannot find type in this scope if let Some(correct) = Self::likely_rust_type(path) { err.span_suggestion( span, diff --git a/src/tools/clippy/tests/ui/crashes/ice-6252.stderr b/src/tools/clippy/tests/ui/crashes/ice-6252.stderr index 201a897b23195..b6a2597a44d50 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[E0425]: cannot find type `PhantomData` in this scope --> 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[E0425]: cannot find type `VAL` in this scope --> tests/ui/crashes/ice-6252.rs:12:63 | LL | impl TypeVal for Multiply where N: TypeVal {} @@ -31,5 +31,5 @@ LL | impl TypeVal for Multiply where N: TypeVal {} error: aborting due to 3 previous errors -Some errors have detailed explanations: E0046, E0412. +Some errors have detailed explanations: E0046, E0425. For more information about an error, try `rustc --explain E0046`. diff --git a/tests/rustdoc-ui/impl-fn-nesting.stderr b/tests/rustdoc-ui/impl-fn-nesting.stderr index 75e6b4ed217dd..42d09258a90d1 100644 --- a/tests/rustdoc-ui/impl-fn-nesting.stderr +++ b/tests/rustdoc-ui/impl-fn-nesting.stderr @@ -10,7 +10,7 @@ error[E0405]: cannot find trait `UnknownBound` in this scope LL | pub fn f(a: UnknownType, b: B) { | ^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `UnknownType` in this scope +error[E0425]: cannot find type `UnknownType` in this scope --> $DIR/impl-fn-nesting.rs:11:30 | LL | pub fn f(a: UnknownType, b: B) { @@ -34,7 +34,7 @@ error[E0405]: cannot find trait `UnknownBound` in this scope LL | impl UnknownTrait for T {} | ^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `UnknownType` in this scope +error[E0425]: cannot find type `UnknownType` in this scope --> $DIR/impl-fn-nesting.rs:18:25 | LL | impl ValidTrait for UnknownType {} @@ -46,13 +46,13 @@ error[E0405]: cannot find trait `UnknownBound` in this scope LL | impl ValidTrait for ValidType where ValidTrait: UnknownBound {} | ^^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `UnknownType` in this scope +error[E0425]: cannot find type `UnknownType` in this scope --> $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[E0425]: cannot find type `UnknownType` in this scope --> $DIR/impl-fn-nesting.rs:44:37 | LL | pub fn doubly_nested(c: UnknownType) { @@ -60,5 +60,5 @@ LL | pub fn doubly_nested(c: UnknownType) { error: aborting due to 10 previous errors -Some errors have detailed explanations: E0405, E0412. +Some errors have detailed explanations: E0405, E0425. For more information about an error, try `rustc --explain E0405`. diff --git a/tests/ui/annotate-snippet/missing-type.stderr b/tests/ui/annotate-snippet/missing-type.stderr index 5cc9cc9529f40..988c27b9eab07 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[E0425]: cannot find type `Iter` in this scope --> $DIR/missing-type.rs:4:12 | LL | let x: Iter; @@ -18,4 +18,4 @@ LL + use std::collections::hash_map::Iter; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/argument-suggestions/extern-fn-arg-names.stderr b/tests/ui/argument-suggestions/extern-fn-arg-names.stderr index 28500908e7ea3..e4183e6d519ef 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[E0425]: cannot find type `err` in this scope --> $DIR/extern-fn-arg-names.rs:2:29 | LL | fn dstfn(src: i32, dst: err); @@ -22,5 +22,5 @@ LL | dstfn(1, /* dst */); error: aborting due to 2 previous errors -Some errors have detailed explanations: E0061, E0412. +Some errors have detailed explanations: E0061, E0425. For more information about an error, try `rustc --explain E0061`. diff --git a/tests/ui/argument-suggestions/issue-109831.rs b/tests/ui/argument-suggestions/issue-109831.rs index 2e8ae40f63059..2a5eadd964246 100644 --- a/tests/ui/argument-suggestions/issue-109831.rs +++ b/tests/ui/argument-suggestions/issue-109831.rs @@ -1,7 +1,7 @@ struct A; struct B; -fn f(b1: B, b2: B, a2: C) {} //~ ERROR E0412 +fn f(b1: B, b2: B, a2: C) {} //~ ERROR E0425 fn main() { f(A, A, B, C); //~ ERROR E0425 diff --git a/tests/ui/argument-suggestions/issue-109831.stderr b/tests/ui/argument-suggestions/issue-109831.stderr index 1a3a597175d83..f235355792538 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[E0425]: cannot find type `C` in this scope --> $DIR/issue-109831.rs:4:24 | LL | struct A; @@ -48,5 +48,5 @@ LL + f(/* B */, /* B */, B); error: aborting due to 3 previous errors -Some errors have detailed explanations: E0061, E0412, E0425. +Some errors have detailed explanations: E0061, E0425, E0425. For more information about an error, try `rustc --explain E0061`. diff --git a/tests/ui/asm/issue-113788.rs b/tests/ui/asm/issue-113788.rs index 3b11e253eda27..2c01639824c40 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` in this scope [E0425] 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..ab175e9ee29bb 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[E0425]: cannot find type `PEB` in this scope --> $DIR/issue-113788.rs:5:21 | LL | let peb: *const PEB; @@ -6,4 +6,4 @@ LL | let peb: *const PEB; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/associated-consts/issue-93835.stderr b/tests/ui/associated-consts/issue-93835.stderr index 551b50d0eb6b5..d29a891fb1b17 100644 --- a/tests/ui/associated-consts/issue-93835.stderr +++ b/tests/ui/associated-consts/issue-93835.stderr @@ -4,7 +4,7 @@ error[E0425]: cannot find value `p` in this scope LL | type_ascribe!(p, a>); | ^ not found in this scope -error[E0412]: cannot find type `a` in this scope +error[E0425]: cannot find type `a` in this scope --> $DIR/issue-93835.rs:4:22 | LL | type_ascribe!(p, a>); @@ -39,5 +39,5 @@ LL | type_ascribe!(p, a>); error: aborting due to 5 previous errors -Some errors have detailed explanations: E0405, E0412, E0425, E0658. +Some errors have detailed explanations: E0405, E0425, E0425, E0658. For more information about an error, try `rustc --explain E0405`. diff --git a/tests/ui/associated-type-bounds/return-type-notation/not-a-method.stderr b/tests/ui/associated-type-bounds/return-type-notation/not-a-method.stderr index ab987ee48e6c8..bf5b432e74f1c 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/not-a-method.stderr +++ b/tests/ui/associated-type-bounds/return-type-notation/not-a-method.stderr @@ -16,7 +16,7 @@ error[E0576]: cannot find function `method` in this scope LL | method(..): Send, | ^^^^^^ not found in this scope -error[E0412]: cannot find type `method` in this scope +error[E0425]: cannot find type `method` in this scope --> $DIR/not-a-method.rs:36:5 | LL | method(): Send, @@ -36,5 +36,5 @@ LL | method(..): Send, error: aborting due to 6 previous errors -Some errors have detailed explanations: E0412, E0573, E0575, E0576. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0573, E0575, E0576. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/associated-types/associated-types-eq-1.stderr b/tests/ui/associated-types/associated-types-eq-1.stderr index 581ad25d88ac0..869583df644fd 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[E0425]: cannot find type `A` in this scope --> $DIR/associated-types-eq-1.rs:10:12 | LL | fn foo2(x: I) { @@ -18,4 +18,4 @@ LL | fn foo2(x: I) { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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..d4e6e64cfa027 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` in this scope [E0425] } 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..c92bce7888b30 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[E0425]: cannot find type `ConnImpl` in this scope --> $DIR/return-not-existing-pair.rs:5:48 | LL | async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T); @@ -26,5 +26,5 @@ LL | async fn foo(_: T) -> (&'a U, &'b T) {} error: aborting due to 3 previous errors -Some errors have detailed explanations: E0308, E0412, E0726. +Some errors have detailed explanations: E0308, E0425, E0726. For more information about an error, try `rustc --explain E0308`. 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..337a2c69525ac 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` in this scope [E0425] } 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..1c88d1c5250b5 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[E0425]: cannot find type `Missing` in this scope --> $DIR/return-not-existing-type-wrapping-rpitit.rs:7:25 | LL | fn bar() -> Wrapper>; @@ -6,4 +6,4 @@ LL | fn bar() -> Wrapper>; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 778423578e169..1d030278fd64e 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[E0425]: cannot find type `Nonexistent` in this scope --> $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[E0425]: cannot find type `Missing` in this scope --> $DIR/issue-72590-type-error-sized.rs:11:11 | LL | test: Missing @@ -30,5 +30,5 @@ LL | async fn frob(&self) {} error: aborting due to 3 previous errors -Some errors have detailed explanations: E0277, E0412. +Some errors have detailed explanations: E0277, E0425. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/async-await/unconstrained-lifetimes.stderr b/tests/ui/async-await/unconstrained-lifetimes.stderr index 18a46a3b55518..e979bdfa895e0 100644 --- a/tests/ui/async-await/unconstrained-lifetimes.stderr +++ b/tests/ui/async-await/unconstrained-lifetimes.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0425]: cannot find type `Missing` in this scope --> $DIR/unconstrained-lifetimes.rs:6:17 | LL | async fn foo(_: Missing<'_>) {} @@ -6,4 +6,4 @@ LL | async fn foo(_: Missing<'_>) {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/borrowck/bad-drop-side-effects.stderr b/tests/ui/borrowck/bad-drop-side-effects.stderr index 0a5998c7e4830..8ba74f26e44b7 100644 --- a/tests/ui/borrowck/bad-drop-side-effects.stderr +++ b/tests/ui/borrowck/bad-drop-side-effects.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0425]: cannot find type `Missing` in this scope --> $DIR/bad-drop-side-effects.rs:7:16 | LL | impl B for &Missing { @@ -6,4 +6,4 @@ LL | impl B for &Missing { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/c-variadic/issue-86053-1.stderr b/tests/ui/c-variadic/issue-86053-1.stderr index adbc04d3a65a4..91aa8062c15fb 100644 --- a/tests/ui/c-variadic/issue-86053-1.stderr +++ b/tests/ui/c-variadic/issue-86053-1.stderr @@ -54,7 +54,7 @@ LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize | = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list -error[E0412]: cannot find type `F` in this scope +error[E0425]: cannot find type `F` in this scope --> $DIR/issue-86053-1.rs:11:48 | LL | self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) { @@ -74,4 +74,4 @@ LL | fn ordering4 < 'a , 'b, F > ( a : , self , self , self , error: aborting due to 10 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/cast/casts-issue-46365.stderr b/tests/ui/cast/casts-issue-46365.stderr index 84bc73a9b7862..e1074b36784ef 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[E0425]: cannot find type `Ipsum` in this scope --> $DIR/casts-issue-46365.rs:2:12 | LL | ipsum: Ipsum @@ -6,4 +6,4 @@ LL | ipsum: Ipsum error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 316a484d97154..dff2277273248 100644 --- a/tests/ui/cast/ice-cast-type-with-error-124848.stderr +++ b/tests/ui/cast/ice-cast-type-with-error-124848.stderr @@ -31,7 +31,7 @@ help: consider introducing lifetime `'a` here LL | fn main<'a>() { | ++++ -error[E0412]: cannot find type `Pin` in this scope +error[E0425]: cannot find type `Pin` in this scope --> $DIR/ice-cast-type-with-error-124848.rs:7:60 | LL | struct MyType<'a>(Cell>>, Pin); @@ -66,5 +66,5 @@ LL | let bad_addr = &unpinned as *const Cell>> as error: aborting due to 6 previous errors -Some errors have detailed explanations: E0061, E0261, E0412, E0606. +Some errors have detailed explanations: E0061, E0261, E0425, E0606. For more information about an error, try `rustc --explain E0061`. diff --git a/tests/ui/closures/issue-78720.stderr b/tests/ui/closures/issue-78720.stderr index 987625d22c9d3..8c6eca05afcdd 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[E0425]: cannot find type `F` in this scope --> $DIR/issue-78720.rs:14:12 | LL | _func: F, @@ -55,5 +55,5 @@ LL | fn map2(&self, f: F) -> Map2 {} error: aborting due to 5 previous errors -Some errors have detailed explanations: E0277, E0282, E0308, E0412. +Some errors have detailed explanations: E0277, E0282, E0308, E0425. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/closures/issue-90871.stderr b/tests/ui/closures/issue-90871.stderr index 12020226680b2..071694def4135 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[E0425]: cannot find type `n` in this scope --> $DIR/issue-90871.rs:4:22 | LL | type_ascribe!(2, n([u8; || 1])) @@ -23,5 +23,5 @@ LL | type_ascribe!(2, n([u8; (|| 1)()])) error: aborting due to 2 previous errors -Some errors have detailed explanations: E0308, E0412. +Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr index 75da78b0b75a9..a3848182ef14b 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/generics.stderr @@ -4,7 +4,7 @@ error: function pointer types may not have generic parameters LL | f1: extern "cmse-nonsecure-call" fn(U, u32, u32, u32) -> u64, | ^^^^^^^^^ -error[E0412]: cannot find type `U` in this scope +error[E0425]: cannot find type `U` in this scope --> $DIR/generics.rs:14:50 | LL | struct Test { @@ -101,5 +101,5 @@ LL | type WithVarArgs = extern "cmse-nonsecure-call" fn(u32, ...); error: aborting due to 12 previous errors -Some errors have detailed explanations: E0045, E0412, E0562, E0798. +Some errors have detailed explanations: E0045, E0425, E0562, E0798. For more information about an error, try `rustc --explain E0045`. diff --git a/tests/ui/coercion/type-errors.stderr b/tests/ui/coercion/type-errors.stderr index 14deb785f75aa..3d2aab3bbd96f 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[E0425]: cannot find type `TypeError` in this scope --> $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[E0425]: cannot find type `TypeError` in this scope --> $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[E0425]: cannot find type `TypeError` in this scope --> $DIR/type-errors.rs:23:29 | LL | pub fn autoderef_target(_: &TypeError) {} @@ -18,4 +18,4 @@ LL | pub fn autoderef_target(_: &TypeError) {} error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/coherence/coherence-error-suppression.rs b/tests/ui/coherence/coherence-error-suppression.rs index 909214c1b6e37..cf66e91d7ba34 100644 --- a/tests/ui/coherence/coherence-error-suppression.rs +++ b/tests/ui/coherence/coherence-error-suppression.rs @@ -7,7 +7,7 @@ impl Foo for i16 {} impl Foo for i32 {} impl Foo for i64 {} impl Foo for DoesNotExist {} -//~^ ERROR E0412 +//~^ ERROR E0425 impl Foo for u8 {} impl Foo for u16 {} impl Foo for u32 {} diff --git a/tests/ui/coherence/coherence-error-suppression.stderr b/tests/ui/coherence/coherence-error-suppression.stderr index fcaa510c632a8..61d3e086dada3 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[E0425]: cannot find type `DoesNotExist` in this scope --> $DIR/coherence-error-suppression.rs:9:14 | LL | impl Foo for DoesNotExist {} @@ -6,4 +6,4 @@ LL | impl Foo for DoesNotExist {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/coherence/illegal-copy-bad-projection.stderr b/tests/ui/coherence/illegal-copy-bad-projection.stderr index 2a74cb5a9b8b1..e85ac6069155d 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[E0425]: cannot find type `void` in this scope --> $DIR/illegal-copy-bad-projection.rs:6:23 | LL | type Ptr = *const void; @@ -6,4 +6,4 @@ LL | type Ptr = *const void; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr index 07dce0b04fd53..4883b35196200 100644 --- a/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr +++ b/tests/ui/coherence/impl-coherence-error-for-undefined-type-18058.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Undefined` in this scope +error[E0425]: cannot find type `Undefined` in this scope --> $DIR/impl-coherence-error-for-undefined-type-18058.rs:2:6 | LL | impl Undefined {} @@ -6,4 +6,4 @@ LL | impl Undefined {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/compiletest-self-test/ui-testing-optout.stderr b/tests/ui/compiletest-self-test/ui-testing-optout.stderr index f1d03eab14a9d..b0d495edfb62a 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[E0425]: cannot find type `B` in this scope --> $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[E0425]: cannot find type `D` in this scope --> $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[E0425]: cannot find type `F` in this scope --> $DIR/ui-testing-optout.rs:92:10 | 4 | type A = B; @@ -24,4 +24,4 @@ error[E0412]: cannot find type `F` in this scope error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-2.stderr b/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-2.stderr index 58d42d82998bf..61fa96aa676d0 100644 --- a/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-2.stderr +++ b/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-2.stderr @@ -9,7 +9,7 @@ LL | | >; | |__| | -error[E0412]: cannot find type `A` in this scope +error[E0425]: cannot find type `A` in this scope --> $DIR/const_arg_trivial_macro_expansion-2.rs:12:10 | LL | const _: A< @@ -32,5 +32,5 @@ LL | const _: A< error: aborting due to 3 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/const-generics/early/invalid-const-arguments.stderr b/tests/ui/const-generics/early/invalid-const-arguments.stderr index 3a9868836ec88..a0a6d8cc8679b 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[E0425]: cannot find type `N` in this scope --> $DIR/invalid-const-arguments.rs:5:16 | LL | struct A; @@ -17,7 +17,7 @@ help: you might be missing a type parameter LL | impl Foo for A {} | +++ -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $DIR/invalid-const-arguments.rs:14:32 | LL | struct A; @@ -72,5 +72,5 @@ LL | impl Foo for C {} error: aborting due to 5 previous errors -Some errors have detailed explanations: E0412, E0747. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0747. +For more information about an error, try `rustc --explain E0425`. 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 c9c8115660f27..733a7f4f197d5 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[E0425]: cannot find type `F` in this scope --> $DIR/expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.rs:11:17 | LL | let f: F = async { 1 }; @@ -59,5 +59,5 @@ LL | ) -> impl Iterator { error: aborting due to 4 previous errors -Some errors have detailed explanations: E0277, E0412, E0782. +Some errors have detailed explanations: E0277, E0425, E0782. For more information about an error, try `rustc --explain E0277`. 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 6037e685e44d7..8e9b5b03d14ee 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 @@ -15,7 +15,7 @@ LL | fn bug(&self) LL | for [(); COT::BYTES]:, | ^ already used -error[E0412]: cannot find type `Nat` in this scope +error[E0425]: cannot find type `Nat` in this scope --> $DIR/ice-predicates-of-no-entry-found-for-key-119275.rs:6:17 | LL | fn bug(&self) @@ -51,5 +51,5 @@ LL | for [(); COT::BYTES]:, error: aborting due to 7 previous errors -Some errors have detailed explanations: E0403, E0412, E0433, E0658. +Some errors have detailed explanations: E0403, E0425, E0433, E0658. For more information about an error, try `rustc --explain E0403`. 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 453079e3c1575..98c4caa67bff7 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 @@ -13,7 +13,7 @@ error[E0425]: cannot find value `v8` in this scope LL | const v0: [[usize; v4]; v4] = v6(v8); | ^^ not found in this scope -error[E0412]: cannot find type `v18` in this scope +error[E0425]: cannot find type `v18` in this scope --> $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[E0425]: cannot find type `v18` in this scope --> $DIR/unevaluated-const-ice-119731.rs:35:31 | LL | pub type v11 = [[usize; v4]; v4]; @@ -129,5 +129,5 @@ LL | pub const fn v21() -> v18 { error: aborting due to 14 previous errors; 2 warnings emitted -Some errors have detailed explanations: E0412, E0422, E0425, E0432, E0592. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0422, E0425, E0432, E0592. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/const-generics/mgca/projection-error.stderr b/tests/ui/const-generics/mgca/projection-error.stderr index e6888351da13a..e3f43111cf805 100644 --- a/tests/ui/const-generics/mgca/projection-error.stderr +++ b/tests/ui/const-generics/mgca/projection-error.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $DIR/projection-error.rs:13:17 | LL | pub trait Tr { @@ -16,7 +16,7 @@ help: you might be missing a type parameter LL | fn mk_array(_x: T) -> [(); >::SIZE] {} | +++ -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $DIR/projection-error.rs:13:29 | LL | pub trait Tr { @@ -36,4 +36,4 @@ LL | fn mk_array(_x: T) -> [(); >::SIZE] {} error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr b/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr index 24e05482a1a99..2b35a1e289464 100644 --- a/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr +++ b/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Tr` in this scope +error[E0425]: cannot find type `Tr` in this scope --> $DIR/parent_generics_of_nested_in_default.rs:1:36 | LL | impl Tr {} @@ -20,5 +20,5 @@ LL | impl Tr {} error: aborting due to 3 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr index bac8abf46dce9..2aa79df096579 100644 --- a/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr +++ b/tests/ui/const-generics/trait-resolution-error-with-const-generics-77919.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `PhantomData` in this scope +error[E0425]: cannot find type `PhantomData` in this scope --> $DIR/trait-resolution-error-with-const-generics-77919.rs:10: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[E0425]: cannot find type `VAL` in this scope --> $DIR/trait-resolution-error-with-const-generics-77919.rs:12:63 | LL | impl TypeVal for Multiply where N: TypeVal {} @@ -31,5 +31,5 @@ LL | impl TypeVal for Multiply where N: TypeVal {} error: aborting due to 3 previous errors -Some errors have detailed explanations: E0046, E0412. +Some errors have detailed explanations: E0046, E0425. For more information about an error, try `rustc --explain E0046`. diff --git a/tests/ui/const-generics/type_not_in_scope.stderr b/tests/ui/const-generics/type_not_in_scope.stderr index 5f45550a62796..f676108d37d0d 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[E0425]: cannot find type `X` in this scope --> $DIR/type_not_in_scope.rs:1:6 | LL | impl X { @@ -20,5 +20,5 @@ LL | fn getn() -> [u8; N] {} error: aborting due to 3 previous errors -Some errors have detailed explanations: E0308, E0412, E0573. +Some errors have detailed explanations: E0308, E0425, E0573. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/const-generics/unknown_adt.stderr b/tests/ui/const-generics/unknown_adt.stderr index 2e8210772e94a..b905299daf622 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[E0425]: cannot find type `UnknownStruct` in this scope --> $DIR/unknown_adt.rs:2:12 | LL | let _: UnknownStruct<7>; @@ -6,4 +6,4 @@ LL | let _: UnknownStruct<7>; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 586c96011e438..3da0f17dcf80a 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 @@ -9,7 +9,7 @@ help: consider introducing lifetime `'a` here LL | pub struct Opcode2<'a>(&'a S); | ++++ -error[E0412]: cannot find type `S` in this scope +error[E0425]: cannot find type `S` in this scope --> $DIR/ice-type-mismatch-when-copying-112824.rs:5:24 | LL | pub struct Opcode2(&'a S); @@ -22,5 +22,5 @@ LL | pub struct Opcode2(&'a S); error: aborting due to 2 previous errors -Some errors have detailed explanations: E0261, E0412. +Some errors have detailed explanations: E0261, E0425. For more information about an error, try `rustc --explain E0261`. 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..9f743fa48efc7 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[E0425]: cannot find type `Sum` in this scope --> $DIR/erroneous_type_in_const_return_value.rs:6:22 | LL | UnusedByTheConst(Sum), @@ -11,4 +11,4 @@ LL + use std::iter::Sum; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/consts/erroneous_type_in_promoted.stderr b/tests/ui/consts/erroneous_type_in_promoted.stderr index 0601fc9ebe7fb..ce8d58482fc28 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[E0425]: cannot find type `Sum` in this scope --> $DIR/erroneous_type_in_promoted.rs:6:22 | LL | UnusedByTheConst(Sum), @@ -11,4 +11,4 @@ LL + use std::iter::Sum; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/consts/error-is-freeze.stderr b/tests/ui/consts/error-is-freeze.stderr index f3bfd1ea5e293..51f6b0efec331 100644 --- a/tests/ui/consts/error-is-freeze.stderr +++ b/tests/ui/consts/error-is-freeze.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `UndefinedType` in this scope +error[E0425]: cannot find type `UndefinedType` in this scope --> $DIR/error-is-freeze.rs:4:17 | LL | foo: Option, @@ -11,4 +11,4 @@ LL | struct MyStruct { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 4fc5972051c23..9eb19a0eaca76 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[E0425]: cannot find type `T` in this scope --> $DIR/ice-bad-input-type-for-cast-83056.rs:5:11 | LL | struct S([bool; f as usize]); @@ -18,4 +18,4 @@ LL | fn f() -> T {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 12965800a027f..cef68950fc066 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[E0425]: cannot find type `Set` in this scope --> $DIR/issue-56028-there-is-an-enum-variant.rs:9:15 | LL | fn setup() -> Set { Set } @@ -40,5 +40,5 @@ LL + use PutDown::Set; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/did_you_mean/sugg-stable-import-first-issue-140240.stderr b/tests/ui/did_you_mean/sugg-stable-import-first-issue-140240.stderr index 9e4314a0699d8..536ab120955e7 100644 --- a/tests/ui/did_you_mean/sugg-stable-import-first-issue-140240.stderr +++ b/tests/ui/did_you_mean/sugg-stable-import-first-issue-140240.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Range` in this scope +error[E0425]: cannot find type `Range` in this scope --> $DIR/sugg-stable-import-first-issue-140240.rs:2:14 | LL | const _: Range = 0..1; @@ -17,4 +17,4 @@ LL + use std::range::Range; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/dropck/drop-on-non-struct.stderr b/tests/ui/dropck/drop-on-non-struct.stderr index 9495642e45e4d..6a23c4c174aa4 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[E0425]: cannot find type `Nonexistent` in this scope --> $DIR/drop-on-non-struct.rs:9:15 | LL | impl Drop for Nonexistent { @@ -24,5 +24,5 @@ LL | impl<'a> Drop for &'a mut isize { error: aborting due to 3 previous errors -Some errors have detailed explanations: E0117, E0120, E0412. +Some errors have detailed explanations: E0117, E0120, E0425. For more information about an error, try `rustc --explain E0117`. diff --git a/tests/ui/dyn-compatibility/erroneous_signature.stderr b/tests/ui/dyn-compatibility/erroneous_signature.stderr index f3b14ffe34c3b..8077f224f064f 100644 --- a/tests/ui/dyn-compatibility/erroneous_signature.stderr +++ b/tests/ui/dyn-compatibility/erroneous_signature.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `MissingType` in this scope +error[E0425]: cannot find type `MissingType` in this scope --> $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[E0425]: cannot find type `MissingType` in this scope --> $DIR/erroneous_signature.rs:7:22 | LL | fn err(&self) -> MissingType { @@ -12,4 +12,4 @@ LL | fn err(&self) -> MissingType { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/enum-discriminant/ice-from-type-error-issue-148515.stderr b/tests/ui/enum-discriminant/ice-from-type-error-issue-148515.stderr index d9f40c7c0f738..37a972a6a8309 100644 --- a/tests/ui/enum-discriminant/ice-from-type-error-issue-148515.stderr +++ b/tests/ui/enum-discriminant/ice-from-type-error-issue-148515.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `Foo` in this scope +error[E0425]: cannot find type `Foo` in this scope --> $DIR/ice-from-type-error-issue-148515.rs:7:34 | LL | fn test1(x: impl Iterator) { | ^^^ not found in this scope -error[E0412]: cannot find type `Foo` in this scope +error[E0425]: cannot find type `Foo` in this scope --> $DIR/ice-from-type-error-issue-148515.rs:12:34 | LL | fn test2(_: impl Iterator) { @@ -20,5 +20,5 @@ LL | 0u8 == -3; error: aborting due to 3 previous errors -Some errors have detailed explanations: E0412, E0600. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0600. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/error-codes/E0412.rs b/tests/ui/error-codes/E0412.rs index 5f922a50a68ed..2c69c5e6b5cfc 100644 --- a/tests/ui/error-codes/E0412.rs +++ b/tests/ui/error-codes/E0412.rs @@ -1,4 +1,4 @@ -impl Something {} //~ ERROR E0412 +impl Something {} //~ ERROR E0425 fn main() { } diff --git a/tests/ui/error-codes/E0412.stderr b/tests/ui/error-codes/E0412.stderr index 7c1172642faff..374875e392dc8 100644 --- a/tests/ui/error-codes/E0412.stderr +++ b/tests/ui/error-codes/E0412.stderr @@ -1,9 +1,9 @@ -error[E0412]: cannot find type `Something` in this scope - --> $DIR/E0412.rs:1:6 +error[E0425]: cannot find type `Something` in this scope + --> $DIR/E0425.rs:1:6 | LL | impl Something {} | ^^^^^^^^^ not found in this scope error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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..b63cc29e56066 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[E0425]: cannot find type `T` in this scope --> $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[E0425]: cannot find type `T` in this scope --> $DIR/issue-112363-extern-item-where-clauses-debug-ice.rs:2:18 | LL | type Item = [T] where [T]: Sized; @@ -44,5 +44,5 @@ LL | type Item = [T] where [T]: Sized; error: aborting due to 5 previous errors -Some errors have detailed explanations: E0412, E0658. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0658. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/fn/trait-fn-generic-mismatch.stderr b/tests/ui/fn/trait-fn-generic-mismatch.stderr index 8384d74e225aa..470865ae3a685 100644 --- a/tests/ui/fn/trait-fn-generic-mismatch.stderr +++ b/tests/ui/fn/trait-fn-generic-mismatch.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `XXX` in this scope +error[E0425]: cannot find type `XXX` in this scope --> $DIR/trait-fn-generic-mismatch.rs:5:11 | LL | impl Core { @@ -28,5 +28,5 @@ LL + core.spawn(); error: aborting due to 2 previous errors -Some errors have detailed explanations: E0061, E0412. +Some errors have detailed explanations: E0061, E0425. For more information about an error, try `rustc --explain E0061`. 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..af425cc6ed823 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[E0425]: cannot find type `T` in this scope --> $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[E0425]: cannot find type `T` in this scope --> $DIR/fn-help-with-err-generic-is-not-function.rs:7:5 | LL | T: Copy, @@ -17,4 +17,4 @@ LL | T: Copy, error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/generic-associated-types/equality-bound.stderr b/tests/ui/generic-associated-types/equality-bound.stderr index a054c06caebde..03fafe3e21c1d 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[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $DIR/equality-bound.rs:75:51 | LL | struct K {} @@ -175,5 +175,5 @@ LL | fn sum3(i: J) -> i32 where I::Item = i32 { error: aborting due to 16 previous errors -Some errors have detailed explanations: E0412, E0433. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0433. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/hygiene/arguments.stderr b/tests/ui/hygiene/arguments.stderr index fe92daf643796..eff6ecd47a5bf 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[E0425]: cannot find type `S` in this scope --> $DIR/arguments.rs:14:8 | LL | struct S; @@ -9,4 +9,4 @@ LL | m!(S, S); error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/hygiene/generate-mod.stderr b/tests/ui/hygiene/generate-mod.stderr index 58b9c642dabe3..bfdb72c22cb9b 100644 --- a/tests/ui/hygiene/generate-mod.stderr +++ b/tests/ui/hygiene/generate-mod.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `FromOutside` in this scope +error[E0425]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:35:13 | LL | type A = $FromOutside; @@ -7,7 +7,7 @@ LL | type A = $FromOutside; LL | genmod!(FromOutside, Outer); | ^^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `Outer` in this scope +error[E0425]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:35:26 | LL | struct $Outer; @@ -16,7 +16,7 @@ LL | struct $Outer; LL | genmod!(FromOutside, Outer); | ^^^^^ not found in this scope -error[E0412]: cannot find type `FromOutside` in this scope +error[E0425]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:19:18 | LL | type A = FromOutside; @@ -27,7 +27,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[E0425]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:20:22 | LL | type Inner = Outer; @@ -38,7 +38,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[E0425]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:28:18 | LL | type A = FromOutside; @@ -49,7 +49,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[E0425]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:29:22 | LL | type Inner = Outer; @@ -62,4 +62,4 @@ LL | genmod_legacy!(); error: aborting due to 6 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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..7245760058770 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[E0425]: cannot find type `Missing` in this scope --> $DIR/ensure-rpitits-are-created-before-freezing.rs:8:19 | LL | impl Iterable for Missing { @@ -6,4 +6,4 @@ LL | impl Iterable for Missing { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/impl-trait/in-trait/refine-err.stderr b/tests/ui/impl-trait/in-trait/refine-err.stderr index 6b4ef74d50afc..d667b1209dd03 100644 --- a/tests/ui/impl-trait/in-trait/refine-err.stderr +++ b/tests/ui/impl-trait/in-trait/refine-err.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $DIR/refine-err.rs:4:38 | LL | fn prepare(self) -> impl Fn() -> T; @@ -6,4 +6,4 @@ LL | fn prepare(self) -> impl Fn() -> T; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 e7d38f2240642..dd0de45bbf53f 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[E0425]: cannot find type `Missing` in this scope --> $DIR/rpitit-shadowed-by-missing-adt.rs:6:35 | LL | fn w() -> impl Deref>; @@ -6,4 +6,4 @@ LL | fn w() -> impl Deref>; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/impl-trait/issues/issue-54966.stderr b/tests/ui/impl-trait/issues/issue-54966.stderr index 4024c5afa80b6..fe20bf42ffc19 100644 --- a/tests/ui/impl-trait/issues/issue-54966.stderr +++ b/tests/ui/impl-trait/issues/issue-54966.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Oper` in this scope +error[E0425]: cannot find type `Oper` in this scope --> $DIR/issue-54966.rs:3:27 | LL | fn generate_duration() -> Oper {} @@ -6,4 +6,4 @@ LL | fn generate_duration() -> Oper {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 73e7890f91fd1..ffa58f4faeeee 100644 --- a/tests/ui/impl-trait/opaque-used-in-extraneous-argument.stderr +++ b/tests/ui/impl-trait/opaque-used-in-extraneous-argument.stderr @@ -11,7 +11,7 @@ LL - fn frob() -> impl Fn + '_ {} LL + fn frob() -> impl Fn + 'static {} | -error[E0412]: cannot find type `P` in this scope +error[E0425]: cannot find type `P` in this scope --> $DIR/opaque-used-in-extraneous-argument.rs:5:22 | LL | fn frob() -> impl Fn + '_ {} @@ -22,7 +22,7 @@ help: you might be missing a type parameter LL | fn frob

() -> impl Fn + '_ {} | +++ -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $DIR/opaque-used-in-extraneous-argument.rs:5:34 | LL | fn frob() -> impl Fn + '_ {} @@ -90,5 +90,5 @@ LL + open_parent() error: aborting due to 7 previous errors -Some errors have detailed explanations: E0061, E0106, E0412, E0658. +Some errors have detailed explanations: E0061, E0106, E0425, E0658. For more information about an error, try `rustc --explain E0061`. diff --git a/tests/ui/implied-bounds/references-err.stderr b/tests/ui/implied-bounds/references-err.stderr index df83fce3bdef7..9ecda02b1d519 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[E0425]: cannot find type `DoesNotExist` in this scope --> $DIR/references-err.rs:14:18 | LL | type Assoc = DoesNotExist; @@ -6,4 +6,4 @@ LL | type Assoc = DoesNotExist; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/imports/glob-conflict-cross-crate-2.stderr b/tests/ui/imports/glob-conflict-cross-crate-2.stderr index aebb2d59d063a..41912ed63f429 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[E0425]: cannot find type `C` in this scope --> $DIR/glob-conflict-cross-crate-2.rs:8:13 | LL | let _a: C = 1; @@ -6,4 +6,4 @@ LL | let _a: C = 1; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/imports/glob-resolve1.stderr b/tests/ui/imports/glob-resolve1.stderr index 23b0db0fa465b..17224defc4120 100644 --- a/tests/ui/imports/glob-resolve1.stderr +++ b/tests/ui/imports/glob-resolve1.stderr @@ -68,7 +68,7 @@ help: consider importing this function LL + use other::import; | -error[E0412]: cannot find type `A` in this scope +error[E0425]: cannot find type `A` in this scope --> $DIR/glob-resolve1.rs:32:11 | LL | pub enum B { @@ -83,7 +83,7 @@ note: enum `bar::A` exists but is inaccessible LL | enum A { | ^^^^^^ not accessible -error[E0412]: cannot find type `C` in this scope +error[E0425]: cannot find type `C` in this scope --> $DIR/glob-resolve1.rs:33:11 | LL | pub enum B { @@ -98,7 +98,7 @@ note: struct `bar::C` exists but is inaccessible LL | struct C; | ^^^^^^^^^ not accessible -error[E0412]: cannot find type `D` in this scope +error[E0425]: cannot find type `D` in this scope --> $DIR/glob-resolve1.rs:34:11 | LL | pub enum B { @@ -115,5 +115,5 @@ LL | type D = isize; error: aborting due to 8 previous errors -Some errors have detailed explanations: E0412, E0423, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0423, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/imports/import-alias-issue-121168.edition2015.stderr b/tests/ui/imports/import-alias-issue-121168.edition2015.stderr index 47001fc1a5291..8dee8e5134448 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[E0425]: cannot find type `Foo` in this scope --> $DIR/import-alias-issue-121168.rs:11:12 | LL | let _: Foo = todo!(); @@ -11,4 +11,4 @@ LL + use nice_crate_name::Foo; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/imports/import-alias-issue-121168.edition2018.stderr b/tests/ui/imports/import-alias-issue-121168.edition2018.stderr index e14e700c33d81..00b30b4c618f0 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[E0425]: cannot find type `Foo` in this scope --> $DIR/import-alias-issue-121168.rs:11:12 | LL | let _: Foo = todo!(); @@ -13,4 +13,4 @@ LL + use import_alias_issue_121168_extern::Foo; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/imports/import-alias-issue-121168.edition2021.stderr b/tests/ui/imports/import-alias-issue-121168.edition2021.stderr index e14e700c33d81..00b30b4c618f0 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[E0425]: cannot find type `Foo` in this scope --> $DIR/import-alias-issue-121168.rs:11:12 | LL | let _: Foo = todo!(); @@ -13,4 +13,4 @@ LL + use import_alias_issue_121168_extern::Foo; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/imports/inaccessible_type_aliases.stderr b/tests/ui/imports/inaccessible_type_aliases.stderr index ef224246061d9..3f7f9432c93c7 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[E0425]: cannot find type `Foo` in this scope --> $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[E0425]: cannot find type `Bar` in this scope --> $DIR/inaccessible_type_aliases.rs:12:12 | LL | let y: Bar = 100; @@ -27,4 +27,4 @@ LL | type Bar = u64; error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/imports/issue-4366-2.stderr b/tests/ui/imports/issue-4366-2.stderr index b1c0092b05d11..a91edabbcc4dd 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[E0425]: cannot find type `Bar` in this scope --> $DIR/issue-4366-2.rs:15:21 | LL | fn sub() -> Bar { 1 } @@ -28,5 +28,5 @@ LL + use foo::foo; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0423. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0423. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/issues/issue-30589.stderr b/tests/ui/issues/issue-30589.stderr index 6f97a189cead9..43d80896edf8c 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[E0425]: cannot find type `DecoderError` in this scope --> $DIR/issue-30589.rs:3:23 | LL | impl fmt::Display for DecoderError { @@ -6,4 +6,4 @@ LL | impl fmt::Display for DecoderError { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/issues/issue-36836.stderr b/tests/ui/issues/issue-36836.stderr index e5c943c7c3d82..2d9a97df90520 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[E0425]: cannot find type `Bar` in this scope --> $DIR/issue-36836.rs:13:17 | LL | impl Foo for Bar {} @@ -6,4 +6,4 @@ LL | impl Foo for Bar {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/issues/issue-53300.rs b/tests/ui/issues/issue-53300.rs index 09f0fe9d93553..db7d61beef2df 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` in this scope [E0425] fn main() { let res = addition(); diff --git a/tests/ui/issues/issue-53300.stderr b/tests/ui/issues/issue-53300.stderr index 293465ecb8140..bff4e2628ad4a 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[E0425]: cannot find type `Wrapper` in this scope --> $DIR/issue-53300.rs:7:18 | LL | fn addition() -> Wrapper {} @@ -6,4 +6,4 @@ LL | fn addition() -> Wrapper {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr b/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr index dd5119318ff4b..b4225a813bd2e 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[E0425]: cannot find type `Missing` in this scope --> $DIR/cannot-transmute-unnormalizable-type.rs:7:5 | LL | Missing: Trait, @@ -15,5 +15,5 @@ LL | std::mem::transmute::, Option<&Other>>(None); error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0512. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0512. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/layout/issue-84108.stderr b/tests/ui/layout/issue-84108.stderr index 08acc3d3b2579..3d3bc003e21a0 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[E0425]: cannot find type `OsStr` in this scope --> $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[E0425]: cannot find type `Path` in this scope --> $DIR/issue-84108.rs:9:14 | LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42); @@ -40,5 +40,5 @@ LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42); error: aborting due to 4 previous errors -Some errors have detailed explanations: E0277, E0308, E0412. +Some errors have detailed explanations: E0277, E0308, E0425. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/layout/malformed-unsized-type-in-union.stderr b/tests/ui/layout/malformed-unsized-type-in-union.stderr index bdfabc0b15190..d819a2b368edb 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[E0425]: cannot find type `Missing` in this scope --> $DIR/malformed-unsized-type-in-union.rs:3:34 | LL | union W { s: dyn Iterator } @@ -18,5 +18,5 @@ LL | union W { s: std::mem::ManuallyDrop> } error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0740. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0740. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/layout/thaw-transmute-invalid-enum.stderr b/tests/ui/layout/thaw-transmute-invalid-enum.stderr index 2b89159c26336..f57f0a2ad6981 100644 --- a/tests/ui/layout/thaw-transmute-invalid-enum.stderr +++ b/tests/ui/layout/thaw-transmute-invalid-enum.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Subset` in this scope +error[E0425]: cannot find type `Subset` in this scope --> $DIR/thaw-transmute-invalid-enum.rs:35:41 | LL | assert::is_transmutable::(); @@ -75,5 +75,5 @@ LL | a: std::mem::ManuallyDrop, error: aborting due to 7 previous errors -Some errors have detailed explanations: E0412, E0517, E0658, E0740. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0517, E0658, E0740. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/layout/transmute-to-tail-with-err.stderr b/tests/ui/layout/transmute-to-tail-with-err.stderr index cff408127179f..484ab5aebd18f 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[E0425]: cannot find type `T` in this scope --> $DIR/transmute-to-tail-with-err.rs:3:26 | LL | struct Bar(Box>); @@ -20,5 +20,5 @@ LL | let x: Bar = unsafe { std::mem::transmute(()) }; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0512. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0512. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/lifetimes/elided-lifetime-in-const-param-type.stderr b/tests/ui/lifetimes/elided-lifetime-in-const-param-type.stderr index c7f3c0cc0cd6e..d8d867be507a0 100644 --- a/tests/ui/lifetimes/elided-lifetime-in-const-param-type.stderr +++ b/tests/ui/lifetimes/elided-lifetime-in-const-param-type.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `c` in this scope +error[E0425]: cannot find type `c` in this scope --> $DIR/elided-lifetime-in-const-param-type.rs:8:27 | LL | type A = dyn for D; @@ -16,5 +16,5 @@ LL | type A = dyn for D; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0658. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0658. +For more information about an error, try `rustc --explain E0425`. 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..a44c9c316984f 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[E0425]: cannot find type `One` in this scope --> $DIR/issue-83907-invalid-fn-like-path.rs:3:26 | LL | static STATIC_VAR_FIVE: &One(); @@ -14,4 +14,4 @@ LL | static STATIC_VAR_FIVE: &One(); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/lint/issue-35075.stderr b/tests/ui/lint/issue-35075.stderr index f02f9e678b469..06e0b12c46bf4 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[E0425]: cannot find type `Foo` in this scope --> $DIR/issue-35075.rs:2:12 | LL | inner: Foo @@ -10,7 +10,7 @@ LL - inner: Foo LL + inner: Baz | -error[E0412]: cannot find type `Foo` in this scope +error[E0425]: cannot find type `Foo` in this scope --> $DIR/issue-35075.rs:6:9 | LL | Foo(Foo) @@ -24,4 +24,4 @@ LL + Foo(Baz) error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/lint/recommend-literal.rs b/tests/ui/lint/recommend-literal.rs index 453cbf28569e9..45f9ae0a7bdfb 100644 --- a/tests/ui/lint/recommend-literal.rs +++ b/tests/ui/lint/recommend-literal.rs @@ -8,10 +8,10 @@ fn main() { //~^ ERROR cannot find type `long` in this scope //~| 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` in this scope [E0425] //~| 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` in this scope [E0425] //~| HELP a builtin type with a similar name exists //~| 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 263071ca9a754..6b6dd134e1d29 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[E0425]: cannot find type `double` in this scope --> $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[E0425]: cannot find type `long` in this scope --> $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[E0425]: cannot find type `Boolean` in this scope --> $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[E0425]: cannot find type `Bool` in this scope --> $DIR/recommend-literal.rs:13:13 | LL | let v2: Bool = true; @@ -42,7 +42,7 @@ LL - let v2: Bool = true; LL + let v2: bool = true; | -error[E0412]: cannot find type `boolean` in this scope +error[E0425]: cannot find type `boolean` in this scope --> $DIR/recommend-literal.rs:19:9 | LL | fn z(a: boolean) { @@ -51,7 +51,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[E0425]: cannot find type `byte` in this scope --> $DIR/recommend-literal.rs:24:11 | LL | fn a() -> byte { @@ -60,7 +60,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[E0425]: cannot find type `float` in this scope --> $DIR/recommend-literal.rs:31:12 | LL | width: float, @@ -69,7 +69,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[E0425]: cannot find type `int` in this scope --> $DIR/recommend-literal.rs:34:19 | LL | depth: Option, @@ -85,7 +85,7 @@ help: you might be missing a type parameter LL | struct Data { | +++++ -error[E0412]: cannot find type `short` in this scope +error[E0425]: cannot find type `short` in this scope --> $DIR/recommend-literal.rs:40:16 | LL | impl Stuff for short {} @@ -96,4 +96,4 @@ LL | impl Stuff for short {} error: aborting due to 9 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/lint/use_suggestion_json.stderr b/tests/ui/lint/use_suggestion_json.stderr index 4dc414b7a65db..5196e91110308 100644 --- a/tests/ui/lint/use_suggestion_json.stderr +++ b/tests/ui/lint/use_suggestion_json.stderr @@ -2,12 +2,12 @@ "$message_type": "diagnostic", "message": "cannot find type `Iter` in this scope", "code": { - "code": "E0412", + "code": "E0425", "explanation": "A used type name is not in scope. Erroneous code examples: -```compile_fail,E0412 +```compile_fail,E0425 impl Something {} // error: type name `Something` is not in scope // or: @@ -47,7 +47,7 @@ module. To fix this, you can follow the suggestion and use File directly or `use super::File;` which will import the types from the parent namespace. An example that causes this error is below: -```compile_fail,E0412 +```compile_fail,E0425 use std::fs::File; mod foo { @@ -403,7 +403,7 @@ mod foo { "rendered": null } ], - "rendered": "\u001b[1m\u001b[91merror[E0412]\u001b[0m\u001b[1m: cannot find type `Iter` in this scope\u001b[0m + "rendered": "\u001b[1m\u001b[91merror[E0425]\u001b[0m\u001b[1m: cannot find type `Iter` in this scope\u001b[0m \u001b[1m\u001b[94m--> \u001b[0m$DIR/use_suggestion_json.rs:12:12 \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94mLL\u001b[0m \u001b[1m\u001b[94m|\u001b[0m let x: Iter; @@ -436,11 +436,11 @@ mod foo { } { "$message_type": "diagnostic", - "message": "For more information about this error, try `rustc --explain E0412`.", + "message": "For more information about this error, try `rustc --explain E0425`.", "code": null, "level": "failure-note", "spans": [], "children": [], - "rendered": "\u001b[1mFor more information about this error, try `rustc --explain E0412`.\u001b[0m + "rendered": "\u001b[1mFor more information about this error, try `rustc --explain E0425`.\u001b[0m " } diff --git a/tests/ui/macros/macro-context.stderr b/tests/ui/macros/macro-context.stderr index 2efc0b136bc14..829ab3dde72cd 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[E0425]: cannot find type `i` in this scope --> $DIR/macro-context.rs:3:13 | LL | () => ( i ; typeof ); @@ -80,8 +80,8 @@ LL | let i = m!(); error: aborting due to 7 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. Future incompatibility report: Future breakage diagnostic: error: trailing semicolon in macro used in expression position --> $DIR/macro-context.rs:3:15 diff --git a/tests/ui/match/issue-82866.stderr b/tests/ui/match/issue-82866.stderr index f9e3360a525ff..da5c700a9655b 100644 --- a/tests/ui/match/issue-82866.stderr +++ b/tests/ui/match/issue-82866.stderr @@ -4,7 +4,7 @@ error[E0425]: cannot find value `x` in this scope LL | match x { | ^ not found in this scope -error[E0412]: cannot find type `v` in this scope +error[E0425]: cannot find type `v` in this scope --> $DIR/issue-82866.rs:4:16 | LL | Some::(v) => (), @@ -12,5 +12,5 @@ LL | Some::(v) => (), error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/mir/gvn-nonsensical-coroutine-layout.rs b/tests/ui/mir/gvn-nonsensical-coroutine-layout.rs index f0d174cd01b0a..1b387b3820e4a 100644 --- a/tests/ui/mir/gvn-nonsensical-coroutine-layout.rs +++ b/tests/ui/mir/gvn-nonsensical-coroutine-layout.rs @@ -4,7 +4,7 @@ pub enum Request { TestSome(T), - //~^ ERROR cannot find type `T` in this scope [E0412] + //~^ ERROR cannot find type `T` in this scope [E0425] } pub async fn handle_event(event: Request) { diff --git a/tests/ui/mir/gvn-nonsensical-coroutine-layout.stderr b/tests/ui/mir/gvn-nonsensical-coroutine-layout.stderr index abc7b16ca7415..c22c996160e5a 100644 --- a/tests/ui/mir/gvn-nonsensical-coroutine-layout.stderr +++ b/tests/ui/mir/gvn-nonsensical-coroutine-layout.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $DIR/gvn-nonsensical-coroutine-layout.rs:6:14 | LL | TestSome(T), @@ -22,5 +22,5 @@ LL + use std::error::Request; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0574. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0574. +For more information about an error, try `rustc --explain E0425`. 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 31a393e7367a3..82338639cd3fd 100644 --- a/tests/ui/mir/issue-83499-input-output-iteration-ice.stderr +++ b/tests/ui/mir/issue-83499-input-output-iteration-ice.stderr @@ -4,7 +4,7 @@ error: at least one trait must be specified LL | unsafe extern "C" fn foo(_: Bar, ...) -> impl {} | ^^^^ -error[E0412]: cannot find type `Bar` in this scope +error[E0425]: cannot find type `Bar` in this scope --> $DIR/issue-83499-input-output-iteration-ice.rs:7:29 | LL | unsafe extern "C" fn foo(_: Bar, ...) -> impl {} @@ -12,4 +12,4 @@ LL | unsafe extern "C" fn foo(_: Bar, ...) -> impl {} error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/mir/meaningless-bound.stderr b/tests/ui/mir/meaningless-bound.stderr index dc08def83b665..73f8f9dcbcdb6 100644 --- a/tests/ui/mir/meaningless-bound.stderr +++ b/tests/ui/mir/meaningless-bound.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `b` in this scope +error[E0425]: cannot find type `b` in this scope --> $DIR/meaningless-bound.rs:6:5 | LL | b: Sized, @@ -15,5 +15,5 @@ LL | Self: Sized, error: aborting due to 2 previous errors -Some errors have detailed explanations: E0411, E0412. +Some errors have detailed explanations: E0411, E0425. For more information about an error, try `rustc --explain E0411`. 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..8c8f1ad85d28a 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[E0425]: cannot find type `B` in this scope --> $DIR/mir-build-2021-closure-capture-ice-110453-1.rs:12:18 | LL | pub struct C(B); @@ -11,4 +11,4 @@ LL + use crate::B; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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..10505991de97b 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[E0425]: cannot find type `as_str` in this scope --> $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 { @@ -6,4 +6,4 @@ LL | pub fn dup(f: impl Fn(i32) -> i32) -> impl Fn(as_str) -> i32 { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/missing/missing-items/missing-type-parameter2.stderr b/tests/ui/missing/missing-items/missing-type-parameter2.stderr index 3c132e769eaef..c361ed79cc799 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[E0425]: cannot find type `N` in this scope --> $DIR/missing-type-parameter2.rs:3:8 | LL | struct X(); @@ -17,7 +17,7 @@ help: you might be missing a type parameter LL | impl X {} | +++ -error[E0412]: cannot find type `N` in this scope +error[E0425]: cannot find type `N` in this scope --> $DIR/missing-type-parameter2.rs:6:28 | LL | impl X {} @@ -35,7 +35,7 @@ help: you might be missing a type parameter LL | impl X {} | +++ -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $DIR/missing-type-parameter2.rs:11:20 | LL | struct X(); @@ -54,7 +54,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[E0425]: cannot find type `T` in this scope --> $DIR/missing-type-parameter2.rs:11:11 | LL | struct X(); @@ -73,7 +73,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[E0425]: cannot find type `A` in this scope --> $DIR/missing-type-parameter2.rs:15:24 | LL | struct X(); @@ -122,5 +122,5 @@ LL | impl X<{ N }> {} error: aborting due to 8 previous errors -Some errors have detailed explanations: E0412, E0747. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0747. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/offset-of/offset-of-enum.stderr b/tests/ui/offset-of/offset-of-enum.stderr index 7e7ad41f5b6a9..d1f206bd19a07 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[E0425]: cannot find type `Beta` in this scope --> $DIR/offset-of-enum.rs:17:16 | LL | offset_of!(Beta, One); @@ -43,5 +43,5 @@ LL | offset_of!(Alpha, NonExistent); error: aborting due to 6 previous errors -Some errors have detailed explanations: E0412, E0573, E0599, E0609, E0795. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0573, E0599, E0609, E0795. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/offset-of/offset-of-self.stderr b/tests/ui/offset-of/offset-of-self.stderr index 5bbb4ecf091a7..f1ee42270d553 100644 --- a/tests/ui/offset-of/offset-of-self.stderr +++ b/tests/ui/offset-of/offset-of-self.stderr @@ -4,7 +4,7 @@ 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[E0425]: cannot find type `S` in module `self` --> $DIR/offset-of-self.rs:32:26 | LL | offset_of!(self::S, v); @@ -59,5 +59,5 @@ LL | offset_of!(S, v.self); error: aborting due to 7 previous errors -Some errors have detailed explanations: E0411, E0412, E0609, E0616. +Some errors have detailed explanations: E0411, E0425, E0609, E0616. For more information about an error, try `rustc --explain E0411`. diff --git a/tests/ui/parallel-rustc/ty-variance-issue-124423.stderr b/tests/ui/parallel-rustc/ty-variance-issue-124423.stderr index 81ba66c42faa3..cb4d754539572 100644 --- a/tests/ui/parallel-rustc/ty-variance-issue-124423.stderr +++ b/tests/ui/parallel-rustc/ty-variance-issue-124423.stderr @@ -237,7 +237,7 @@ help: consider introducing lifetime `'a` here LL | fn elided4<'a>(_: &impl Copy + 'a) -> new { x(x) } | ++++ -error[E0412]: cannot find type `new` in this scope +error[E0425]: cannot find type `new` in this scope --> $DIR/ty-variance-issue-124423.rs:48:36 | LL | fn elided4(_: &impl Copy + 'a) -> new { x(x) } @@ -282,5 +282,5 @@ note: if you're trying to build a new `Box<_, _>` consider using one of the foll error: aborting due to 30 previous errors -Some errors have detailed explanations: E0121, E0224, E0261, E0412, E0599. +Some errors have detailed explanations: E0121, E0224, E0261, E0425, E0599. For more information about an error, try `rustc --explain E0121`. \ No newline at end of file diff --git a/tests/ui/parser/associated-path-shl.stderr b/tests/ui/parser/associated-path-shl.stderr index 71ee93f4835fb..42b7c6a73aef2 100644 --- a/tests/ui/parser/associated-path-shl.stderr +++ b/tests/ui/parser/associated-path-shl.stderr @@ -1,28 +1,28 @@ -error[E0412]: cannot find type `A` in this scope +error[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $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[E0425]: cannot find type `A` in this scope --> $DIR/associated-path-shl.rs:8:7 | LL | <::B>::C; @@ -30,4 +30,4 @@ LL | <::B>::C; error: aborting due to 5 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 855163e3d3bd3..db7c76dc1aa95 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 @@ -30,7 +30,7 @@ LL | path::path::Struct::() | = help: you might be missing a crate named `path` -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $DIR/const-param-decl-on-type-instead-of-impl.rs:8:15 | LL | fn banana(a: >::BAR) {} @@ -46,5 +46,5 @@ LL | let _: () = 42; error: aborting due to 6 previous errors -Some errors have detailed explanations: E0308, E0412, E0433. +Some errors have detailed explanations: E0308, E0425, E0433. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/parser/dyn-trait-compatibility.stderr b/tests/ui/parser/dyn-trait-compatibility.stderr index a57c033c1e13d..d15bf3c97f659 100644 --- a/tests/ui/parser/dyn-trait-compatibility.stderr +++ b/tests/ui/parser/dyn-trait-compatibility.stderr @@ -1,28 +1,28 @@ -error[E0412]: cannot find type `dyn` in this scope +error[E0425]: cannot find type `dyn` in this scope --> $DIR/dyn-trait-compatibility.rs:3:11 | LL | type A0 = dyn; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0425]: cannot find type `dyn` in this scope --> $DIR/dyn-trait-compatibility.rs:7:11 | LL | type A2 = dyn; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0425]: cannot find type `dyn` in this scope --> $DIR/dyn-trait-compatibility.rs:7:15 | LL | type A2 = dyn; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0425]: cannot find type `dyn` in this scope --> $DIR/dyn-trait-compatibility.rs:7:20 | LL | type A2 = dyn; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0425]: cannot find type `dyn` in this scope --> $DIR/dyn-trait-compatibility.rs:11:11 | LL | type A3 = dyn<::dyn>; @@ -34,7 +34,7 @@ error[E0405]: cannot find trait `dyn` in this scope LL | type A3 = dyn<::dyn>; | ^^^ not found in this scope -error[E0412]: cannot find type `dyn` in this scope +error[E0425]: cannot find type `dyn` in this scope --> $DIR/dyn-trait-compatibility.rs:11:16 | LL | type A3 = dyn<::dyn>; @@ -50,5 +50,5 @@ LL | type A1 = dyn::dyn; error: aborting due to 8 previous errors -Some errors have detailed explanations: E0405, E0412, E0433. +Some errors have detailed explanations: E0405, E0425, E0433. For more information about an error, try `rustc --explain E0405`. diff --git a/tests/ui/parser/fn-field-parse-error-ice.stderr b/tests/ui/parser/fn-field-parse-error-ice.stderr index 6f033e2b0c6ff..74ab1b004ccb6 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[E0425]: cannot find type `dyn` in this scope --> $DIR/fn-field-parse-error-ice.rs:5:13 | LL | inner : dyn fn () @@ -25,4 +25,4 @@ LL | inner : dyn fn () error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 9023856ef2486..b69e07cc3a1a4 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[E0425]: cannot find type `T` in this scope --> $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[E0425]: cannot find type `T` in this scope --> $DIR/recover-fn-ptr-with-generics.rs:5:33 | LL | type Identity = fn(T) -> T; @@ -108,4 +108,4 @@ LL | let _: extern "C" fn<'a: 'static>(); error: aborting due to 12 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/parser/unmatched-langle-1.rs b/tests/ui/parser/unmatched-langle-1.rs index fdf2ae398014b..51072c13ba5b9 100644 --- a/tests/ui/parser/unmatched-langle-1.rs +++ b/tests/ui/parser/unmatched-langle-1.rs @@ -5,5 +5,5 @@ 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 type `Ty` in this scope [E0425] } diff --git a/tests/ui/parser/unmatched-langle-1.stderr b/tests/ui/parser/unmatched-langle-1.stderr index 3411a05fb589a..993aef15a4ae2 100644 --- a/tests/ui/parser/unmatched-langle-1.stderr +++ b/tests/ui/parser/unmatched-langle-1.stderr @@ -10,7 +10,7 @@ LL - foo::<<<>(); LL + foo::>(); | -error[E0412]: cannot find type `Ty` in this scope +error[E0425]: cannot find type `Ty` in this scope --> $DIR/unmatched-langle-1.rs:5:14 | LL | foo::<<<>(); @@ -24,5 +24,5 @@ LL | foo::<<<>(); error: aborting due to 3 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/parser/where_with_bound.stderr b/tests/ui/parser/where_with_bound.stderr index ff98b3f5fed61..70d95b1d652ba 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[E0425]: cannot find type `Item` in the crate root --> $DIR/where_with_bound.rs:1:24 | LL | fn foo() where ::Item: ToString, T: Iterator { } @@ -12,4 +12,4 @@ LL | fn foo() where ::Item: ToString, T: Iterator { } error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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..06e13aa2ea01d 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[E0425]: cannot find type `NonExistent` in this scope --> $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[E0425]: cannot find type `NonExistent` in this scope --> $DIR/issue-119493-type-error-ice.rs:5:16 | LL | struct Foo(NonExistent); @@ -27,5 +27,5 @@ LL | type U = impl Copy; error: aborting due to 3 previous errors -Some errors have detailed explanations: E0412, E0658. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0658. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/privacy/privacy-ns1.stderr b/tests/ui/privacy/privacy-ns1.stderr index c782c67e71c6e..d627dead7a685 100644 --- a/tests/ui/privacy/privacy-ns1.stderr +++ b/tests/ui/privacy/privacy-ns1.stderr @@ -52,7 +52,7 @@ help: consider importing this function LL + use foo2::Bar; | -error[E0412]: cannot find type `Bar` in this scope +error[E0425]: cannot find type `Bar` in this scope --> $DIR/privacy-ns1.rs:52:17 | LL | pub struct Baz; @@ -90,5 +90,5 @@ LL | let _x: Box; error: aborting due to 4 previous errors -Some errors have detailed explanations: E0412, E0423, E0425, E0747. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0423, E0425, E0747. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/privacy/sysroot-private.default.stderr b/tests/ui/privacy/sysroot-private.default.stderr index 692b1bbd4db35..d9a872c205219 100644 --- a/tests/ui/privacy/sysroot-private.default.stderr +++ b/tests/ui/privacy/sysroot-private.default.stderr @@ -4,7 +4,7 @@ error[E0405]: cannot find trait `Equivalent` in this scope LL | trait Trait2: Equivalent {} | ^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `K` in this scope +error[E0425]: cannot find type `K` in this scope --> $DIR/sysroot-private.rs:32:35 | LL | fn trait_member(val: &T, key: &K) -> bool { @@ -36,5 +36,5 @@ LL | memchr2(b'a', b'b', buf) error: aborting due to 4 previous errors -Some errors have detailed explanations: E0220, E0405, E0412, E0425. +Some errors have detailed explanations: E0220, E0405, E0425, E0425. For more information about an error, try `rustc --explain E0220`. diff --git a/tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr b/tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr index dc2d890a082cf..1336b206d2670 100644 --- a/tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr +++ b/tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr @@ -4,7 +4,7 @@ error[E0405]: cannot find trait `Equivalent` in this scope LL | trait Trait2: Equivalent {} | ^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `K` in this scope +error[E0425]: cannot find type `K` in this scope --> $DIR/sysroot-private.rs:32:35 | LL | fn trait_member(val: &T, key: &K) -> bool { @@ -36,5 +36,5 @@ LL | memchr2(b'a', b'b', buf) error: aborting due to 4 previous errors -Some errors have detailed explanations: E0220, E0405, E0412, E0425. +Some errors have detailed explanations: E0220, E0405, E0425, E0425. For more information about an error, try `rustc --explain E0220`. diff --git a/tests/ui/proc-macro/attributes-on-modules-fail.stderr b/tests/ui/proc-macro/attributes-on-modules-fail.stderr index 26b20a3ee6cb8..156ad6770b718 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[E0425]: cannot find type `Y` in this scope --> $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[E0425]: cannot find type `X` in this scope --> $DIR/attributes-on-modules-fail.rs:14:10 | LL | type A = X; @@ -70,5 +70,5 @@ LL + use m::X; error: aborting due to 7 previous errors -Some errors have detailed explanations: E0412, E0658, E0774. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0658, E0774. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/proc-macro/empty-where-clause.stderr b/tests/ui/proc-macro/empty-where-clause.stderr index 192a2b30f0dcd..5588ed5f36e21 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[E0425]: cannot find type `MissingType1` in this scope --> $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[E0425]: cannot find type `MissingType2` in this scope --> $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[E0425]: cannot find type `MissingType3` in this scope --> $DIR/empty-where-clause.rs:15:13 | LL | Variant(MissingType3) @@ -18,4 +18,4 @@ LL | Variant(MissingType3) error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/proc-macro/generate-mod.stderr b/tests/ui/proc-macro/generate-mod.stderr index 03cf8c35188ac..821a91aa19617 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[E0425]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:10: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[E0425]: cannot find type `Outer` in this scope --> $DIR/generate-mod.rs:10: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[E0425]: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:13: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[E0425]: cannot find type `OuterAttr` in this scope --> $DIR/generate-mod.rs:13:1 | LL | #[generate_mod::check_attr] @@ -81,7 +81,7 @@ LL | #[derive(generate_mod::CheckDerive)] error: aborting due to 8 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. Future incompatibility report: Future breakage diagnostic: error: cannot find type `FromOutside` in this scope --> $DIR/generate-mod.rs:17:10 diff --git a/tests/ui/proc-macro/issue-83510.stderr b/tests/ui/proc-macro/issue-83510.stderr index a7c3f5a1d5b67..f03e01f39c427 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[E0425]: cannot find type `Foo` in this scope --> $DIR/issue-83510.rs:6:1 | LL | issue_83510::dance_like_you_want_to_ice!(); @@ -35,5 +35,5 @@ LL | issue_83510::dance_like_you_want_to_ice!(); error: aborting due to 4 previous errors -Some errors have detailed explanations: E0404, E0405, E0412, E0658. +Some errors have detailed explanations: E0404, E0405, E0425, E0658. For more information about an error, try `rustc --explain E0404`. diff --git a/tests/ui/proc-macro/macro-rules-derive.stderr b/tests/ui/proc-macro/macro-rules-derive.stderr index e7cd4474618fe..05ad9e559ad1c 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[E0425]: cannot find type `MissingType` in this scope --> $DIR/macro-rules-derive.rs:10:20 | LL | field: MissingType @@ -11,4 +11,4 @@ LL | produce_it!(MyName); error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/proc-macro/mixed-site-span.stderr b/tests/ui/proc-macro/mixed-site-span.stderr index 2d2d55fe148d5..904994f3abe58 100644 --- a/tests/ui/proc-macro/mixed-site-span.stderr +++ b/tests/ui/proc-macro/mixed-site-span.stderr @@ -576,7 +576,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[E0412]: cannot find type `ItemUse` in crate `$crate` +error[E0425]: cannot find type `ItemUse` in crate `$crate` --> $DIR/mixed-site-span.rs:22:9 | LL | proc_macro_rules!(); @@ -604,5 +604,5 @@ LL | local_def; error: aborting due to 52 previous errors -Some errors have detailed explanations: E0412, E0425, E0426, E0432. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425, E0426, E0432. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/proc-macro/span-from-proc-macro.stderr b/tests/ui/proc-macro/span-from-proc-macro.stderr index 945a5620fac48..8201b45c225a7 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[E0425]: cannot find type `MissingType` in this scope --> $DIR/auxiliary/span-from-proc-macro.rs:33: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 attribute macro expansion -error[E0412]: cannot find type `OtherMissingType` in this scope +error[E0425]: cannot find type `OtherMissingType` in this scope --> $DIR/auxiliary/span-from-proc-macro.rs:42:21 | LL | pub fn error_from_derive(_input: TokenStream) -> TokenStream { @@ -58,5 +58,5 @@ LL | error_from_bang!(); error: aborting due to 4 previous errors -Some errors have detailed explanations: E0308, E0412, E0425. +Some errors have detailed explanations: E0308, E0425, E0425. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/recursion/recursive-reexports.stderr b/tests/ui/recursion/recursive-reexports.stderr index 71653d26a18d7..04805d145fee1 100644 --- a/tests/ui/recursion/recursive-reexports.stderr +++ b/tests/ui/recursion/recursive-reexports.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `S` in crate `recursive_reexports` +error[E0425]: cannot find type `S` in crate `recursive_reexports` --> $DIR/recursive-reexports.rs:5:32 | LL | fn f() -> recursive_reexports::S {} @@ -6,4 +6,4 @@ LL | fn f() -> recursive_reexports::S {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/regions/outlives-with-missing.stderr b/tests/ui/regions/outlives-with-missing.stderr index 0e3aaaf5fdbd0..b8762e9cb8f3e 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[E0425]: cannot find type `T` in this scope --> $DIR/outlives-with-missing.rs:10:9 | LL | impl HandlerWrapper { @@ -9,4 +9,4 @@ LL | T: Send + Sync + 'static, error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/dont-compute-arg-names-for-non-fn.stderr b/tests/ui/resolve/dont-compute-arg-names-for-non-fn.stderr index a1a8bb575e14a..01a3293b73610 100644 --- a/tests/ui/resolve/dont-compute-arg-names-for-non-fn.stderr +++ b/tests/ui/resolve/dont-compute-arg-names-for-non-fn.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Bar` in this scope +error[E0425]: cannot find type `Bar` in this scope --> $DIR/dont-compute-arg-names-for-non-fn.rs:8:14 | LL | impl Foo for Bar {} @@ -11,4 +11,4 @@ LL | impl Foo for Self::Bar {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/editions-crate-root-2015.stderr b/tests/ui/resolve/editions-crate-root-2015.stderr index 3d203c8ed9676..989ee547a7c6c 100644 --- a/tests/ui/resolve/editions-crate-root-2015.stderr +++ b/tests/ui/resolve/editions-crate-root-2015.stderr @@ -20,13 +20,13 @@ help: you might be missing a crate named `nonexistant`, add it to your project a LL + extern crate nonexistant; | -error[E0412]: cannot find type `nonexistant` in the crate root +error[E0425]: cannot find type `nonexistant` in the crate root --> $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[E0425]: cannot find type `nonexistant` in the crate root --> $DIR/editions-crate-root-2015.rs:14:29 | LL | fn bare_crate(_: crate::nonexistant) { @@ -34,5 +34,5 @@ LL | fn bare_crate(_: crate::nonexistant) { error: aborting due to 4 previous errors -Some errors have detailed explanations: E0412, E0433. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0433. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/editions-crate-root-2018.stderr b/tests/ui/resolve/editions-crate-root-2018.stderr index 967a5a2fca155..1bcef33961994 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[E0425]: cannot find crate `nonexistant` in the list of imported crates --> $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[E0425]: cannot find type `nonexistant` in the crate root --> $DIR/editions-crate-root-2018.rs:14:29 | LL | fn bare_crate(_: crate::nonexistant) { @@ -24,5 +24,5 @@ LL | fn bare_crate(_: crate::nonexistant) { error: aborting due to 4 previous errors -Some errors have detailed explanations: E0412, E0433. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0433. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/issue-21221-1.rs b/tests/ui/resolve/issue-21221-1.rs index b180624d2f491..4240081b61562 100644 --- a/tests/ui/resolve/issue-21221-1.rs +++ b/tests/ui/resolve/issue-21221-1.rs @@ -45,7 +45,7 @@ impl Mul for Foo { } // BEFORE, we got: -// error: use of undeclared type name `Mul` [E0412] +// error: use of undeclared type name `Mul` [E0425] // AFTER, we get: // error: type name `Mul` is not in scope. Maybe you meant: // help: ... diff --git a/tests/ui/resolve/issue-21221-1.stderr b/tests/ui/resolve/issue-21221-1.stderr index dafa41bf312f5..dc2b9772eb71b 100644 --- a/tests/ui/resolve/issue-21221-1.stderr +++ b/tests/ui/resolve/issue-21221-1.stderr @@ -13,7 +13,7 @@ LL + use mul1::Mul; LL + use mul2::Mul; | -error[E0412]: cannot find type `Mul` in this scope +error[E0425]: cannot find type `Mul` in this scope --> $DIR/issue-21221-1.rs:58:16 | LL | fn getMul() -> Mul { @@ -58,5 +58,5 @@ LL + use std::ops::Div; error: aborting due to 4 previous errors -Some errors have detailed explanations: E0405, E0412. +Some errors have detailed explanations: E0405, E0425. For more information about an error, try `rustc --explain E0405`. diff --git a/tests/ui/resolve/issue-35675.stderr b/tests/ui/resolve/issue-35675.stderr index 83d92ea7bf1ac..f95f4bd92c3e2 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[E0425]: cannot find type `Apple` in this scope --> $DIR/issue-35675.rs:7:29 | LL | fn should_return_fruit() -> Apple { @@ -50,7 +50,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[E0425]: cannot find type `Variant3` in this scope --> $DIR/issue-35675.rs:24:13 | LL | fn bar() -> Variant3 { @@ -73,5 +73,5 @@ LL | fn qux() -> Some { error: aborting due to 7 previous errors -Some errors have detailed explanations: E0412, E0425, E0573. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425, E0573. +For more information about an error, try `rustc --explain E0425`. 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..235eae9f517ab 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` in this scope [E0425] } 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..1db2a0a707b03 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[E0425]: cannot find type `b` in this scope --> $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); @@ -6,4 +6,4 @@ LL | fn fn_with_type_named_same_as_local_in_param(b: b); error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/issue-85348.rs b/tests/ui/resolve/issue-85348.rs index 3a33c19340841..d0704bcddef5b 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` in this scope [E0425] 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..bf44a570ab8c0 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[E0425]: cannot find type `ArrayWindowsExample` in this scope --> $DIR/issue-85348.rs:3:22 | LL | impl ArrayWindowsExample { @@ -26,5 +26,5 @@ LL | let mut N: /* Type */; error: aborting due to 3 previous errors -Some errors have detailed explanations: E0282, E0412, E0530. +Some errors have detailed explanations: E0282, E0425, E0530. For more information about an error, try `rustc --explain E0282`. diff --git a/tests/ui/resolve/issue-88472.rs b/tests/ui/resolve/issue-88472.rs index 6bf7caeddbfcd..c6cc745c7e122 100644 --- a/tests/ui/resolve/issue-88472.rs +++ b/tests/ui/resolve/issue-88472.rs @@ -14,7 +14,7 @@ mod b { use crate::a::*; //~^ WARNING: unused import type Bar = Foo; - //~^ ERROR: cannot find type `Foo` in this scope [E0412] + //~^ ERROR: cannot find type `Foo` in this scope [E0425] //~| NOTE: not found in this scope } @@ -31,7 +31,7 @@ mod c { mod e { type Baz = Eee; - //~^ ERROR: cannot find type `Eee` in this scope [E0412] + //~^ ERROR: cannot find type `Eee` in this scope [E0425] //~| NOTE: not found in this scope } diff --git a/tests/ui/resolve/issue-88472.stderr b/tests/ui/resolve/issue-88472.stderr index 8431fc97766f7..375e6fbe24a15 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[E0425]: cannot find type `Foo` in this scope --> $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[E0425]: cannot find type `Eee` in this scope --> $DIR/issue-88472.rs:33:16 | LL | type Baz = Eee; @@ -39,4 +39,4 @@ LL | #![warn(unused_imports)] error: aborting due to 2 previous errors; 1 warning emitted -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/levenshtein.stderr b/tests/ui/resolve/levenshtein.stderr index 7fc5710c35ecc..db2a74a9708ba 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[E0425]: cannot find type `esize` in this scope --> $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[E0425]: cannot find type `Baz` in this scope --> $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[E0425]: cannot find type `Opiton` in this scope --> $DIR/levenshtein.rs:12:10 | LL | type B = Opiton; // Misspelled type name from the prelude. @@ -23,7 +23,7 @@ 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[E0425]: cannot find type `Baz` in this scope --> $DIR/levenshtein.rs:16:14 | LL | type A = Baz; // No suggestion here, Bar is not visible @@ -38,7 +38,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[E0425]: cannot find type `first` in module `m` --> $DIR/levenshtein.rs:28:15 | LL | pub struct First; @@ -67,5 +67,5 @@ LL | foobar(); // Misspelled function name. error: aborting due to 8 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/missing-type-in-scope-58712.stderr b/tests/ui/resolve/missing-type-in-scope-58712.stderr index d7e06eee856c9..bd40781230688 100644 --- a/tests/ui/resolve/missing-type-in-scope-58712.stderr +++ b/tests/ui/resolve/missing-type-in-scope-58712.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `DeviceId` in this scope +error[E0425]: cannot find type `DeviceId` in this scope --> $DIR/missing-type-in-scope-58712.rs:7: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[E0425]: cannot find type `DeviceId` in this scope --> $DIR/missing-type-in-scope-58712.rs:9:29 | LL | pub fn device(&self) -> DeviceId { @@ -17,4 +17,4 @@ LL | pub fn device(&self) -> DeviceId { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/privacy-enum-ctor.stderr b/tests/ui/resolve/privacy-enum-ctor.stderr index 4ec1b6b97bd32..0855a5a543bc1 100644 --- a/tests/ui/resolve/privacy-enum-ctor.stderr +++ b/tests/ui/resolve/privacy-enum-ctor.stderr @@ -142,7 +142,7 @@ LL + use std::f32::consts::E; LL + use std::f64::consts::E; | -error[E0412]: cannot find type `Z` in this scope +error[E0425]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:57:12 | LL | pub enum E { @@ -185,7 +185,7 @@ LL - let _: Z = m::n::Z; LL + let _: Z = (m::Z::Fn(/* fields */)); | -error[E0412]: cannot find type `Z` in this scope +error[E0425]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:61:12 | LL | pub enum E { @@ -200,7 +200,7 @@ note: enum `m::Z` exists but is inaccessible LL | pub(in crate::m) enum Z { | ^^^^^^^^^^^^^^^^^^^^^^^ not accessible -error[E0412]: cannot find type `Z` in this scope +error[E0425]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:64:12 | LL | pub enum E { @@ -215,7 +215,7 @@ note: enum `m::Z` exists but is inaccessible LL | pub(in crate::m) enum Z { | ^^^^^^^^^^^^^^^^^^^^^^^ not accessible -error[E0412]: cannot find type `Z` in this scope +error[E0425]: cannot find type `Z` in this scope --> $DIR/privacy-enum-ctor.rs:68:12 | LL | pub enum E { @@ -433,5 +433,5 @@ LL | let _: Z = m::n::Z::Struct { s: /* value */ }; error: aborting due to 23 previous errors -Some errors have detailed explanations: E0308, E0412, E0423, E0533, E0603, E0618. +Some errors have detailed explanations: E0308, E0425, E0423, E0533, E0603, E0618. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/resolve/raw-ident-in-path.stderr b/tests/ui/resolve/raw-ident-in-path.stderr index 7d2aa69113638..e88465ab89523 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[E0425]: cannot find type `r#break` in the crate root --> $DIR/raw-ident-in-path.rs:3:17 | LL | type A = crate::r#break; @@ -6,4 +6,4 @@ LL | type A = crate::r#break; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/resolve-assoc-suggestions.stderr b/tests/ui/resolve/resolve-assoc-suggestions.stderr index 3d9d4ffaa10c8..cbf2522315d56 100644 --- a/tests/ui/resolve/resolve-assoc-suggestions.stderr +++ b/tests/ui/resolve/resolve-assoc-suggestions.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `field` in this scope +error[E0425]: cannot find type `field` in this scope --> $DIR/resolve-assoc-suggestions.rs:16:16 | LL | let _: 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[E0425]: cannot find type `Type` in this scope --> $DIR/resolve-assoc-suggestions.rs:23:16 | LL | let _: Type; @@ -44,7 +44,7 @@ error[E0425]: cannot find value `Type` in this scope LL | Type; | ^^^^ not found in this scope -error[E0412]: cannot find type `method` in this scope +error[E0425]: cannot find type `method` in this scope --> $DIR/resolve-assoc-suggestions.rs:30:16 | LL | let _: method; @@ -69,5 +69,5 @@ LL | self.method; error: aborting due to 9 previous errors -Some errors have detailed explanations: E0412, E0425, E0531. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425, E0531. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/resolve-primitive-fallback.stderr b/tests/ui/resolve/resolve-primitive-fallback.stderr index d0583966459be..99686f95f182d 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[E0425]: cannot find type `u8` in the crate root --> $DIR/resolve-primitive-fallback.rs:8:14 | LL | let _: ::u8; @@ -36,5 +36,5 @@ LL + std::mem::size_of(); error: aborting due to 3 previous errors -Some errors have detailed explanations: E0061, E0412, E0423. +Some errors have detailed explanations: E0061, E0425, E0423. For more information about an error, try `rustc --explain E0061`. 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 1ecbfee17bc70..2fb4d8eb83d96 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 @@ -61,7 +61,7 @@ help: a constant with a similar name exists LL | BARR; | + -error[E0412]: cannot find type `Baz` in this scope +error[E0425]: cannot find type `Baz` in this scope --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:37:18 | LL | let foo: Baz = "".to_string(); @@ -101,5 +101,5 @@ LL + ba(); error: aborting due to 7 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/use_suggestion.stderr b/tests/ui/resolve/use_suggestion.stderr index 1155f5caa1739..9981c97b2c17e 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[E0425]: cannot find type `HashMap` in this scope --> $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[E0425]: cannot find type `GooMap` in this scope --> $DIR/use_suggestion.rs:6:13 | LL | let y2: GooMap; @@ -34,5 +34,5 @@ LL | let x2 = GooMap::new(); error: aborting due to 4 previous errors -Some errors have detailed explanations: E0412, E0433. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0433. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/use_suggestion_placement.stderr b/tests/ui/resolve/use_suggestion_placement.stderr index 3611f9ae6b4ed..dcccc101ec3bd 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[E0425]: cannot find type `Path` in this scope --> $DIR/use_suggestion_placement.rs:18:16 | LL | type Bar = Path; @@ -20,7 +20,7 @@ help: consider importing this constant LL + use m::A; | -error[E0412]: cannot find type `HashMap` in this scope +error[E0425]: cannot find type `HashMap` in this scope --> $DIR/use_suggestion_placement.rs:28:23 | LL | type Dict = HashMap; @@ -33,5 +33,5 @@ LL + use std::collections::HashMap; error: aborting due to 3 previous errors -Some errors have detailed explanations: E0412, E0425. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0425. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/self/elision/nested-item.stderr b/tests/ui/self/elision/nested-item.stderr index 7bad26fa13303..0e6e36a30f9ca 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[E0425]: cannot find type `Wrap` in this scope --> $DIR/nested-item.rs:5:15 | LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { @@ -43,5 +43,5 @@ LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { error: aborting due to 4 previous errors -Some errors have detailed explanations: E0106, E0412. +Some errors have detailed explanations: E0106, E0425. For more information about an error, try `rustc --explain E0106`. 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 eec2f5b42fda9..d253c7c065b9a 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 @@ -6,7 +6,7 @@ LL | let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes; | = note: arbitrary expressions are not allowed in patterns: -error[E0412]: cannot find type `T` in this scope +error[E0425]: cannot find type `T` in this scope --> $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; @@ -47,5 +47,5 @@ LL | let str::<{fn str() { let str::T>>::as_bytes: /* Type */; }}, T>::as_by error: aborting due to 5 previous errors -Some errors have detailed explanations: E0109, E0282, E0412, E0533. +Some errors have detailed explanations: E0109, E0282, E0425, E0533. For more information about an error, try `rustc --explain E0109`. 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 00b9a81b27d99..b2380f4ba2739 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 2024` 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[E0425]: cannot find type `Duration` in this scope --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs:12:19 | LL | interval: Duration, @@ -20,5 +20,5 @@ LL + use std::time::Duration; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0412, E0670. -For more information about an error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0425, E0670. +For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr b/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr index 0ecec03a023eb..f668fda119c2a 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[E0425]: cannot find type `MissingType` in this scope --> $DIR/issue-68830-spurious-diagnostics.rs:8:10 | LL | err: MissingType @@ -6,4 +6,4 @@ LL | err: MissingType error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr b/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr index 85b492c0503b2..a531d07d97c55 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[E0425]: cannot find type `NonExistent` in this scope --> $DIR/impl-on-nonexisting.rs:4:16 | LL | impl Trait for NonExistent {} @@ -6,4 +6,4 @@ LL | impl Trait for NonExistent {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/structs/ice-struct-tail-normalization-113272.stderr b/tests/ui/structs/ice-struct-tail-normalization-113272.stderr index 8c55dbca18719..9663f93c169b4 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[E0425]: cannot find type `Missing` in this scope --> $DIR/ice-struct-tail-normalization-113272.rs:5:25 | LL | impl Trait for () where Missing: Trait {} @@ -24,5 +24,5 @@ LL | std::mem::transmute::, Option<&Other>>(None); error: aborting due to 3 previous errors -Some errors have detailed explanations: E0046, E0412, E0512. +Some errors have detailed explanations: E0046, E0425, E0512. For more information about an error, try `rustc --explain E0046`. diff --git a/tests/ui/suggestions/assoc-type-in-method-return.stderr b/tests/ui/suggestions/assoc-type-in-method-return.stderr index f83da79097009..23a2fd5c504e4 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[E0425]: cannot find type `Bla` in this scope --> $DIR/assoc-type-in-method-return.rs:3:25 | LL | fn to_bla(&self) -> Bla; @@ -11,4 +11,4 @@ LL | fn to_bla(&self) -> Self::Bla; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs index a83e496f2703d..63b175c742343 100644 --- a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs +++ b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.rs @@ -8,16 +8,16 @@ mod local { } pub fn test(_: Foo) {} -//~^ ERROR [E0412] +//~^ ERROR [E0425] pub fn test2(_: Bar) {} -//~^ ERROR [E0412] +//~^ ERROR [E0425] pub fn test3(_: Baz) {} -//~^ ERROR [E0412] +//~^ ERROR [E0425] pub fn test4(_: Quux) {} -//~^ ERROR [E0412] +//~^ ERROR [E0425] fn test5() {} diff --git a/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr b/tests/ui/suggestions/dont-suggest-foreign-doc-hidden.stderr index e0444c93eeece..93d9ddfbfd69b 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[E0425]: cannot find type `Foo` in this scope --> $DIR/dont-suggest-foreign-doc-hidden.rs:10:16 | LL | pub fn test(_: Foo) {} @@ -9,13 +9,13 @@ help: consider importing this struct LL + use local::Foo; | -error[E0412]: cannot find type `Bar` in this scope +error[E0425]: cannot find type `Bar` in this scope --> $DIR/dont-suggest-foreign-doc-hidden.rs:13:17 | LL | pub fn test2(_: Bar) {} | ^^^ not found in this scope -error[E0412]: cannot find type `Baz` in this scope +error[E0425]: cannot find type `Baz` in this scope --> $DIR/dont-suggest-foreign-doc-hidden.rs:16:17 | LL | pub fn test3(_: Baz) {} @@ -26,7 +26,7 @@ help: consider importing this struct LL + use hidden_struct::Baz; | -error[E0412]: cannot find type `Quux` in this scope +error[E0425]: cannot find type `Quux` in this scope --> $DIR/dont-suggest-foreign-doc-hidden.rs:19:17 | LL | pub fn test4(_: Quux) {} @@ -61,5 +61,5 @@ LL | fn test5() {} error: aborting due to 5 previous errors -Some errors have detailed explanations: E0277, E0412. +Some errors have detailed explanations: E0277, E0425. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/suggestions/no-extern-crate-in-type.stderr b/tests/ui/suggestions/no-extern-crate-in-type.stderr index 384b17d1e2b48..6e71b351d1b54 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[E0425]: cannot find type `Foo` in this scope --> $DIR/no-extern-crate-in-type.rs:5:22 | LL | type Output = Option; @@ -11,4 +11,4 @@ LL + use foo::Foo; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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..7d8c6433eb5ae 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[E0425]: cannot find type `Someunknownname` in this scope --> $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[E0425]: cannot find type `K` in this scope --> $DIR/type-not-found-in-adt-field.rs:6:8 | LL | m: K, @@ -17,4 +17,4 @@ LL | struct OtherStruct { error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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..c70d4cefe9398 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[E0425]: cannot find type `Idx` in this scope --> $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[E0425]: cannot find type `Idx` in this scope --> $DIR/ice-unsized-struct-arg-issue-121612.rs:5:38 | LL | struct MySlice Idx>(bool, T); @@ -53,5 +53,5 @@ LL | struct MySlice Idx>(bool, T); error: aborting due to 4 previous errors -Some errors have detailed explanations: E0277, E0412. +Some errors have detailed explanations: E0277, E0425. For more information about an error, try `rustc --explain E0277`. 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..6213f74329420 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` in this scope [E0425] { 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..ca8a575e2caa8 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[E0425]: cannot find type `Cow` in this scope --> $DIR/impl-bound-with-references-error.rs:12:13 | LL | T: Into>, @@ -34,5 +34,5 @@ LL | LabelText::Plain(text.into()) error: aborting due to 3 previous errors -Some errors have detailed explanations: E0119, E0412, E0618. +Some errors have detailed explanations: E0119, E0425, E0618. For more information about an error, try `rustc --explain E0119`. diff --git a/tests/ui/traits/duplicate-generic-parameter-error-86756.stderr b/tests/ui/traits/duplicate-generic-parameter-error-86756.stderr index e761d15ff6708..16043d868e07f 100644 --- a/tests/ui/traits/duplicate-generic-parameter-error-86756.stderr +++ b/tests/ui/traits/duplicate-generic-parameter-error-86756.stderr @@ -6,7 +6,7 @@ LL | trait Foo {} | | | first use of `T` -error[E0412]: cannot find type `dyn` in this scope +error[E0425]: cannot find type `dyn` in this scope --> $DIR/duplicate-generic-parameter-error-86756.rs:7:10 | LL | eq:: @@ -44,5 +44,5 @@ LL | eq::> error: aborting due to 3 previous errors; 1 warning emitted -Some errors have detailed explanations: E0107, E0403, E0412. +Some errors have detailed explanations: E0107, E0403, E0425. For more information about an error, try `rustc --explain E0107`. diff --git a/tests/ui/traits/error-reporting/apit-with-bad-path.stderr b/tests/ui/traits/error-reporting/apit-with-bad-path.stderr index 19bd5e78b47fa..c4cc000d47531 100644 --- a/tests/ui/traits/error-reporting/apit-with-bad-path.stderr +++ b/tests/ui/traits/error-reporting/apit-with-bad-path.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Path` in this scope +error[E0425]: cannot find type `Path` in this scope --> $DIR/apit-with-bad-path.rs:3:29 | LL | fn foo(filename: impl AsRef) { @@ -11,4 +11,4 @@ LL + use std::path::Path; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/traits/error-reporting/where-clause-with-bad-path.stderr b/tests/ui/traits/error-reporting/where-clause-with-bad-path.stderr index 1137178f6114b..763898277b8f0 100644 --- a/tests/ui/traits/error-reporting/where-clause-with-bad-path.stderr +++ b/tests/ui/traits/error-reporting/where-clause-with-bad-path.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Path` in this scope +error[E0425]: cannot find type `Path` in this scope --> $DIR/where-clause-with-bad-path.rs:3:17 | LL | fn foo>(filename: T) { @@ -11,4 +11,4 @@ LL + use std::path::Path; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/traits/ignore-err-impls.stderr b/tests/ui/traits/ignore-err-impls.stderr index 955e2d7804981..68077c435135c 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[E0425]: cannot find type `Type` in this scope --> $DIR/ignore-err-impls.rs:6:14 | LL | impl Generic for S {} @@ -11,4 +11,4 @@ LL | impl Generic for S {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/traits/issue-50480.stderr b/tests/ui/traits/issue-50480.stderr index ed8c74e9bddcf..32c8b2cf3ac1f 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[E0425]: cannot find type `N` in this scope --> $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[E0425]: cannot find type `NotDefined` in this scope --> $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[E0425]: cannot find type `N` in this scope --> $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[E0425]: cannot find type `NotDefined` in this scope --> $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[E0425]: cannot find type `N` in this scope --> $DIR/issue-50480.rs:14:18 | LL | struct Bar(T, N, NotDefined, ::Item, Vec, String); @@ -55,7 +55,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[E0425]: cannot find type `NotDefined` in this scope --> $DIR/issue-50480.rs:14:21 | LL | struct Bar(T, N, NotDefined, ::Item, Vec, String); @@ -128,5 +128,5 @@ LL | struct Bar(T, N, NotDefined, ::Item, Vec, String); error: aborting due to 13 previous errors -Some errors have detailed explanations: E0204, E0277, E0412. +Some errors have detailed explanations: E0204, E0277, E0425. For more information about an error, try `rustc --explain E0204`. diff --git a/tests/ui/traits/issue-75627.stderr b/tests/ui/traits/issue-75627.stderr index 137985ee04641..0a3fc181aea26 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[E0425]: cannot find type `T` in this scope --> $DIR/issue-75627.rs:3:26 | LL | unsafe impl Send for Foo {} @@ -11,4 +11,4 @@ LL | unsafe impl Send for Foo {} error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/traits/issue-78372.stderr b/tests/ui/traits/issue-78372.stderr index a1c772f58e1f1..6744281dc34e2 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[E0425]: cannot find type `PhantomData` in this scope --> $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[E0425]: cannot find type `U` in this scope --> $DIR/issue-78372.rs:3:31 | LL | impl DispatchFromDyn> for T {} @@ -27,7 +27,7 @@ help: you might be missing a type parameter LL | impl DispatchFromDyn> for T {} | +++ -error[E0412]: cannot find type `MISC` in this scope +error[E0425]: cannot find type `MISC` in this scope --> $DIR/issue-78372.rs:3:34 | LL | impl DispatchFromDyn> for T {} @@ -73,5 +73,5 @@ LL | fn foo(self: Smaht); error: aborting due to 7 previous errors -Some errors have detailed explanations: E0307, E0377, E0412, E0658. +Some errors have detailed explanations: E0307, E0377, E0425, E0658. For more information about an error, try `rustc --explain E0307`. 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..67690a85d53ce 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[E0425]: cannot find type `TypeError` in this scope --> $DIR/dont-normalize-proj-with-error.rs:17:20 | LL | fn type_error() -> TypeError { todo!() } @@ -6,4 +6,4 @@ LL | fn type_error() -> TypeError { todo!() } error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 e934c5cdc7494..74cbb5be02b37 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[E0425]: cannot find type `Missing` in this scope --> $DIR/issue-118950-root-region.rs:19:55 | LL | impl Overlap fn(Assoc<'a, T>)> for T where Missing: Overlap {} @@ -28,5 +28,5 @@ LL | trait ToUnit<'a> { WARN rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: ['^0.Named(DefId(0:15 ~ issue_118950_root_region[d54f]::{impl#1}::'a)), ?1t], def_id: DefId(0:8 ~ issue_118950_root_region[d54f]::Assoc), .. } error: aborting due to 2 previous errors; 1 warning emitted -Some errors have detailed explanations: E0277, E0412. +Some errors have detailed explanations: E0277, E0425. For more information about an error, try `rustc --explain E0277`. 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 d9e77dec794a7..608e8136d2a82 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[E0425]: cannot find type `V` in this scope --> $DIR/binder-defaults-112547.rs:10:4 | LL | }> V: IntoIterator @@ -37,4 +37,4 @@ LL | | }> V: IntoIterator error: aborting due to 3 previous errors; 1 warning emitted -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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..9dea5b40159a8 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[E0425]: cannot find type `A` in this scope --> $DIR/binder-defaults-118697.rs:4:22 | LL | type T = dyn for Fn(()); @@ -18,4 +18,4 @@ LL | type T = dyn for Fn(()); error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/traits/trait-selection-ice-84727.stderr b/tests/ui/traits/trait-selection-ice-84727.stderr index d4bc4163897c4..c37c267c893ea 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[E0425]: cannot find type `Color` in this scope --> $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[E0425]: cannot find type `Color` in this scope --> $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[E0425]: cannot find type `Color` in this scope --> $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[E0425]: cannot find type `NewBg` in this scope --> $DIR/trait-selection-ice-84727.rs:32:27 | LL | fn over(self) -> Cell { @@ -43,5 +43,5 @@ LL | self.over(); error: aborting due to 5 previous errors -Some errors have detailed explanations: E0308, E0412. +Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/transmutability/issue-101739-1.stderr b/tests/ui/transmutability/issue-101739-1.stderr index 20bc8af47f8d9..8ec3c8508fa93 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[E0425]: cannot find type `Dst` in this scope --> $DIR/issue-101739-1.rs:8:9 | LL | Dst: TransmuteFrom, @@ -6,4 +6,4 @@ LL | Dst: TransmuteFrom, error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr b/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst.stderr index 9fa376bf4332b..530cfc7e9b18f 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[E0425]: cannot find type `Dst` in this scope --> $DIR/unknown_dst.rs:18:36 | LL | assert::is_transmutable::(); @@ -11,4 +11,4 @@ LL | fn should_gracefully_handle_unknown_dst() { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst_field.stderr b/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst_field.stderr index 564aee687a5f9..267f3b55619e0 100644 --- a/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst_field.stderr +++ b/tests/ui/transmutability/malformed-program-gracefulness/unknown_dst_field.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0425]: cannot find type `Missing` in this scope --> $DIR/unknown_dst_field.rs:18:27 | LL | #[repr(C)] struct Dst(Missing); | ^^^^^^^ not found in this scope -error[E0412]: cannot find type `Missing` in this scope +error[E0425]: cannot find type `Missing` in this scope --> $DIR/unknown_dst_field.rs:24:36 | LL | #[repr(C)] struct Dst(&'static Missing); @@ -42,5 +42,5 @@ LL | Dst: TransmuteFrom error: aborting due to 4 previous errors -Some errors have detailed explanations: E0277, E0412. +Some errors have detailed explanations: E0277, E0425. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr b/tests/ui/transmutability/malformed-program-gracefulness/unknown_src.stderr index f2c7d9e1bcc15..0ee03efef9f88 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[E0425]: cannot find type `Src` in this scope --> $DIR/unknown_src.rs:18:31 | LL | assert::is_transmutable::(); @@ -11,4 +11,4 @@ LL | fn should_gracefully_handle_unknown_src() { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 1156391c301c7..e6bb45a34a1df 100644 --- a/tests/ui/transmutability/malformed-program-gracefulness/unknown_src_field.stderr +++ b/tests/ui/transmutability/malformed-program-gracefulness/unknown_src_field.stderr @@ -1,10 +1,10 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0425]: cannot find type `Missing` in this scope --> $DIR/unknown_src_field.rs:17:27 | LL | #[repr(C)] struct Src(Missing); | ^^^^^^^ not found in this scope -error[E0412]: cannot find type `Missing` in this scope +error[E0425]: cannot find type `Missing` in this scope --> $DIR/unknown_src_field.rs:23:36 | LL | #[repr(C)] struct Src(&'static Missing); @@ -42,5 +42,5 @@ LL | Dst: TransmuteFrom error: aborting due to 4 previous errors -Some errors have detailed explanations: E0277, E0412. +Some errors have detailed explanations: E0277, E0425. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/tuple/tuple-struct-fields/test.stderr b/tests/ui/tuple/tuple-struct-fields/test.stderr index bfa0b32fd458a..61dcbde13b57c 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[E0425]: cannot find type `foo` in this scope --> $DIR/test.rs:4:20 | LL | struct S2(pub((foo)) ()); @@ -14,4 +14,4 @@ LL | struct S2(pub((foo)) ()); error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/tuple/tuple-struct-fields/test2.stderr b/tests/ui/tuple/tuple-struct-fields/test2.stderr index 784411aba8f8a..53706eb90bbb7 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[E0425]: cannot find type `foo` in this scope --> $DIR/test2.rs:11:23 | LL | define_struct! { (foo) } | ^^^ not found in this scope -error[E0412]: cannot find type `foo` in this scope +error[E0425]: cannot find type `foo` in this scope --> $DIR/test2.rs:11:23 | LL | define_struct! { (foo) } @@ -27,4 +27,4 @@ LL | define_struct! { (foo) } error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/tuple/tuple-struct-fields/test3.stderr b/tests/ui/tuple/tuple-struct-fields/test3.stderr index 00b07c0315292..6a30e4ba5da2a 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[E0425]: cannot find type `foo` in this scope --> $DIR/test3.rs:11:22 | LL | define_struct! { foo } | ^^^ not found in this scope -error[E0412]: cannot find type `foo` in this scope +error[E0425]: cannot find type `foo` in this scope --> $DIR/test3.rs:11:22 | LL | define_struct! { foo } @@ -27,4 +27,4 @@ LL | define_struct! { foo } error: aborting due to 3 previous errors -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/type-alias-impl-trait/define_opaques_attr/invalid_path.stderr b/tests/ui/type-alias-impl-trait/define_opaques_attr/invalid_path.stderr index 6b4cd4eac512b..c6c530b41aff5 100644 --- a/tests/ui/type-alias-impl-trait/define_opaques_attr/invalid_path.stderr +++ b/tests/ui/type-alias-impl-trait/define_opaques_attr/invalid_path.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type alias or associated type with opaqaue types `Boom` in this scope +error[E0425]: cannot find type alias or associated type with opaqaue types `Boom` in this scope --> $DIR/invalid_path.rs:3:17 | LL | #[define_opaque(Boom)] @@ -6,4 +6,4 @@ LL | #[define_opaque(Boom)] error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. 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 3a13ab7cb9570..936bdd59cc9bd 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[E0425]: cannot find type `LocalKey` in this scope --> $DIR/nested-impl-trait-in-tait.rs:3:44 | LL | pub type Tait = impl Iterator; @@ -43,5 +43,5 @@ LL | pub type Tait = impl Iterator; error: aborting due to 4 previous errors -Some errors have detailed explanations: E0261, E0412. +Some errors have detailed explanations: E0261, E0425. For more information about an error, try `rustc --explain E0261`. diff --git a/tests/ui/type/issue-7607-1.stderr b/tests/ui/type/issue-7607-1.stderr index 69b6d62e987a4..ac6034da75f1b 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[E0425]: cannot find type `Fo` in this scope --> $DIR/issue-7607-1.rs:5:6 | LL | impl Fo { @@ -10,4 +10,4 @@ LL | impl Fo { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/type/type-path-err-node-types.stderr b/tests/ui/type/type-path-err-node-types.stderr index 8b12aa1a393b2..1dc1bfed79d0e 100644 --- a/tests/ui/type/type-path-err-node-types.stderr +++ b/tests/ui/type/type-path-err-node-types.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Nonexistent` in this scope +error[E0425]: cannot find type `Nonexistent` in this scope --> $DIR/type-path-err-node-types.rs:7:12 | LL | let _: Nonexistent; @@ -35,5 +35,5 @@ LL | let _ = |a: /* Type */, b: _| -> _ { 0 }; error: aborting due to 5 previous errors -Some errors have detailed explanations: E0282, E0412, E0425, E0433, E0576. +Some errors have detailed explanations: E0282, E0425, E0425, E0433, E0576. For more information about an error, try `rustc --explain E0282`. 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..21ae7554d2bb3 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[E0425]: cannot find type `Bar` in this scope --> $DIR/apit-with-error-type-in-sig.rs:1:12 | LL | type Foo = Bar; @@ -6,4 +6,4 @@ LL | type Foo = Bar; error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/typeck/autoderef-with-param-env-error.stderr b/tests/ui/typeck/autoderef-with-param-env-error.stderr index e06be398aa07a..dd4cfa761ce88 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[E0425]: cannot find type `T` in this scope --> $DIR/autoderef-with-param-env-error.rs:3:5 | LL | T: Send, @@ -11,4 +11,4 @@ LL | fn foo() error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/typeck/impl-for-nonexistent-type-error-8767.stderr b/tests/ui/typeck/impl-for-nonexistent-type-error-8767.stderr index 0e37391a00f7b..354eb4019c65a 100644 --- a/tests/ui/typeck/impl-for-nonexistent-type-error-8767.stderr +++ b/tests/ui/typeck/impl-for-nonexistent-type-error-8767.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `B` in this scope +error[E0425]: cannot find type `B` in this scope --> $DIR/impl-for-nonexistent-type-error-8767.rs:2:6 | LL | impl B { @@ -6,4 +6,4 @@ LL | impl B { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/typeck/issue-104510-ice.stderr b/tests/ui/typeck/issue-104510-ice.stderr index 143139b2c089c..5f330a4e685ce 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[E0425]: cannot find type `Oops` in this scope --> $DIR/issue-104510-ice.rs:4:21 | LL | struct W(Oops); @@ -6,4 +6,4 @@ LL | struct W(Oops); error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/typeck/issue-83693.rs b/tests/ui/typeck/issue-83693.rs index 68a1416517a73..f78cf7da4a98b 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` in this scope [E0425] fn call() { ::call - //~^ ERROR: cannot find type `TestResult` in this scope [E0412] + //~^ ERROR: cannot find type `TestResult` in this scope [E0425] //~| ERROR 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` in this scope [E0425] //~| 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 0359b8af93a37..521288c434022 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[E0425]: cannot find type `F` in this scope --> $DIR/issue-83693.rs:6:6 | LL | impl F { @@ -8,13 +8,13 @@ LL | impl F { | = note: similarly named trait `Fn` defined here -error[E0412]: cannot find type `TestResult` in this scope +error[E0425]: cannot find type `TestResult` in this scope --> $DIR/issue-83693.rs:9:22 | LL | ::call | ^^^^^^^^^^ not found in this scope -error[E0412]: cannot find type `x` in this scope +error[E0425]: cannot find type `x` in this scope --> $DIR/issue-83693.rs:16:6 | LL | ::call @@ -34,5 +34,5 @@ LL | ::call error: aborting due to 5 previous errors -Some errors have detailed explanations: E0229, E0412. +Some errors have detailed explanations: E0229, E0425. For more information about an error, try `rustc --explain E0229`. diff --git a/tests/ui/typeck/issue-88844.rs b/tests/ui/typeck/issue-88844.rs index 116c75aabdbdf..35d110b50262b 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` in this scope [E0425] //~| 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..a5f4310c34dde 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[E0425]: cannot find type `Stuct` in this scope --> $DIR/issue-88844.rs:6:6 | LL | struct Struct { value: i32 } @@ -9,4 +9,4 @@ LL | impl Stuct { error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/typeck/issue-90319.rs b/tests/ui/typeck/issue-90319.rs index 57e6ac7cf34f5..64b3a27155036 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` in this scope [E0425] 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..4f427cbb3b003 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[E0425]: cannot find type `Thing` in this scope --> $DIR/issue-90319.rs:14:23 | LL | let thing = get::(); @@ -6,4 +6,4 @@ LL | let thing = get::(); error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/typeck/issue-91267.rs b/tests/ui/typeck/issue-91267.rs index 1bffa09e64360..22198532b0c91 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` in this scope [E0425] //~| 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..0c186f546df26 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[E0425]: cannot find type `e` in this scope --> $DIR/issue-91267.rs:4:30 | LL | type_ascribe!(0, u8=e>) @@ -22,5 +22,5 @@ LL | type_ascribe!(0, u8=e>) error: aborting due to 3 previous errors -Some errors have detailed explanations: E0229, E0308, E0412. +Some errors have detailed explanations: E0229, E0308, E0425. For more information about an error, try `rustc --explain E0229`. diff --git a/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr b/tests/ui/typeck/nonexistent-field-not-ambiguous.stderr index 82207a731b962..3d876b0228979 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[E0425]: cannot find type `MissingType` in this scope --> $DIR/nonexistent-field-not-ambiguous.rs:2:10 | LL | val: MissingType, @@ -6,4 +6,4 @@ LL | val: MissingType, error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/typeck/sugg-swap-equality-in-macro-issue-139050.rs b/tests/ui/typeck/sugg-swap-equality-in-macro-issue-139050.rs index 5aa2bd7fddeb1..28aefdd8d3e4a 100644 --- a/tests/ui/typeck/sugg-swap-equality-in-macro-issue-139050.rs +++ b/tests/ui/typeck/sugg-swap-equality-in-macro-issue-139050.rs @@ -26,7 +26,7 @@ macro_rules! eq_local { pub fn foo(mut iter: I, value: &I::Item) where - Item: Eq + Debug, //~ ERROR cannot find type `Item` in this scope [E0412] + Item: Eq + Debug, //~ ERROR cannot find type `Item` in this scope [E0425] { ext::eq!(assert iter.next(), Some(value)); //~ ERROR mismatched types [E0308] eq_local!(assert iter.next(), Some(value)); diff --git a/tests/ui/typeck/sugg-swap-equality-in-macro-issue-139050.stderr b/tests/ui/typeck/sugg-swap-equality-in-macro-issue-139050.stderr index 96a3bc65dfdc9..d74372c665a45 100644 --- a/tests/ui/typeck/sugg-swap-equality-in-macro-issue-139050.stderr +++ b/tests/ui/typeck/sugg-swap-equality-in-macro-issue-139050.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Item` in this scope +error[E0425]: cannot find type `Item` in this scope --> $DIR/sugg-swap-equality-in-macro-issue-139050.rs:29:5 | LL | Item: Eq + Debug, @@ -35,5 +35,5 @@ LL + if !(*right_val == *left_val) { error: aborting due to 3 previous errors -Some errors have detailed explanations: E0308, E0412. +Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/union/unresolved-field-isnt-copy.stderr b/tests/ui/union/unresolved-field-isnt-copy.stderr index ee5d1e37b141c..5ac9e0e9162ab 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[E0425]: cannot find type `Missing` in this scope --> $DIR/unresolved-field-isnt-copy.rs:4:15 | LL | x: *const Missing, @@ -6,4 +6,4 @@ LL | x: *const Missing, error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/variance/type-resolve-error-two-structs-deep.stderr b/tests/ui/variance/type-resolve-error-two-structs-deep.stderr index 3458d924bb153..2b4f3b5b11157 100644 --- a/tests/ui/variance/type-resolve-error-two-structs-deep.stderr +++ b/tests/ui/variance/type-resolve-error-two-structs-deep.stderr @@ -1,4 +1,4 @@ -error[E0412]: cannot find type `Missing` in this scope +error[E0425]: cannot find type `Missing` in this scope --> $DIR/type-resolve-error-two-structs-deep.rs:5:14 | LL | missing: Missing<'a>, @@ -6,4 +6,4 @@ LL | missing: Missing<'a>, error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/wf/issue-110157.stderr b/tests/ui/wf/issue-110157.stderr index e750ea47d515c..eb496628c5e0f 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[E0425]: cannot find type `Missing` in this scope --> $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[E0425]: cannot find type `Missing` in this scope --> $DIR/issue-110157.rs:8:24 | LL | I: Iterator, @@ -26,5 +26,5 @@ LL | | I: Iterator, error: aborting due to 3 previous errors -Some errors have detailed explanations: E0046, E0412. +Some errors have detailed explanations: E0046, E0425. For more information about an error, try `rustc --explain E0046`. diff --git a/tests/ui/where-clauses/ignore-err-clauses.stderr b/tests/ui/where-clauses/ignore-err-clauses.stderr index 9c76c1c6a0486..222b162cd482c 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[E0425]: cannot find type `UUU` in this scope --> $DIR/ignore-err-clauses.rs:6:5 | LL | UUU: Copy, @@ -29,5 +29,5 @@ note: calling this operator moves the left-hand side error: aborting due to 2 previous errors -Some errors have detailed explanations: E0382, E0412. +Some errors have detailed explanations: E0382, E0425. For more information about an error, try `rustc --explain E0382`. diff --git a/tests/ui/where-clauses/normalization-of-unknown-type.stderr b/tests/ui/where-clauses/normalization-of-unknown-type.stderr index 11b83224352b8..100d28ed2debe 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[E0425]: cannot find type `Foo` in this scope --> $DIR/normalization-of-unknown-type.rs:24:5 | LL | Foo: Filter, @@ -6,4 +6,4 @@ LL | Foo: Filter, error: aborting due to 1 previous error -For more information about this error, try `rustc --explain E0412`. +For more information about this error, try `rustc --explain E0425`. From 471ccd85e017433235100e49fef8ae165b86ecd1 Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Fri, 7 Nov 2025 19:04:12 +0000 Subject: [PATCH 2/4] fix typo --- compiler/rustc_resolve/src/late.rs | 2 +- compiler/rustc_resolve/src/late/diagnostics.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 36cfce1b98400..5bfc60cbd7657 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -3158,7 +3158,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { result } - /// When evaluating a `trait` use its associated types' idents for suggestions in EO425. + /// When evaluating a `trait` use its associated types' idents for suggestions in E0425. fn resolve_trait_items(&mut self, trait_items: &'ast [Box]) { let trait_assoc_items = replace(&mut self.diag_metadata.current_trait_assoc_items, Some(trait_items)); diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 7be2c8a5d8419..4f7b7913274dc 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -705,7 +705,7 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { if !enum_candidates.is_empty() { enum_candidates.sort(); - // Contextualize for E0412 "cannot find type", but don't belabor the point + // Contextualize for E0425 "cannot find type", but don't belabor the point // (that it's a variant) for E0573 "expected type, found variant". let preamble = if res.is_none() { let others = match enum_candidates.len() { From b6cb948e8bb6b3c57f49a03250034ec9479bfccc Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Fri, 7 Nov 2025 23:32:49 +0000 Subject: [PATCH 3/4] fixing errors --- .../src/error_codes/E0412.md | 3 +- .../argument-suggestions/issue-109831.stderr | 2 +- tests/ui/associated-consts/issue-93835.stderr | 2 +- ...const_arg_trivial_macro_expansion-2.stderr | 3 +- .../unevaluated-const-ice-119731.stderr | 4 +- ...arent_generics_of_nested_in_default.stderr | 3 +- ...ssue-56028-there-is-an-enum-variant.stderr | 3 +- tests/ui/error-codes/E0412.stderr | 2 +- tests/ui/imports/glob-resolve1.stderr | 4 +- tests/ui/imports/issue-4366-2.stderr | 4 +- tests/ui/lint/use_suggestion_json.stderr | 70 +++++++++---------- tests/ui/macros/macro-context.stderr | 3 +- tests/ui/match/issue-82866.stderr | 3 +- tests/ui/parser/unmatched-langle-1.stderr | 3 +- tests/ui/privacy/privacy-ns1.stderr | 4 +- .../ui/privacy/sysroot-private.default.stderr | 2 +- ...sroot-private.rustc_private_enabled.stderr | 2 +- tests/ui/proc-macro/mixed-site-span.stderr | 2 +- .../ui/proc-macro/span-from-proc-macro.stderr | 2 +- tests/ui/resolve/issue-35675.stderr | 2 +- tests/ui/resolve/levenshtein.stderr | 3 +- tests/ui/resolve/privacy-enum-ctor.stderr | 2 +- .../resolve/resolve-assoc-suggestions.stderr | 2 +- .../resolve/resolve-primitive-fallback.stderr | 2 +- ...e-with-name-similar-to-struct-field.stderr | 3 +- .../resolve/use_suggestion_placement.stderr | 3 +- tests/ui/type/type-path-err-node-types.stderr | 2 +- 27 files changed, 64 insertions(+), 76 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0412.md b/compiler/rustc_error_codes/src/error_codes/E0412.md index 41696ce9f3c85..cf5140b6ea126 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0412.md +++ b/compiler/rustc_error_codes/src/error_codes/E0412.md @@ -1,5 +1,6 @@ This error code is no longer emitted by the compiler. -Unresolved types are now reported under the unified error code E0425 ("cannot find ... in this scope"). +Unresolved types are now reported under the unified error code E0425 +("cannot find ... in this scope"). See the explanation for E0425 for guidance on common causes and fixes. diff --git a/tests/ui/argument-suggestions/issue-109831.stderr b/tests/ui/argument-suggestions/issue-109831.stderr index f235355792538..6c25236ebb1b0 100644 --- a/tests/ui/argument-suggestions/issue-109831.stderr +++ b/tests/ui/argument-suggestions/issue-109831.stderr @@ -48,5 +48,5 @@ LL + f(/* B */, /* B */, B); error: aborting due to 3 previous errors -Some errors have detailed explanations: E0061, E0425, E0425. +Some errors have detailed explanations: E0061, E0425. For more information about an error, try `rustc --explain E0061`. diff --git a/tests/ui/associated-consts/issue-93835.stderr b/tests/ui/associated-consts/issue-93835.stderr index d29a891fb1b17..3f16798901303 100644 --- a/tests/ui/associated-consts/issue-93835.stderr +++ b/tests/ui/associated-consts/issue-93835.stderr @@ -39,5 +39,5 @@ LL | type_ascribe!(p, a>); error: aborting due to 5 previous errors -Some errors have detailed explanations: E0405, E0425, E0425, E0658. +Some errors have detailed explanations: E0405, E0425, E0658. For more information about an error, try `rustc --explain E0405`. diff --git a/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-2.stderr b/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-2.stderr index 61fa96aa676d0..26d80c85e1610 100644 --- a/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-2.stderr +++ b/tests/ui/const-generics/early/const_arg_trivial_macro_expansion-2.stderr @@ -32,5 +32,4 @@ LL | const _: A< error: aborting due to 3 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. 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 98c4caa67bff7..d3a7e286fdd60 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 @@ -129,5 +129,5 @@ LL | pub const fn v21() -> v18 { error: aborting due to 14 previous errors; 2 warnings emitted -Some errors have detailed explanations: E0425, E0422, E0425, E0432, E0592. -For more information about an error, try `rustc --explain E0425`. +Some errors have detailed explanations: E0422, E0425, E0432, E0592. +For more information about an error, try `rustc --explain E0422`. diff --git a/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr b/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr index 2b35a1e289464..00eeecb9595f3 100644 --- a/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr +++ b/tests/ui/const-generics/parent_generics_of_nested_in_default.stderr @@ -20,5 +20,4 @@ LL | impl Tr {} error: aborting due to 3 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. 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 cef68950fc066..d3306efbed261 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 @@ -40,5 +40,4 @@ LL + use PutDown::Set; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/error-codes/E0412.stderr b/tests/ui/error-codes/E0412.stderr index 374875e392dc8..4a4abf009c841 100644 --- a/tests/ui/error-codes/E0412.stderr +++ b/tests/ui/error-codes/E0412.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find type `Something` in this scope - --> $DIR/E0425.rs:1:6 + --> $DIR/E0412.rs:1:6 | LL | impl Something {} | ^^^^^^^^^ not found in this scope diff --git a/tests/ui/imports/glob-resolve1.stderr b/tests/ui/imports/glob-resolve1.stderr index 17224defc4120..622e217a2f750 100644 --- a/tests/ui/imports/glob-resolve1.stderr +++ b/tests/ui/imports/glob-resolve1.stderr @@ -115,5 +115,5 @@ LL | type D = isize; error: aborting due to 8 previous errors -Some errors have detailed explanations: E0425, E0423, E0425. -For more information about an error, try `rustc --explain E0425`. +Some errors have detailed explanations: E0423, E0425. +For more information about an error, try `rustc --explain E0423`. diff --git a/tests/ui/imports/issue-4366-2.stderr b/tests/ui/imports/issue-4366-2.stderr index a91edabbcc4dd..f384973613bc6 100644 --- a/tests/ui/imports/issue-4366-2.stderr +++ b/tests/ui/imports/issue-4366-2.stderr @@ -28,5 +28,5 @@ LL + use foo::foo; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0425, E0423. -For more information about an error, try `rustc --explain E0425`. +Some errors have detailed explanations: E0423, E0425. +For more information about an error, try `rustc --explain E0423`. diff --git a/tests/ui/lint/use_suggestion_json.stderr b/tests/ui/lint/use_suggestion_json.stderr index 5196e91110308..89412179d90bb 100644 --- a/tests/ui/lint/use_suggestion_json.stderr +++ b/tests/ui/lint/use_suggestion_json.stderr @@ -3,70 +3,66 @@ "message": "cannot find type `Iter` in this scope", "code": { "code": "E0425", - "explanation": "A used type name is not in scope. + "explanation": "An unresolved name was used. Erroneous code examples: ```compile_fail,E0425 -impl Something {} // error: type name `Something` is not in scope +something_that_doesnt_exist::foo; +// error: unresolved name `something_that_doesnt_exist::foo` // or: trait Foo { - fn bar(N); // error: type name `N` is not in scope + fn bar() { + Self; // error: unresolved name `Self` + } } // or: -fn foo(x: T) {} // type name `T` is not in scope +let x = unknown_variable; // error: unresolved name `unknown_variable` ``` -To fix this error, please verify you didn't misspell the type name, you did -declare it or imported it into the scope. Examples: +Please verify that the name wasn't misspelled and ensure that the +identifier being referred to is valid for the given situation. Example: ``` -struct Something; - -impl Something {} // ok! - -// or: - -trait Foo { - type N; - - fn bar(_: Self::N); // ok! +enum something_that_does_exist { + Foo, } +``` -// or: +Or: -fn foo(x: T) {} // ok! ``` +mod something_that_does_exist { + pub static foo : i32 = 0i32; +} -Another case that causes this error is when a type is imported into a parent -module. To fix this, you can follow the suggestion and use File directly or -`use super::File;` which will import the types from the parent namespace. An -example that causes this error is below: +something_that_does_exist::foo; // ok! +``` -```compile_fail,E0425 -use std::fs::File; +Or: -mod foo { - fn some_function(f: File) {} -} ``` - +let unknown_variable = 12u32; +let x = unknown_variable; // ok! ``` -use std::fs::File; -mod foo { - // either - use super::File; - // or - // use std::fs::File; - fn foo(f: File) {} -} -# fn main() {} // don't insert it for us; that'll break imports +If the item is not defined in the current module, it must be imported using a +`use` statement, like so: + ``` +# mod foo { pub fn bar() {} } +# fn main() { +use foo::bar; +bar(); +# } +``` + +If the item you are importing is not defined in some super-module of the +current module, then it must also be declared as public (e.g., `pub fn`). " }, "level": "error", diff --git a/tests/ui/macros/macro-context.stderr b/tests/ui/macros/macro-context.stderr index 829ab3dde72cd..edddfef9de3b2 100644 --- a/tests/ui/macros/macro-context.stderr +++ b/tests/ui/macros/macro-context.stderr @@ -80,8 +80,7 @@ LL | let i = m!(); error: aborting due to 7 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. Future incompatibility report: Future breakage diagnostic: error: trailing semicolon in macro used in expression position --> $DIR/macro-context.rs:3:15 diff --git a/tests/ui/match/issue-82866.stderr b/tests/ui/match/issue-82866.stderr index da5c700a9655b..f2b63c6a0ea50 100644 --- a/tests/ui/match/issue-82866.stderr +++ b/tests/ui/match/issue-82866.stderr @@ -12,5 +12,4 @@ LL | Some::(v) => (), error: aborting due to 2 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/parser/unmatched-langle-1.stderr b/tests/ui/parser/unmatched-langle-1.stderr index 993aef15a4ae2..efe6c9b33210f 100644 --- a/tests/ui/parser/unmatched-langle-1.stderr +++ b/tests/ui/parser/unmatched-langle-1.stderr @@ -24,5 +24,4 @@ LL | foo::<<<>(); error: aborting due to 3 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/privacy/privacy-ns1.stderr b/tests/ui/privacy/privacy-ns1.stderr index d627dead7a685..cb88345b3e979 100644 --- a/tests/ui/privacy/privacy-ns1.stderr +++ b/tests/ui/privacy/privacy-ns1.stderr @@ -90,5 +90,5 @@ LL | let _x: Box; error: aborting due to 4 previous errors -Some errors have detailed explanations: E0425, E0423, E0425, E0747. -For more information about an error, try `rustc --explain E0425`. +Some errors have detailed explanations: E0423, E0425, E0747. +For more information about an error, try `rustc --explain E0423`. diff --git a/tests/ui/privacy/sysroot-private.default.stderr b/tests/ui/privacy/sysroot-private.default.stderr index d9a872c205219..66712a59e7b27 100644 --- a/tests/ui/privacy/sysroot-private.default.stderr +++ b/tests/ui/privacy/sysroot-private.default.stderr @@ -36,5 +36,5 @@ LL | memchr2(b'a', b'b', buf) error: aborting due to 4 previous errors -Some errors have detailed explanations: E0220, E0405, E0425, E0425. +Some errors have detailed explanations: E0220, E0405, E0425. For more information about an error, try `rustc --explain E0220`. diff --git a/tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr b/tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr index 1336b206d2670..94b85b995c479 100644 --- a/tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr +++ b/tests/ui/privacy/sysroot-private.rustc_private_enabled.stderr @@ -36,5 +36,5 @@ LL | memchr2(b'a', b'b', buf) error: aborting due to 4 previous errors -Some errors have detailed explanations: E0220, E0405, E0425, E0425. +Some errors have detailed explanations: E0220, E0405, E0425. For more information about an error, try `rustc --explain E0220`. diff --git a/tests/ui/proc-macro/mixed-site-span.stderr b/tests/ui/proc-macro/mixed-site-span.stderr index 904994f3abe58..30c1a0dde946a 100644 --- a/tests/ui/proc-macro/mixed-site-span.stderr +++ b/tests/ui/proc-macro/mixed-site-span.stderr @@ -604,5 +604,5 @@ LL | local_def; error: aborting due to 52 previous errors -Some errors have detailed explanations: E0425, E0425, E0426, E0432. +Some errors have detailed explanations: E0425, E0426, E0432. For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/proc-macro/span-from-proc-macro.stderr b/tests/ui/proc-macro/span-from-proc-macro.stderr index 8201b45c225a7..0605c727733b2 100644 --- a/tests/ui/proc-macro/span-from-proc-macro.stderr +++ b/tests/ui/proc-macro/span-from-proc-macro.stderr @@ -58,5 +58,5 @@ LL | error_from_bang!(); error: aborting due to 4 previous errors -Some errors have detailed explanations: E0308, E0425, E0425. +Some errors have detailed explanations: E0308, E0425. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/resolve/issue-35675.stderr b/tests/ui/resolve/issue-35675.stderr index f95f4bd92c3e2..40c299fe04cf3 100644 --- a/tests/ui/resolve/issue-35675.stderr +++ b/tests/ui/resolve/issue-35675.stderr @@ -73,5 +73,5 @@ LL | fn qux() -> Some { error: aborting due to 7 previous errors -Some errors have detailed explanations: E0425, E0425, E0573. +Some errors have detailed explanations: E0425, E0573. For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/levenshtein.stderr b/tests/ui/resolve/levenshtein.stderr index db2a74a9708ba..7a1abd1343303 100644 --- a/tests/ui/resolve/levenshtein.stderr +++ b/tests/ui/resolve/levenshtein.stderr @@ -67,5 +67,4 @@ LL | foobar(); // Misspelled function name. error: aborting due to 8 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/privacy-enum-ctor.stderr b/tests/ui/resolve/privacy-enum-ctor.stderr index 0855a5a543bc1..c09e1c85162ed 100644 --- a/tests/ui/resolve/privacy-enum-ctor.stderr +++ b/tests/ui/resolve/privacy-enum-ctor.stderr @@ -433,5 +433,5 @@ LL | let _: Z = m::n::Z::Struct { s: /* value */ }; error: aborting due to 23 previous errors -Some errors have detailed explanations: E0308, E0425, E0423, E0533, E0603, E0618. +Some errors have detailed explanations: E0308, E0423, E0425, E0533, E0603, E0618. For more information about an error, try `rustc --explain E0308`. diff --git a/tests/ui/resolve/resolve-assoc-suggestions.stderr b/tests/ui/resolve/resolve-assoc-suggestions.stderr index cbf2522315d56..ef519ac0d9217 100644 --- a/tests/ui/resolve/resolve-assoc-suggestions.stderr +++ b/tests/ui/resolve/resolve-assoc-suggestions.stderr @@ -69,5 +69,5 @@ LL | self.method; error: aborting due to 9 previous errors -Some errors have detailed explanations: E0425, E0425, E0531. +Some errors have detailed explanations: E0425, E0531. For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/resolve-primitive-fallback.stderr b/tests/ui/resolve/resolve-primitive-fallback.stderr index 99686f95f182d..280d4eddb8cb0 100644 --- a/tests/ui/resolve/resolve-primitive-fallback.stderr +++ b/tests/ui/resolve/resolve-primitive-fallback.stderr @@ -36,5 +36,5 @@ LL + std::mem::size_of(); error: aborting due to 3 previous errors -Some errors have detailed explanations: E0061, E0425, E0423. +Some errors have detailed explanations: E0061, E0423, E0425. For more information about an error, try `rustc --explain E0061`. 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 2fb4d8eb83d96..039410f8795f8 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 @@ -101,5 +101,4 @@ LL + ba(); error: aborting due to 7 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/resolve/use_suggestion_placement.stderr b/tests/ui/resolve/use_suggestion_placement.stderr index dcccc101ec3bd..605306c28db3b 100644 --- a/tests/ui/resolve/use_suggestion_placement.stderr +++ b/tests/ui/resolve/use_suggestion_placement.stderr @@ -33,5 +33,4 @@ LL + use std::collections::HashMap; error: aborting due to 3 previous errors -Some errors have detailed explanations: E0425, E0425. -For more information about an error, try `rustc --explain E0425`. +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/type/type-path-err-node-types.stderr b/tests/ui/type/type-path-err-node-types.stderr index 1dc1bfed79d0e..a9e999f80b3a0 100644 --- a/tests/ui/type/type-path-err-node-types.stderr +++ b/tests/ui/type/type-path-err-node-types.stderr @@ -35,5 +35,5 @@ LL | let _ = |a: /* Type */, b: _| -> _ { 0 }; error: aborting due to 5 previous errors -Some errors have detailed explanations: E0282, E0425, E0425, E0433, E0576. +Some errors have detailed explanations: E0282, E0425, E0433, E0576. For more information about an error, try `rustc --explain E0282`. From 6fd6509612187d8aa67cedb86a2d6cd384199d5b Mon Sep 17 00:00:00 2001 From: xonx <119700621+xonx4l@users.noreply.github.com> Date: Sun, 9 Nov 2025 17:52:58 +0000 Subject: [PATCH 4/4] cleanup --- compiler/rustc_error_codes/src/error_codes/E0412.md | 2 +- compiler/rustc_resolve/src/late.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0412.md b/compiler/rustc_error_codes/src/error_codes/E0412.md index cf5140b6ea126..e0e6bd30c3aae 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0412.md +++ b/compiler/rustc_error_codes/src/error_codes/E0412.md @@ -1,4 +1,4 @@ -This error code is no longer emitted by the compiler. +#### Note: this error code is no longer emitted by the compiler. Unresolved types are now reported under the unified error code E0425 ("cannot find ... in this scope"). diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 5bfc60cbd7657..1baf73ed00791 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -4350,7 +4350,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { // // Thus (since we're in expression-position at this point), not to // confuse the user, we want to keep the *message* from E0433 (so - // `parent_err`), but we want *hints* from the unified E0425 (so `err`). + // `parent_err`), but we want *hints* from E0425 (so `err`). // // And that's what happens below - we're just mixing both messages // into a single one.