5717: Minor

 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-08-12 10:35:18 +00:00 committed by GitHub
commit d0fd8eb7f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,8 +265,7 @@ impl SourceAnalyzer {
} }
// This must be a normal source file rather than macro file. // This must be a normal source file rather than macro file.
let hir_path = let hir_path = Path::from_src(path.clone(), &Hygiene::new(db.upcast(), self.file_id))?;
crate::Path::from_src(path.clone(), &Hygiene::new(db.upcast(), self.file_id))?;
// Case where path is a qualifier of another path, e.g. foo::bar::Baz where we // Case where path is a qualifier of another path, e.g. foo::bar::Baz where we
// trying to resolve foo::bar. // trying to resolve foo::bar.
@ -451,7 +450,7 @@ fn adjust(
pub(crate) fn resolve_hir_path( pub(crate) fn resolve_hir_path(
db: &dyn HirDatabase, db: &dyn HirDatabase,
resolver: &Resolver, resolver: &Resolver,
path: &crate::Path, path: &Path,
) -> Option<PathResolution> { ) -> Option<PathResolution> {
let types = let types =
resolver.resolve_path_in_type_ns_fully(db.upcast(), path.mod_path()).map(|ty| match ty { resolver.resolve_path_in_type_ns_fully(db.upcast(), path.mod_path()).map(|ty| match ty {
@ -512,7 +511,7 @@ pub(crate) fn resolve_hir_path(
pub(crate) fn resolve_hir_path_qualifier( pub(crate) fn resolve_hir_path_qualifier(
db: &dyn HirDatabase, db: &dyn HirDatabase,
resolver: &Resolver, resolver: &Resolver,
path: &crate::Path, path: &Path,
) -> Option<PathResolution> { ) -> Option<PathResolution> {
let items = resolver let items = resolver
.resolve_module_path_in_items(db.upcast(), path.mod_path()) .resolve_module_path_in_items(db.upcast(), path.mod_path())