Skip to content

Commit 0af50b4

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 2b20f49 + 967a721 commit 0af50b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/ui/needless_borrow_pat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
fn f1(_: &str) {}
88
macro_rules! m1 {
99
($e:expr) => {
10-
f1($e);
10+
f1($e)
1111
};
1212
}
1313
macro_rules! m3 {

tests/ui/ref_binding_to_reference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
fn f1(_: &str) {}
88
macro_rules! m2 {
99
($e:expr) => {
10-
f1(*$e);
10+
f1(*$e)
1111
};
1212
}
1313
macro_rules! m3 {

0 commit comments

Comments
 (0)