Skip to content

Wrong unexpected token diagnostic when passing negative numbers to concat! #19417

Open
@vdrn

Description

@vdrn

This code compiles fine with rustc, but rust analyzer reports error: unexpected token

 pub const T: &str = concat!(-42.0); 

rust-analyzer version: 1.87.0-nightly (be73c1f 2025-03-21)

rustc version: rustc 1.87.0-nightly (be73c1f46 2025-03-21)

Metadata

Metadata

Labels

A-macromacro expansionC-bugCategory: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions