about summary refs log tree commit diff
diff options
context:
space:
mode:
authoralibektas <bektasali@protonmail.com>2023-04-22 13:23:52 +0200
committeralibektas <bektasali@protonmail.com>2023-04-22 13:23:52 +0200
commite275f77b2cb070e84f76e9e493560d2d9a531bff (patch)
treeb6c415dfc6308b8aaddcb4b5c704faf6bbfe3d2a
parentcaa13b3f95c26db7450f6efa5371298ea650792b (diff)
downloadrust-e275f77b2cb070e84f76e9e493560d2d9a531bff.tar.gz
rust-e275f77b2cb070e84f76e9e493560d2d9a531bff.zip
Comment clean-up. Use display where possible
-rw-r--r--crates/syntax/src/ast/make.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs
index 74cf9888e9b..48f52c904cf 100644
--- a/crates/syntax/src/ast/make.rs
+++ b/crates/syntax/src/ast/make.rs
@@ -159,14 +159,12 @@ fn ty_from_text(text: &str) -> ast::Type {
 }
 
 /// Related goto [link](https://doc.rust-lang.org/reference/items/type-aliases.html)
-///     Type Alias syntax is
-///
-///     ```
-///     TypeAlias :
-///        type IDENTIFIER GenericParams? ( : TypeParamBounds )? WhereClause? ( = Type WhereClause?)? ;
-///     ```
-///
-///     FIXME : ident should be of type ast::Ident
+/// Type Alias syntax is
+/// ```
+/// TypeAlias :
+/// type IDENTIFIER GenericParams? ( : TypeParamBounds )? WhereClause? ( = Type WhereClause?)? ;
+/// ```
+/// FIXME : ident should be of type ast::Ident
 pub fn ty_alias(
     ident: &str,
     generic_param_list: Option<ast::GenericParamList>,
@@ -182,7 +180,7 @@ pub fn ty_alias(
     }
 
     if let Some(list) = type_param_bounds {
-        s.push_str(&format!(" : {}", &list.to_string()));
+        s.push_str(&format!(" : {}", &list));
     }
 
     if let Some(cl) = where_clause {