A small fix in enforce_slug_naming.rs.

In #119972 the code should have become `E0123` rather than `0123`. This
fix doesn't affect the outcome because the proc macro errors out before
the type of the code is checked, but the fix makes the test's code
consistent with other similar code elsewhere.
This commit is contained in:
Nicholas Nethercote 2024-01-30 14:09:24 +11:00
parent 3434466a7f
commit 3db37fb78a
2 changed files with 2 additions and 2 deletions

View file

@ -19,6 +19,6 @@ use rustc_errors::{Applicability, MultiSpan};
extern crate rustc_session;
#[derive(Diagnostic)]
#[diag(compiletest_example, code = 0123)]
#[diag(compiletest_example, code = E0123)]
//~^ ERROR diagnostic slug and crate name do not match
struct Hello {}

View file

@ -1,7 +1,7 @@
error: diagnostic slug and crate name do not match
--> $DIR/enforce_slug_naming.rs:22:8
|
LL | #[diag(compiletest_example, code = 0123)]
LL | #[diag(compiletest_example, code = E0123)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: slug is `compiletest_example` but the crate name is `rustc_dummy`