mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Correctly fill default type parameters
This commit is contained in:
parent
88d3959c33
commit
00f3b6c59a
6 changed files with 80 additions and 1 deletions
|
@ -13,6 +13,10 @@ pub fn name_ref(text: &str) -> ast::NameRef {
|
|||
ast_from_text(&format!("fn f() {{ {}; }}", text))
|
||||
}
|
||||
|
||||
pub fn type_arg(text: &str) -> ast::TypeArg {
|
||||
ast_from_text(&format!("impl F<{}> for G {{}}", text))
|
||||
}
|
||||
|
||||
pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment {
|
||||
ast_from_text(&format!("use {};", name_ref))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue