diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-06 15:21:05 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-06 15:21:05 +0100 |
commit | 81d6816f175e02bccef8f373d2961d756dff31bb (patch) | |
tree | 5c1a042a4c4e77475e7bac3ea1b5ac96ff457377 /crates/assists/src/handlers/fill_match_arms.rs | |
parent | 8bf13292f0af1cfd74a6123399f524c81dcb57e3 (diff) | |
parent | 2090b534fc249a493823bb8e9039c0123aa0b90e (diff) |
Merge #6150
6150: Move ModPath->ast::Path function to IDE layer r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/fill_match_arms.rs')
-rw-r--r-- | crates/assists/src/handlers/fill_match_arms.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs index 3d9bdb2bf..676f5ad92 100644 --- a/crates/assists/src/handlers/fill_match_arms.rs +++ b/crates/assists/src/handlers/fill_match_arms.rs | |||
@@ -7,7 +7,7 @@ use syntax::ast::{self, make, AstNode, MatchArm, NameOwner, Pat}; | |||
7 | use test_utils::mark; | 7 | use test_utils::mark; |
8 | 8 | ||
9 | use crate::{ | 9 | use crate::{ |
10 | utils::{render_snippet, Cursor, FamousDefs}, | 10 | utils::{mod_path_to_ast, render_snippet, Cursor, FamousDefs}, |
11 | AssistContext, AssistId, AssistKind, Assists, | 11 | AssistContext, AssistId, AssistKind, Assists, |
12 | }; | 12 | }; |
13 | 13 | ||
@@ -192,7 +192,7 @@ fn resolve_tuple_of_enum_def( | |||
192 | } | 192 | } |
193 | 193 | ||
194 | fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::EnumVariant) -> Option<ast::Pat> { | 194 | fn build_pat(db: &RootDatabase, module: hir::Module, var: hir::EnumVariant) -> Option<ast::Pat> { |
195 | let path = crate::ast_transform::path_to_ast(module.find_use_path(db, ModuleDef::from(var))?); | 195 | let path = mod_path_to_ast(&module.find_use_path(db, ModuleDef::from(var))?); |
196 | 196 | ||
197 | // FIXME: use HIR for this; it doesn't currently expose struct vs. tuple vs. unit variants though | 197 | // FIXME: use HIR for this; it doesn't currently expose struct vs. tuple vs. unit variants though |
198 | let pat: ast::Pat = match var.source(db).value.kind() { | 198 | let pat: ast::Pat = match var.source(db).value.kind() { |