Skip to content

Commit ec6d066

Browse files
authored
Rollup merge of rust-lang#87385 - Aaron1011:final-enable-semi, r=petrochenkov
Make `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` warn by default This PR makes the `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` lint warn by default. To avoid showing a large number of un-actionable warnings to users, we only enable the lint for macros defined in the same crate. This ensures that users will be able to fix the warning by simply removing a semicolon. In the future, I'd like to enable this lint unconditionally, and eventually make it into a hard error in a future edition. This PR is a step towards that goal.
2 parents 95108aa + b5ddc10 commit ec6d066

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

std/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ macro_rules! dbg {
290290
// `$val` expression could be a block (`{ .. }`), in which case the `eprintln!`
291291
// will be malformed.
292292
() => {
293-
$crate::eprintln!("[{}:{}]", $crate::file!(), $crate::line!());
293+
$crate::eprintln!("[{}:{}]", $crate::file!(), $crate::line!())
294294
};
295295
($val:expr $(,)?) => {
296296
// Use of `match` here is intentional because it affects the lifetimes

0 commit comments

Comments
 (0)