Re-use error code for duplicate error

This commit is contained in:
Oli Scherer 2023-06-16 20:20:39 +00:00
parent d6e1b20623
commit 30ff127036
3 changed files with 5 additions and 3 deletions

View File

@ -113,7 +113,7 @@ pub struct DuplicateArg<'tcx> {
}
#[derive(Diagnostic)]
#[diag(ty_utils_impl_trait_not_param)]
#[diag(ty_utils_impl_trait_not_param, code = "E0792")]
pub struct NotParam<'tcx> {
pub arg: GenericArg<'tcx>,
#[primary_span]

View File

@ -1,4 +1,4 @@
error: non-defining opaque type use in defining scope
error[E0792]: non-defining opaque type use in defining scope
--> $DIR/multi-error.rs:17:17
|
LL | fn foo() -> (Self::Bar<u32>, Self::Baz) {
@ -12,3 +12,4 @@ LL | type Bar<T> = impl Sized;
error: aborting due to previous error
For more information about this error, try `rustc --explain E0792`.

View File

@ -1,4 +1,4 @@
error: non-defining opaque type use in defining scope
error[E0792]: non-defining opaque type use in defining scope
--> $DIR/non-defining-method.rs:16:17
|
LL | fn foo() -> Self::Bar<u32> {}
@ -12,3 +12,4 @@ LL | type Bar<T> = impl Sized;
error: aborting due to previous error
For more information about this error, try `rustc --explain E0792`.