Disable insert_import in extract_struct_from_enum_variant until its fixed
This commit is contained in:
parent
7de2a30f40
commit
d29b69cbe6
@ -118,6 +118,7 @@ fn insert_import(
|
||||
make::path_from_text(&mod_path.to_string()),
|
||||
Some(MergeBehaviour::Full),
|
||||
);
|
||||
// FIXME: this will currently panic as multiple imports will have overlapping text ranges
|
||||
builder.replace(syntax.text_range(), new_syntax.to_string())
|
||||
}
|
||||
Some(())
|
||||
@ -191,6 +192,7 @@ fn update_reference(
|
||||
list_range.end().checked_sub(TextSize::from(1))?,
|
||||
);
|
||||
builder.edit_file(reference.file_range.file_id);
|
||||
/* FIXME: this most likely requires AST-based editing, see `insert_import`
|
||||
if !visited_modules_set.contains(&module) {
|
||||
if insert_import(ctx, builder, &path_expr, &module, enum_module_def, variant_hir_name)
|
||||
.is_some()
|
||||
@ -198,6 +200,7 @@ fn update_reference(
|
||||
visited_modules_set.insert(module);
|
||||
}
|
||||
}
|
||||
*/
|
||||
builder.replace(inside_list_range, format!("{}{}", segment, list));
|
||||
Some(())
|
||||
}
|
||||
@ -256,6 +259,7 @@ pub enum A { One(One) }"#,
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore] // FIXME: this currently panics if `insert_import` is used
|
||||
fn test_extract_struct_with_complex_imports() {
|
||||
check_assist(
|
||||
extract_struct_from_enum_variant,
|
||||
|
Loading…
Reference in New Issue
Block a user