@@ -34,8 +34,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<'_
3434 return map[ & trait_item_def_id] ;
3535 }
3636 Err ( _) => {
37- return ty:: EarlyBinder :: bind ( Ty :: new_error_with_message (
38- tcx,
37+ return ty:: EarlyBinder :: bind ( tcx. new_error_with_message (
3938 DUMMY_SP ,
4039 "Could not collect return position impl trait in trait tys" ,
4140 ) ) ;
@@ -366,8 +365,7 @@ fn anon_const_type_of<'tcx>(icx: &ItemCtxt<'tcx>, def_id: LocalDefId) -> Ty<'tcx
366365 tcx. type_of ( field_def_id) . instantiate_identity ( )
367366 }
368367
369- _ => Ty :: new_error_with_message (
370- tcx,
368+ _ => tcx. new_error_with_message (
371369 span,
372370 format ! ( "unexpected anon const parent in type_of(): {parent_node:?}" ) ,
373371 ) ,
@@ -402,8 +400,7 @@ fn const_arg_anon_type_of<'tcx>(icx: &ItemCtxt<'tcx>, arg_hir_id: HirId, span: S
402400
403401 // This is not a `bug!` as const arguments in path segments that did not resolve to anything
404402 // will result in `type_of` never being fed.
405- _ => Ty :: new_error_with_message (
406- tcx,
403+ _ => tcx. new_error_with_message (
407404 span,
408405 "`type_of` called on const argument's anon const before the const argument was lowered" ,
409406 ) ,
@@ -427,8 +424,7 @@ fn infer_placeholder_type<'tcx>(
427424 if let Some ( trait_item_def_id) = tcx. trait_item_of ( def_id. to_def_id ( ) ) {
428425 tcx. type_of ( trait_item_def_id) . instantiate_identity ( )
429426 } else {
430- Ty :: new_error_with_message (
431- tcx,
427+ tcx. new_error_with_message (
432428 ty_span,
433429 "constant with `type const` requires an explicit type" ,
434430 )
0 commit comments