diff --git a/crates/rustc_codegen_spirv/build.rs b/crates/rustc_codegen_spirv/build.rs index 923113855b..c7b84faba3 100644 --- a/crates/rustc_codegen_spirv/build.rs +++ b/crates/rustc_codegen_spirv/build.rs @@ -10,9 +10,9 @@ use std::process::{Command, ExitCode}; /// `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"); const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain] -channel = "nightly-2022-11-28" +channel = "nightly-2022-12-10" components = ["rust-src", "rustc-dev", "llvm-tools-preview"] -# commit_hash = 1eb62b1235fd77200e6bd967d70e83c0f2497233"#; +# commit_hash = dfe3fe710181738a2cb3060c23ec5efb3c68ca09"#; fn get_rustc_commit_hash() -> Result> { let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc")); diff --git a/crates/rustc_codegen_spirv/src/link.rs b/crates/rustc_codegen_spirv/src/link.rs index 998379052f..a9afe011e7 100644 --- a/crates/rustc_codegen_spirv/src/link.rs +++ b/crates/rustc_codegen_spirv/src/link.rs @@ -18,6 +18,7 @@ use rustc_session::config::{CrateType, DebugInfo, Lto, OptLevel, OutputFilenames use rustc_session::output::{check_file_is_writeable, invalid_output_for_target, out_filename}; use rustc_session::utils::NativeLibKind; use rustc_session::Session; +use rustc_span::Symbol; use std::collections::BTreeMap; use std::ffi::{CString, OsStr}; use std::fs::File; @@ -58,7 +59,7 @@ pub fn link<'a>( } if outputs.outputs.should_codegen() { - let out_filename = out_filename(sess, crate_type, outputs, crate_name); + let out_filename = out_filename(sess, crate_type, outputs, Symbol::intern(crate_name)); match crate_type { CrateType::Rlib => { link_rlib(sess, codegen_results, &out_filename); diff --git a/crates/rustc_codegen_spirv/src/symbols.rs b/crates/rustc_codegen_spirv/src/symbols.rs index cb1ff7388e..9d5ea4a460 100644 --- a/crates/rustc_codegen_spirv/src/symbols.rs +++ b/crates/rustc_codegen_spirv/src/symbols.rs @@ -1,7 +1,7 @@ use crate::attr::{Entry, ExecutionModeExtra, IntrinsicType, SpirvAttribute}; use crate::builder::libm_intrinsics; use rspirv::spirv::{BuiltIn, ExecutionMode, ExecutionModel, StorageClass}; -use rustc_ast::ast::{AttrKind, Attribute, Lit, LitIntType, LitKind, NestedMetaItem}; +use rustc_ast::ast::{AttrKind, Attribute, LitIntType, LitKind, MetaItemLit, NestedMetaItem}; use rustc_data_structures::fx::FxHashMap; use rustc_span::symbol::{Ident, Symbol}; use rustc_span::Span; @@ -500,7 +500,7 @@ fn parse_attr_int_value(arg: &NestedMetaItem) -> Result { None => return Err((arg.span(), "attribute must have value".to_string())), }; match arg.name_value_literal() { - Some(&Lit { + Some(&MetaItemLit { kind: LitKind::Int(x, LitIntType::Unsuffixed), .. }) if x <= u32::MAX as u128 => Ok(x as u32), @@ -517,11 +517,11 @@ fn parse_local_size_attr(arg: &NestedMetaItem) -> Result<[u32; 3], ParseAttrErro Some(tuple) if !tuple.is_empty() && tuple.len() < 4 => { let mut local_size = [1; 3]; for (idx, lit) in tuple.iter().enumerate() { - match lit.literal() { - Some(&Lit { + match lit { + NestedMetaItem::Lit(MetaItemLit { kind: LitKind::Int(x, LitIntType::Unsuffixed), .. - }) if x <= u32::MAX as u128 => local_size[idx] = x as u32, + }) if *x <= u32::MAX as u128 => local_size[idx] = *x as u32, _ => return Err((lit.span(), "must be a u32 literal".to_string())), } } diff --git a/rust-toolchain b/rust-toolchain index a96c599c9b..e950da783e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -5,9 +5,9 @@ # to the user in the error, instead of "error: invalid channel name '[toolchain]'". [toolchain] -channel = "nightly-2022-11-28" +channel = "nightly-2022-12-10" components = ["rust-src", "rustc-dev", "llvm-tools-preview"] -# commit_hash = 1eb62b1235fd77200e6bd967d70e83c0f2497233 +# commit_hash = dfe3fe710181738a2cb3060c23ec5efb3c68ca09 # Whenever changing the nightly channel, update the commit hash above, and make # sure to change REQUIRED_TOOLCHAIN in crates/rustc_codegen_spirv/src/build.rs also.