@@ -693,7 +693,7 @@ fn main() {
693693
694694[discrete]
695695=== `convert_to_guarded_return`
696- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_to_guarded_return.rs#L21 [convert_to_guarded_return.rs]
696+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_to_guarded_return.rs#L24 [convert_to_guarded_return.rs]
697697
698698Replace a large conditional with a guarded return.
699699
@@ -944,7 +944,7 @@ fn main() {
944944
945945[discrete]
946946=== `extract_function`
947- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_function.rs#L39 [extract_function.rs]
947+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_function.rs#L37 [extract_function.rs]
948948
949949Extracts selected statements and comments into new function.
950950
@@ -977,7 +977,7 @@ fn ┃fun_name(n: i32) {
977977
978978[discrete]
979979=== `extract_module`
980- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_module.rs#L32 [extract_module.rs]
980+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_module.rs#L30 [extract_module.rs]
981981
982982Extracts a selected region as separate module. All the references, visibility and imports are
983983resolved.
@@ -1251,7 +1251,7 @@ impl Default for Example {
12511251
12521252[discrete]
12531253=== `generate_delegate_methods`
1254- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_delegate_methods.rs#L17 [generate_delegate_methods.rs]
1254+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_delegate_methods.rs#L15 [generate_delegate_methods.rs]
12551255
12561256Generate delegate methods.
12571257
@@ -1681,15 +1681,15 @@ struct Person {
16811681
16821682impl Person {
16831683 fn ┃name(&self) -> &str {
1684- self.name.as_ref()
1684+ & self.name
16851685 }
16861686}
16871687```
16881688
16891689
16901690[discrete]
16911691=== `generate_getter_mut`
1692- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_getter_or_setter.rs#L113 [generate_getter_or_setter.rs]
1692+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_getter_or_setter.rs#L127 [generate_getter_or_setter.rs]
16931693
16941694Generate a mut getter method.
16951695
@@ -1733,9 +1733,7 @@ struct Ctx<T: Clone> {
17331733 data: T,
17341734}
17351735
1736- impl<T: Clone> Ctx<T> {
1737- ┃
1738- }
1736+ impl<T: Clone> Ctx<T> {┃}
17391737```
17401738
17411739
@@ -1816,7 +1814,7 @@ impl<T> core::ops::Index<Axis> for [T; 3] {
18161814
18171815[discrete]
18181816=== `generate_new`
1819- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_new.rs#L13 [generate_new.rs]
1817+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_new.rs#L14 [generate_new.rs]
18201818
18211819Adds a `fn new` for a type.
18221820
@@ -1834,7 +1832,9 @@ struct Ctx<T: Clone> {
18341832}
18351833
18361834impl<T: Clone> Ctx<T> {
1837- fn ┃new(data: T) -> Self { Self { data } }
1835+ fn ┃new(data: T) -> Self {
1836+ Self { data }
1837+ }
18381838}
18391839```
18401840
@@ -1928,7 +1928,7 @@ impl<const N: usize> ${0:TraitName}<N> for Foo<N> {
19281928
19291929[discrete]
19301930=== `generate_trait_impl`
1931- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_impl.rs#L56 [generate_impl.rs]
1931+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_impl.rs#L59 [generate_impl.rs]
19321932
19331933Adds a new trait impl for a type.
19341934
@@ -1945,9 +1945,7 @@ struct Ctx<T: Clone> {
19451945 data: T,
19461946}
19471947
1948- impl<T: Clone> ┃ for Ctx<T> {
1949-
1950- }
1948+ impl<T: Clone> ${0:_} for Ctx<T> {}
19511949```
19521950
19531951
@@ -2348,7 +2346,7 @@ use std::{fmt::Formatter, io};
23482346
23492347[discrete]
23502348=== `merge_match_arms`
2351- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/merge_match_arms.rs#L11 [merge_match_arms.rs]
2349+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/merge_match_arms.rs#L12 [merge_match_arms.rs]
23522350
23532351Merges the current match arm with the following if their bodies are identical.
23542352
@@ -3006,7 +3004,7 @@ fn main() {
30063004
30073005[discrete]
30083006=== `replace_derive_with_manual_impl`
3009- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs#L18 [replace_derive_with_manual_impl.rs]
3007+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs#L20 [replace_derive_with_manual_impl.rs]
30103008
30113009Converts a `derive` impl into a manual one.
30123010
0 commit comments