Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b1a0c0b

Browse files
committedJun 28, 2024
Change RTN to use .. again
1 parent 99f77a2 commit b1a0c0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+109
-163
lines changed
 

‎compiler/rustc_ast/src/ast.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ pub enum GenericArgs {
176176
AngleBracketed(AngleBracketedArgs),
177177
/// The `(A, B)` and `C` in `Foo(A, B) -> C`.
178178
Parenthesized(ParenthesizedArgs),
179+
/// `(..)` in return type notation
180+
ParenthesizedElided(Span),
179181
}
180182

181183
impl GenericArgs {
@@ -187,6 +189,7 @@ impl GenericArgs {
187189
match self {
188190
AngleBracketed(data) => data.span,
189191
Parenthesized(data) => data.span,
192+
ParenthesizedElided(span) => *span,
190193
}
191194
}
192195
}
@@ -2051,7 +2054,7 @@ impl UintTy {
20512054
/// * the `A: Bound` in `Trait<A: Bound>`
20522055
/// * the `RetTy` in `Trait(ArgTy, ArgTy) -> RetTy`
20532056
/// * the `C = { Ct }` in `Trait<C = { Ct }>` (feature `associated_const_equality`)
2054-
/// * the `f(): Bound` in `Trait<f(): Bound>` (feature `return_type_notation`)
2057+
/// * the `f(..): Bound` in `Trait<f(..): Bound>` (feature `return_type_notation`)
20552058
#[derive(Clone, Encodable, Decodable, Debug)]
20562059
pub struct AssocItemConstraint {
20572060
pub id: NodeId,

‎compiler/rustc_ast/src/mut_visit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ fn noop_visit_generic_args<T: MutVisitor>(generic_args: &mut GenericArgs, vis: &
582582
match generic_args {
583583
GenericArgs::AngleBracketed(data) => vis.visit_angle_bracketed_parameter_data(data),
584584
GenericArgs::Parenthesized(data) => vis.visit_parenthesized_parameter_data(data),
585+
GenericArgs::ParenthesizedElided(span) => vis.visit_span(span),
585586
}
586587
}
587588

0 commit comments

Comments
 (0)
Please sign in to comment.