From 45298b5d2a8e7d1f962f3117de27957e393c03e2 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 16 Sep 2020 20:33:08 +0200 Subject: Add make::glob_use_tree function to create star-only UseTree --- crates/syntax/src/ast/make.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/syntax/src/ast/make.rs') diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index 25e8a359d..6868feed9 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -38,6 +38,10 @@ pub fn path_from_text(text: &str) -> ast::Path { ast_from_text(text) } +pub fn glob_use_tree() -> ast::UseTree { + ast_from_text("use *;") +} + pub fn use_tree( path: ast::Path, use_tree_list: Option, -- cgit v1.2.3