3 Cursor position or selection is signified by `┃` character.
8 Adds a new `#[derive()]` clause to a struct or enum.
25 ## `add_explicit_type`
27 Specify type for a let binding.
43 Adds a new inherent impl for a type.
47 struct Ctx<T: Clone> {
52 struct Ctx<T: Clone> {
56 impl<T: Clone> Ctx<T> {
61 ## `add_impl_default_members`
63 Adds scaffold for overriding default impl members.
94 ## `add_impl_missing_members`
96 Adds scaffold for required impl members.
118 fn foo(&self) { unimplemented!() }
125 Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws).
126 This transforms expressions of the form `!l || !r` into `!(l && r)`.
127 This also works with `&&`. This assist can only be applied with the cursor
128 on either `||` or `&&`, with both operands being a negation of some kind.
129 This means something of the form `!x` or `x != y`.
143 ## `change_visibility`
145 Adds or changes existing visibility specifier.
152 pub(crate) fn frobnicate() {}
155 ## `convert_to_guarded_return`
157 Replace a large conditional with a guarded return.
180 Adds missing clauses to a `match` expression.
184 enum Action { Move { distance: u32 }, Stop }
186 fn handle(action: Action) {
193 enum Action { Move { distance: u32 }, Stop }
195 fn handle(action: Action) {
197 Action::Move { distance } => (),
205 Flips operands of a binary expression.
221 Flips two comma-separated items.
235 ## `inline_local_variable`
237 Inlines local variable.
252 ## `introduce_variable`
254 Extracts subexpression into a variable.
264 let var_name = (1 + 2);