Better strip turbofishes

This commit is contained in:
Kirill Bulatov 2021-03-08 14:59:54 +02:00
parent 5168ab16e1
commit 778deb38fe
5 changed files with 52 additions and 8 deletions

View file

@ -91,6 +91,10 @@ pub fn path_from_segments(
})
}
pub fn path_from_text(text: &str) -> ast::Path {
ast_from_text(&format!("fn main() {{ let test = {}; }}", text))
}
pub fn glob_use_tree() -> ast::UseTree {
ast_from_text("use *;")
}