Skip to content

Conversation

@A4-Tacks
Copy link
Member

Example

fn main() { let _ = &raw $0 }

Before this PR

fn main() fn()
bt u32     u32
kw const
kw const
kw crate::
...

After this PR

fn main() fn()
bt u32     u32
kw const
kw crate::
...

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 30, 2025
@A4-Tacks A4-Tacks mentioned this pull request Nov 19, 2025
41 tasks
if !in_block_expr {
add_keyword("unsafe", "unsafe {\n $0\n}");
add_keyword("const", "const {\n $0\n}");
if !wants_const_token {
Copy link
Member

Choose a reason for hiding this comment

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

While this is totally correct, it looks quite counter-intuitive as it adds a const token even though it says does not want a const token 😅 Could you add a brief comment addressing this?

Example
---
```rust
fn main() { let _ = &raw $0 }
```

**Before this PR**

```text
fn main() fn()
bt u32     u32
kw const
kw const
kw crate::
...
```

**After this PR**

```text
fn main() fn()
bt u32     u32
kw const
kw crate::
...
```
@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Nov 24, 2025
Merged via the queue into rust-lang:master with commit 9328757 Nov 24, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 24, 2025
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.

3 participants