mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
ParenthesizedGenericArgs::{Ok -> ParenSugar}
This commit is contained in:
parent
5bf139e360
commit
f50c1e1f05
@ -482,7 +482,7 @@ enum ParamMode {
|
||||
}
|
||||
|
||||
enum ParenthesizedGenericArgs {
|
||||
Ok,
|
||||
ParenSugar,
|
||||
Err,
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
let parenthesized_generic_args = match base_res {
|
||||
// `a::b::Trait(Args)`
|
||||
Res::Def(DefKind::Trait, _) if i + 1 == proj_start => {
|
||||
ParenthesizedGenericArgs::Ok
|
||||
ParenthesizedGenericArgs::ParenSugar
|
||||
}
|
||||
// `a::b::Trait(Args)::TraitItem`
|
||||
Res::Def(DefKind::AssocFn, _)
|
||||
@ -59,10 +59,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
| Res::Def(DefKind::AssocTy, _)
|
||||
if i + 2 == proj_start =>
|
||||
{
|
||||
ParenthesizedGenericArgs::Ok
|
||||
ParenthesizedGenericArgs::ParenSugar
|
||||
}
|
||||
// Avoid duplicated errors.
|
||||
Res::Err => ParenthesizedGenericArgs::Ok,
|
||||
Res::Err => ParenthesizedGenericArgs::ParenSugar,
|
||||
// An error
|
||||
_ => ParenthesizedGenericArgs::Err,
|
||||
};
|
||||
@ -180,7 +180,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
self.lower_angle_bracketed_parameter_data(data, param_mode, itctx)
|
||||
}
|
||||
GenericArgs::Parenthesized(data) => match parenthesized_generic_args {
|
||||
ParenthesizedGenericArgs::Ok => {
|
||||
ParenthesizedGenericArgs::ParenSugar => {
|
||||
self.lower_parenthesized_parameter_data(data, itctx)
|
||||
}
|
||||
ParenthesizedGenericArgs::Err => {
|
||||
|
Loading…
Reference in New Issue
Block a user