mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Simplify mbe match error.
Handle parse error in rule parsing instead of match in mbe
This commit is contained in:
parent
3ecd5112bb
commit
706ac8256d
6 changed files with 180 additions and 210 deletions
|
@ -86,13 +86,6 @@ fn expand_subtree(
|
|||
let start_elements = arena.len();
|
||||
let mut err = None;
|
||||
for op in template.iter() {
|
||||
let op = match op {
|
||||
Ok(op) => op,
|
||||
Err(e) => {
|
||||
err = Some(e.clone());
|
||||
break;
|
||||
}
|
||||
};
|
||||
match op {
|
||||
Op::Leaf(tt) => arena.push(tt.clone().into()),
|
||||
Op::Subtree(tt) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue