Skip to content

Conversation

@A4-Tacks
Copy link
Member

Example

#[cfg(test)]
fn foo() {
    foo($01 + 1$0);
}

Before this PR

#[cfg(test)]
fn foo() {
    foo(fun_name());
}

fn $0fun_name() -> i32 {
    1 + 1
}

After this PR

#[cfg(test)]
fn foo() {
    foo(fun_name());
}

#[cfg(test)]
fn $0fun_name() -> i32 {
    1 + 1
}

Example
---
```rust
#[cfg(test)]
fn foo() {
    foo($01 + 1$0);
}
```

**Before this PR**

```rust
#[cfg(test)]
fn foo() {
    foo(fun_name());
}

fn $0fun_name() -> i32 {
    1 + 1
}
```

**After this PR**

```rust
#[cfg(test)]
fn foo() {
    foo(fun_name());
}

#[cfg(test)]
fn $0fun_name() -> i32 {
    1 + 1
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 11, 2026
@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Jan 13, 2026
Merged via the queue into rust-lang:master with commit f8b5330 Jan 13, 2026
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 13, 2026
@A4-Tacks A4-Tacks deleted the extract-func-attrs branch January 14, 2026 08:36
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