diff --git a/example/mini_core.rs b/example/mini_core.rs index 2dd75563a..b522ea193 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -6,6 +6,7 @@ extern_types, decl_macro, rustc_attrs, + rustc_private, transparent_unions, auto_traits, freeze_impls, diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index c971a7df3..10549cd2a 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -1,4 +1,13 @@ -#![feature(no_core, lang_items, never_type, linkage, extern_types, thread_local, repr_simd)] +#![feature( + no_core, + lang_items, + never_type, + linkage, + extern_types, + thread_local, + repr_simd, + rustc_private +)] #![no_core] #![allow(dead_code, non_camel_case_types, internal_features)] diff --git a/josh-sync.toml b/josh-sync.toml new file mode 100644 index 000000000..edd1eaadb --- /dev/null +++ b/josh-sync.toml @@ -0,0 +1,2 @@ +repo = "rustc_codegen_cranelift" +filter = ":rev(6f3f6bdacb75571a87f08e0920d9c191b3d65ded:prefix=compiler/rustc_codegen_cranelift):/compiler/rustc_codegen_cranelift" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b157c5879..c5c5d06c3 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2025-12-23" +channel = "nightly-2025-12-25" components = ["rust-src", "rustc-dev", "llvm-tools", "rustfmt"] profile = "minimal" diff --git a/rust-version b/rust-version new file mode 100644 index 000000000..5ffe95a0b --- /dev/null +++ b/rust-version @@ -0,0 +1 @@ +e7d44143a12a526488e4f0c0d7ea8e62a4fe9354 diff --git a/src/intrinsics/simd.rs b/src/intrinsics/simd.rs index 1504869b8..bef9c6747 100644 --- a/src/intrinsics/simd.rs +++ b/src/intrinsics/simd.rs @@ -130,7 +130,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( return; } - let idx = generic_args[2].expect_const().to_value().valtree.unwrap_branch(); + let idx = generic_args[2].expect_const().to_branch(); assert_eq!(x.layout(), y.layout()); let layout = x.layout(); @@ -143,7 +143,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( let total_len = lane_count * 2; - let indexes = idx.iter().map(|idx| idx.unwrap_leaf().to_u32()).collect::>(); + let indexes = idx.iter().map(|idx| idx.to_leaf().to_u32()).collect::>(); for &idx in &indexes { assert!(u64::from(idx) < total_len, "idx {} out of range 0..{}", idx, total_len); @@ -961,9 +961,8 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( let lane_clif_ty = fx.clif_type(val_lane_ty).unwrap(); let ptr_val = ptr.load_scalar(fx); - let alignment = generic_args[3].expect_const().to_value().valtree.unwrap_branch()[0] - .unwrap_leaf() - .to_simd_alignment(); + let alignment = + generic_args[3].expect_const().to_branch()[0].to_leaf().to_simd_alignment(); let memflags = match alignment { SimdAlign::Unaligned => MemFlags::new().with_notrap(), @@ -1050,9 +1049,8 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( let ret_lane_layout = fx.layout_of(ret_lane_ty); let ptr_val = ptr.load_scalar(fx); - let alignment = generic_args[3].expect_const().to_value().valtree.unwrap_branch()[0] - .unwrap_leaf() - .to_simd_alignment(); + let alignment = + generic_args[3].expect_const().to_branch()[0].to_leaf().to_simd_alignment(); let memflags = match alignment { SimdAlign::Unaligned => MemFlags::new().with_notrap(),