about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-09 06:25:13 +0000
committerbors <bors@rust-lang.org>2018-09-09 06:25:13 +0000
commit3d2fc456a91e898f735f97f1a9ea79432da4e1a5 (patch)
treeb7620e25ede29068f275795f65610a116f215a70 /src/libstd
parentdac76020a5a33fa723d578043e422455e598620b (diff)
parente0e7cf303ba2fd63763e6d99a9d67dced1fac8ab (diff)
downloadrust-3d2fc456a91e898f735f97f1a9ea79432da4e1a5.tar.gz
rust-3d2fc456a91e898f735f97f1a9ea79432da4e1a5.zip
Auto merge of #53988 - eddyb:issue-53770, r=petrochenkov
rustc_resolve: only prepend CrateRoot to a non-keyword segment.

Fixes #53770 by treating `use` paths as absolute in a finer-grained manner, specifically:
```rust
use {a, crate::b, self::c, super::d};
```
Used to be interpreted as if it were (when `uniform_paths` is not enabled):
```rust
use ::{a, crate::b, self::c, super::d};
```
With this PR, the `CrateRoot` pseudo-keyword indicating an absolute path is only inserted when the first path segment is found (if it's not a keyword), i.e. the example behaves like:
```rust
use {::a, crate::b, self::c, super::d};
```
This should (finally) make `use {path};` fully equivalent to `use path;`.

r? @petrochenkov cc @cramertj @joshtriplett @nikomatsakis
Diffstat (limited to 'src/libstd')
0 files changed, 0 insertions, 0 deletions