rust/crates
bors[bot] 5c10f2f705
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 <michaelfbryan@gmail.com>
2021-01-05 11:04:58 +00:00
..
arena
assists Created an inline-function assist (fixes #6863) 2021-01-05 04:18:57 +08:00
base_db Add support for Rust 2021. 2021-01-01 17:22:23 +01:00
cfg Upgrade expect-test to 1.1 2021-01-03 14:43:29 +01:00
completion Upgrade expect-test to 1.1 2021-01-03 14:43:29 +01:00
flycheck
hir Remove RetType 2021-01-04 20:34:23 +01:00
hir_def Introduce new queries to compute 2021-01-04 20:37:50 -08:00
hir_expand Refactor TokenBuffer for reduc cloning 2021-01-05 02:00:46 +08:00
hir_ty Update crates 2021-01-04 11:12:42 -05:00
ide Show GotoTypeAction for TypeParam 2021-01-04 15:54:45 +01:00
ide_db Upgrade expect-test to 1.1 2021-01-03 14:43:29 +01:00
mbe Simplify SubtreeTokenSource 2021-01-05 02:00:51 +08:00
parser parser,syntax: Add separate parser for stmt with optional semicolon 2021-01-03 12:05:52 +01:00
paths
proc_macro_api Remove serde_stacker which depends on cc 2021-01-01 15:26:55 +08:00
proc_macro_srv Fix spacing in proc-macro tokens to_string 2020-12-31 13:36:19 +08:00
proc_macro_test
profile
project_model Add support for Rust 2021. 2021-01-01 17:22:23 +01:00
rust-analyzer Allow #anchor linking of config options 2021-01-05 13:09:06 +03:00
ssr Merge #7147 2021-01-04 20:36:13 +00:00
stdx
syntax Update crates 2021-01-04 11:12:42 -05:00
test_utils
text_edit
toolchain
tt Refactor TokenBuffer for reduc cloning 2021-01-05 02:00:46 +08:00
vfs
vfs-notify