Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 26e7e4f

Browse files
committed
minor: Add ty_infer constructor to SyntaxFactory
1 parent d9bb8fc commit 26e7e4f

File tree

1 file changed

+8
-0
lines changed
  • src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory

1 file changed

+8
-0
lines changed

src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ impl SyntaxFactory {
1818
make::ty(text).clone_for_update()
1919
}
2020

21+
pub fn ty_infer(&self) -> ast::InferType {
22+
let ast::Type::InferType(ast) = make::ty_placeholder().clone_for_update() else {
23+
unreachable!()
24+
};
25+
26+
ast
27+
}
28+
2129
pub fn type_param(
2230
&self,
2331
name: ast::Name,

0 commit comments

Comments
 (0)