mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Add snippet support for some assists
This commit is contained in:
parent
c847c079fd
commit
fa2e5299c3
5 changed files with 71 additions and 60 deletions
|
@ -17,7 +17,7 @@ struct S;
|
|||
struct S;
|
||||
|
||||
impl Debug for S {
|
||||
|
||||
$0
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -33,7 +33,7 @@ struct Point {
|
|||
}
|
||||
|
||||
// AFTER
|
||||
#[derive()]
|
||||
#[derive($0)]
|
||||
struct Point {
|
||||
x: u32,
|
||||
y: u32,
|
||||
|
@ -105,16 +105,16 @@ Adds a new inherent impl for a type.
|
|||
```rust
|
||||
// BEFORE
|
||||
struct Ctx<T: Clone> {
|
||||
data: T,┃
|
||||
data: T,┃
|
||||
}
|
||||
|
||||
// AFTER
|
||||
struct Ctx<T: Clone> {
|
||||
data: T,
|
||||
data: T,
|
||||
}
|
||||
|
||||
impl<T: Clone> Ctx<T> {
|
||||
|
||||
$0
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue