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
Correct. Mac call formatting is intentionally pretty limited for various reasons (complexity, failure to be semantics preserving, high potential for butchering, etc.) and that definitely holds true for items within cfg_if. rustfmt will recurse into and format any mods defined or imported within cfg_if, but not the items themselves
Describe the bug
Rustfmt does not normalize
use std::rc::Weak as Weak;
touse std::rc::Weak;
in some cases.To Reproduce
x.py fmt
on https://github.com/rust-lang/rust/blob/c3ed6681ff8d446e68ce272be4bf66f4145f6e29/compiler/rustc_data_structures/src/sync.rs#L224Expected behavior
It should turn that line into
use std::rc::Weak;
, the same way it does on playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=2fbcb920f10e1ad6b4883e3970eba5cc. I'm not sure why this only breaks on rustc.Meta
rustfmt: nightly-2020-11-19
x.py fmt
The text was updated successfully, but these errors were encountered: