summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/redundant-semicolon
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/redundant-semicolon')
-rw-r--r--src/test/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs12
-rw-r--r--src/test/ui/lint/redundant-semicolon/item-stmt-semi.rs6
-rw-r--r--src/test/ui/lint/redundant-semicolon/item-stmt-semi.stderr20
-rw-r--r--src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs19
-rw-r--r--src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr21
5 files changed, 0 insertions, 78 deletions
diff --git a/src/test/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs b/src/test/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs
deleted file mode 100644
index 5a94ccd74..000000000
--- a/src/test/ui/lint/redundant-semicolon/auxiliary/redundant-semi-proc-macro-def.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// force-host
-// no-prefer-dynamic
-#![crate_type="proc-macro"]
-#![crate_name="redundant_semi_proc_macro"]
-extern crate proc_macro;
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn should_preserve_spans(_attr: TokenStream, item: TokenStream) -> TokenStream {
- eprintln!("{:?}", item);
- item
-}
diff --git a/src/test/ui/lint/redundant-semicolon/item-stmt-semi.rs b/src/test/ui/lint/redundant-semicolon/item-stmt-semi.rs
deleted file mode 100644
index 8c79630b7..000000000
--- a/src/test/ui/lint/redundant-semicolon/item-stmt-semi.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-#![deny(redundant_semicolons)]
-
-fn main() {
- fn inner() {}; //~ ERROR unnecessary
- struct Bar {}; //~ ERROR unnecessary
-}
diff --git a/src/test/ui/lint/redundant-semicolon/item-stmt-semi.stderr b/src/test/ui/lint/redundant-semicolon/item-stmt-semi.stderr
deleted file mode 100644
index 451b152cb..000000000
--- a/src/test/ui/lint/redundant-semicolon/item-stmt-semi.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: unnecessary trailing semicolon
- --> $DIR/item-stmt-semi.rs:4:18
- |
-LL | fn inner() {};
- | ^ help: remove this semicolon
- |
-note: the lint level is defined here
- --> $DIR/item-stmt-semi.rs:1:9
- |
-LL | #![deny(redundant_semicolons)]
- | ^^^^^^^^^^^^^^^^^^^^
-
-error: unnecessary trailing semicolon
- --> $DIR/item-stmt-semi.rs:5:18
- |
-LL | struct Bar {};
- | ^ help: remove this semicolon
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs b/src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs
deleted file mode 100644
index 08a5c6c2b..000000000
--- a/src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// aux-build:redundant-semi-proc-macro-def.rs
-
-#![deny(redundant_semicolons)]
-extern crate redundant_semi_proc_macro;
-use redundant_semi_proc_macro::should_preserve_spans;
-
-#[should_preserve_spans]
-fn span_preservation() {
- let tst = 123;; //~ ERROR unnecessary trailing semicolon
- match tst {
- // Redundant semicolons are parsed as empty tuple exprs
- // for the lint, so ensure the lint doesn't affect
- // empty tuple exprs explicitly in source.
- 123 => (),
- _ => ()
- };;; //~ ERROR unnecessary trailing semicolons
-}
-
-fn main() {}
diff --git a/src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr b/src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr
deleted file mode 100644
index e31d14c55..000000000
--- a/src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-TokenStream [Ident { ident: "fn", span: #0 bytes(198..200) }, Ident { ident: "span_preservation", span: #0 bytes(201..218) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(218..220) }, Group { delimiter: Brace, stream: TokenStream [Ident { ident: "let", span: #0 bytes(228..231) }, Ident { ident: "tst", span: #0 bytes(232..235) }, Punct { ch: '=', spacing: Alone, span: #0 bytes(236..237) }, Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(238..241) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(241..242) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(242..243) }, Ident { ident: "match", span: #0 bytes(289..294) }, Ident { ident: "tst", span: #0 bytes(295..298) }, Group { delimiter: Brace, stream: TokenStream [Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(483..486) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(487..488) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(488..489) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(490..492) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(492..493) }, Ident { ident: "_", span: #0 bytes(502..503) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(504..505) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(505..506) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(507..509) }], span: #0 bytes(299..515) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(515..516) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(516..517) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(517..518) }], span: #0 bytes(222..562) }]
-error: unnecessary trailing semicolon
- --> $DIR/redundant-semi-proc-macro.rs:9:19
- |
-LL | let tst = 123;;
- | ^ help: remove this semicolon
- |
-note: the lint level is defined here
- --> $DIR/redundant-semi-proc-macro.rs:3:9
- |
-LL | #![deny(redundant_semicolons)]
- | ^^^^^^^^^^^^^^^^^^^^
-
-error: unnecessary trailing semicolons
- --> $DIR/redundant-semi-proc-macro.rs:16:7
- |
-LL | };;;
- | ^^ help: remove these semicolons
-
-error: aborting due to 2 previous errors
-