Noratrieb
8a02724b9d
Fix const items not being allowed to be called r#move or r#static
...
Because of an ambiguity with const closures, the parser needs to ensure
that for a const item, the `const` keyword isn't followed by a `move` or
`static` keyword, as that would indicate a const closure:
```rust
fn main() {
const move // ...
}
```
This check did not take raw identifiers into account, therefore being
unable to distinguish between `const move` and `const r#move`. The
latter is obviously not a const closure, so it should be allowed as a
const item.
This fixes the check in the parser to only treat `const ...` as a const
closure if it's followed by the *proper keyword*, and not a raw
identifier.
Additionally, this adds a large test that tests for all raw identifiers in
all kinds of positions, including `const`, to prevent issues like this
one from occurring again.
2025-02-16 18:21:40 +01:00
..
2025-02-03 14:04:57 +00:00
2025-02-14 00:27:13 -08:00
2024-12-13 07:10:20 +11:00
2025-02-14 00:44:10 -08:00
2025-02-14 00:44:10 -08:00
2025-02-16 18:21:40 +01:00
2025-02-14 00:44:10 -08:00
2025-02-10 20:21:39 +00:00
2024-12-10 11:34:13 +08:00
2024-12-17 19:09:00 +08:00
2024-12-17 19:09:00 +08:00
2025-02-14 00:44:10 -08:00
2025-02-10 20:21:39 +00:00
2025-02-14 00:44:10 -08:00
2025-01-27 17:17:22 +00:00
2025-01-07 16:04:14 +01:00
2025-01-27 17:17:22 +00:00
2025-02-10 20:21:39 +00:00
2025-01-07 16:04:14 +01:00
2025-02-11 19:42:47 -08:00
2024-12-11 16:23:04 +01:00
2024-12-13 07:10:20 +11:00
2024-12-13 07:10:20 +11:00
2025-02-14 00:44:10 -08:00
2025-02-10 20:21:39 +00:00
2024-12-10 18:17:24 +00:00
2025-01-24 01:19:50 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-01-24 01:19:50 +00:00
2025-01-24 01:19:50 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-14 00:44:10 -08:00
2024-12-12 23:36:27 +00:00
2025-02-10 20:21:39 +00:00
2025-01-04 11:41:51 +01:00
2025-01-04 11:41:51 +01:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-01-07 16:04:14 +01:00
2025-01-07 16:04:14 +01:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-01-07 16:04:14 +01:00
2025-02-11 19:42:47 -08:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-14 00:44:10 -08:00
2025-01-24 01:19:50 +00:00
2025-01-24 01:19:50 +00:00
2025-02-03 10:39:32 -05:00
2025-02-03 10:39:32 -05:00
2025-01-22 00:52:27 +00:00
2025-01-22 00:52:27 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2024-12-09 21:55:13 +00:00
2024-12-09 21:55:13 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-14 00:27:17 -08:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2024-12-31 05:03:22 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-14 00:44:10 -08:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00