File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
src/librustc_typeck/check Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -435,23 +435,18 @@ fn check_trait(tcx: TyCtxt<'_>, item: &hir::Item<'_>) {
435435///
436436/// Assuming the defaults are used, check that all predicates (bounds on the
437437/// assoc type and where clauses on the trait) hold.
438- fn check_associated_type_defaults (
439- fcx : & FnCtxt < ' _ , ' _ > ,
440- trait_def_id : DefId ,
441- ) {
438+ fn check_associated_type_defaults ( fcx : & FnCtxt < ' _ , ' _ > , trait_def_id : DefId ) {
442439 let tcx = fcx. tcx ;
443440 let substs = InternalSubsts :: identity_for_item ( tcx, trait_def_id) ;
444441
445442 // For all assoc. types with defaults, build a map from
446443 // `<Self as Trait<...>>::Assoc` to the default type.
447- let map = tcx. associated_items ( trait_def_id)
444+ let map = tcx
445+ . associated_items ( trait_def_id)
448446 . filter_map ( |item| {
449447 if item. kind == ty:: AssocKind :: Type && item. defaultness . has_value ( ) {
450448 // `<Self as Trait<...>>::Assoc`
451- let proj = ty:: ProjectionTy {
452- substs,
453- item_def_id : item. def_id ,
454- } ;
449+ let proj = ty:: ProjectionTy { substs, item_def_id : item. def_id } ;
455450 let default_ty = tcx. type_of ( item. def_id ) ;
456451 debug ! ( "assoc. type default mapping: {} -> {}" , proj, default_ty) ;
457452 Some ( ( proj, default_ty) )
You can’t perform that action at this time.
0 commit comments