Skip to content

Commit

Permalink
syntax: Don't use unstable fn to convert single element to a slice
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Apr 21, 2015
1 parent e3dd68d commit bc6d990
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libsyntax/util/small_vector.rs
Expand Up @@ -64,7 +64,10 @@ impl<T> SmallVector<T> {
let result: &[T] = &[];
result
}
One(ref v) => slice::ref_slice(v),
One(ref v) => {
// FIXME: Could be replaced with `slice::ref_slice(v)` when it is stable.
unsafe { slice::from_raw_parts(v, 1) }
}
Many(ref vs) => vs
}
}
Expand Down

0 comments on commit bc6d990

Please sign in to comment.