aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/tests
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-05-30 09:01:00 +0100
committerGitHub <[email protected]>2020-05-30 09:01:00 +0100
commit5d8402817044ac4039c7315e70565d6b0414b9d3 (patch)
treecf79ec5d7d09e1e5e1dafca0e14e63d3ed409f1f /crates/ra_assists/src/tests
parent11f74f28271279e998f28d62034bffe9cf7610a3 (diff)
parentbd8aa04bae5280c9b5248413f2370f0773ac73aa (diff)
Merge #4562
4562: Assist: replace anonymous lifetime with a named one r=matklad a=jbalint (fixes #4523) Co-authored-by: Jess Balint <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/tests')
-rw-r--r--crates/ra_assists/src/tests/generated.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ra_assists/src/tests/generated.rs b/crates/ra_assists/src/tests/generated.rs
index 250e56a69..abffbf97c 100644
--- a/crates/ra_assists/src/tests/generated.rs
+++ b/crates/ra_assists/src/tests/generated.rs
@@ -269,6 +269,31 @@ pub mod std { pub mod collections { pub struct HashMap { } } }
269} 269}
270 270
271#[test] 271#[test]
272fn doctest_change_lifetime_anon_to_named() {
273 check_doc_test(
274 "change_lifetime_anon_to_named",
275 r#####"
276impl Cursor<'_<|>> {
277 fn node(self) -> &SyntaxNode {
278 match self {
279 Cursor::Replace(node) | Cursor::Before(node) => node,
280 }
281 }
282}
283"#####,
284 r#####"
285impl<'a> Cursor<'a> {
286 fn node(self) -> &SyntaxNode {
287 match self {
288 Cursor::Replace(node) | Cursor::Before(node) => node,
289 }
290 }
291}
292"#####,
293 )
294}
295
296#[test]
272fn doctest_change_return_type_to_result() { 297fn doctest_change_return_type_to_result() {
273 check_doc_test( 298 check_doc_test(
274 "change_return_type_to_result", 299 "change_return_type_to_result",