about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2022-11-24 11:12:34 +0000
committerBoxy <supbscripter@gmail.com>2022-11-24 11:12:46 +0000
commit72d8879c29570ee18cc3ab2c3e96bfd97221d0bb (patch)
treeaa5db5c888d1e5da5df848167835b6c56214ba5d /src
parent4e0d0d757e2f1b61ec809420b006545a9f8974c0 (diff)
downloadrust-72d8879c29570ee18cc3ab2c3e96bfd97221d0bb.tar.gz
rust-72d8879c29570ee18cc3ab2c3e96bfd97221d0bb.zip
make `error_reported` check for delayed bugs
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/consts/issue-104768.rs4
-rw-r--r--src/test/ui/consts/issue-104768.stderr12
2 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/consts/issue-104768.rs b/src/test/ui/consts/issue-104768.rs
new file mode 100644
index 00000000000..3192daafa0b
--- /dev/null
+++ b/src/test/ui/consts/issue-104768.rs
@@ -0,0 +1,4 @@
+const A: &_ = 0_u32;
+//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for constants
+
+fn main() {}
diff --git a/src/test/ui/consts/issue-104768.stderr b/src/test/ui/consts/issue-104768.stderr
new file mode 100644
index 00000000000..55b2b6f0435
--- /dev/null
+++ b/src/test/ui/consts/issue-104768.stderr
@@ -0,0 +1,12 @@
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
+  --> $DIR/issue-104768.rs:1:10
+   |
+LL | const A: &_ = 0_u32;
+   |          ^^
+   |          |
+   |          not allowed in type signatures
+   |          help: replace with the correct type: `u32`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0121`.