Skip to content

Commit 5c618b6

Browse files
committed
WIP: Add create_function assist
1 parent 1c2d413 commit 5c618b6

File tree

4 files changed

+771
-0
lines changed

4 files changed

+771
-0
lines changed

crates/ra_assists/src/doc_tests/generated.rs

+27
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,33 @@ fn main() {
5858
)
5959
}
6060

61+
#[test]
62+
fn doctest_add_function() {
63+
check(
64+
"add_function",
65+
r#####"
66+
struct Baz;
67+
fn baz() -> Baz { Baz }
68+
fn foo() {
69+
bar<|>("", baz());
70+
}
71+
72+
"#####,
73+
r#####"
74+
struct Baz;
75+
fn baz() -> Baz { Baz }
76+
fn foo() {
77+
bar("", baz());
78+
}
79+
80+
fn bar(arg: &str, baz: Baz) {
81+
<|>todo!()
82+
}
83+
84+
"#####,
85+
)
86+
}
87+
6188
#[test]
6289
fn doctest_add_hash() {
6390
check(

0 commit comments

Comments
 (0)