Remove redundant dependencies

Signed-off-by: JmPotato <ghzpotato@gmail.com>
This commit is contained in:
JmPotato 2020-08-11 14:35:15 +08:00
parent ace75f9590
commit b69dfddb57
3 changed files with 2 additions and 5 deletions

1
Cargo.lock generated
View file

@ -912,7 +912,6 @@ dependencies = [
"ra_db",
"ra_fmt",
"ra_hir",
"ra_hir_expand",
"ra_ide_db",
"ra_prof",
"ra_syntax",

View file

@ -22,5 +22,4 @@ ra_prof = { path = "../ra_prof" }
ra_db = { path = "../ra_db" }
ra_ide_db = { path = "../ra_ide_db" }
hir = { path = "../ra_hir", package = "ra_hir" }
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
test_utils = { path = "../test_utils" }

View file

@ -2,7 +2,6 @@
use rustc_hash::FxHashMap;
use hir::{HirDisplay, PathResolution, SemanticsScope};
use hir_expand::hygiene::Hygiene;
use ra_syntax::{
algo::SyntaxRewriter,
ast::{self, AstNode},
@ -111,7 +110,7 @@ impl<'a> SubstituteTypeParams<'a> {
ast::Type::PathType(path_type) => path_type.path()?,
_ => return None,
};
let path = hir::Path::from_src(path, &Hygiene::new_unhygienic())?;
let path = hir::Path::from_src(path, &hir::Hygiene::new_unhygienic())?;
let resolution = self.source_scope.resolve_hir_path(&path)?;
match resolution {
hir::PathResolution::TypeParam(tp) => Some(self.substs.get(&tp)?.syntax().clone()),
@ -151,7 +150,7 @@ impl<'a> QualifyPaths<'a> {
// don't try to qualify `Fn(Foo) -> Bar` paths, they are in prelude anyway
return None;
}
let hir_path = hir::Path::from_src(p.clone(), &Hygiene::new_unhygienic())?;
let hir_path = hir::Path::from_src(p.clone(), &hir::Hygiene::new_unhygienic())?;
let resolution = self.source_scope.resolve_hir_path(&hir_path)?;
match resolution {
PathResolution::Def(def) => {