Fix error in Rust 2018 + no_core environment
This commit is contained in:
parent
d59b46fd49
commit
362d2439bd
1 changed files with 6 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue