forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#12347 - feniljain:fix_extract_module, r=Veykril
fix(extract_module) resolving import panics and improve import resolution - Should solve rust-lang#11766 - While adding a test case for this issue, I observed another issue: For this test case: ```rust mod x { pub struct Foo; pub struct Bar; } use x::{Bar, Foo}; $0type A = (Foo, Bar);$0 ``` extract module should yield this: ```rust mod x { pub struct Foo; pub struct Bar; } use x::{}; mod modname { use super::x::Bar; use super::x::Foo; pub(crate) type A = (Foo, Bar); } ``` instead it gave: ```rust mod x { pub struct Foo; pub struct Bar; } use x::{}; mod modname { use x::Bar; use x::Foo; pub(crate) type A = (Foo, Bar); } ``` So fixed this problem with second commit
- Loading branch information
Showing
1 changed file
with
92 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters