mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
minor: Add ty_infer
constructor to SyntaxFactory
This commit is contained in:
parent
d7d68310c0
commit
21b376583a
1 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,14 @@ impl SyntaxFactory {
|
|||
make::ty(text).clone_for_update()
|
||||
}
|
||||
|
||||
pub fn ty_infer(&self) -> ast::InferType {
|
||||
let ast::Type::InferType(ast) = make::ty_placeholder().clone_for_update() else {
|
||||
unreachable!()
|
||||
};
|
||||
|
||||
ast
|
||||
}
|
||||
|
||||
pub fn type_param(
|
||||
&self,
|
||||
name: ast::Name,
|
||||
|
|
Loading…
Reference in a new issue