mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-19 01:50:32 +00:00
Minor, cleanup API
This commit is contained in:
parent
8be3f25b0b
commit
cd4a7bf36e
2 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,9 @@ pub fn name_ref(text: &str) -> ast::NameRef {
|
|||
pub fn ty(text: &str) -> ast::Type {
|
||||
ast_from_text(&format!("impl {} for D {{}};", text))
|
||||
}
|
||||
pub fn ty_unit() -> ast::Type {
|
||||
ty("()")
|
||||
}
|
||||
|
||||
pub fn assoc_item_list() -> ast::AssocItemList {
|
||||
ast_from_text("impl C for D {};")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue