Uh oh!
There was an error while loading. Please reload this page.
Remove some trailing semicolons from macro definitions - #422
Conversation
This will allow these macros to continue to be used in expression position if rust-lang/rust#33953 is fixed.
Even if rust-lang/rust#33953 would be fixed wouldn't this break compatibility with older Rust versions? |
Aaron1011
commented
Nov 13, 2020
No - older versions of Rust will accept the code without a semicolon, since it's still an expression. |
Aaron1011
commented
Nov 13, 2020
A fix for rust-lang/rust#33953 would mean removing this code: This would cause an error (or future-compat) lint to be emitted for code that currently compiles without warnings. However, any code that works with rust-lang/rust#33953 fixed will still work on a compiler that does not have a fix for rust-lang/rust#33953. |
KodrAus
commented
Dec 21, 2020
Thanks @Aaron1011! This looks good to me. I noticed we're not actually testing our macros against our MSRV so will follow up to run those. It includes checking the macros work in expression position so should pick up anything unexpected anyways. |
* Extract `infer_bin_dir_template` and call it once in `collect_bin_files` * Ensure `product.name.is_some()` is true * Avoid cloning `str` in `BinFile::from_product` * Optimize: Take reference in `bins::Data` * Optimize: Construct `CompactString` only when needed Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This will allow these macros to continue to be used in expression
position if rust-lang/rust#33953 is fixed.