Comment clean-up. Use display where possible

This commit is contained in:
alibektas 2023-04-22 13:23:52 +02:00
parent caa13b3f95
commit e275f77b2c

View file

@ -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) /// Related goto [link](https://doc.rust-lang.org/reference/items/type-aliases.html)
/// Type Alias syntax is /// Type Alias syntax is
/// /// ```
/// ``` /// TypeAlias :
/// TypeAlias : /// type IDENTIFIER GenericParams? ( : TypeParamBounds )? WhereClause? ( = Type WhereClause?)? ;
/// type IDENTIFIER GenericParams? ( : TypeParamBounds )? WhereClause? ( = Type WhereClause?)? ; /// ```
/// ``` /// FIXME : ident should be of type ast::Ident
///
/// FIXME : ident should be of type ast::Ident
pub fn ty_alias( pub fn ty_alias(
ident: &str, ident: &str,
generic_param_list: Option<ast::GenericParamList>, generic_param_list: Option<ast::GenericParamList>,
@ -182,7 +180,7 @@ pub fn ty_alias(
} }
if let Some(list) = type_param_bounds { 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 { if let Some(cl) = where_clause {