about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-02 12:37:17 +0000
committerbors <bors@rust-lang.org>2022-06-02 12:37:17 +0000
commit2f0814ea351d323ee236f6757c3f7603fc7d714a (patch)
tree85c225f83fce5758eb4cc178501d5311e4620df7 /src/test/codegen/src-hash-algorithm
parent6f7c5589abfc93fbdfc071cc2716d1ea7b527e2e (diff)
parent8a1ef52f5c39e1d549bf4c731f5d7756fe54cd0e (diff)
downloadrust-2f0814ea351d323ee236f6757c3f7603fc7d714a.tar.gz
rust-2f0814ea351d323ee236f6757c3f7603fc7d714a.zip
Auto merge of #12347 - feniljain:fix_extract_module, r=Veykril
fix(extract_module) resolving import panics and improve import resolution

- Should solve #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
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions