From d8559588c0a38ef1c2cfcb297b520469e6765c80 Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Sat, 20 Feb 2021 15:05:01 +0100 Subject: fix(assist): display where predicates when we want to generate impl Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- crates/assists/src/handlers/generate_impl.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'crates/assists/src/handlers/generate_impl.rs') diff --git a/crates/assists/src/handlers/generate_impl.rs b/crates/assists/src/handlers/generate_impl.rs index 16a600e6f..a8e3c4fc2 100644 --- a/crates/assists/src/handlers/generate_impl.rs +++ b/crates/assists/src/handlers/generate_impl.rs @@ -122,6 +122,31 @@ mod tests { $0 }"#, ); + + check_assist( + generate_impl, + r#"pub trait Trait {} +struct Struct$0 +where + T: Trait, +{ + inner: T, +}"#, + r#"pub trait Trait {} +struct Struct +where + T: Trait, +{ + inner: T, +} + +impl Struct +where + T: Trait, +{ + $0 +}"#, + ); } #[test] -- cgit v1.2.3