about summary refs log tree commit diff
path: root/tests/incremental/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-22 05:07:51 +0000
committerbors <bors@rust-lang.org>2023-09-22 05:07:51 +0000
commitc22bb0338a20a67b40e435e51de70867fed1ab95 (patch)
treef8d5d412e03678a0a7f412de14d89faae1a50273 /tests/incremental/thinlto
parentd6fef2c7e3be2783369b4b84e320b163b8fd291a (diff)
parentea118464908589db0293b7ba458a58db2f13db83 (diff)
downloadrust-c22bb0338a20a67b40e435e51de70867fed1ab95.tar.gz
rust-c22bb0338a20a67b40e435e51de70867fed1ab95.zip
Auto merge of #15651 - rmehri01:15639_fix_inline_local_closure, r=lnicola
Fix inlining closures from local variables and functions

Previously, closures were not properly wrapped in parentheses for the `inline_local_variable` and `inline_call` assists, leading to the usages being incorrectly called:

```rust
fn main() {
    let $0f = || 2;
    let _ = f();
}
```

Now produces:

```rust
fn main() {
    let _ = (|| 2)();
}
```

Instead of:

```rust
fn main() {
    let _ = || 2();
}
```

Closes #15639
Diffstat (limited to 'tests/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions