Skip to content

Commit d1de799

Browse files
committed
Remove trailing semicolon on a bunch of macros
1 parent 38b670e commit d1de799

File tree

6 files changed

+9
-16
lines changed

6 files changed

+9
-16
lines changed

library/std/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ macro_rules! eprintln {
282282
#[stable(feature = "dbg_macro", since = "1.32.0")]
283283
macro_rules! dbg {
284284
() => {
285-
$crate::eprintln!("[{}:{}]", $crate::file!(), $crate::line!());
285+
$crate::eprintln!("[{}:{}]", $crate::file!(), $crate::line!())
286286
};
287287
($val:expr $(,)?) => {
288288
// Use of `match` here is intentional because it affects the lifetimes

src/test/ui/hygiene/auxiliary/intercrate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub mod foo {
55
mod bar {
66
fn f() -> u32 { 1 }
77
pub macro m() {
8-
f();
8+
f()
99
}
1010
}
1111
}

src/test/ui/hygiene/intercrate.stderr

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
error: macro expansion ignores token `;` and any following
2-
--> $DIR/auxiliary/intercrate.rs:8:16
3-
|
4-
LL | f();
5-
| ^
6-
|
7-
::: $DIR/intercrate.rs:10:16
1+
error: type `fn() -> u32 {foo::bar::f}` is private
2+
--> $DIR/intercrate.rs:10:16
83
|
94
LL | assert_eq!(intercrate::foo::m!(), 1);
10-
| ---------------------- help: you might be missing a semicolon here: `;`
11-
| |
12-
| caused by the macro expansion here
5+
| ^^^^^^^^^^^^^^^^^^^^^ private type
136
|
14-
= note: the usage of `m!` is likely invalid in expression context
7+
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
158

169
error: aborting due to previous error
1710

src/test/ui/macros/macro-context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// (typeof used because it's surprisingly hard to find an unparsed token after a stmt)
22
macro_rules! m {
33
() => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof`
4-
//~| ERROR macro expansion ignores token `typeof`
4+
//~| ERROR macro expansion ignores token `;`
55
//~| ERROR macro expansion ignores token `;`
66
//~| ERROR macro expansion ignores token `;`
77
//~| ERROR cannot find type `i` in this scope

src/test/ui/macros/trace_faulty_macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ macro_rules! my_faulty_macro {
1010

1111
macro_rules! pat_macro {
1212
() => {
13-
pat_macro!(A{a:a, b:0, c:_, ..});
13+
pat_macro!(A{a:a, b:0, c:_, ..})
1414
};
1515
($a:pat) => {
1616
$a //~ ERROR expected expression

src/test/ui/proc-macro/nested-nonterminal-tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ macro_rules! wrap {
1717
(first, $e:expr) => { wrap!(second, $e + 1) };
1818
(second, $e:expr) => { wrap!(third, $e + 2) };
1919
(third, $e:expr) => {
20-
print_bang!($e + 3);
20+
print_bang!($e + 3)
2121
};
2222
}
2323

0 commit comments

Comments
 (0)