@@ -33,8 +33,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<'_
3333 return map[ & trait_item_def_id] ;
3434 }
3535 Err ( _) => {
36- return ty:: EarlyBinder :: bind ( Ty :: new_error_with_message (
37- tcx,
36+ return ty:: EarlyBinder :: bind ( tcx. new_error_with_message (
3837 DUMMY_SP ,
3938 "Could not collect return position impl trait in trait tys" ,
4039 ) ) ;
@@ -359,8 +358,7 @@ fn anon_const_type_of<'tcx>(icx: &ItemCtxt<'tcx>, def_id: LocalDefId) -> Ty<'tcx
359358 tcx. type_of ( field_def_id) . instantiate_identity ( )
360359 }
361360
362- _ => Ty :: new_error_with_message (
363- tcx,
361+ _ => tcx. new_error_with_message (
364362 span,
365363 format ! ( "unexpected anon const parent in type_of(): {parent_node:?}" ) ,
366364 ) ,
@@ -395,8 +393,7 @@ fn const_arg_anon_type_of<'tcx>(icx: &ItemCtxt<'tcx>, arg_hir_id: HirId, span: S
395393
396394 // This is not a `bug!` as const arguments in path segments that did not resolve to anything
397395 // will result in `type_of` never being fed.
398- _ => Ty :: new_error_with_message (
399- tcx,
396+ _ => tcx. new_error_with_message (
400397 span,
401398 "`type_of` called on const argument's anon const before the const argument was lowered" ,
402399 ) ,
@@ -420,8 +417,7 @@ fn infer_placeholder_type<'tcx>(
420417 if let Some ( trait_item_def_id) = tcx. trait_item_of ( def_id. to_def_id ( ) ) {
421418 tcx. type_of ( trait_item_def_id) . instantiate_identity ( )
422419 } else {
423- Ty :: new_error_with_message (
424- tcx,
420+ tcx. new_error_with_message (
425421 ty_span,
426422 "constant with `type const` requires an explicit type" ,
427423 )
0 commit comments