mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-26 17:57:19 +00:00
Examples
---
```rust
mod indent {
struct Foo {}
fn foo() {
let foo = Foo{};
foo.bar$0;
}
}
```
**Before this PR**:
```rust
mod indent {
struct Foo { bar: ()
}
fn foo() {
let foo = Foo{};
foo.bar;
}
}
```
**After this PR**:
```rust
mod indent {
struct Foo {
bar: ()
}
fn foo() {
let foo = Foo{};
foo.bar;
}
}
```
---
New field list add newline
```rust
mod indent {
struct Foo;
fn foo() {
Foo.bar$0;
}
}
```
**Before this PR**:
```rust
mod indent {
struct Foo{ bar: () }
fn foo() {
Foo.bar;
}
}
```
**After this PR**:
```rust
mod indent {
struct Foo {
bar: (),
}
fn foo() {
Foo.bar;
}
}
```
|
||
|---|---|---|
| .. | ||
| base-db | ||
| cfg | ||
| edition | ||
| hir | ||
| hir-def | ||
| hir-expand | ||
| hir-ty | ||
| ide | ||
| ide-assists | ||
| ide-completion | ||
| ide-db | ||
| ide-diagnostics | ||
| ide-ssr | ||
| intern | ||
| load-cargo | ||
| mbe | ||
| parser | ||
| paths | ||
| proc-macro-api | ||
| proc-macro-srv | ||
| proc-macro-srv-cli | ||
| profile | ||
| project-model | ||
| query-group-macro | ||
| rust-analyzer | ||
| span | ||
| stdx | ||
| syntax | ||
| syntax-bridge | ||
| test-fixture | ||
| test-utils | ||
| toolchain | ||
| tt | ||
| vfs | ||
| vfs-notify | ||