mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-22 09:55:06 +00:00
42 lines
616 B
Rust
42 lines
616 B
Rust
|
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) {
|
||
|
<|>
|
||
|
}
|
||
|
}",
|
||
|
);
|
||
|
}
|
||
|
}
|