diff options
Diffstat (limited to 'src/libstd/lib.rs')
| -rw-r--r-- | src/libstd/lib.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 7114d47e6e8..135ea8a5e7c 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -467,3 +467,15 @@ pub mod __rand { // the rustdoc documentation for primitive types. Using `include!` // because rustdoc only looks for these modules at the crate level. include!("primitive_docs.rs"); + +// FIXME(stage0): remove this after a snapshot +// HACK: this is needed because the interpretation of slice +// patterns changed between stage0 and now. +#[cfg(stage0)] +fn slice_pat<'a, 'b, T>(t: &'a &'b [T]) -> &'a &'b [T] { + t +} +#[cfg(not(stage0))] +fn slice_pat<'a, 'b, T>(t: &'a &'b [T]) -> &'b [T] { + *t +} |
