resolve: Rename CrateLint
to Finalize
And `crate_lint`/`record_used` to `finalize`
This commit is contained in:
parent
74d079d566
commit
1ad64a23d4
7 changed files with 147 additions and 170 deletions
|
@ -24,10 +24,8 @@ use tracing::debug;
|
|||
use crate::imports::{Import, ImportKind, ImportResolver};
|
||||
use crate::path_names_to_string;
|
||||
use crate::{AmbiguityError, AmbiguityErrorMisc, AmbiguityKind};
|
||||
use crate::{
|
||||
BindingError, CrateLint, HasGenericParams, MacroRulesScope, Module, ModuleOrUniformRoot,
|
||||
};
|
||||
use crate::{NameBinding, NameBindingKind, PrivacyError, VisResolutionError};
|
||||
use crate::{BindingError, HasGenericParams, MacroRulesScope, Module, ModuleOrUniformRoot};
|
||||
use crate::{Finalize, NameBinding, NameBindingKind, PrivacyError, VisResolutionError};
|
||||
use crate::{ParentScope, PathResult, ResolutionError, Resolver, Scope, ScopeSet, Segment};
|
||||
|
||||
type Res = def::Res<ast::NodeId>;
|
||||
|
@ -1424,7 +1422,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
|
|||
) -> Option<(Vec<Segment>, Vec<String>)> {
|
||||
// Replace first ident with `self` and check if that is valid.
|
||||
path[0].ident.name = kw::SelfLower;
|
||||
let result = self.r.resolve_path(&path, None, parent_scope, CrateLint::No);
|
||||
let result = self.r.resolve_path(&path, None, parent_scope, Finalize::No);
|
||||
debug!("make_missing_self_suggestion: path={:?} result={:?}", path, result);
|
||||
if let PathResult::Module(..) = result { Some((path, Vec::new())) } else { None }
|
||||
}
|
||||
|
@ -1443,7 +1441,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
|
|||
) -> Option<(Vec<Segment>, Vec<String>)> {
|
||||
// Replace first ident with `crate` and check if that is valid.
|
||||
path[0].ident.name = kw::Crate;
|
||||
let result = self.r.resolve_path(&path, None, parent_scope, CrateLint::No);
|
||||
let result = self.r.resolve_path(&path, None, parent_scope, Finalize::No);
|
||||
debug!("make_missing_crate_suggestion: path={:?} result={:?}", path, result);
|
||||
if let PathResult::Module(..) = result {
|
||||
Some((
|
||||
|
@ -1474,7 +1472,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
|
|||
) -> Option<(Vec<Segment>, Vec<String>)> {
|
||||
// Replace first ident with `crate` and check if that is valid.
|
||||
path[0].ident.name = kw::Super;
|
||||
let result = self.r.resolve_path(&path, None, parent_scope, CrateLint::No);
|
||||
let result = self.r.resolve_path(&path, None, parent_scope, Finalize::No);
|
||||
debug!("make_missing_super_suggestion: path={:?} result={:?}", path, result);
|
||||
if let PathResult::Module(..) = result { Some((path, Vec::new())) } else { None }
|
||||
}
|
||||
|
@ -1508,7 +1506,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
|
|||
for name in extern_crate_names.into_iter() {
|
||||
// Replace first ident with a crate name and check if that is valid.
|
||||
path[0].ident.name = name;
|
||||
let result = self.r.resolve_path(&path, None, parent_scope, CrateLint::No);
|
||||
let result = self.r.resolve_path(&path, None, parent_scope, Finalize::No);
|
||||
debug!(
|
||||
"make_external_crate_suggestion: name={:?} path={:?} result={:?}",
|
||||
name, path, result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue