diff options
author | JmPotato <[email protected]> | 2020-08-11 07:35:15 +0100 |
---|---|---|
committer | JmPotato <[email protected]> | 2020-08-11 07:35:15 +0100 |
commit | b69dfddb572b9182f4880065ca5034aba8b15ce3 (patch) | |
tree | a4b9d99f71b4ac4db9dfa92e335928490e9a4c65 /crates/ra_assists/src | |
parent | ace75f95905564a34f46be57ead51828844da745 (diff) |
Remove redundant dependencies
Signed-off-by: JmPotato <[email protected]>
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/ast_transform.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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 @@ | |||
2 | use rustc_hash::FxHashMap; | 2 | use rustc_hash::FxHashMap; |
3 | 3 | ||
4 | use hir::{HirDisplay, PathResolution, SemanticsScope}; | 4 | use hir::{HirDisplay, PathResolution, SemanticsScope}; |
5 | use hir_expand::hygiene::Hygiene; | ||
6 | use ra_syntax::{ | 5 | use 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) => { |