]> git.lizzy.rs Git - rust.git/commit
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)
commit662ed41ebcb1cd221b32be95d08b5bf5f10ae525
tree943ef1bbcd95d9854975da1d2d9c6a3aa24e11ba
parentdc09f1597fea78900a6b67d4871edfbb6fafbcdc
parent747f6f64d7f8fae3a40be6ffacc9640bca068bd0
Merge #6073

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>