Add (..)
syntax for RTN
This commit is contained in:
parent
104aacb49f
commit
8b592db27a
44 changed files with 355 additions and 201 deletions
|
@ -1075,6 +1075,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
|
|||
self.with_impl_trait(None, |this| this.visit_ty(ty));
|
||||
}
|
||||
}
|
||||
GenericArgs::ReturnTypeNotation(_span) => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1387,16 +1388,19 @@ fn deny_equality_constraints(
|
|||
match &mut assoc_path.segments[len].args {
|
||||
Some(args) => match args.deref_mut() {
|
||||
GenericArgs::Parenthesized(_) => continue,
|
||||
GenericArgs::ReturnTypeNotation(_span) => continue,
|
||||
GenericArgs::AngleBracketed(args) => {
|
||||
args.args.push(arg);
|
||||
}
|
||||
},
|
||||
empty_args => {
|
||||
*empty_args = AngleBracketedArgs {
|
||||
span: ident.span,
|
||||
args: thin_vec![arg],
|
||||
}
|
||||
.into();
|
||||
*empty_args = Some(
|
||||
AngleBracketedArgs {
|
||||
span: ident.span,
|
||||
args: thin_vec![arg],
|
||||
}
|
||||
.into(),
|
||||
);
|
||||
}
|
||||
}
|
||||
err.assoc = Some(errors::AssociatedSuggestion {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue