about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-30 14:09:24 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-01 19:18:45 +1100
commit3db37fb78a9a6b76373faf85c2976a2916599f85 (patch)
tree069870d6536328537742c69bf854c378c7d3b207
parent3434466a7f3d82103beb32e1b53ec26231cbe6c7 (diff)
downloadrust-3db37fb78a9a6b76373faf85c2976a2916599f85.tar.gz
rust-3db37fb78a9a6b76373faf85c2976a2916599f85.zip
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.
-rw-r--r--tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs2
-rw-r--r--tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
index 785da11b9b2..3056ebb7575 100644
--- a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
+++ b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs
@@ -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 {}
diff --git a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
index eda24a555f8..df1bad3cad0 100644
--- a/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.stderr
@@ -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`