mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 17:58:16 +00:00
Fix type typo in add_missing_impl_members doc
This commit is contained in:
parent
e1acb0ca5c
commit
e7dd73ea9e
2 changed files with 18 additions and 14 deletions
|
@ -15,7 +15,7 @@ use crate::{
|
|||
//
|
||||
// ```
|
||||
// trait Trait<T> {
|
||||
// Type X;
|
||||
// type X;
|
||||
// fn foo(&self) -> T;
|
||||
// fn bar(&self) {}
|
||||
// }
|
||||
|
@ -27,14 +27,16 @@ use crate::{
|
|||
// ->
|
||||
// ```
|
||||
// trait Trait<T> {
|
||||
// Type X;
|
||||
// type X;
|
||||
// fn foo(&self) -> T;
|
||||
// fn bar(&self) {}
|
||||
// }
|
||||
//
|
||||
// impl Trait<u32> for () {
|
||||
// $0type X;
|
||||
//
|
||||
// fn foo(&self) -> u32 {
|
||||
// ${0:todo!()}
|
||||
// todo!()
|
||||
// }
|
||||
// }
|
||||
// ```
|
||||
|
@ -54,13 +56,13 @@ pub(crate) fn add_missing_impl_members(acc: &mut Assists, ctx: &AssistContext) -
|
|||
//
|
||||
// ```
|
||||
// trait Trait {
|
||||
// Type X;
|
||||
// type X;
|
||||
// fn foo(&self);
|
||||
// fn bar(&self) {}
|
||||
// }
|
||||
//
|
||||
// impl Trait for () {
|
||||
// Type X = ();
|
||||
// type X = ();
|
||||
// fn foo(&self) {}<|>
|
||||
//
|
||||
// }
|
||||
|
@ -68,13 +70,13 @@ pub(crate) fn add_missing_impl_members(acc: &mut Assists, ctx: &AssistContext) -
|
|||
// ->
|
||||
// ```
|
||||
// trait Trait {
|
||||
// Type X;
|
||||
// type X;
|
||||
// fn foo(&self);
|
||||
// fn bar(&self) {}
|
||||
// }
|
||||
//
|
||||
// impl Trait for () {
|
||||
// Type X = ();
|
||||
// type X = ();
|
||||
// fn foo(&self) {}
|
||||
//
|
||||
// $0fn bar(&self) {}
|
||||
|
|
|
@ -42,26 +42,26 @@ fn doctest_add_impl_default_members() {
|
|||
"add_impl_default_members",
|
||||
r#####"
|
||||
trait Trait {
|
||||
Type X;
|
||||
type X;
|
||||
fn foo(&self);
|
||||
fn bar(&self) {}
|
||||
}
|
||||
|
||||
impl Trait for () {
|
||||
Type X = ();
|
||||
type X = ();
|
||||
fn foo(&self) {}<|>
|
||||
|
||||
}
|
||||
"#####,
|
||||
r#####"
|
||||
trait Trait {
|
||||
Type X;
|
||||
type X;
|
||||
fn foo(&self);
|
||||
fn bar(&self) {}
|
||||
}
|
||||
|
||||
impl Trait for () {
|
||||
Type X = ();
|
||||
type X = ();
|
||||
fn foo(&self) {}
|
||||
|
||||
$0fn bar(&self) {}
|
||||
|
@ -76,7 +76,7 @@ fn doctest_add_impl_missing_members() {
|
|||
"add_impl_missing_members",
|
||||
r#####"
|
||||
trait Trait<T> {
|
||||
Type X;
|
||||
type X;
|
||||
fn foo(&self) -> T;
|
||||
fn bar(&self) {}
|
||||
}
|
||||
|
@ -87,14 +87,16 @@ impl Trait<u32> for () {<|>
|
|||
"#####,
|
||||
r#####"
|
||||
trait Trait<T> {
|
||||
Type X;
|
||||
type X;
|
||||
fn foo(&self) -> T;
|
||||
fn bar(&self) {}
|
||||
}
|
||||
|
||||
impl Trait<u32> for () {
|
||||
$0type X;
|
||||
|
||||
fn foo(&self) -> u32 {
|
||||
${0:todo!()}
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
"#####,
|
||||
|
|
Loading…
Reference in a new issue