Skip to content

Commit

Permalink
A small fix in enforce_slug_naming.rs.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nnethercote committed Feb 1, 2024
1 parent 3434466 commit 3db37fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Original file line number Diff line number Diff line change
@@ -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`
Expand Down

0 comments on commit 3db37fb

Please sign in to comment.