From 394e4744792f8e36ca1690cb23c2d3dd55556272 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 26 Oct 2019 17:27:47 +0300 Subject: add blank lines for readability --- crates/ra_assists/src/assists/add_derive.rs | 2 ++ crates/ra_assists/src/assists/add_explicit_type.rs | 2 ++ crates/ra_assists/src/assists/add_impl.rs | 2 ++ crates/ra_assists/src/assists/add_missing_impl_members.rs | 2 ++ crates/ra_assists/src/assists/apply_demorgan.rs | 2 ++ 5 files changed, 10 insertions(+) (limited to 'crates') diff --git a/crates/ra_assists/src/assists/add_derive.rs b/crates/ra_assists/src/assists/add_derive.rs index d3ba634c4..b077acb81 100644 --- a/crates/ra_assists/src/assists/add_derive.rs +++ b/crates/ra_assists/src/assists/add_derive.rs @@ -8,7 +8,9 @@ use ra_syntax::{ use crate::{Assist, AssistCtx, AssistId}; // Assist: add_derive +// // Adds a new `#[derive()]` clause to a struct or enum. +// // ``` // struct Point { // x: u32, diff --git a/crates/ra_assists/src/assists/add_explicit_type.rs b/crates/ra_assists/src/assists/add_explicit_type.rs index 33b7bea7f..302b95579 100644 --- a/crates/ra_assists/src/assists/add_explicit_type.rs +++ b/crates/ra_assists/src/assists/add_explicit_type.rs @@ -7,7 +7,9 @@ use ra_syntax::{ use crate::{Assist, AssistCtx, AssistId}; // Assist: add_explicit_type +// // Specify type for a let binding +// // ``` // fn main() { // let x<|> = 92; diff --git a/crates/ra_assists/src/assists/add_impl.rs b/crates/ra_assists/src/assists/add_impl.rs index 40bc5c464..43aeac7bd 100644 --- a/crates/ra_assists/src/assists/add_impl.rs +++ b/crates/ra_assists/src/assists/add_impl.rs @@ -9,7 +9,9 @@ use ra_syntax::{ use crate::{Assist, AssistCtx, AssistId}; // Assist: add_impl +// // Adds a new inherent impl for a type +// // ``` // struct Ctx { // data: T,<|> diff --git a/crates/ra_assists/src/assists/add_missing_impl_members.rs b/crates/ra_assists/src/assists/add_missing_impl_members.rs index 36fa6f9ea..fe1f2e72e 100644 --- a/crates/ra_assists/src/assists/add_missing_impl_members.rs +++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs @@ -13,7 +13,9 @@ enum AddMissingImplMembersMode { } // Assist: add_impl_missing_members +// // Adds scaffold for required impl members +// // ``` // trait T { // Type X; diff --git a/crates/ra_assists/src/assists/apply_demorgan.rs b/crates/ra_assists/src/assists/apply_demorgan.rs index a072f63e7..75144cefe 100644 --- a/crates/ra_assists/src/assists/apply_demorgan.rs +++ b/crates/ra_assists/src/assists/apply_demorgan.rs @@ -5,11 +5,13 @@ use ra_syntax::SyntaxNode; use crate::{Assist, AssistCtx, AssistId}; // Assist: apply_demorgan +// // Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws). // This transforms expressions of the form `!l || !r` into `!(l && r)`. // This also works with `&&`. This assist can only be applied with the cursor // on either `||` or `&&`, with both operands being a negation of some kind. // This means something of the form `!x` or `x != y`. +// // ``` // fn main() { // if x != 4 ||<|> !y {} -- cgit v1.2.3