Turn ExpandResult into struct

This commit is contained in:
Florian Diebold 2020-03-16 12:22:10 +01:00
parent f3c6a2e3db
commit d655749aae
6 changed files with 63 additions and 43 deletions

View file

@ -1430,8 +1430,7 @@ impl MacroFixture {
let (invocation_tt, _) =
ast_to_token_tree(&macro_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) {