mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Turn ExpandResult into struct
This commit is contained in:
parent
f3c6a2e3db
commit
d655749aae
6 changed files with 63 additions and 43 deletions
|
@ -1430,8 +1430,7 @@ impl MacroFixture {
|
|||
let (invocation_tt, _) =
|
||||
ast_to_token_tree(¯o_invocation.token_tree().unwrap()).unwrap();
|
||||
|
||||
let (tt, err) = self.rules.expand(&invocation_tt);
|
||||
err.map(Err).unwrap_or(Ok(tt))
|
||||
self.rules.expand(&invocation_tt).result()
|
||||
}
|
||||
|
||||
fn assert_expand_err(&self, invocation: &str, err: &ExpandError) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue