# Rust 2024 reserved tokens macro input accepted before fails lexing edition 2024

Status: search-observed
Product: Rust 2024
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/rust-2024-reserved-tokens-macro-input-accepted-before-fails-lexing-edition-2024
Machine JSON: https://gitdocs.org/api/fixes/rust-2024-reserved-tokens-macro-input-accepted-before-fails-lexing-edition-2024.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

Source may compile under an older edition/toolchain; current edition migration rules and tool metadata are external to the repo's immediate error context.

## Fix

```
Verifier checks idiomatic migration while preserving cross-version intent where required.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- Rust 2024 reserved tokens macro input accepted before fails lexing edition 2024
- Rust 2024 reserved syntax guarded string literal macro input lexer
- site:doc.rust-lang.org edition-guide Rust 2024 reserved syntax guarded strings
- https://doc.rust-lang.org/edition-guide/rust-2024/reserved-syntax.html

## Sources

- Rust 1.85 and Rust 2024 edition: https://blog.rust-lang.org/2025/02/20/Rust-1.85.0/
- Official reference opened by Codex: https://doc.rust-lang.org/edition-guide/rust-2024/reserved-syntax.html
