diff options
| author | Douglas Campos <qmx@qmx.me> | 2018-08-10 02:13:35 +0000 |
|---|---|---|
| committer | Douglas Campos <qmx@qmx.me> | 2018-08-16 19:21:04 +0000 |
| commit | bfbbe6d426f33439d9c5fb6d592bcde10953411f (patch) | |
| tree | d702bdf0a035ddbaa5616fbb5be6d12654ee44a4 | |
| parent | d584151bf83b327713bd2df529654ef38a47786c (diff) | |
| download | rust-bfbbe6d426f33439d9c5fb6d592bcde10953411f.tar.gz rust-bfbbe6d426f33439d9c5fb6d592bcde10953411f.zip | |
use name instead of boolean
| -rw-r--r-- | src/librustc_resolve/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 423d2a7b532..6a2b595e3e7 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -4241,7 +4241,7 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> { lookup_name: Name, namespace: Namespace, start_module: &'a ModuleData<'a>, - graph_root: bool, + name: Name, filter_fn: FilterFn) -> Vec<ImportSuggestion> where FilterFn: Fn(Def) -> bool @@ -4272,7 +4272,7 @@ 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 graph_root { + if name == keywords::Crate.name() { segms.insert( 0, ast::PathSegment::from_ident(keywords::Crate.ident()) ); |
