Skip to content

minor: offer on r_curly for generate_impl#22403

Open
A4-Tacks wants to merge 1 commit into
rust-lang:masterfrom
A4-Tacks:gen-impl-r-curly
Open

minor: offer on r_curly for generate_impl#22403
A4-Tacks wants to merge 1 commit into
rust-lang:masterfrom
A4-Tacks:gen-impl-r-curly

Conversation

@A4-Tacks
Copy link
Copy Markdown
Member

Example

struct Foo {
    x: i32
}$0

Before this PR

Assist not applicable

After this PR

struct Foo {
    x: i32
}

impl Foo {$0}

Example
---
```rust
struct Foo {
    x: i32
}$0
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
struct Foo {
    x: i32
}

impl Foo {$0}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 19, 2026
Copy link
Copy Markdown
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.

I support changing the assist to only trigger on the struct name instead.

View changes since this review

@A4-Tacks
Copy link
Copy Markdown
Member Author

Triggering at the tail is very meaningful, especially for longer structures

@ChayimFriedman2
Copy link
Copy Markdown
Contributor

We already have too many assists. Shrinking their range, while making them less discoverable, also makes them less distracting.

@A4-Tacks
Copy link
Copy Markdown
Member Author

Just triggered in braces, it's also good to trigger in name+braces

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.

3 participants