@@ -290,11 +290,20 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
290290 Some ( hir_id) => match tcx. hir ( ) . get ( hir_id) {
291291 hir:: Node :: Item ( hir:: Item { kind : hir:: ItemKind :: Const ( ..) , .. } )
292292 | hir:: Node :: Item ( hir:: Item { kind : hir:: ItemKind :: Static ( ..) , .. } )
293- | hir:: Node :: TraitItem ( hir:: TraitItem { kind : hir:: TraitItemKind :: Const ( ..) , .. } )
293+ | hir:: Node :: TraitItem ( hir:: TraitItem {
294+ kind : hir:: TraitItemKind :: Const ( ..) , ..
295+ } )
294296 | hir:: Node :: AnonConst ( _)
295297 | hir:: Node :: ImplItem ( hir:: ImplItem { kind : hir:: ImplItemKind :: Const ( ..) , .. } )
296298 | hir:: Node :: ImplItem ( hir:: ImplItem {
297- kind : hir:: ImplItemKind :: Fn ( hir:: FnSig { header : hir:: FnHeader { constness : hir:: Constness :: Const , .. } , .. } , ..) ,
299+ kind :
300+ hir:: ImplItemKind :: Fn (
301+ hir:: FnSig {
302+ header : hir:: FnHeader { constness : hir:: Constness :: Const , .. } ,
303+ ..
304+ } ,
305+ ..,
306+ ) ,
298307 ..
299308 } ) => hir:: Constness :: Const ,
300309
@@ -304,7 +313,10 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
304313 } ) => {
305314 let parent_hir_id = tcx. hir ( ) . get_parent_node ( hir_id) ;
306315 match tcx. hir ( ) . get ( parent_hir_id) {
307- hir:: Node :: Item ( hir:: Item { kind : hir:: ItemKind :: Impl ( hir:: Impl { constness, .. } ) , .. } ) => * constness,
316+ hir:: Node :: Item ( hir:: Item {
317+ kind : hir:: ItemKind :: Impl ( hir:: Impl { constness, .. } ) ,
318+ ..
319+ } ) => * constness,
308320 _ => span_bug ! (
309321 tcx. def_span( parent_hir_id. owner) ,
310322 "impl item's parent node is not an impl" ,
@@ -313,14 +325,22 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
313325 }
314326
315327 hir:: Node :: Item ( hir:: Item {
316- kind : hir:: ItemKind :: Fn ( hir:: FnSig { header : hir:: FnHeader { constness, .. } , .. } , ..) ,
328+ kind :
329+ hir:: ItemKind :: Fn ( hir:: FnSig { header : hir:: FnHeader { constness, .. } , .. } , ..) ,
317330 ..
318331 } )
319332 | hir:: Node :: TraitItem ( hir:: TraitItem {
320- kind : hir:: TraitItemKind :: Fn ( hir:: FnSig { header : hir:: FnHeader { constness, .. } , .. } , ..) ,
333+ kind :
334+ hir:: TraitItemKind :: Fn (
335+ hir:: FnSig { header : hir:: FnHeader { constness, .. } , .. } ,
336+ ..,
337+ ) ,
321338 ..
322339 } )
323- | hir:: Node :: Item ( hir:: Item { kind : hir:: ItemKind :: Impl ( hir:: Impl { constness, .. } ) , .. } ) => * constness,
340+ | hir:: Node :: Item ( hir:: Item {
341+ kind : hir:: ItemKind :: Impl ( hir:: Impl { constness, .. } ) ,
342+ ..
343+ } ) => * constness,
324344
325345 _ => hir:: Constness :: NotConst ,
326346 } ,
0 commit comments