diff --git a/patches/0002-Disable-u128-and-i128-in-libcore.patch b/patches/0002-Disable-u128-and-i128-in-libcore.patch index 94744b41daef..b3f98c68dae2 100644 --- a/patches/0002-Disable-u128-and-i128-in-libcore.patch +++ b/patches/0002-Disable-u128-and-i128-in-libcore.patch @@ -320,7 +320,7 @@ index 5b7d5f4..0cfb96c 100644 #[cfg(target_pointer_width = "16")] #[lang = "usize"] impl usize { -@@ -4501,7 +4476,7 @@ macro_rules! from_str_radix_int_impl { +@@ -4376,7 +4376,7 @@ macro_rules! from_str_radix_int_impl { } )*} } @@ -328,7 +328,7 @@ index 5b7d5f4..0cfb96c 100644 +from_str_radix_int_impl! { isize i8 i16 i32 i64 usize u8 u16 u32 u64 } /// The error type returned when a checked integral type conversion fails. - #[unstable(feature = "try_from", issue = "33417")] + #[stable(feature = "try_from", since = "1.34.0")] @@ -4617,30 +4592,25 @@ macro_rules! rev { try_from_upper_bounded!(u16, u8); try_from_upper_bounded!(u32, u16, u8); diff --git a/src/constant.rs b/src/constant.rs index 0216eb80a53f..74a16b3bf2ad 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -224,7 +224,7 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>( let const_ = tcx.const_eval(ParamEnv::reveal_all().and(cid)).unwrap(); let alloc = match const_.val { - ConstValue::ByRef(_alloc_id, alloc, n) if n.bytes() == 0 => alloc, + ConstValue::ByRef(ptr, alloc) if ptr.offset.bytes() == 0 => alloc, _ => bug!("static const eval returned {:#?}", const_), };