Update to nightly-2022-12-10

This commit is contained in:
Sylvester Hesp 2023-01-04 17:11:12 +01:00 committed by Eduard-Mihai Burtescu
parent 2cb10b2771
commit 54587b1816
4 changed files with 11 additions and 10 deletions

View File

@ -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<String, Box<dyn Error>> {
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc"));

View File

@ -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);

View File

@ -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<u32, ParseAttrError> {
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())),
}
}

View File

@ -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.