Skip to content

Commit

Permalink
pass down a Ident
Browse files Browse the repository at this point in the history
  • Loading branch information
qmx committed Aug 16, 2018
1 parent 2fcabf2 commit 963c8bd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/librustc_resolve/lib.rs
Expand Up @@ -4241,7 +4241,7 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
lookup_name: Name,
namespace: Namespace,
start_module: &'a ModuleData<'a>,
name: Name,
crate_name: Ident,
filter_fn: FilterFn)
-> Vec<ImportSuggestion>
where FilterFn: Fn(Def) -> bool
Expand Down Expand Up @@ -4272,11 +4272,10 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
if self.session.rust_2018() && !in_module_is_extern {
// crate-local absolute paths start with `crate::` in edition 2018
// FIXME: may also be stabilized for Rust 2015 (Issues #45477, #44660)
if name == keywords::Crate.name() {
segms.insert(
0, ast::PathSegment::from_ident(keywords::Crate.ident())
);
}

segms.insert(
0, ast::PathSegment::from_ident(crate_name)
);
}

segms.push(ast::PathSegment::from_ident(ident));
Expand Down

0 comments on commit 963c8bd

Please sign in to comment.