Skip to content

Commit 54587b1

Browse files
oisyneddyb
authored andcommitted
Update to nightly-2022-12-10
1 parent 2cb10b2 commit 54587b1

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

crates/rustc_codegen_spirv/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use std::process::{Command, ExitCode};
1010
/// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/
1111
//const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain");
1212
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
13-
channel = "nightly-2022-11-28"
13+
channel = "nightly-2022-12-10"
1414
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
15-
# commit_hash = 1eb62b1235fd77200e6bd967d70e83c0f2497233"#;
15+
# commit_hash = dfe3fe710181738a2cb3060c23ec5efb3c68ca09"#;
1616

1717
fn get_rustc_commit_hash() -> Result<String, Box<dyn Error>> {
1818
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc"));

crates/rustc_codegen_spirv/src/link.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use rustc_session::config::{CrateType, DebugInfo, Lto, OptLevel, OutputFilenames
1818
use rustc_session::output::{check_file_is_writeable, invalid_output_for_target, out_filename};
1919
use rustc_session::utils::NativeLibKind;
2020
use rustc_session::Session;
21+
use rustc_span::Symbol;
2122
use std::collections::BTreeMap;
2223
use std::ffi::{CString, OsStr};
2324
use std::fs::File;
@@ -58,7 +59,7 @@ pub fn link<'a>(
5859
}
5960

6061
if outputs.outputs.should_codegen() {
61-
let out_filename = out_filename(sess, crate_type, outputs, crate_name);
62+
let out_filename = out_filename(sess, crate_type, outputs, Symbol::intern(crate_name));
6263
match crate_type {
6364
CrateType::Rlib => {
6465
link_rlib(sess, codegen_results, &out_filename);

crates/rustc_codegen_spirv/src/symbols.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::attr::{Entry, ExecutionModeExtra, IntrinsicType, SpirvAttribute};
22
use crate::builder::libm_intrinsics;
33
use rspirv::spirv::{BuiltIn, ExecutionMode, ExecutionModel, StorageClass};
4-
use rustc_ast::ast::{AttrKind, Attribute, Lit, LitIntType, LitKind, NestedMetaItem};
4+
use rustc_ast::ast::{AttrKind, Attribute, LitIntType, LitKind, MetaItemLit, NestedMetaItem};
55
use rustc_data_structures::fx::FxHashMap;
66
use rustc_span::symbol::{Ident, Symbol};
77
use rustc_span::Span;
@@ -500,7 +500,7 @@ fn parse_attr_int_value(arg: &NestedMetaItem) -> Result<u32, ParseAttrError> {
500500
None => return Err((arg.span(), "attribute must have value".to_string())),
501501
};
502502
match arg.name_value_literal() {
503-
Some(&Lit {
503+
Some(&MetaItemLit {
504504
kind: LitKind::Int(x, LitIntType::Unsuffixed),
505505
..
506506
}) 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
517517
Some(tuple) if !tuple.is_empty() && tuple.len() < 4 => {
518518
let mut local_size = [1; 3];
519519
for (idx, lit) in tuple.iter().enumerate() {
520-
match lit.literal() {
521-
Some(&Lit {
520+
match lit {
521+
NestedMetaItem::Lit(MetaItemLit {
522522
kind: LitKind::Int(x, LitIntType::Unsuffixed),
523523
..
524-
}) if x <= u32::MAX as u128 => local_size[idx] = x as u32,
524+
}) if *x <= u32::MAX as u128 => local_size[idx] = *x as u32,
525525
_ => return Err((lit.span(), "must be a u32 literal".to_string())),
526526
}
527527
}

rust-toolchain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
66

77
[toolchain]
8-
channel = "nightly-2022-11-28"
8+
channel = "nightly-2022-12-10"
99
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
10-
# commit_hash = 1eb62b1235fd77200e6bd967d70e83c0f2497233
10+
# commit_hash = dfe3fe710181738a2cb3060c23ec5efb3c68ca09
1111

1212
# Whenever changing the nightly channel, update the commit hash above, and make
1313
# sure to change REQUIRED_TOOLCHAIN in crates/rustc_codegen_spirv/src/build.rs also.

0 commit comments

Comments
 (0)