aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/ast
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2021-03-08 12:59:54 +0000
committerKirill Bulatov <[email protected]>2021-03-08 21:59:39 +0000
commit778deb38fe7e1bac8833934224d26f44eb80a6cc (patch)
tree978ef918e70a41ef818ba12efb3e63b1e6abe2ae /crates/syntax/src/ast
parent5168ab16e14679e16a472c0ab13b1bbc32dc95f3 (diff)
Better strip turbofishes
Diffstat (limited to 'crates/syntax/src/ast')
-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 b6c5de658..70ba8adb4 100644
--- a/crates/syntax/src/ast/make.rs
+++ b/crates/syntax/src/ast/make.rs
@@ -91,6 +91,10 @@ pub fn path_from_segments(
91 }) 91 })
92} 92}
93 93
94pub fn path_from_text(text: &str) -> ast::Path {
95 ast_from_text(&format!("fn main() {{ let test = {}; }}", text))
96}
97
94pub fn glob_use_tree() -> ast::UseTree { 98pub fn glob_use_tree() -> ast::UseTree {
95 ast_from_text("use *;") 99 ast_from_text("use *;")
96} 100}