Commit 3bea64b
authored
Remove trailing semicolon from macro expression
Trailing semicolon in macro expression is being phased out.
The Rust compiler gives the following warning when compiling this code.
```
warning: trailing semicolon in macro used in expression position
--> macro.rs:6:27
|
6 | println!("Hello!");
| ^
...
12 | say_hello!()
| ------------ in this macro invocation
|
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #79813 <rust-lang/rust#79813>
= note: macro invocations at the end of a block are treated as expressions
= note: to ignore the value produced by the macro, add a semicolon after the invocation of `say_hello`
= note: this warning originates in the macro `say_hello` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: 1 warning emitted
```1 parent efe23c4 commit 3bea64b
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments