Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/rustc_codegen_spirv/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ use std::{env, fs, mem};
/// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/
//const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain.toml");
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
channel = "nightly-2026-03-14"
channel = "nightly-2026-04-01"
components = ["rust-src", "rustc-dev", "llvm-tools"]
# commit_hash = 1d8897a4e88051480b36c501e66809425c6e08ad"#;
# commit_hash = 48cc71ee88cd0f11217eced958b9930970da998b"#;

fn rustc_output(arg: &str) -> Result<String, Box<dyn Error>> {
let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".into());
Expand Down
8 changes: 3 additions & 5 deletions crates/rustc_codegen_spirv/src/builder/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,13 @@ impl<'a, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'tcx> {
args[2].immediate(),
],
),
sym::fabsf32 | sym::fabsf64 | sym::fabsf128 => {
self.gl_op(GLOp::FAbs, ret_ty, [args[0].immediate()])
}
sym::minnumf32 | sym::minnumf64 | sym::minnumf128 => self.gl_op(
sym::fabs => self.gl_op(GLOp::FAbs, ret_ty, [args[0].immediate()]),
sym::minimumf32 | sym::minimumf64 | sym::minimumf128 => self.gl_op(
GLOp::FMin,
ret_ty,
[args[0].immediate(), args[1].immediate()],
),
sym::maxnumf32 | sym::maxnumf64 | sym::maxnumf128 => self.gl_op(
sym::maximumf32 | sym::maximumf64 | sym::maximumf128 => self.gl_op(
GLOp::FMax,
ret_ty,
[args[0].immediate(), args[1].immediate()],
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[toolchain]
channel = "nightly-2026-03-14"
channel = "nightly-2026-04-01"
components = ["rust-src", "rustc-dev", "llvm-tools"]
# commit_hash = 1d8897a4e88051480b36c501e66809425c6e08ad
# commit_hash = 48cc71ee88cd0f11217eced958b9930970da998b

# Whenever changing the nightly channel, update the commit hash above, and
# change `REQUIRED_RUST_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` too.
17 changes: 6 additions & 11 deletions tests/compiletests/ui/arch/debug_printf_type_checking.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,14 @@ error[E0277]: the trait bound `{float}: spirv_std::Vector<f32, 2>` is not satisf
LL | debug_printf!("%v2f", 11.0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `spirv_std::Vector<f32, 2>` is not implemented for `{float}`
|
= help: the following other types implement trait `spirv_std::Vector<T, N>`:
`BVec2` implements `spirv_std::Vector<bool, 2>`
`BVec3` implements `spirv_std::Vector<bool, 3>`
`BVec4` implements `spirv_std::Vector<bool, 4>`
`DVec2` implements `spirv_std::Vector<f64, 2>`
`DVec3` implements `spirv_std::Vector<f64, 3>`
`DVec4` implements `spirv_std::Vector<f64, 4>`
`IVec2` implements `spirv_std::Vector<i32, 2>`
`IVec3` implements `spirv_std::Vector<i32, 3>`
and 8 others
help: the trait `spirv_std::Vector<f32, 2>` is implemented for `Vec2`
--> $SPIRV_STD_SRC/vector.rs:70:12
::: $SPIRV_STD_SRC/vector.rs:92:1
|
= note: in this macro invocation
note: required by a bound in `spirv_std::debug_printf::assert_is_vector`
--> $SPIRV_STD_SRC/debug_printf.rs:11:0
= note: this error originates in the macro `debug_printf` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `debug_printf` which comes from the expansion of the macro `impl_vector` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
--> $DIR/debug_printf_type_checking.rs:25:29
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ error[E0277]: the trait bound `i32: From<NoFrom>` is not satisfied
LL | #[derive(Copy, Clone, Default, ScalarComposite)]
| ^^^^^^^^^^^^^^^ the trait `From<NoFrom>` is not implemented for `i32`
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<NoDefault>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= help: `i32` implements trait `From<T>`:
From<NoDefault>
From<bool>
From<i16>
From<i8>
From<u16>
From<u8>
= note: required for `NoFrom` to implement `Into<i32>`
= note: this error originates in the derive macro `ScalarComposite` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down Expand Up @@ -86,24 +86,24 @@ error[E0277]: the trait bound `i32: From<WrongFrom>` is not satisfied
LL | #[derive(Copy, Clone, Default, ScalarComposite)]
| ^^^^^^^^^^^^^^^ the trait `From<WrongFrom>` is not implemented for `i32`
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<NoDefault>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= help: `i32` implements trait `From<T>`:
From<NoDefault>
From<bool>
From<i16>
From<i8>
From<u16>
From<u8>
= note: required for `WrongFrom` to implement `Into<i32>`
= note: this error originates in the derive macro `ScalarComposite` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no variant or associated item named `default` found for enum `NoDefault` in the current scope
error[E0599]: no variant, associated function, or constant named `default` found for enum `NoDefault` in the current scope
--> $DIR/subgroup_composite_enum_err.rs:
|
LL | _ => Self::default(),
| ^^^^^^^ variant or associated item not found in `NoDefault`
| ^^^^^^^ variant, associated function, or constant not found in `NoDefault`
...
LL | pub enum NoDefault {
| ------------------ variant or associated item `default` not found for this enum
| ------------------ variant, associated function, or constant `default` not found for this enum
...
LL | enum_repr_from!(NoDefault, i32);
| ------------------------------- in this macro invocation
Expand Down
8 changes: 4 additions & 4 deletions tests/compiletests/ui/dis/ptr_copy.normal.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: cannot memcpy dynamically sized data
--> <$CORE_SRC/ptr/mod.rs>:642:9
--> <$CORE_SRC/ptr/mod.rs>:643:9
|
LL | crate::intrinsics::copy(src, dst, count)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: used from within `core::ptr::copy::<f32>`
--> <$CORE_SRC/ptr/mod.rs>:627:21
--> <$CORE_SRC/ptr/mod.rs>:628:21
|
LL | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
| ^^^^
Expand All @@ -28,7 +28,7 @@ LL | pub fn main(i: f32, o: &mut f32) {
error: cannot cast between pointer types
from `*f32`
to `*struct () { }`
--> <$CORE_SRC/ptr/mod.rs>:630:9
--> <$CORE_SRC/ptr/mod.rs>:631:9
|
LL | / ub_checks::assert_unsafe_precondition!(
LL | | check_language_ub,
Expand All @@ -39,7 +39,7 @@ LL | | );
| |_________^
|
note: used from within `core::ptr::copy::<f32>`
--> <$CORE_SRC/ptr/mod.rs>:630:9
--> <$CORE_SRC/ptr/mod.rs>:631:9
|
LL | / ub_checks::assert_unsafe_precondition!(
LL | | check_language_ub,
Expand Down
2 changes: 1 addition & 1 deletion tests/compiletests/ui/dis/ptr_read.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 1720 8
OpLine %8 1721 8
%9 = OpLoad %10 %4
OpLine %11 7 13
OpStore %6 %9
Expand Down
2 changes: 1 addition & 1 deletion tests/compiletests/ui/dis/ptr_read_method.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 1720 8
OpLine %8 1721 8
%9 = OpLoad %10 %4
OpLine %11 7 13
OpStore %6 %9
Expand Down
2 changes: 1 addition & 1 deletion tests/compiletests/ui/dis/ptr_write.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%7 = OpLabel
OpLine %8 7 35
%9 = OpLoad %10 %4
OpLine %11 1920 40
OpLine %11 1921 40
OpStore %6 %9
OpNoLine
OpReturn
Expand Down
2 changes: 1 addition & 1 deletion tests/compiletests/ui/dis/ptr_write_method.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%7 = OpLabel
OpLine %8 7 37
%9 = OpLoad %10 %4
OpLine %11 1920 40
OpLine %11 1921 40
OpStore %6 %9
OpNoLine
OpReturn
Expand Down
14 changes: 7 additions & 7 deletions tests/compiletests/ui/lang/consts/u32-from-u64-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ error[E0277]: the trait bound `u32: From<u64>` is not satisfied
LL | let value = u32::from(K);
| ^^^ the trait `From<u64>` is not implemented for `u32`
|
= help: the following other types implement trait `From<T>`:
`u32` implements `From<Ipv4Addr>`
`u32` implements `From<bool>`
`u32` implements `From<char>`
`u32` implements `From<core::ascii::Char>`
`u32` implements `From<u16>`
`u32` implements `From<u8>`
= help: `u32` implements trait `From<T>`:
From<Ipv4Addr>
From<bool>
From<char>
From<core::ascii::Char>
From<u16>
From<u8>

error: aborting due to 1 previous error

Expand Down
Loading