Skip to content

fix: support hover ranged inside macro call - #22973

Open
A4-Tacks wants to merge 1 commit into
rust-lang:masterfrom
A4-Tacks:todo-hover-ranged-in-macro
Open

fix: support hover ranged inside macro call#22973
A4-Tacks wants to merge 1 commit into
rust-lang:masterfrom
A4-Tacks:todo-hover-ranged-in-macro

Conversation

@A4-Tacks

@A4-Tacks A4-Tacks commented Jul 31, 2026

Copy link
Copy Markdown
Member

Fixes #13931

Example

macro_rules! identity { ($($t:tt)*) => { $($t)* }; }
fn f() {
    identity!( ($01i32 + 2i32$0) as u8 );
}

Before this PR

identity!( (1i32 + 2i32) as u8 );
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u8

After this PR

identity!( (1i32 + 2i32) as u8 );
            ^^^^^^^^^^^ i32

Example
---
```rust
macro_rules! identity { ($($t:tt)*) => { $($t)* }; }
fn f() {
    identity!( ($01i32 + 2i32$0) as u8 );
}
```

**Before this PR**

```rust
identity!( (1i32 + 2i32) as u8 );
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ u8
```

**After this PR**

```rust
identity!( (1i32 + 2i32) as u8 );
            ^^^^^^^^^^^ i32
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Range hover inside macro is wrong

2 participants