提交 ae853752 编写于 作者: D Douglas Campos

no need to special case std

上级 32da6ccc
......@@ -4273,12 +4273,9 @@ fn lookup_import_candidates_from_module<FilterFn>(&mut self,
if self.session.rust_2018() {
// crate-local absolute paths start with `crate::` in edition 2018
// FIXME: may also be stabilized for Rust 2015 (Issues #45477, #44660)
let first_segment_ident = segms[0].ident;
if first_segment_ident.name != "std" {
segms.insert(
0, ast::PathSegment::from_ident(crate_name)
);
}
segms.insert(
0, ast::PathSegment::from_ident(crate_name)
);
}
segms.push(ast::PathSegment::from_ident(ident));
......@@ -4307,8 +4304,7 @@ fn lookup_import_candidates_from_module<FilterFn>(&mut self,
let is_extern_crate_that_also_appears_in_prelude =
name_binding.is_extern_crate() &&
self.session.rust_2018() &&
self.extern_prelude.contains(&ident.name);
self.session.rust_2018();
let is_visible_to_user =
!in_module_is_extern || name_binding.vis == ty::Visibility::Public;
......
......@@ -9,11 +9,11 @@ LL | use crate::plumbing::Drain;
|
LL | use std::collections::binary_heap::Drain;
|
LL | use std::collections::binary_heap::Drain;
|
LL | use std::collections::hash_map::Drain;
|
and 9 other candidates
LL | use std::collections::hash_set::Drain;
|
and 3 other candidates
error: aborting due to previous error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册