diff options
author | Aleksey Kladov <[email protected]> | 2019-11-20 06:40:36 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-20 06:42:30 +0000 |
commit | 36e3fc9d5413f7e6e17e82867aae1318645880a3 (patch) | |
tree | 166ee3c45f99611f7c20740c2a246f5b3bed41a3 /crates/ra_assists/src/assists | |
parent | e975f6364cb3caf50467835afb0dafce887f51f0 (diff) |
Rename Source::ast -> Source::value
Diffstat (limited to 'crates/ra_assists/src/assists')
-rw-r--r-- | crates/ra_assists/src/assists/add_missing_impl_members.rs | 2 | ||||
-rw-r--r-- | crates/ra_assists/src/assists/add_new.rs | 4 | ||||
-rw-r--r-- | crates/ra_assists/src/assists/fill_match_arms.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_assists/src/assists/add_missing_impl_members.rs b/crates/ra_assists/src/assists/add_missing_impl_members.rs index 91af161ee..cef669cb5 100644 --- a/crates/ra_assists/src/assists/add_missing_impl_members.rs +++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs | |||
@@ -174,7 +174,7 @@ fn resolve_target_trait_def( | |||
174 | .path()?; | 174 | .path()?; |
175 | 175 | ||
176 | match analyzer.resolve_path(db, &ast_path) { | 176 | match analyzer.resolve_path(db, &ast_path) { |
177 | Some(hir::PathResolution::Def(hir::ModuleDef::Trait(def))) => Some(def.source(db).ast), | 177 | Some(hir::PathResolution::Def(hir::ModuleDef::Trait(def))) => Some(def.source(db).value), |
178 | _ => None, | 178 | _ => None, |
179 | } | 179 | } |
180 | } | 180 | } |
diff --git a/crates/ra_assists/src/assists/add_new.rs b/crates/ra_assists/src/assists/add_new.rs index 2038afdc6..b5f8afb4e 100644 --- a/crates/ra_assists/src/assists/add_new.rs +++ b/crates/ra_assists/src/assists/add_new.rs | |||
@@ -141,7 +141,7 @@ fn find_struct_impl( | |||
141 | })?; | 141 | })?; |
142 | 142 | ||
143 | let struct_ty = { | 143 | let struct_ty = { |
144 | let src = hir::Source { file_id: ctx.frange.file_id.into(), ast: strukt.clone() }; | 144 | let src = hir::Source { file_id: ctx.frange.file_id.into(), value: strukt.clone() }; |
145 | hir::Struct::from_source(db, src).unwrap().ty(db) | 145 | hir::Struct::from_source(db, src).unwrap().ty(db) |
146 | }; | 146 | }; |
147 | 147 | ||
@@ -152,7 +152,7 @@ fn find_struct_impl( | |||
152 | return false; | 152 | return false; |
153 | } | 153 | } |
154 | 154 | ||
155 | let src = hir::Source { file_id: ctx.frange.file_id.into(), ast: impl_blk.clone() }; | 155 | let src = hir::Source { file_id: ctx.frange.file_id.into(), value: impl_blk.clone() }; |
156 | let blk = hir::ImplBlock::from_source(db, src).unwrap(); | 156 | let blk = hir::ImplBlock::from_source(db, src).unwrap(); |
157 | 157 | ||
158 | let same_ty = blk.target_ty(db) == struct_ty; | 158 | let same_ty = blk.target_ty(db) == struct_ty; |
diff --git a/crates/ra_assists/src/assists/fill_match_arms.rs b/crates/ra_assists/src/assists/fill_match_arms.rs index b851c2082..9354466d9 100644 --- a/crates/ra_assists/src/assists/fill_match_arms.rs +++ b/crates/ra_assists/src/assists/fill_match_arms.rs | |||
@@ -84,7 +84,7 @@ fn resolve_enum_def( | |||
84 | let expr_ty = analyzer.type_of(db, &expr)?; | 84 | let expr_ty = analyzer.type_of(db, &expr)?; |
85 | 85 | ||
86 | analyzer.autoderef(db, expr_ty).find_map(|ty| match ty.as_adt() { | 86 | analyzer.autoderef(db, expr_ty).find_map(|ty| match ty.as_adt() { |
87 | Some((Adt::Enum(e), _)) => Some(e.source(db).ast), | 87 | Some((Adt::Enum(e), _)) => Some(e.source(db).value), |
88 | _ => None, | 88 | _ => None, |
89 | }) | 89 | }) |
90 | } | 90 | } |