Change RTN to use .. again
This commit is contained in:
parent
99f77a2eda
commit
b1a0c0b123
47 changed files with 109 additions and 163 deletions
|
@ -176,6 +176,8 @@ pub enum GenericArgs {
|
|||
AngleBracketed(AngleBracketedArgs),
|
||||
/// The `(A, B)` and `C` in `Foo(A, B) -> C`.
|
||||
Parenthesized(ParenthesizedArgs),
|
||||
/// `(..)` in return type notation
|
||||
ParenthesizedElided(Span),
|
||||
}
|
||||
|
||||
impl GenericArgs {
|
||||
|
@ -187,6 +189,7 @@ impl GenericArgs {
|
|||
match self {
|
||||
AngleBracketed(data) => data.span,
|
||||
Parenthesized(data) => data.span,
|
||||
ParenthesizedElided(span) => *span,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2051,7 +2054,7 @@ impl UintTy {
|
|||
/// * the `A: Bound` in `Trait<A: Bound>`
|
||||
/// * the `RetTy` in `Trait(ArgTy, ArgTy) -> RetTy`
|
||||
/// * the `C = { Ct }` in `Trait<C = { Ct }>` (feature `associated_const_equality`)
|
||||
/// * the `f(): Bound` in `Trait<f(): Bound>` (feature `return_type_notation`)
|
||||
/// * the `f(..): Bound` in `Trait<f(..): Bound>` (feature `return_type_notation`)
|
||||
#[derive(Clone, Encodable, Decodable, Debug)]
|
||||
pub struct AssocItemConstraint {
|
||||
pub id: NodeId,
|
||||
|
|
|
@ -582,6 +582,7 @@ fn noop_visit_generic_args<T: MutVisitor>(generic_args: &mut GenericArgs, vis: &
|
|||
match generic_args {
|
||||
GenericArgs::AngleBracketed(data) => vis.visit_angle_bracketed_parameter_data(data),
|
||||
GenericArgs::Parenthesized(data) => vis.visit_parenthesized_parameter_data(data),
|
||||
GenericArgs::ParenthesizedElided(span) => vis.visit_span(span),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -234,6 +234,6 @@ fn path_return_type(path: &ast::Path) -> Option<&ast::Ty> {
|
|||
ast::FnRetTy::Default(_) => None,
|
||||
ast::FnRetTy::Ty(ret) => Some(ret),
|
||||
},
|
||||
ast::GenericArgs::AngleBracketed(_) => None,
|
||||
ast::GenericArgs::AngleBracketed(_) | ast::GenericArgs::ParenthesizedElided(_) => None,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -609,6 +609,7 @@ where
|
|||
walk_list!(visitor, visit_ty, inputs);
|
||||
try_visit!(visitor.visit_fn_ret_ty(output));
|
||||
}
|
||||
GenericArgs::ParenthesizedElided(_span) => {}
|
||||
}
|
||||
V::Result::output()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue