Skip to content

Commit

Permalink
Fix error in Rust 2018 + no_core environment
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Mar 29, 2019
1 parent d59b46f commit 362d243
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/librustc_resolve/lib.rs
Expand Up @@ -1697,7 +1697,12 @@ impl<'a> hir::lowering::Resolver for Resolver<'a> {
components: &[&str],
is_value: bool
) -> hir::Path {
let segments = iter::once(keywords::PathRoot.ident())
let root = if crate_root.is_some() {
keywords::PathRoot
} else {
keywords::Crate
};
let segments = iter::once(root.ident())
.chain(
crate_root.into_iter()
.chain(components.iter().cloned())
Expand Down

0 comments on commit 362d243

Please sign in to comment.