summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/impl-item-const-semantic-fail.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/impl-item-const-semantic-fail.rs')
-rw-r--r--tests/ui/parser/impl-item-const-semantic-fail.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/parser/impl-item-const-semantic-fail.rs b/tests/ui/parser/impl-item-const-semantic-fail.rs
new file mode 100644
index 000000000..5d4692f9f
--- /dev/null
+++ b/tests/ui/parser/impl-item-const-semantic-fail.rs
@@ -0,0 +1,7 @@
+fn main() {}
+
+struct X;
+
+impl X {
+ const Y: u8; //~ ERROR associated constant in `impl` without body
+}