the.bay.news

Is there a config or attribute for `rustfmt` to only format but not modify my code?

The Rust Programming Language Forum
Is there a config or attribute for `rustfmt` to only format but not modify my code?
to test a procedural macro, I creates this helper macro: macro_rules! check_derive_expansion { ($input:tt, $expected_output: tt) => { let input = quote! $input; let output = derive_foo(input); assert_eq!(output.to_string(), quote! $expected_output . to_string()); }; } but rustfmt keeps modifying my code in the macro invocaiton. for example, with this code: #[test] fn simple() { check_derive_expansion!( { struct Foo(i32) }, { impl<> ::my_crate::Foo for...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.