Skip to content

Commit 716e6de

Browse files
committed
Merge branch 'main' into update-toolchain-Nov-02-2025
2 parents 27398fd + 2232fcb commit 716e6de

File tree

92 files changed

+3870
-3626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3870
-3626
lines changed

crates/rustc_codegen_spirv/build.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::collections::VecDeque;
88
use std::error::Error;
99
use std::path::{Path, PathBuf};
1010
use std::process::{Command, ExitCode};
11+
use std::string::ToString;
1112
use std::{env, fs, mem};
1213

1314
/// Current `rust-toolchain.toml` file
@@ -33,15 +34,15 @@ fn get_rustc_commit_hash() -> Result<String, Box<dyn Error>> {
3334
rustc_output("-vV")?
3435
.lines()
3536
.find_map(|l| l.strip_prefix("commit-hash: "))
36-
.map(|s| s.to_string())
37+
.map(ToString::to_string)
3738
.ok_or_else(|| "`commit-hash` not found in `rustc -vV` output".into())
3839
}
3940

4041
fn get_required_commit_hash() -> Result<String, Box<dyn Error>> {
4142
REQUIRED_RUST_TOOLCHAIN
4243
.lines()
4344
.find_map(|l| l.strip_prefix("# commit_hash = "))
44-
.map(|s| s.to_string())
45+
.map(ToString::to_string)
4546
.ok_or_else(|| "`commit_hash` not found in `rust-toolchain.toml`".into())
4647
}
4748

@@ -72,16 +73,16 @@ fn check_toolchain_version() -> Result<(), Box<dyn Error>> {
7273
let stripped_toolchain = REQUIRED_RUST_TOOLCHAIN
7374
.lines()
7475
.filter(|l| !l.trim().is_empty() && !l.starts_with("# "))
75-
.map(|l| l.to_string())
76+
.map(ToString::to_string)
7677
.reduce(|a, b| a + "\n" + &b)
7778
.unwrap_or_default();
7879

7980
return Err(format!(
80-
r#"error: wrong toolchain detected (found commit hash `{current_hash}`, expected `{required_hash}`).
81+
"error: wrong toolchain detected (found commit hash `{current_hash}`, expected `{required_hash}`).
8182
Make sure your `rust-toolchain.toml` file contains the following:
8283
-------------
8384
{stripped_toolchain}
84-
-------------"#
85+
-------------"
8586
).into());
8687
}
8788
}

crates/rustc_codegen_spirv/src/attr.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ pub enum IntrinsicType {
7575
pub struct SpecConstant {
7676
pub id: u32,
7777
pub default: Option<u32>,
78+
pub array_count: Option<u32>,
7879
}
7980

8081
// NOTE(eddyb) when adding new `#[spirv(...)]` attributes, the tests found inside
@@ -661,6 +662,8 @@ fn parse_spec_constant_attr(
661662
Ok(SpecConstant {
662663
id: id.ok_or_else(|| (arg.span(), "expected `spec_constant(id = ...)`".into()))?,
663664
default,
665+
// to be set later
666+
array_count: None,
664667
})
665668
}
666669

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 5 additions & 774 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)