aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/ast/make.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-05-18 12:42:41 +0100
committerAleksey Kladov <[email protected]>2021-05-22 13:27:32 +0100
commit47d7434dde215460fc95916f2703c6925f58dcce (patch)
tree2eb017e9a32da4fb6f729b6b9c617c2516dafc40 /crates/syntax/src/ast/make.rs
parent3cfe2d0a5d663d29c3d196f9d16e91964780792a (diff)
internal: replace AstTransformer with mutable syntax trees
Diffstat (limited to 'crates/syntax/src/ast/make.rs')
-rw-r--r--crates/syntax/src/ast/make.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs
index d13926ded..0cf170626 100644
--- a/crates/syntax/src/ast/make.rs
+++ b/crates/syntax/src/ast/make.rs
@@ -106,6 +106,10 @@ pub fn impl_trait(trait_: ast::Path, ty: ast::Path) -> ast::Impl {
106 ast_from_text(&format!("impl {} for {} {{}}", trait_, ty)) 106 ast_from_text(&format!("impl {} for {} {{}}", trait_, ty))
107} 107}
108 108
109pub(crate) fn generic_arg_list() -> ast::GenericArgList {
110 ast_from_text("const S: T<> = ();")
111}
112
109pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment { 113pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment {
110 ast_from_text(&format!("use {};", name_ref)) 114 ast_from_text(&format!("use {};", name_ref))
111} 115}