aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/replace_impl_trait_with_generic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists/src/handlers/replace_impl_trait_with_generic.rs')
-rw-r--r--crates/assists/src/handlers/replace_impl_trait_with_generic.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/assists/src/handlers/replace_impl_trait_with_generic.rs b/crates/assists/src/handlers/replace_impl_trait_with_generic.rs
index 6738bc134..ff25b61ea 100644
--- a/crates/assists/src/handlers/replace_impl_trait_with_generic.rs
+++ b/crates/assists/src/handlers/replace_impl_trait_with_generic.rs
@@ -7,7 +7,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists};
7// Replaces `impl Trait` function argument with the named generic. 7// Replaces `impl Trait` function argument with the named generic.
8// 8//
9// ``` 9// ```
10// fn foo(bar: <|>impl Bar) {} 10// fn foo(bar: $0impl Bar) {}
11// ``` 11// ```
12// -> 12// ->
13// ``` 13// ```
@@ -56,7 +56,7 @@ mod tests {
56 check_assist( 56 check_assist(
57 replace_impl_trait_with_generic, 57 replace_impl_trait_with_generic,
58 r#" 58 r#"
59 fn foo<G>(bar: <|>impl Bar) {} 59 fn foo<G>(bar: $0impl Bar) {}
60 "#, 60 "#,
61 r#" 61 r#"
62 fn foo<G, B: Bar>(bar: B) {} 62 fn foo<G, B: Bar>(bar: B) {}
@@ -69,7 +69,7 @@ mod tests {
69 check_assist( 69 check_assist(
70 replace_impl_trait_with_generic, 70 replace_impl_trait_with_generic,
71 r#" 71 r#"
72 fn foo(bar: <|>impl Bar) {} 72 fn foo(bar: $0impl Bar) {}
73 "#, 73 "#,
74 r#" 74 r#"
75 fn foo<B: Bar>(bar: B) {} 75 fn foo<B: Bar>(bar: B) {}
@@ -82,7 +82,7 @@ mod tests {
82 check_assist( 82 check_assist(
83 replace_impl_trait_with_generic, 83 replace_impl_trait_with_generic,
84 r#" 84 r#"
85 fn foo<G>(foo: impl Foo, bar: <|>impl Bar) {} 85 fn foo<G>(foo: impl Foo, bar: $0impl Bar) {}
86 "#, 86 "#,
87 r#" 87 r#"
88 fn foo<G, B: Bar>(foo: impl Foo, bar: B) {} 88 fn foo<G, B: Bar>(foo: impl Foo, bar: B) {}
@@ -95,7 +95,7 @@ mod tests {
95 check_assist( 95 check_assist(
96 replace_impl_trait_with_generic, 96 replace_impl_trait_with_generic,
97 r#" 97 r#"
98 fn foo<>(bar: <|>impl Bar) {} 98 fn foo<>(bar: $0impl Bar) {}
99 "#, 99 "#,
100 r#" 100 r#"
101 fn foo<B: Bar>(bar: B) {} 101 fn foo<B: Bar>(bar: B) {}
@@ -109,7 +109,7 @@ mod tests {
109 replace_impl_trait_with_generic, 109 replace_impl_trait_with_generic,
110 r#" 110 r#"
111 fn foo< 111 fn foo<
112 >(bar: <|>impl Bar) {} 112 >(bar: $0impl Bar) {}
113 "#, 113 "#,
114 r#" 114 r#"
115 fn foo<B: Bar 115 fn foo<B: Bar
@@ -124,7 +124,7 @@ mod tests {
124 check_assist( 124 check_assist(
125 replace_impl_trait_with_generic, 125 replace_impl_trait_with_generic,
126 r#" 126 r#"
127 fn foo<B>(bar: <|>impl Bar) {} 127 fn foo<B>(bar: $0impl Bar) {}
128 "#, 128 "#,
129 r#" 129 r#"
130 fn foo<B, C: Bar>(bar: C) {} 130 fn foo<B, C: Bar>(bar: C) {}
@@ -141,7 +141,7 @@ mod tests {
141 G: Foo, 141 G: Foo,
142 F, 142 F,
143 H, 143 H,
144 >(bar: <|>impl Bar) {} 144 >(bar: $0impl Bar) {}
145 "#, 145 "#,
146 r#" 146 r#"
147 fn foo< 147 fn foo<
@@ -158,7 +158,7 @@ mod tests {
158 check_assist( 158 check_assist(
159 replace_impl_trait_with_generic, 159 replace_impl_trait_with_generic,
160 r#" 160 r#"
161 fn foo(bar: <|>impl Foo + Bar) {} 161 fn foo(bar: $0impl Foo + Bar) {}
162 "#, 162 "#,
163 r#" 163 r#"
164 fn foo<F: Foo + Bar>(bar: F) {} 164 fn foo<F: Foo + Bar>(bar: F) {}