mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 17:07:26 +00:00
Add make utility for empty associated item lists
This commit is contained in:
parent
4362297a0b
commit
ae7c982421
1 changed files with 4 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue