diff options
author | Florian Diebold <[email protected]> | 2019-03-17 18:37:09 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-03-21 21:17:00 +0000 |
commit | 8a5fbf471305894094726834f7701747fce9c961 (patch) | |
tree | d210d1a25099ca381bac2f0f2f3247fbd69b366d /crates/ra_ide_api/src/completion/complete_struct_literal.rs | |
parent | 7a8ba535422a4e3d2b649acde75b5c400ef5e7c6 (diff) |
Remove the old variants replaced by Ty::Apply
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_struct_literal.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_struct_literal.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_struct_literal.rs b/crates/ra_ide_api/src/completion/complete_struct_literal.rs index 6bef9624e..b75526282 100644 --- a/crates/ra_ide_api/src/completion/complete_struct_literal.rs +++ b/crates/ra_ide_api/src/completion/complete_struct_literal.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use hir::{Ty, AdtDef}; | 1 | use hir::AdtDef; |
2 | 2 | ||
3 | use crate::completion::{CompletionContext, Completions}; | 3 | use crate::completion::{CompletionContext, Completions}; |
4 | 4 | ||
@@ -15,8 +15,8 @@ pub(super) fn complete_struct_literal(acc: &mut Completions, ctx: &CompletionCon | |||
15 | None => return, | 15 | None => return, |
16 | }; | 16 | }; |
17 | let ty = infer_result[expr].clone(); | 17 | let ty = infer_result[expr].clone(); |
18 | let (adt, substs) = match ty { | 18 | let (adt, substs) = match ty.as_adt() { |
19 | Ty::Adt { def_id, ref substs, .. } => (def_id, substs), | 19 | Some(res) => res, |
20 | _ => return, | 20 | _ => return, |
21 | }; | 21 | }; |
22 | match adt { | 22 | match adt { |