Skip to content

Conversation

@A4-Tacks
Copy link
Member

@A4-Tacks A4-Tacks commented Nov 18, 2025

Fixes #16865

Example

viewHir

fn main() {
    let r = &2;
    let _ = &mut (*r as i32)
}

Before this PR

fn main() {
    let r = &2;
    let _ = &mut *r as i32;
}

After this PR

fn main() {
    let r = &2;
    let _ = &mut (*r as i32);
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 18, 2025
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

Example
---
viewHir

```rust
fn main() {
    let r = &2;
    let _ = &mut (*r as i32)
}
```

**Before this PR**

```rust
fn main() {
    let r = &2;
    let _ = &mut *r as i32;
}
```

**After this PR**

```rust
fn main() {
    let r = &2;
    let _ = &mut (*r as i32);
}
```
@A4-Tacks A4-Tacks force-pushed the hir-debug-precedence branch from bcc01c8 to c3b8385 Compare November 18, 2025 14:23
@A4-Tacks
Copy link
Member Author

Ready for merge

@Veykril Veykril added this pull request to the merge queue Nov 18, 2025
Merged via the queue into rust-lang:master with commit 19a4295 Nov 18, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 18, 2025
@A4-Tacks A4-Tacks deleted the hir-debug-precedence branch November 18, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hir debug view drops precedence as and &mut

4 participants