diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-05 11:04:58 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-05 11:04:58 +0000 |
commit | 5c10f2f705d6757b9821387a5be759789b7ee480 (patch) | |
tree | 961570d2245c2e62ce7f20c2437fe5d8abb92166 /crates/parser/src/grammar/params.rs | |
parent | 4bc1ed7d592819bf2a29f7be376e0c09f190c345 (diff) | |
parent | 7b4b4ef02681053299dda5111c0d4b0113e29224 (diff) |
Merge #7131
7131: Created an assist for inlining a function's body into its caller r=matklad a=Michael-F-Bryan
This introduces an `inline_function` assist which will convert code like this:
```rust
fn add(a: u32, b: u32) -> u32 { a + b }
fn main() {
let x = add<|>(1, 2);
}
```
Into something like this:
```rust
fn add(a: u32, b: u32) -> u32 { a + b }
fn main() {
let x = {
let a = 1;
let b = 2;
a + b
};
}
```
Fixes #6863.
Co-authored-by: Michael-F-Bryan <[email protected]>
Diffstat (limited to 'crates/parser/src/grammar/params.rs')
0 files changed, 0 insertions, 0 deletions