@@ -25,7 +25,7 @@ use ty::subst::{Subst, Substs};
2525use ty:: { self , AdtDef , ClosureSubsts , Region , Ty , TyCtxt , GeneratorInterior } ;
2626use ty:: fold:: { TypeFoldable , TypeFolder , TypeVisitor } ;
2727use util:: ppaux;
28- use rustc_back :: slice;
28+ use std :: slice;
2929use hir:: { self , InlineAsm } ;
3030use std:: ascii;
3131use std:: borrow:: { Cow } ;
@@ -754,28 +754,28 @@ impl<'tcx> TerminatorKind<'tcx> {
754754 pub fn successors ( & self ) -> Cow < [ BasicBlock ] > {
755755 use self :: TerminatorKind :: * ;
756756 match * self {
757- Goto { target : ref b } => slice:: ref_slice ( b) . into_cow ( ) ,
757+ Goto { target : ref b } => slice:: from_ref ( b) . into_cow ( ) ,
758758 SwitchInt { targets : ref b, .. } => b[ ..] . into_cow ( ) ,
759759 Resume | GeneratorDrop => ( & [ ] ) . into_cow ( ) ,
760760 Return => ( & [ ] ) . into_cow ( ) ,
761761 Unreachable => ( & [ ] ) . into_cow ( ) ,
762762 Call { destination : Some ( ( _, t) ) , cleanup : Some ( c) , .. } => vec ! [ t, c] . into_cow ( ) ,
763763 Call { destination : Some ( ( _, ref t) ) , cleanup : None , .. } =>
764- slice:: ref_slice ( t) . into_cow ( ) ,
765- Call { destination : None , cleanup : Some ( ref c) , .. } => slice:: ref_slice ( c) . into_cow ( ) ,
764+ slice:: from_ref ( t) . into_cow ( ) ,
765+ Call { destination : None , cleanup : Some ( ref c) , .. } => slice:: from_ref ( c) . into_cow ( ) ,
766766 Call { destination : None , cleanup : None , .. } => ( & [ ] ) . into_cow ( ) ,
767767 Yield { resume : t, drop : Some ( c) , .. } => vec ! [ t, c] . into_cow ( ) ,
768- Yield { resume : ref t, drop : None , .. } => slice:: ref_slice ( t) . into_cow ( ) ,
768+ Yield { resume : ref t, drop : None , .. } => slice:: from_ref ( t) . into_cow ( ) ,
769769 DropAndReplace { target, unwind : Some ( unwind) , .. } |
770770 Drop { target, unwind : Some ( unwind) , .. } => {
771771 vec ! [ target, unwind] . into_cow ( )
772772 }
773773 DropAndReplace { ref target, unwind : None , .. } |
774774 Drop { ref target, unwind : None , .. } => {
775- slice:: ref_slice ( target) . into_cow ( )
775+ slice:: from_ref ( target) . into_cow ( )
776776 }
777777 Assert { target, cleanup : Some ( unwind) , .. } => vec ! [ target, unwind] . into_cow ( ) ,
778- Assert { ref target, .. } => slice:: ref_slice ( target) . into_cow ( ) ,
778+ Assert { ref target, .. } => slice:: from_ref ( target) . into_cow ( ) ,
779779 FalseEdges { ref real_target, ref imaginary_targets } => {
780780 let mut s = vec ! [ * real_target] ;
781781 s. extend_from_slice ( imaginary_targets) ;
0 commit comments