]> git.lizzy.rs Git - rust.git/commitdiff
Merge #6073
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Fri, 25 Sep 2020 14:57:15 +0000 (14:57 +0000)
committerGitHub <noreply@github.com>
Fri, 25 Sep 2020 14:57:15 +0000 (14:57 +0000)
6073: Dont unnecessarily unnest imports r=matklad a=Veykril

Fixes #6071

This has the side effect that paths that refer to items inside of the current module get prefixed with `self`. Changing this behavior is unfortunately not straightforward should it be unwanted, though I don't see a problem with this as prefixing imports like this with `self` is what I do personally anyways ðŸ˜…. You can see what I mean with this in one of the tests which had to be changed in `crates/ssr/src/tests.rs`.

There is one test that i still have to look at though, ~~which I by accident pushed with `#[ignore]` on it~~, which is `different_crate_renamed`, for some reason this now doesn't use the crate alias. This also makes me believe that aliases in general will break with this. So maybe this is not as straight forwards as I'd hoped for, but I don't really know how aliases work here.

Edit: The failing test should work now

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>

Trivial merge