about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-03-05 19:53:45 +0000
committerbors <bors@rust-lang.org>2022-03-05 19:53:45 +0000
commitc274e4969f058b1c644243181ece9f829efa7594 (patch)
tree0ddc168615acabe0f03bfb299bc268c6a7327285 /src/test/ui
parentab2bd41ce0da79f82e7bfd281bb746a6eee21346 (diff)
parent00fd87e68ae02bb2a8b04fc00d6e9dd471470485 (diff)
downloadrust-c274e4969f058b1c644243181ece9f829efa7594.tar.gz
rust-c274e4969f058b1c644243181ece9f829efa7594.zip
Auto merge of #94648 - RalfJung:rollup-4iorcrd, r=RalfJung
Rollup of 4 pull requests

Successful merges:

 - #94630 (Update note about tier 2 docs.)
 - #94633 (Suggest removing a semicolon after derive attributes)
 - #94642 (Fix source code pages scroll)
 - #94645 (do not attempt to open cgroup files under Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/parser/attr-with-a-semicolon.rs4
-rw-r--r--src/test/ui/parser/attr-with-a-semicolon.stderr14
2 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/parser/attr-with-a-semicolon.rs b/src/test/ui/parser/attr-with-a-semicolon.rs
new file mode 100644
index 00000000000..56fe40b916b
--- /dev/null
+++ b/src/test/ui/parser/attr-with-a-semicolon.rs
@@ -0,0 +1,4 @@
+#[derive(Debug, Clone)]; //~ERROR expected item after attributes
+struct Foo;
+
+fn main() {}
diff --git a/src/test/ui/parser/attr-with-a-semicolon.stderr b/src/test/ui/parser/attr-with-a-semicolon.stderr
new file mode 100644
index 00000000000..49ed30150d0
--- /dev/null
+++ b/src/test/ui/parser/attr-with-a-semicolon.stderr
@@ -0,0 +1,14 @@
+error: expected item after attributes
+  --> $DIR/attr-with-a-semicolon.rs:1:1
+   |
+LL | #[derive(Debug, Clone)];
+   | ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: consider removing this semicolon
+   |
+LL - #[derive(Debug, Clone)];
+LL + #[derive(Debug, Clone)]
+   | 
+
+error: aborting due to previous error
+