rust/compiler/rustc_parse/src
León Orell Valerian Liehr 5b485f04de
Rollup merge of #125049 - dtolnay:castbrace, r=compiler-errors
Disallow cast with trailing braced macro in let-else

This fixes an edge case I noticed while porting #118880 and #119062 to syn.

Previously, rustc incorrectly accepted code such as:

```rust
let foo = &std::ptr::null as &'static dyn std::ops::Fn() -> *const primitive! {
    8
} else {
    return;
};
```

even though a right curl brace `}` directly before `else` in a `let...else` statement is not supposed to be valid syntax.
2024-05-22 19:04:44 +02:00
..
lexer Rename buffer_lint_with_diagnostic to buffer_lint 2024-05-21 20:16:39 +00:00
parser Rollup merge of #125049 - dtolnay:castbrace, r=compiler-errors 2024-05-22 19:04:44 +02:00
errors.rs improve maybe_consume_incorrect_semicolon 2024-05-14 23:07:40 +02:00
lib.rs compiler: add Parser::debug_lookahead 2024-05-07 19:10:29 -07:00
validate_attr.rs Rename buffer_lint_with_diagnostic to buffer_lint 2024-05-21 20:16:39 +00:00