diff --git a/patches/0003-Disable-inline-assembly-in-libcore.patch b/patches/0003-Disable-inline-assembly-in-libcore.patch index dce18ec1ad9..5174e4d08e9 100644 --- a/patches/0003-Disable-inline-assembly-in-libcore.patch +++ b/patches/0003-Disable-inline-assembly-in-libcore.patch @@ -16,9 +16,9 @@ index ad5a207..04712b8 100644 #[unstable(feature = "renamed_spin_loop", issue = "55002")] pub fn spin_loop() { + /* - #[cfg( - all( - any(target_arch = "x86", target_arch = "x86_64"), + #[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "sse2"))] + { + #[cfg(target_arch = "x86")] @@ -71,4 +72,5 @@ pub fn spin_loop() { unsafe { crate::arch::arm::__yield() }; } diff --git a/patches/0022-core-Disable-not-compiling-tests.patch b/patches/0022-core-Disable-not-compiling-tests.patch index 77cdd0c56e9..e001ba766fc 100644 --- a/patches/0022-core-Disable-not-compiling-tests.patch +++ b/patches/0022-core-Disable-not-compiling-tests.patch @@ -44,41 +44,41 @@ index 0475aeb..9558198 100644 --- a/src/libcore/tests/num/int_macros.rs +++ b/src/libcore/tests/num/int_macros.rs @@ -88,6 +88,7 @@ mod tests { - assert_eq!(C.count_zeros(), bits as u32 - 5); - } + assert_eq!(C.count_zeros(), bits as u32 - 5); + } -+ /* - #[test] - fn test_rotate() { - assert_eq!(A.rotate_left(6).rotate_right(2).rotate_right(4), A); ++ /* + #[test] + fn test_rotate() { + assert_eq!(A.rotate_left(6).rotate_right(2).rotate_right(4), A); @@ -112,6 +113,7 @@ mod tests { - assert_eq!(B.rotate_left(64), B); - assert_eq!(C.rotate_left(64), C); - } -+ */ + assert_eq!(B.rotate_left(64), B); + assert_eq!(C.rotate_left(64), C); + } ++ */ - #[test] - fn test_swap_bytes() { + #[test] + fn test_swap_bytes() { diff --git a/src/libcore/tests/num/uint_macros.rs b/src/libcore/tests/num/uint_macros.rs index 04ed14f..a6e372e 100644 --- a/src/libcore/tests/num/uint_macros.rs +++ b/src/libcore/tests/num/uint_macros.rs @@ -52,6 +52,7 @@ mod tests { - assert!(C.count_zeros() == bits as u32 - 5); - } + assert!(C.count_zeros() == bits as u32 - 5); + } -+ /* - #[test] - fn test_rotate() { - assert_eq!(A.rotate_left(6).rotate_right(2).rotate_right(4), A); ++ /* + #[test] + fn test_rotate() { + assert_eq!(A.rotate_left(6).rotate_right(2).rotate_right(4), A); @@ -76,6 +77,7 @@ mod tests { - assert_eq!(B.rotate_left(64), B); - assert_eq!(C.rotate_left(64), C); - } -+ */ + assert_eq!(B.rotate_left(64), B); + assert_eq!(C.rotate_left(64), C); + } ++ */ - #[test] - fn test_swap_bytes() { + #[test] + fn test_swap_bytes() { diff --git a/src/libcore/tests/ptr.rs b/src/libcore/tests/ptr.rs index 1a6be3a..42dbd59 100644 --- a/src/libcore/tests/ptr.rs @@ -98,7 +98,7 @@ index 1a6be3a..42dbd59 100644 +*/ #[test] - #[cfg(not(miri))] // Miri does not compute a maximal `mid` for `align_offset` + #[cfg_attr(miri, ignore)] // Miri does not compute a maximal `mid` for `align_offset` diff --git a/src/libcore/tests/slice.rs b/src/libcore/tests/slice.rs index 6609bc3..241b497 100644 --- a/src/libcore/tests/slice.rs diff --git a/src/base.rs b/src/base.rs index 28f55a6cc6d..705629888aa 100644 --- a/src/base.rs +++ b/src/base.rs @@ -647,7 +647,7 @@ pub fn trans_place<'tcx>( }; cplace = cplace.place_index(fx, index); } - PlaceElem::Subslice { from, to } => { + PlaceElem::Subslice { from, to, from_end } => { // These indices are generated by slice patterns. // slice[from:-to] in Python terms. @@ -665,6 +665,7 @@ pub fn trans_place<'tcx>( ); } ty::Slice(elem_ty) => { + assert!(from_end, "slice subslices should be `from_end`"); let elem_layout = fx.layout_of(elem_ty); let (ptr, len) = cplace.to_addr_maybe_unsized(fx); let len = len.unwrap(); diff --git a/src/lib.rs b/src/lib.rs index 3d30185f945..cc8216f0efa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(rustc_private, decl_macro, type_alias_impl_trait, associated_type_bounds)] +#![feature(rustc_private, decl_macro, type_alias_impl_trait, associated_type_bounds, never_type)] #![allow(intra_doc_link_resolution_failure)] extern crate flate2;