//! FIXME: write short doc here
-use crate::{Assist, AssistCtx, AssistId};
-
use join_to_string::join;
use ra_syntax::{
ast::{self, AstNode},
TextRange, TextUnit,
};
+use crate::{Assist, AssistCtx, AssistId};
+
const DERIVE_TRAIT: &str = "derive";
// Assist: add_custom_impl
use format_buf::format;
-
use join_to_string::join;
use ra_syntax::{
ast::{self, AstNode, NameOwner, TypeParamsOwner},
+use std::fmt::Write;
+
use format_buf::format;
use hir::Adt;
use join_to_string::join;
},
TextUnit, T,
};
-use std::fmt::Write;
use crate::{Assist, AssistCtx, AssistId};
-use crate::{
- assist_ctx::{Assist, AssistCtx},
- utils::insert_use_statement,
- AssistId,
-};
+use std::collections::BTreeSet;
+
use hir::{
AsAssocItem, AssocItemContainer, ModPath, Module, ModuleDef, PathResolution, Semantics, Trait,
Type,
SyntaxNode,
};
use rustc_hash::FxHashSet;
-use std::collections::BTreeSet;
+
+use crate::{
+ assist_ctx::{Assist, AssistCtx},
+ utils::insert_use_statement,
+ AssistId,
+};
// Assist: auto_import
//
use std::iter;
use hir::{Adt, HasSource, Semantics};
+use ra_ide_db::RootDatabase;
use ra_syntax::ast::{self, edit::IndentLevel, make, AstNode, NameOwner};
use crate::{Assist, AssistCtx, AssistId};
-use ra_ide_db::RootDatabase;
// Assist: fill_match_arms
//
-use ra_syntax::ast::{self, AstNode};
-use ra_syntax::T;
+use ra_syntax::{
+ ast::{self, AstNode},
+ T,
+};
use crate::{utils::invert_boolean_expression, Assist, AssistCtx, AssistId};