- ItemSortKey(match item {
- MonoItem::Fn(ref instance) => {
- match instance.def {
- // We only want to take HirIds of user-defined
- // instances into account. The others don't matter for
- // the codegen tests and can even make item order
- // unstable.
- InstanceDef::Item(def_id) => {
- tcx.hir().as_local_hir_id(def_id)
- }
- InstanceDef::VtableShim(..) |
- InstanceDef::ReifyShim(..) |
- InstanceDef::Intrinsic(..) |
- InstanceDef::FnPtrShim(..) |
- InstanceDef::Virtual(..) |
- InstanceDef::ClosureOnceShim { .. } |
- InstanceDef::DropGlue(..) |
- InstanceDef::CloneShim(..) => {
- None
+ ItemSortKey(
+ match item {
+ MonoItem::Fn(ref instance) => {
+ match instance.def {
+ // We only want to take HirIds of user-defined
+ // instances into account. The others don't matter for
+ // the codegen tests and can even make item order
+ // unstable.
+ InstanceDef::Item(def_id) => tcx.hir().as_local_hir_id(def_id),
+ InstanceDef::VtableShim(..)
+ | InstanceDef::ReifyShim(..)
+ | InstanceDef::Intrinsic(..)
+ | InstanceDef::FnPtrShim(..)
+ | InstanceDef::Virtual(..)
+ | InstanceDef::ClosureOnceShim { .. }
+ | InstanceDef::DropGlue(..)
+ | InstanceDef::CloneShim(..) => None,