From 21b376583ab8676a07d73395937decedfa234c13 Mon Sep 17 00:00:00 2001 From: Giga Bowser <45986823+Giga-Bowser@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:33:32 -0500 Subject: [PATCH] minor: Add `ty_infer` constructor to `SyntaxFactory` --- crates/syntax/src/ast/syntax_factory/constructors.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/syntax/src/ast/syntax_factory/constructors.rs b/crates/syntax/src/ast/syntax_factory/constructors.rs index 640d262a3e..aa894ef633 100644 --- a/crates/syntax/src/ast/syntax_factory/constructors.rs +++ b/crates/syntax/src/ast/syntax_factory/constructors.rs @@ -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,