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
..
2024-04-12 12:59:40 +09:00
2024-05-10 09:16:27 +02:00
2024-05-20 21:36:20 +02:00
2024-05-11 15:49:50 -07:00
2024-05-09 10:47:14 -04:00
2024-03-01 02:03:00 +00:00
2024-05-12 21:50:14 -07:00
2024-05-12 21:50:14 -07:00
2024-02-20 16:09:09 +00:00
2024-02-20 16:09:09 +00:00
2024-03-01 02:03:00 +00:00
2024-03-08 20:56:25 +00:00
2024-04-12 12:59:40 +09:00
2024-03-12 21:32:21 +01:00
2024-03-12 21:32:21 +01:00
2024-05-11 15:49:51 -07:00
2024-05-11 15:49:51 -07:00
2024-02-22 18:05:28 +00:00
2024-04-22 17:47:35 +02:00
2024-04-22 17:47:35 +02:00
2024-04-22 17:47:35 +02:00
2024-02-28 20:59:32 +11:00
2024-02-28 20:59:32 +11:00
2024-04-04 11:58:38 +02:00
2024-04-04 11:58:38 +02:00
2024-03-07 23:03:42 +00:00
2024-03-07 23:03:42 +00:00
2024-03-18 16:08:58 +00:00
2024-03-05 00:12:15 +01:00
2024-03-05 00:12:15 +01:00
2024-03-05 00:12:15 +01:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-05-18 18:12:18 +02:00
2024-03-01 02:03:00 +00:00
2024-03-01 02:03:00 +00:00
2024-04-04 11:58:38 +02:00
2024-04-04 11:58:38 +02:00
2024-03-22 17:25:57 +01:00
2024-03-22 17:25:57 +01:00
2024-05-20 19:55:59 -07:00
2024-03-18 21:35:18 -07:00
2024-02-20 16:09:09 +00:00
2024-02-20 16:09:09 +00:00
2024-04-12 12:59:40 +09:00
2024-04-12 12:59:40 +09:00
2024-04-12 12:59:40 +09:00
2024-03-17 23:35:18 +00:00
2024-03-17 23:35:18 +00:00
2024-03-17 23:35:18 +00:00
2024-04-04 11:58:38 +02:00