mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Make ast_to_token_tree
infallible
It could never return `None`, so reflect that in the return type
This commit is contained in:
parent
bcf600fc88
commit
3abcdc03ba
11 changed files with 32 additions and 41 deletions
|
@ -65,7 +65,7 @@ fn macro_rules_fixtures_tt() -> FxHashMap<String, tt::Subtree> {
|
|||
.filter_map(ast::MacroRules::cast)
|
||||
.map(|rule| {
|
||||
let id = rule.name().unwrap().to_string();
|
||||
let (def_tt, _) = ast_to_token_tree(&rule.token_tree().unwrap()).unwrap();
|
||||
let (def_tt, _) = ast_to_token_tree(&rule.token_tree().unwrap());
|
||||
(id, def_tt)
|
||||
})
|
||||
.collect()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue