diff options
author | Kirill Bulatov <[email protected]> | 2021-03-08 12:59:54 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2021-03-08 21:59:39 +0000 |
commit | 778deb38fe7e1bac8833934224d26f44eb80a6cc (patch) | |
tree | 978ef918e70a41ef818ba12efb3e63b1e6abe2ae /crates/syntax/src/ast | |
parent | 5168ab16e14679e16a472c0ab13b1bbc32dc95f3 (diff) |
Better strip turbofishes
Diffstat (limited to 'crates/syntax/src/ast')
-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 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 | ||
94 | pub fn path_from_text(text: &str) -> ast::Path { | ||
95 | ast_from_text(&format!("fn main() {{ let test = {}; }}", text)) | ||
96 | } | ||
97 | |||
94 | pub fn glob_use_tree() -> ast::UseTree { | 98 | pub fn glob_use_tree() -> ast::UseTree { |
95 | ast_from_text("use *;") | 99 | ast_from_text("use *;") |
96 | } | 100 | } |