This repository was archived by the owner on Apr 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 33#![ allow( clippy:: similar_names) ]
44#![ allow( clippy:: single_match_else) ]
55#![ allow( clippy:: too_many_lines) ]
6- // Needs a nightly feature, doesn't bring that much to the table
7- // FIXME: Apply Clippy lint once or-patterns are stabilized (rust-lang/rust#54883)
8- #![ allow( clippy:: unnested_or_patterns) ]
96#![ deny( warnings) ]
107
118extern crate rustc_const_eval; // Requires `rustup component add rustc-dev`
Original file line number Diff line number Diff line change @@ -875,7 +875,7 @@ fn diff_types<'tcx>(
875875
876876 match old {
877877 // type aliases, consts and statics just need their type to be checked
878- Def ( TyAlias , _ ) | Def ( Const , _ ) | Def ( Static , _) => {
878+ Def ( TyAlias | Const | Static , _) => {
879879 cmp_types (
880880 changes,
881881 id_mapping,
@@ -887,7 +887,7 @@ fn diff_types<'tcx>(
887887 ) ;
888888 }
889889 // functions and methods require us to compare their signatures, not types
890- Def ( Fn , _ ) | Def ( AssocFn , _) => {
890+ Def ( Fn | AssocFn , _) => {
891891 let old_fn_sig = tcx. type_of ( old_def_id) . fn_sig ( tcx) ;
892892 let new_fn_sig = tcx. type_of ( new_def_id) . fn_sig ( tcx) ;
893893
@@ -902,7 +902,7 @@ fn diff_types<'tcx>(
902902 ) ;
903903 }
904904 // ADTs' types are compared field-wise
905- Def ( Struct , _ ) | Def ( Enum , _ ) | Def ( Union , _) => {
905+ Def ( Struct | Enum | Union , _) => {
906906 if let Some ( children) = id_mapping. children_of ( old_def_id) {
907907 for ( o_def_id, n_def_id) in children {
908908 let o_ty = tcx. type_of ( o_def_id) ;
You can’t perform that action at this time.
0 commit comments