@@ -408,14 +408,14 @@ impl<'tcx> Place<'tcx> {
408
408
self . as_ref ( ) . project_deeper ( more_projections, tcx)
409
409
}
410
410
411
- pub fn ty_from < D : ? Sized > (
411
+ pub fn ty_from < D > (
412
412
local : Local ,
413
413
projection : & [ PlaceElem < ' tcx > ] ,
414
414
local_decls : & D ,
415
415
tcx : TyCtxt < ' tcx > ,
416
416
) -> PlaceTy < ' tcx >
417
417
where
418
- D : HasLocalDecls < ' tcx > ,
418
+ D : ? Sized + HasLocalDecls < ' tcx > ,
419
419
{
420
420
PlaceTy :: from_ty ( local_decls. local_decls ( ) [ local] . ty ) . multi_projection_ty ( tcx, projection)
421
421
}
@@ -529,9 +529,9 @@ impl<'tcx> PlaceRef<'tcx> {
529
529
Place { local : self . local , projection : tcx. mk_place_elems ( new_projections) }
530
530
}
531
531
532
- pub fn ty < D : ? Sized > ( & self , local_decls : & D , tcx : TyCtxt < ' tcx > ) -> PlaceTy < ' tcx >
532
+ pub fn ty < D > ( & self , local_decls : & D , tcx : TyCtxt < ' tcx > ) -> PlaceTy < ' tcx >
533
533
where
534
- D : HasLocalDecls < ' tcx > ,
534
+ D : ? Sized + HasLocalDecls < ' tcx > ,
535
535
{
536
536
Place :: ty_from ( self . local , self . projection , local_decls, tcx)
537
537
}
@@ -630,19 +630,19 @@ impl<'tcx> Operand<'tcx> {
630
630
if let ty:: FnDef ( def_id, args) = * const_ty. kind ( ) { Some ( ( def_id, args) ) } else { None }
631
631
}
632
632
633
- pub fn ty < D : ? Sized > ( & self , local_decls : & D , tcx : TyCtxt < ' tcx > ) -> Ty < ' tcx >
633
+ pub fn ty < D > ( & self , local_decls : & D , tcx : TyCtxt < ' tcx > ) -> Ty < ' tcx >
634
634
where
635
- D : HasLocalDecls < ' tcx > ,
635
+ D : ? Sized + HasLocalDecls < ' tcx > ,
636
636
{
637
637
match self {
638
638
& Operand :: Copy ( ref l) | & Operand :: Move ( ref l) => l. ty ( local_decls, tcx) . ty ,
639
639
Operand :: Constant ( c) => c. const_ . ty ( ) ,
640
640
}
641
641
}
642
642
643
- pub fn span < D : ? Sized > ( & self , local_decls : & D ) -> Span
643
+ pub fn span < D > ( & self , local_decls : & D ) -> Span
644
644
where
645
- D : HasLocalDecls < ' tcx > ,
645
+ D : ? Sized + HasLocalDecls < ' tcx > ,
646
646
{
647
647
match self {
648
648
& Operand :: Copy ( ref l) | & Operand :: Move ( ref l) => {
@@ -674,7 +674,7 @@ impl<'tcx> ConstOperand<'tcx> {
674
674
}
675
675
676
676
///////////////////////////////////////////////////////////////////////////
677
- /// Rvalues
677
+ // Rvalues
678
678
679
679
pub enum RvalueInitializationState {
680
680
Shallow ,
@@ -721,9 +721,9 @@ impl<'tcx> Rvalue<'tcx> {
721
721
}
722
722
}
723
723
724
- pub fn ty < D : ? Sized > ( & self , local_decls : & D , tcx : TyCtxt < ' tcx > ) -> Ty < ' tcx >
724
+ pub fn ty < D > ( & self , local_decls : & D , tcx : TyCtxt < ' tcx > ) -> Ty < ' tcx >
725
725
where
726
- D : HasLocalDecls < ' tcx > ,
726
+ D : ? Sized + HasLocalDecls < ' tcx > ,
727
727
{
728
728
match * self {
729
729
Rvalue :: Use ( ref operand) => operand. ty ( local_decls, tcx) ,
0 commit comments