Skip to content

Commit 963c8bd

Browse files
committed
pass down a Ident
1 parent 2fcabf2 commit 963c8bd

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/librustc_resolve/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4241,7 +4241,7 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
42414241
lookup_name: Name,
42424242
namespace: Namespace,
42434243
start_module: &'a ModuleData<'a>,
4244-
name: Name,
4244+
crate_name: Ident,
42454245
filter_fn: FilterFn)
42464246
-> Vec<ImportSuggestion>
42474247
where FilterFn: Fn(Def) -> bool
@@ -4272,11 +4272,10 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
42724272
if self.session.rust_2018() && !in_module_is_extern {
42734273
// crate-local absolute paths start with `crate::` in edition 2018
42744274
// FIXME: may also be stabilized for Rust 2015 (Issues #45477, #44660)
4275-
if name == keywords::Crate.name() {
4276-
segms.insert(
4277-
0, ast::PathSegment::from_ident(keywords::Crate.ident())
4278-
);
4279-
}
4275+
4276+
segms.insert(
4277+
0, ast::PathSegment::from_ident(crate_name)
4278+
);
42804279
}
42814280

42824281
segms.push(ast::PathSegment::from_ident(ident));

0 commit comments

Comments
 (0)