From 2dda8ad98a8d5089335b2d09307f1bfd085499f9 Mon Sep 17 00:00:00 2001 From: varkor Date: Tue, 22 Oct 2019 12:28:23 +0100 Subject: [PATCH] Use E0741 for structural match error --- src/librustc_resolve/error_codes.rs | 2 +- src/librustc_typeck/collect.rs | 2 +- src/librustc_typeck/error_codes.rs | 4 ++-- .../const-param-type-depends-on-type-param-ungated.stderr | 4 ++-- .../const-param-type-depends-on-type-param.stderr | 4 ++-- .../const-generics/forbid-non-structural_match-types.stderr | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/librustc_resolve/error_codes.rs b/src/librustc_resolve/error_codes.rs index 49f8e82a2d1..df22085c38c 100644 --- a/src/librustc_resolve/error_codes.rs +++ b/src/librustc_resolve/error_codes.rs @@ -1884,7 +1884,7 @@ E0671: r##" Const parameters cannot depend on type parameters. The following is therefore invalid: -```compile_fail,E0740 +```compile_fail,E0741 #![feature(const_generics)] fn const_id() -> T { // error diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 08fb5ae1676..f40667652ca 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -1536,7 +1536,7 @@ pub fn checked_type_of(tcx: TyCtxt<'_>, def_id: DefId, fail: bool) -> Option(PhantomData<[T; N]>); = note: for more information, see https://github.com/rust-lang/rust/issues/44580 = help: add `#![feature(const_generics)]` to the crate attributes to enable -error[E0740]: the types of const generic parameters must derive `PartialEq` and `Eq` +error[E0741]: the types of const generic parameters must derive `PartialEq` and `Eq` --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:22 | LL | struct B(PhantomData<[T; N]>); @@ -15,5 +15,5 @@ LL | struct B(PhantomData<[T; N]>); error: aborting due to 2 previous errors -Some errors have detailed explanations: E0658, E0740. +Some errors have detailed explanations: E0658, E0741. For more information about an error, try `rustc --explain E0658`. diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr index c86a09bef0b..c9d6db7e2c2 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr @@ -6,7 +6,7 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default -error[E0740]: the types of const generic parameters must derive `PartialEq` and `Eq` +error[E0741]: the types of const generic parameters must derive `PartialEq` and `Eq` --> $DIR/const-param-type-depends-on-type-param.rs:9:34 | LL | pub struct Dependent([(); X]); @@ -14,4 +14,4 @@ LL | pub struct Dependent([(); X]); error: aborting due to previous error -For more information about this error, try `rustc --explain E0740`. +For more information about this error, try `rustc --explain E0741`. diff --git a/src/test/ui/const-generics/forbid-non-structural_match-types.stderr b/src/test/ui/const-generics/forbid-non-structural_match-types.stderr index c870d9b1db4..0fd9e0599e8 100644 --- a/src/test/ui/const-generics/forbid-non-structural_match-types.stderr +++ b/src/test/ui/const-generics/forbid-non-structural_match-types.stderr @@ -6,7 +6,7 @@ LL | #![feature(const_generics)] | = note: `#[warn(incomplete_features)]` on by default -error[E0740]: the types of const generic parameters must derive `PartialEq` and `Eq` +error[E0741]: the types of const generic parameters must derive `PartialEq` and `Eq` --> $DIR/forbid-non-structural_match-types.rs:11:19 | LL | struct D; @@ -14,4 +14,4 @@ LL | struct D; error: aborting due to previous error -For more information about this error, try `rustc --explain E0740`. +For more information about this error, try `rustc --explain E0741`.