File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -199,13 +199,6 @@ fn from_mut<T>(+v: [mut T]) -> [T] unsafe {
199
199
r
200
200
}
201
201
202
- // This function only exists to work around bugs in the type checker.
203
- fn from_const < T > ( +v : [ const T ] ) -> [ T ] unsafe {
204
- let r = :: unsafe:: reinterpret_cast ( v) ;
205
- :: unsafe:: forget ( v) ;
206
- r
207
- }
208
-
209
202
// Accessors
210
203
211
204
#[ doc = "Returns the first element of a vector" ]
@@ -534,7 +527,7 @@ Flattens a vector of vectors of T into a single vector of T.
534
527
" ]
535
528
fn concat < T : copy > ( v: [ const [ const T ] ] ) -> [ T ] {
536
529
let mut r = [ ] ;
537
- for each( v) { |inner| r += from_const ( inner) ; }
530
+ for each( v) { |inner| r += inner; }
538
531
ret r;
539
532
}
540
533
@@ -546,7 +539,7 @@ fn connect<T: copy>(v: [const [const T]], sep: T) -> [T] {
546
539
let mut first = true ;
547
540
for each( v) { |inner|
548
541
if first { first = false ; } else { push ( r, sep) ; }
549
- r += from_const ( inner) ;
542
+ r += inner;
550
543
}
551
544
ret r;
552
545
}
You can’t perform that action at this time.
0 commit comments