From e7dd73ea9e1df22a4432a39daf3869a9028a3fb4 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 25 Dec 2020 18:15:31 +0100 Subject: Fix type typo in add_missing_impl_members doc --- crates/assists/src/handlers/add_missing_impl_members.rs | 16 +++++++++------- crates/assists/src/tests/generated.rs | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/crates/assists/src/handlers/add_missing_impl_members.rs b/crates/assists/src/handlers/add_missing_impl_members.rs index e413505d3..7df05b841 100644 --- a/crates/assists/src/handlers/add_missing_impl_members.rs +++ b/crates/assists/src/handlers/add_missing_impl_members.rs @@ -15,7 +15,7 @@ use crate::{ // // ``` // trait Trait { -// Type X; +// type X; // fn foo(&self) -> T; // fn bar(&self) {} // } @@ -27,14 +27,16 @@ use crate::{ // -> // ``` // trait Trait { -// Type X; +// type X; // fn foo(&self) -> T; // fn bar(&self) {} // } // // impl Trait 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) {} diff --git a/crates/assists/src/tests/generated.rs b/crates/assists/src/tests/generated.rs index e9093ec53..d3dfe24e7 100644 --- a/crates/assists/src/tests/generated.rs +++ b/crates/assists/src/tests/generated.rs @@ -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 { - Type X; + type X; fn foo(&self) -> T; fn bar(&self) {} } @@ -87,14 +87,16 @@ impl Trait for () {<|> "#####, r#####" trait Trait { - Type X; + type X; fn foo(&self) -> T; fn bar(&self) {} } impl Trait for () { + $0type X; + fn foo(&self) -> u32 { - ${0:todo!()} + todo!() } } "#####, -- cgit v1.2.3