diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-01-30 11:03:32 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-01-30 12:26:26 +0000 |
| commit | fd649a3cc5e9f17c8aee070227e8c71f094560b7 (patch) | |
| tree | b2d741c4f018a744f79877a8ca669a2617c652e1 /compiler/rustc_hir_analysis/src/astconv/generics.rs | |
| parent | f55b0022db8dccc6aa6bf3f650b562eaec0fdc54 (diff) | |
| download | rust-fd649a3cc5e9f17c8aee070227e8c71f094560b7.tar.gz rust-fd649a3cc5e9f17c8aee070227e8c71f094560b7.zip | |
Replace enum `==`s with `match`es where it makes sense
Diffstat (limited to 'compiler/rustc_hir_analysis/src/astconv/generics.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/generics.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/generics.rs b/compiler/rustc_hir_analysis/src/astconv/generics.rs index 7a499327dbf..5e8f727df69 100644 --- a/compiler/rustc_hir_analysis/src/astconv/generics.rs +++ b/compiler/rustc_hir_analysis/src/astconv/generics.rs @@ -385,10 +385,9 @@ pub fn check_generic_arg_count_for_call( ) -> GenericArgCountResult { let empty_args = hir::GenericArgs::none(); let gen_args = seg.args.unwrap_or(&empty_args); - let gen_pos = if is_method_call == IsMethodCall::Yes { - GenericArgPosition::MethodCall - } else { - GenericArgPosition::Value + let gen_pos = match is_method_call { + IsMethodCall::Yes => GenericArgPosition::MethodCall, + IsMethodCall::No => GenericArgPosition::Value, }; let has_self = generics.parent.is_none() && generics.has_self; |
