mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
Add 'add_missing_impl_members' assist stub
This commit is contained in:
parent
9a59272f5f
commit
fc060573f9
41
crates/ra_assists/src/add_missing_impl_members.rs
Normal file
41
crates/ra_assists/src/add_missing_impl_members.rs
Normal file
@ -0,0 +1,41 @@
|
||||
use crate::assist_ctx::{Assist, AssistCtx};
|
||||
use hir::db::HirDatabase;
|
||||
|
||||
pub(crate) fn add_missing_impl_members(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::helpers::{ check_assist };
|
||||
|
||||
#[test]
|
||||
fn test_add_missing_impl_members() {
|
||||
check_assist(
|
||||
add_missing_impl_members,
|
||||
"
|
||||
trait Foo {
|
||||
fn foo(&self);
|
||||
}
|
||||
|
||||
struct S;
|
||||
|
||||
impl Foo for S {
|
||||
<|>
|
||||
}",
|
||||
"
|
||||
trait Foo {
|
||||
fn foo(&self);
|
||||
}
|
||||
|
||||
struct S;
|
||||
|
||||
impl Foo for S {
|
||||
fn foo(&self) {
|
||||
<|>
|
||||
}
|
||||
}",
|
||||
);
|
||||
}
|
||||
}
|
@ -95,6 +95,7 @@ mod replace_if_let_with_match;
|
||||
mod split_import;
|
||||
mod remove_dbg;
|
||||
mod auto_import;
|
||||
mod add_missing_impl_members;
|
||||
|
||||
fn all_assists<DB: HirDatabase>() -> &'static [fn(AssistCtx<DB>) -> Option<Assist>] {
|
||||
&[
|
||||
@ -108,6 +109,7 @@ fn all_assists<DB: HirDatabase>() -> &'static [fn(AssistCtx<DB>) -> Option<Assis
|
||||
split_import::split_import,
|
||||
remove_dbg::remove_dbg,
|
||||
auto_import::auto_import,
|
||||
add_missing_impl_members::add_missing_impl_members,
|
||||
]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user