mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix: Fix incorrect parsing of use bounds
Also lower them a bit more
This commit is contained in:
parent
17055aaca9
commit
95298a2e61
11 changed files with 184 additions and 25 deletions
|
@ -795,7 +795,7 @@ pub enum TypeBoundKind {
|
|||
/// for<'a> ...
|
||||
ForType(ast::ForType),
|
||||
/// use
|
||||
Use(ast::GenericParamList),
|
||||
Use(ast::UseBoundGenericArgs),
|
||||
/// 'a
|
||||
Lifetime(ast::Lifetime),
|
||||
}
|
||||
|
@ -806,8 +806,8 @@ impl ast::TypeBound {
|
|||
TypeBoundKind::PathType(path_type)
|
||||
} else if let Some(for_type) = support::children(self.syntax()).next() {
|
||||
TypeBoundKind::ForType(for_type)
|
||||
} else if let Some(generic_param_list) = self.generic_param_list() {
|
||||
TypeBoundKind::Use(generic_param_list)
|
||||
} else if let Some(args) = self.use_bound_generic_args() {
|
||||
TypeBoundKind::Use(args)
|
||||
} else if let Some(lifetime) = self.lifetime() {
|
||||
TypeBoundKind::Lifetime(lifetime)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue