diff options
| author | Matt Hooper <matthewjhooper94@gmail.com> | 2020-09-21 00:39:17 +0100 |
|---|---|---|
| committer | Matt Hooper <matthewjhooper94@gmail.com> | 2020-09-21 00:39:17 +0100 |
| commit | ae7c9824215dbaa53786cba2fcc1d9537cb06276 (patch) | |
| tree | e63d2af74962f75003765755f519b90af9ace460 | |
| parent | 4362297a0b25ba4b3993324755c2f57cd846bc8e (diff) | |
Add make utility for empty associated item lists
| -rw-r--r-- | crates/syntax/src/ast/make.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index 6868feed997..4a0ffcbb070 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -21,6 +21,10 @@ pub fn ty(text: &str) -> ast::Type { ast_from_text(&format!("impl {} for D {{}};", text)) } +pub fn assoc_item_list() -> ast::AssocItemList { + ast_from_text("impl C for D {};") +} + pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment { ast_from_text(&format!("use {};", name_ref)) } |
