Skip to content

Commit 3db37fb

Browse files
committed
A small fix in enforce_slug_naming.rs.
In rust-lang#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.
1 parent 3434466 commit 3db37fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ use rustc_errors::{Applicability, MultiSpan};
1919
extern crate rustc_session;
2020

2121
#[derive(Diagnostic)]
22-
#[diag(compiletest_example, code = 0123)]
22+
#[diag(compiletest_example, code = E0123)]
2323
//~^ ERROR diagnostic slug and crate name do not match
2424
struct Hello {}

tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: diagnostic slug and crate name do not match
22
--> $DIR/enforce_slug_naming.rs:22:8
33
|
4-
LL | #[diag(compiletest_example, code = 0123)]
4+
LL | #[diag(compiletest_example, code = E0123)]
55
| ^^^^^^^^^^^^^^^^^^^
66
|
77
= note: slug is `compiletest_example` but the crate name is `rustc_dummy`

0 commit comments

Comments
 (0)