We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb0e103 commit 5ce99f1Copy full SHA for 5ce99f1
1 file changed
crates/syntax/src/ast/syntax_factory/constructors.rs
@@ -71,6 +71,22 @@ impl SyntaxFactory {
71
make::type_bound_text(bound).clone_for_update()
72
}
73
74
+ pub fn use_tree_list(
75
+ &self,
76
+ use_trees: impl IntoIterator<Item = ast::UseTree>,
77
+ ) -> ast::UseTreeList {
78
+ let (use_trees, input) = iterator_input(use_trees);
79
+ let ast = make::use_tree_list(use_trees).clone_for_update();
80
+
81
+ if let Some(mut mapping) = self.mappings() {
82
+ let mut builder = SyntaxMappingBuilder::new(ast.syntax().clone());
83
+ builder.map_children(input, ast.use_trees().map(|b| b.syntax().clone()));
84
+ builder.finish(&mut mapping);
85
+ }
86
87
+ ast
88
89
90
pub fn type_bound_list(
91
&self,
92
bounds: impl IntoIterator<Item = ast::TypeBound>,
0 commit comments