move mbe to the new API

This commit is contained in:
Aleksey Kladov 2019-05-28 17:39:01 +03:00
parent 0efbcdf435
commit 2e3f5af9d4
3 changed files with 72 additions and 72 deletions

View file

@ -175,7 +175,7 @@ mod tests {
}
fn create_rules(macro_definition: &str) -> Result<crate::MacroRules, ParseError> {
let source_file = ast::SourceFile::parse(macro_definition);
let source_file = ast::SourceFile::parse(macro_definition).ok().unwrap();
let macro_definition =
source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap();