diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-11-01 19:54:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-02 00:54:21 +0000 |
| commit | dd11a4b07befa30df96b13793acaaa89a6ae81c4 (patch) | |
| tree | 706c7a79170235bff693ec093cf790355473b7a4 /library/stdarch/crates/assert-instr-macro/src | |
| parent | 33355e69c2b90220b9668df06689a23d2efdbec5 (diff) | |
| download | rust-dd11a4b07befa30df96b13793acaaa89a6ae81c4.tar.gz rust-dd11a4b07befa30df96b13793acaaa89a6ae81c4.zip | |
Remove trailing semicolons from several macro definitions (#938)
The x86 code contains several macros that following this pattern:
```rust
macro_rules! expr {
() => { true; }
}
fn bar(_val: bool) {}
fn main() {
bar(expr!());
}
```
Here, we have a macro `expr!` that expands to tokens sequence with
a trailing semicolon.
Currently, the trailing semicolon is ignored when the macro is invoked
in expression position, due to https://github.com/rust-lang/rust/issues/33953
If this behavior is changed, then a large number of macro invocations in
`stdarch` will stop compiling.
Regardless of whether nor not this change is made, removing the
semicolon more clearly expresses the intent of the code - these macros
are designed to expand to the result of a function call, not ignore its
results (as the `;` would suggest).Diffstat (limited to 'library/stdarch/crates/assert-instr-macro/src')
0 files changed, 0 insertions, 0 deletions
