rustc_lexer Unicode version assertion fails with allowed unicode-ident 1.0.26
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
The published ra-ap-rustc_lexer 0.166.0 snapshot (rust commit ce89c898570852a1bb441d77570596e50bf362c2) fails to compile after resolving unicode-ident 1.0.26. The current compiler/rustc_lexer/Cargo.toml also permits this combination: unicode-ident = "1.0.22" and unicode-properties = "0.1.4".
The two Unicode tables resolve to versions 18.0.0 and 17.0.0 respectively, triggering the compile-time assertion in compiler/rustc_lexer/src/lib.rs. This concerns the published library's dependency bounds, not a compiler ICE.
Reproduction
Create an empty Rust library with this manifest and run cargo check:
[package]
name = "lexer-unicode-repro"
version = "0.1.0"
edition = "2024"
[dependencies]
ra-ap-rustc_lexer = "=0.166.0"
unicode-ident = "=1.0.26"
unicode-properties = "=0.1.4"
I expected the allowed dependency combination to compile. Instead:
error[E0080]: evaluation panicked: unicode-properties and unicode-ident must use the same Unicode version, `unicode_properties::UNICODE_VERSION` and `unicode_ident::UNICODE_VERSION` are different.
unicode-ident 1.0.24 contains Unicode 17.0.0 tables. The lexer needs compatible dependency constraints or matching table updates when a Unicode version changes. Lockfile-free consumers can otherwise encounter this even if the compiler workspace lockfile remains consistent.
Meta
Reproduced with rustc 1.96.0 (ac68faa20 2026-05-25), host aarch64-apple-darwin, LLVM 22.1.2. The same assertion fails in Ubuntu CI. This standalone dependency reproduction was not tested on beta/nightly.
Discovered through Reinhardt's optional evcxr management shell: evcxr 0.22.0 -> ra_ap_* 0.0.347 -> ra-ap-rustc_lexer 0.166.0.
CI evidence: https://github.com/kent8192/reinhardt-web/actions/runs/35440841190/job/105891305695
🤖 Generated with Codex
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with compiler/rustc_lexer/Cargo.toml and compiler/rustc_lexer/src/lib.rs, then reproduce the failure using the manifest and cargo check command in the issue. Trace how unicode-ident and unicode-properties dependency bounds select different Unicode table versions. Done means the allowed dependency combination no longer triggers the compile-time assertion and the standalone reproduction compiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100