Skip to content

Commit

Permalink
WIP: Add create_function assist
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoFreiberg committed Mar 29, 2020
1 parent 1c2d413 commit 1ce72a7
Show file tree
Hide file tree
Showing 5 changed files with 779 additions and 0 deletions.
27 changes: 27 additions & 0 deletions crates/ra_assists/src/doc_tests/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,33 @@ fn main() {
)
}

#[test]
fn doctest_add_function() {
check(
"add_function",
r#####"
struct Baz;
fn baz() -> Baz { Baz }
fn foo() {
bar<|>("", baz());
}
"#####,
r#####"
struct Baz;
fn baz() -> Baz { Baz }
fn foo() {
bar("", baz());
}
fn bar(arg: &str, baz: Baz) {
<|>todo!()
}
"#####,
)
}

#[test]
fn doctest_add_hash() {
check(
Expand Down
Loading

0 comments on commit 1ce72a7

Please sign in to comment.