diff options
author | Lukas Wirth <[email protected]> | 2020-09-16 19:33:08 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2020-09-16 19:33:08 +0100 |
commit | 45298b5d2a8e7d1f962f3117de27957e393c03e2 (patch) | |
tree | a084e63fd71cf28ea69a8ceb374f19aa9e111a4e /crates/syntax | |
parent | b874721752e07673f28ef07a003fe8582d4f1645 (diff) |
Add make::glob_use_tree function to create star-only UseTree
Diffstat (limited to 'crates/syntax')
-rw-r--r-- | crates/syntax/src/ast/make.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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 { | |||
38 | ast_from_text(text) | 38 | ast_from_text(text) |
39 | } | 39 | } |
40 | 40 | ||
41 | pub fn glob_use_tree() -> ast::UseTree { | ||
42 | ast_from_text("use *;") | ||
43 | } | ||
44 | |||
41 | pub fn use_tree( | 45 | pub fn use_tree( |
42 | path: ast::Path, | 46 | path: ast::Path, |
43 | use_tree_list: Option<ast::UseTreeList>, | 47 | use_tree_list: Option<ast::UseTreeList>, |