@@ -887,32 +887,28 @@ fn method_context(cx: &Context, m: &ast::Method) -> MethodContext {
887
887
888
888
match cx. tcx . impl_or_trait_items . borrow ( ) . get ( & did) . cloned ( ) {
889
889
None => cx. sess ( ) . span_bug ( m. span , "missing method descriptor?!" ) ,
890
- Some ( md) => {
891
- match md {
892
- ty:: MethodTraitItem ( md) => {
893
- match md. container {
894
- ty:: TraitContainer ( ..) => MethodContext :: TraitDefaultImpl ,
895
- ty:: ImplContainer ( cid) => {
896
- match ty:: impl_trait_ref ( cx. tcx , cid) {
897
- Some ( ..) => MethodContext :: TraitImpl ,
898
- None => MethodContext :: PlainImpl
899
- }
900
- }
890
+ Some ( ty:: MethodTraitItem ( md) ) => {
891
+ match md. container {
892
+ ty:: TraitContainer ( ..) => MethodContext :: TraitDefaultImpl ,
893
+ ty:: ImplContainer ( cid) => {
894
+ match ty:: impl_trait_ref ( cx. tcx , cid) {
895
+ Some ( ..) => MethodContext :: TraitImpl ,
896
+ None => MethodContext :: PlainImpl
901
897
}
902
898
}
903
- ty :: TypeTraitItem ( typedef ) => {
904
- match typedef . container {
905
- ty:: TraitContainer ( .. ) => MethodContext :: TraitDefaultImpl ,
906
- ty :: ImplContainer ( cid ) => {
907
- match ty:: impl_trait_ref ( cx . tcx , cid ) {
908
- Some ( .. ) => MethodContext :: TraitImpl ,
909
- None => MethodContext :: PlainImpl
910
- }
911
- }
899
+ }
900
+ } ,
901
+ Some ( ty:: TypeTraitItem ( typedef ) ) => {
902
+ match typedef . container {
903
+ ty:: TraitContainer ( .. ) => MethodContext :: TraitDefaultImpl ,
904
+ ty :: ImplContainer ( cid ) => {
905
+ match ty :: impl_trait_ref ( cx . tcx , cid ) {
906
+ Some ( .. ) => MethodContext :: TraitImpl ,
907
+ None => MethodContext :: PlainImpl
912
908
}
913
909
}
914
910
}
915
- }
911
+ } ,
916
912
}
917
913
}
918
914
0 commit comments