@@ -25,7 +25,7 @@ use ty::subst::{Subst, Substs};
25
25
use ty:: { self , AdtDef , ClosureSubsts , Region , Ty , TyCtxt , GeneratorInterior } ;
26
26
use ty:: fold:: { TypeFoldable , TypeFolder , TypeVisitor } ;
27
27
use util:: ppaux;
28
- use rustc_back :: slice;
28
+ use std :: slice;
29
29
use hir:: { self , InlineAsm } ;
30
30
use std:: ascii;
31
31
use std:: borrow:: { Cow } ;
@@ -754,28 +754,28 @@ impl<'tcx> TerminatorKind<'tcx> {
754
754
pub fn successors ( & self ) -> Cow < [ BasicBlock ] > {
755
755
use self :: TerminatorKind :: * ;
756
756
match * self {
757
- Goto { target : ref b } => slice:: ref_slice ( b) . into_cow ( ) ,
757
+ Goto { target : ref b } => slice:: from_ref ( b) . into_cow ( ) ,
758
758
SwitchInt { targets : ref b, .. } => b[ ..] . into_cow ( ) ,
759
759
Resume | GeneratorDrop => ( & [ ] ) . into_cow ( ) ,
760
760
Return => ( & [ ] ) . into_cow ( ) ,
761
761
Unreachable => ( & [ ] ) . into_cow ( ) ,
762
762
Call { destination : Some ( ( _, t) ) , cleanup : Some ( c) , .. } => vec ! [ t, c] . into_cow ( ) ,
763
763
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 ( ) ,
766
766
Call { destination : None , cleanup : None , .. } => ( & [ ] ) . into_cow ( ) ,
767
767
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 ( ) ,
769
769
DropAndReplace { target, unwind : Some ( unwind) , .. } |
770
770
Drop { target, unwind : Some ( unwind) , .. } => {
771
771
vec ! [ target, unwind] . into_cow ( )
772
772
}
773
773
DropAndReplace { ref target, unwind : None , .. } |
774
774
Drop { ref target, unwind : None , .. } => {
775
- slice:: ref_slice ( target) . into_cow ( )
775
+ slice:: from_ref ( target) . into_cow ( )
776
776
}
777
777
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 ( ) ,
779
779
FalseEdges { ref real_target, ref imaginary_targets } => {
780
780
let mut s = vec ! [ * real_target] ;
781
781
s. extend_from_slice ( imaginary_targets) ;
0 commit comments