diff options
Diffstat (limited to 'crates/ra_assists/src/doc_tests/generated.rs')
-rw-r--r-- | crates/ra_assists/src/doc_tests/generated.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs index 76d86b93d..2f36c3baa 100644 --- a/crates/ra_assists/src/doc_tests/generated.rs +++ b/crates/ra_assists/src/doc_tests/generated.rs | |||
@@ -142,6 +142,19 @@ fn main() { | |||
142 | } | 142 | } |
143 | 143 | ||
144 | #[test] | 144 | #[test] |
145 | fn doctest_change_visibility() { | ||
146 | check( | ||
147 | "change_visibility", | ||
148 | r#####" | ||
149 | fn<|> frobnicate() {} | ||
150 | "#####, | ||
151 | r#####" | ||
152 | pub(crate) fn frobnicate() {} | ||
153 | "#####, | ||
154 | ) | ||
155 | } | ||
156 | |||
157 | #[test] | ||
145 | fn doctest_convert_to_guarded_return() { | 158 | fn doctest_convert_to_guarded_return() { |
146 | check( | 159 | check( |
147 | "convert_to_guarded_return", | 160 | "convert_to_guarded_return", |
@@ -164,3 +177,29 @@ fn main() { | |||
164 | "#####, | 177 | "#####, |
165 | ) | 178 | ) |
166 | } | 179 | } |
180 | |||
181 | #[test] | ||
182 | fn doctest_fill_match_arms() { | ||
183 | check( | ||
184 | "fill_match_arms", | ||
185 | r#####" | ||
186 | enum Action { Move { distance: u32 }, Stop } | ||
187 | |||
188 | fn handle(action: Action) { | ||
189 | match action { | ||
190 | <|> | ||
191 | } | ||
192 | } | ||
193 | "#####, | ||
194 | r#####" | ||
195 | enum Action { Move { distance: u32 }, Stop } | ||
196 | |||
197 | fn handle(action: Action) { | ||
198 | match action { | ||
199 | Action::Move{ distance } => (), | ||
200 | Action::Stop => (), | ||
201 | } | ||
202 | } | ||
203 | "#####, | ||
204 | ) | ||
205 | } | ||