You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macro_rules! x {($tt:tt) => {};}extern"C"{x!(-);x!(x);}
Rustfmt loses the necessary ; after some macro calls, which becomes invalid Rust syntax in the above input. The call x!(x); appears unaffected, regardless of the order of the two calls.
- x!(-);+ x!(-)
Self-contained repro as of current master (e0c7b7d):
$ echo'extern { x!(-); x!(x); }'| cargo run --bin rustfmtextern "C" { x!(-) x!(x);}
$ !!| rustc -error: macros that expand to items must be delimited with braces or followed by a semicolon --> <anon>:2:7 |2 | x!(-) | ^^^ |help: change the delimiters to curly braces |2 | x!{-} | ~ ~help: add a semicolon |2 | x!(-); | +
The text was updated successfully, but these errors were encountered:
#[cxx::bridge]mod ffi {extern"C++"{include!("path/to/thing.h");// turns into `#include "path/to/thing.h"` in C++include!(<some/systemheader>);// turns into `#include <some/systemheader>`typeThing;fnwhatever() -> UniquePtr<Thing>;}}
Rustfmt loses the necessary
;
after some macro calls, which becomes invalid Rust syntax in the above input. The callx!(x);
appears unaffected, regardless of the order of the two calls.Self-contained repro as of current master (e0c7b7d):
The text was updated successfully, but these errors were encountered: