46ab14437e
We no longer flatten a block that looks like this: ```rust match val { pat => { macro_call!() } } ``` Currently, rust ignores trailing semicolons in macro expansion in expression position (see https://github.com/rust-lang/rust/issues/33953) If this is changed, flattening a block with a macro call may break the user's code - the trailing semicolon will no longer parse if the macro call occurs immediately on the right-hand side of the match arm (e.g. `pat => macro_call!()`)
22 lines
522 B
Rust
22 lines
522 B
Rust
struct AStruct {
|
|
A: u32,
|
|
B: u32,
|
|
C: u32,
|
|
}
|
|
|
|
impl Something for AStruct {
|
|
fn a_func() {
|
|
match a_val {
|
|
ContextualParseError::InvalidMediaRule(ref err) => {
|
|
let err: &CStr = match err.kind {
|
|
ParseErrorKind::Custom(StyleParseErrorKind::MediaQueryExpectedFeatureName(
|
|
..,
|
|
)) => {
|
|
cstr!("PEMQExpectedFeatureName")
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}
|
|
}
|