aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock1
-rw-r--r--crates/ra_assists/Cargo.toml1
-rw-r--r--crates/ra_assists/src/ast_transform.rs5
3 files changed, 2 insertions, 5 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 936e863f5..a094ec4f7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -912,7 +912,6 @@ dependencies = [
912 "ra_db", 912 "ra_db",
913 "ra_fmt", 913 "ra_fmt",
914 "ra_hir", 914 "ra_hir",
915 "ra_hir_expand",
916 "ra_ide_db", 915 "ra_ide_db",
917 "ra_prof", 916 "ra_prof",
918 "ra_syntax", 917 "ra_syntax",
diff --git a/crates/ra_assists/Cargo.toml b/crates/ra_assists/Cargo.toml
index a436e861d..bd2905f08 100644
--- a/crates/ra_assists/Cargo.toml
+++ b/crates/ra_assists/Cargo.toml
@@ -22,5 +22,4 @@ ra_prof = { path = "../ra_prof" }
22ra_db = { path = "../ra_db" } 22ra_db = { path = "../ra_db" }
23ra_ide_db = { path = "../ra_ide_db" } 23ra_ide_db = { path = "../ra_ide_db" }
24hir = { path = "../ra_hir", package = "ra_hir" } 24hir = { path = "../ra_hir", package = "ra_hir" }
25hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
26test_utils = { path = "../test_utils" } 25test_utils = { path = "../test_utils" }
diff --git a/crates/ra_assists/src/ast_transform.rs b/crates/ra_assists/src/ast_transform.rs
index 02c4a4bae..6c92124ed 100644
--- a/crates/ra_assists/src/ast_transform.rs
+++ b/crates/ra_assists/src/ast_transform.rs
@@ -2,7 +2,6 @@
2use rustc_hash::FxHashMap; 2use rustc_hash::FxHashMap;
3 3
4use hir::{HirDisplay, PathResolution, SemanticsScope}; 4use hir::{HirDisplay, PathResolution, SemanticsScope};
5use hir_expand::hygiene::Hygiene;
6use ra_syntax::{ 5use ra_syntax::{
7 algo::SyntaxRewriter, 6 algo::SyntaxRewriter,
8 ast::{self, AstNode}, 7 ast::{self, AstNode},
@@ -111,7 +110,7 @@ impl<'a> SubstituteTypeParams<'a> {
111 ast::Type::PathType(path_type) => path_type.path()?, 110 ast::Type::PathType(path_type) => path_type.path()?,
112 _ => return None, 111 _ => return None,
113 }; 112 };
114 let path = hir::Path::from_src(path, &Hygiene::new_unhygienic())?; 113 let path = hir::Path::from_src(path, &hir::Hygiene::new_unhygienic())?;
115 let resolution = self.source_scope.resolve_hir_path(&path)?; 114 let resolution = self.source_scope.resolve_hir_path(&path)?;
116 match resolution { 115 match resolution {
117 hir::PathResolution::TypeParam(tp) => Some(self.substs.get(&tp)?.syntax().clone()), 116 hir::PathResolution::TypeParam(tp) => Some(self.substs.get(&tp)?.syntax().clone()),
@@ -151,7 +150,7 @@ impl<'a> QualifyPaths<'a> {
151 // don't try to qualify `Fn(Foo) -> Bar` paths, they are in prelude anyway 150 // don't try to qualify `Fn(Foo) -> Bar` paths, they are in prelude anyway
152 return None; 151 return None;
153 } 152 }
154 let hir_path = hir::Path::from_src(p.clone(), &Hygiene::new_unhygienic())?; 153 let hir_path = hir::Path::from_src(p.clone(), &hir::Hygiene::new_unhygienic())?;
155 let resolution = self.source_scope.resolve_hir_path(&hir_path)?; 154 let resolution = self.source_scope.resolve_hir_path(&hir_path)?;
156 match resolution { 155 match resolution {
157 PathResolution::Def(def) => { 156 PathResolution::Def(def) => {