Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/syntax_factory/constructors.rs')
-rw-r--r--crates/syntax/src/ast/syntax_factory/constructors.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/syntax/src/ast/syntax_factory/constructors.rs b/crates/syntax/src/ast/syntax_factory/constructors.rs
index 5a01580c56..bebf595f00 100644
--- a/crates/syntax/src/ast/syntax_factory/constructors.rs
+++ b/crates/syntax/src/ast/syntax_factory/constructors.rs
@@ -2,7 +2,7 @@
use either::Either;
use crate::{
- AstNode, NodeOrToken, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken,
+ AstNode, Edition, NodeOrToken, SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken,
ast::{
self, HasArgList, HasAttrs, HasGenericArgs, HasGenericParams, HasLoopBody, HasName,
HasTypeBounds, HasVisibility, Lifetime, Param, RangeItem, make,
@@ -131,6 +131,10 @@ impl SyntaxFactory {
make::path_from_text(text).clone_for_update()
}
+ pub fn path_from_text_with_edition(&self, text: &str, edition: Edition) -> ast::Path {
+ make::path_from_text_with_edition(text, edition).clone_for_update()
+ }
+
pub fn path_concat(&self, first: ast::Path, second: ast::Path) -> ast::Path {
make::path_concat(first, second).clone_for_update()
}