mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Merge commit 'cd3bf9fe51
' into sync-from-ra
This commit is contained in:
parent
bbd695589e
commit
9326cf7f0c
114 changed files with 3893 additions and 1252 deletions
|
@ -1207,7 +1207,7 @@ impl ArrayType {
|
|||
pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
|
||||
pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
|
||||
pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
|
||||
pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
|
||||
pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
|
||||
pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ pub fn ty_alias(
|
|||
assignment: Option<(ast::Type, Option<ast::WhereClause>)>,
|
||||
) -> ast::TypeAlias {
|
||||
let mut s = String::new();
|
||||
s.push_str(&format!("type {} ", ident));
|
||||
s.push_str(&format!("type {}", ident));
|
||||
|
||||
if let Some(list) = generic_param_list {
|
||||
s.push_str(&list.to_string());
|
||||
|
@ -182,9 +182,9 @@ pub fn ty_alias(
|
|||
|
||||
if let Some(exp) = assignment {
|
||||
if let Some(cl) = exp.1 {
|
||||
s.push_str(&format!("= {} {}", &exp.0.to_string(), &cl.to_string()));
|
||||
s.push_str(&format!(" = {} {}", &exp.0.to_string(), &cl.to_string()));
|
||||
} else {
|
||||
s.push_str(&format!("= {}", &exp.0.to_string()));
|
||||
s.push_str(&format!(" = {}", &exp.0.to_string()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue