A newline after the `#[test]` is indented: impl <A, D> MyTrait<A, D> for YourType where A: TraitB + TraitC, D: TraitE + TraitF {} #[test] ^ I expect format this as impl <A, D> MyTrait<A, D> for YourType where A: TraitB + TraitC, D: TraitE + TraitF {} #[test] ^ This is another result: fn call_twice<F>(closure: F) where F: FnMut() { closure(); closure(); } #[test] ^ Expected indentation: fn call_twice<F>(closure: F) where F: FnMut() { closure(); closure(); } #[test] ^