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
// rustfmt-imports_granularity: Onepubuse foo::x;pubuse foo::x as x2;pubuse foo::y;use bar::a;use bar::b;use bar::b::f;use bar::b::f as f2;use bar::b::g;use bar::c;use bar::d::e;use bar::d::e as e2;use qux::h;use qux::i;use qux::i as j;// added this alias
// rustfmt-imports_granularity: Onepubuse foo::{x, x as x2, y};use{
bar::{
a,
b::{self, f, g},
c,
d::{e, e as e2},},
qux::{h, i, i as j},// expected, but fails};
I tested this with rev 6356fca675bd756d71f5c123cd053d17b16c573e. I assume, this (prefix == 0 && a.equal_except_alias(b)) || a == b needs some adjustment.
The text was updated successfully, but these errors were encountered:
use foo::do_something;use foo::do_something as do_it;
as:
use foo:::{do_something, do_something as do_it};
There could be some heuristics implemented to check if the item is self-able (modules, types…), e.g. if there is some foo::bar or mod foo, but this would not catch the first example.
I would like to open issue #5131 again with:
Modified https://github.com/rust-lang/rustfmt/blob/master/tests/source/5131_one.rs:
And modified https://github.com/rust-lang/rustfmt/blob/master/tests/target/5131_one.rs:
I tested this with rev
6356fca675bd756d71f5c123cd053d17b16c573e
. I assume, this(prefix == 0 && a.equal_except_alias(b)) || a == b
needs some adjustment.The text was updated successfully, but these errors were encountered: