rust/tests/ui/macros/failed-to-reparse-issue-137874.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
286 B
Rust
Raw Normal View History

// This originally crashed because `Recovery::Forbidden` wasn't being applied
// when fragments pasted by declarative macros were reparsed.
macro_rules! m {
($p:pat) => {
if let $p = 0 {}
}
}
fn main() {
m!(0X0); //~ ERROR invalid base prefix for number literal
}