Skip to content

Conversation

@A4-Tacks
Copy link
Member

Extract substring inside format string.

Example

fn main() {
    let out = format_args!("foo$0bar$0");
}

->

fn main() {
    let new_str = "bar";
    let out = format_args!("foo{new_str}");
}

Extract substring inside format string.

Example
---
```rust
fn main() {
    let out = format_args!("foo$0bar$0");
}
```
->
```rust
fn main() {
    let new_str = "bar";
    let out = format_args!("foo{new_str}");
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2025
@ChayimFriedman2
Copy link
Contributor

Unless you are ready to have wasted work, please don't create PRs for new assists. We already have too many of them and are in the middle of a migration to SyntaxEditor, it's not clear if and when and what we want to accept.

@A4-Tacks
Copy link
Member Author

migration to SyntaxEditor

I created this assist using SyntaxEditor

@ShoyuVanilla
Copy link
Member

SyntaxEditor is not finished yet as a foundation for improving our syntax tree manipulation infrastructure. Its current primary goal is to make that work easier by centralizing all mutable syntax tree usage in one place.

Beyond mutable tree handling, we are also planning other changes - such as adopting a Roslyn-style trivia model - which will significantly affect how whitespace and comments are represented and manipulated. The more functionality we build on top of the current infrastructure, the harder this migration will become.

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.

4 participants