diff --git a/src/librustc_resolve/error_codes.rs b/src/librustc_resolve/error_codes.rs index b82cba8c83dc4..c8ccd330b517e 100644 --- a/src/librustc_resolve/error_codes.rs +++ b/src/librustc_resolve/error_codes.rs @@ -1797,6 +1797,31 @@ let _: ::Empire; // ok! ``` "##, +E0576: r##" +An associated item wasn't found in the given type. + +Erroneous code example: + +```compile_fail,E0576 +trait Hello { + type Who; + + fn hello() -> ::You; // error! +} +``` + +In this example, we tried to use the non-existent associated type `You` of the +`Hello` trait. To fix this error, use an existing associated type: + +``` +trait Hello { + type Who; + + fn hello() -> ::Who; // ok! +} +``` +"##, + E0603: r##" A private item was used outside its scope. @@ -1924,7 +1949,6 @@ struct Foo> { // E0427, merged into 530 // E0467, removed // E0470, removed - E0576, E0577, E0578, } diff --git a/src/test/ui/issues/issue-19883.stderr b/src/test/ui/issues/issue-19883.stderr index 738add1684004..e370b2ec1cb42 100644 --- a/src/test/ui/issues/issue-19883.stderr +++ b/src/test/ui/issues/issue-19883.stderr @@ -6,3 +6,4 @@ LL | >::Dst error: aborting due to previous error +For more information about this error, try `rustc --explain E0576`. diff --git a/src/test/ui/issues/issue-22037.stderr b/src/test/ui/issues/issue-22037.stderr index 40d4a5e3bc0c5..615628558f08b 100644 --- a/src/test/ui/issues/issue-22037.stderr +++ b/src/test/ui/issues/issue-22037.stderr @@ -6,3 +6,4 @@ LL | fn a(&self) -> ::X; error: aborting due to previous error +For more information about this error, try `rustc --explain E0576`. diff --git a/src/test/ui/issues/issue-22384.stderr b/src/test/ui/issues/issue-22384.stderr index 130c3124b6f82..1f767a443d0f0 100644 --- a/src/test/ui/issues/issue-22384.stderr +++ b/src/test/ui/issues/issue-22384.stderr @@ -6,3 +6,4 @@ LL | <::foobar as Trait>::foo(); error: aborting due to previous error +For more information about this error, try `rustc --explain E0576`. diff --git a/src/test/ui/type/type-path-err-node-types.stderr b/src/test/ui/type/type-path-err-node-types.stderr index cd93525c76219..ea9cca2bfaab0 100644 --- a/src/test/ui/type/type-path-err-node-types.stderr +++ b/src/test/ui/type/type-path-err-node-types.stderr @@ -30,5 +30,5 @@ LL | let _ = |a, b: _| -> _ { 0 }; error: aborting due to 5 previous errors -Some errors have detailed explanations: E0282, E0412, E0425, E0433. +Some errors have detailed explanations: E0282, E0412, E0425, E0433, E0576. For more information about an error, try `rustc --explain E0282`. diff --git a/src/test/ui/ufcs/ufcs-partially-resolved.stderr b/src/test/ui/ufcs/ufcs-partially-resolved.stderr index 39752f66b9d65..dee990ec3d1cb 100644 --- a/src/test/ui/ufcs/ufcs-partially-resolved.stderr +++ b/src/test/ui/ufcs/ufcs-partially-resolved.stderr @@ -200,5 +200,5 @@ LL | ::X::N; error: aborting due to 32 previous errors -Some errors have detailed explanations: E0223, E0433, E0575, E0599. +Some errors have detailed explanations: E0223, E0433, E0575, E0576, E0599. For more information about an error, try `rustc --explain E0223`.