diff options
author | JmPotato <[email protected]> | 2020-08-11 10:19:02 +0100 |
---|---|---|
committer | JmPotato <[email protected]> | 2020-08-11 10:19:02 +0100 |
commit | 6ef019bd4601b9dc36325e096d066a4ddbda1bdf (patch) | |
tree | d7ba0fa11aba8b4a8ee0f7c6fe8683e43e3fcfd7 /crates/ra_assists | |
parent | 7fbc9afca48240cf16c82a996ac7b14c554bade6 (diff) |
Revert some FIXMEs
Signed-off-by: JmPotato <[email protected]>
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/ast_transform.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/ra_assists/src/ast_transform.rs b/crates/ra_assists/src/ast_transform.rs index 6c92124ed..07c978378 100644 --- a/crates/ra_assists/src/ast_transform.rs +++ b/crates/ra_assists/src/ast_transform.rs | |||
@@ -110,7 +110,9 @@ impl<'a> SubstituteTypeParams<'a> { | |||
110 | ast::Type::PathType(path_type) => path_type.path()?, | 110 | ast::Type::PathType(path_type) => path_type.path()?, |
111 | _ => return None, | 111 | _ => return None, |
112 | }; | 112 | }; |
113 | let path = hir::Path::from_src(path, &hir::Hygiene::new_unhygienic())?; | 113 | // FIXME: use `hir::Path::from_src` instead. |
114 | #[allow(deprecated)] | ||
115 | let path = hir::Path::from_ast(path)?; | ||
114 | let resolution = self.source_scope.resolve_hir_path(&path)?; | 116 | let resolution = self.source_scope.resolve_hir_path(&path)?; |
115 | match resolution { | 117 | match resolution { |
116 | hir::PathResolution::TypeParam(tp) => Some(self.substs.get(&tp)?.syntax().clone()), | 118 | hir::PathResolution::TypeParam(tp) => Some(self.substs.get(&tp)?.syntax().clone()), |
@@ -150,8 +152,10 @@ impl<'a> QualifyPaths<'a> { | |||
150 | // don't try to qualify `Fn(Foo) -> Bar` paths, they are in prelude anyway | 152 | // don't try to qualify `Fn(Foo) -> Bar` paths, they are in prelude anyway |
151 | return None; | 153 | return None; |
152 | } | 154 | } |
153 | let hir_path = hir::Path::from_src(p.clone(), &hir::Hygiene::new_unhygienic())?; | 155 | // FIXME: use `hir::Path::from_src` instead. |
154 | let resolution = self.source_scope.resolve_hir_path(&hir_path)?; | 156 | #[allow(deprecated)] |
157 | let hir_path = hir::Path::from_ast(p.clone()); | ||
158 | let resolution = self.source_scope.resolve_hir_path(&hir_path?)?; | ||
155 | match resolution { | 159 | match resolution { |
156 | PathResolution::Def(def) => { | 160 | PathResolution::Def(def) => { |
157 | let found_path = from.find_use_path(self.source_scope.db.upcast(), def)?; | 161 | let found_path = from.find_use_path(self.source_scope.db.upcast(), def)?; |