-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Spurious "expected integer or floating pointer number after -
(rust-analyzer macro-error)" (with reproduction)
#19993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Specifically the problem seems to come from the combination of
Since it compiles fine I think it's probably a RA bug.
The problem still reproduces whether I have backticks or not, i.e. /// A docstring with a -- causes a problem.
/// A docstring with a `--` causes a problem.
|
Grepping in the r-a codebase the thing that causes that error is |
Likely our |
I got a backtrace in case that helps:
|
And it seems to be coming from this |
rust-analyzer version: rust-analyzer 1.89.0-nightly (573a015 2025-06-12)
rustc version: rustc 1.89.0-nightly (573a01569 2025-06-12)
binary: rustc
commit-hash: 573a01569000d395498a5f98f916d6e5305ac81a
commit-date: 2025-06-12
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5
editor or extension: Zed 0.190.5 901b05221cf3f1946638c44a81c93cffdaf1cdf5, also
reproducible on VS Code 1.100.3 258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTC
,RUSTUP_HOME
orCARGO_HOME
)repository link (if public, optional): (eg. rust-analyzer) https://github.com/sourcefrog/rust-analyzer-repro (minimized from https://github.com/sourcefrog/cargo-mutants)
code snippet to reproduce:
errors:
cargo build
doesn't error on this code.Incidentally there's a typo "floating pointer" rather than "floating point".
The text was updated successfully, but these errors were encountered: