support as _ and add tests

This commit is contained in:
Ellen 2021-06-10 14:53:38 +01:00
parent c318364d48
commit 17cd79090e
6 changed files with 220 additions and 3 deletions

View file

@ -431,7 +431,9 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> {
}
}
// These are not actually relevant for us here, so we can ignore them.
StatementKind::StorageLive(_) | StatementKind::StorageDead(_) => Ok(()),
StatementKind::AscribeUserType(..)
| StatementKind::StorageLive(_)
| StatementKind::StorageDead(_) => Ok(()),
_ => self.error(Some(stmt.source_info.span), "unsupported statement")?,
}
}