Skip to content

Conversation

@A4-Tacks
Copy link
Member

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

Fixes #20998

Example

fn main() { unsafe {1}.$0 }

Before this PR

fn main() { const unsafe {{1}} }

After this PR

fn main() { const { unsafe {1} } }

Example
---
```rust
fn main() { unsafe {1}.$0 }
```

**Before this PR**

```rust
fn main() { const unsafe {{1}} }
```

**After this PR**

```rust
fn main() { const { unsafe {1} } }
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 9, 2025
@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Nov 10, 2025
Merged via the queue into rust-lang:master with commit 99bfa4a Nov 10, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 10, 2025
@A4-Tacks A4-Tacks deleted the missing-curly-postfix-with-modifier-block branch November 10, 2025 07:13
@lnicola lnicola changed the title Fix .const missing block on with modifier block fix: add block on postfix .const completion Nov 10, 2025
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Nov 11, 2025
…x-with-modifier-block

Fix .const missing block on with modifier block
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Nov 11, 2025
…x-with-modifier-block

Fix .const missing block on with modifier block
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Nov 15, 2025
…x-with-modifier-block

Fix .const missing block on with modifier block
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.

.unsafe code snippet on const {} expr results in unsafe const {} which is invalid Rust

3 participants