1 // aux-build:redundant-semi-proc-macro-def.rs
3 #![deny(redundant_semicolons)]
4 extern crate redundant_semi_proc_macro;
5 use redundant_semi_proc_macro::should_preserve_spans;
7 #[should_preserve_spans]
8 fn span_preservation() {
9 let tst = 123;; //~ ERROR unnecessary trailing semicolon
11 // Redundant semicolons are parsed as empty tuple exprs
12 // for the lint, so ensure the lint doesn't affect
13 // empty tuple exprs explicitly in source.
16 };;; //~ ERROR unnecessary trailing semicolons