Upgrade to nightly-03-04

This commit is contained in:
Sylvester Hesp 2023-03-17 15:31:24 +01:00
parent 1ca358b9f6
commit 86f0cc994f
11 changed files with 29 additions and 17 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-2023-02-15"
channel = "nightly-2023-03-04"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
# commit_hash = 0416b1a6f6d5c42696494e1a3a33580fd3f669d8"#;
# commit_hash = 44cfafe2fafe816395d3acc434663a45d5178c41"#;
fn get_rustc_commit_hash() -> Result<String, Box<dyn Error>> {
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| String::from("rustc"));

View File

@ -96,7 +96,7 @@ pub(crate) fn provide(providers: &mut Providers) {
// FIXME(eddyb) remove this by deriving `Clone` for `LayoutS` upstream.
// FIXME(eddyb) the `S` suffix is a naming antipattern, rename upstream.
fn clone_layout<V: Idx>(layout: &LayoutS<V>) -> LayoutS<V> {
fn clone_layout(layout: &LayoutS) -> LayoutS {
let LayoutS {
ref fields,
ref variants,
@ -160,7 +160,7 @@ pub(crate) fn provide(providers: &mut Providers) {
};
if hide_niche {
layout = tcx.intern_layout(LayoutS {
layout = tcx.mk_layout(LayoutS {
largest_niche: None,
..clone_layout(layout.0 .0)
});

View File

@ -940,7 +940,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
OverflowOp::Mul => (self.mul(lhs, rhs), fals),
};
self.zombie(
result.0.def(self),
result.1.def(self),
match oop {
OverflowOp::Add => "checked add is not supported yet",
OverflowOp::Sub => "checked sub is not supported yet",

View File

@ -314,7 +314,14 @@ impl<'a, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'tcx> {
let res3 = self.or(res3, res4);
self.or(res1, res3)
}
other => self.fatal(&format!("bswap not implemented for int width {other}")),
other => {
let undef = self.undef(ret_ty);
self.zombie(
undef.def(self),
&format!("bswap not implemented for int width {other}"),
);
undef
}
}
}

View File

@ -10,7 +10,7 @@ use rustc_middle::bug;
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
use rustc_middle::mir::mono::{Linkage, MonoItem, Visibility};
use rustc_middle::ty::layout::{FnAbiOf, LayoutOf};
use rustc_middle::ty::{self, Instance, ParamEnv, TypeVisitable};
use rustc_middle::ty::{self, Instance, ParamEnv, TypeVisitableExt};
use rustc_span::def_id::DefId;
use rustc_span::Span;
use rustc_target::abi::Align;

View File

@ -190,6 +190,10 @@ impl ThinBufferMethods for SpirvThinBuffer {
struct SpirvCodegenBackend;
impl CodegenBackend for SpirvCodegenBackend {
fn locale_resource(&self) -> &'static str {
rustc_errors::DEFAULT_LOCALE_RESOURCE
}
fn target_features(&self, sess: &Session, _allow_unstable: bool) -> Vec<Symbol> {
let cmdline = sess.opts.cg.target_feature.split(',');
let cfg = sess.target.options.features.split(',');

View File

@ -144,6 +144,7 @@ fn link_with_linker_opts(
None,
Registry::new(&[]),
Default::default(),
Default::default(),
None,
None,
);
@ -154,7 +155,7 @@ fn link_with_linker_opts(
let fallback_bundle = {
extern crate rustc_error_messages;
rustc_error_messages::fallback_fluent_bundle(
rustc_errors::DEFAULT_LOCALE_RESOURCES,
Vec::new(),
sess.opts.unstable_opts.translate_directionality_markers,
)
};

View File

@ -432,7 +432,7 @@ pub(crate) fn parse_attrs_for_checking<'a>(
"unknown `rust_gpu` attribute, expected `rust_gpu::spirv`"
.to_string(),
))),
Vec::new(),
Default::default(),
)
} else if let Some(args) = attr.meta_item_list() {
// #[rust_gpu::spirv(...)]
@ -445,15 +445,15 @@ pub(crate) fn parse_attrs_for_checking<'a>(
"#[rust_gpu::spirv(..)] attribute must have at least one argument"
.to_string(),
))),
Vec::new(),
Default::default(),
)
}
} else {
// #[...] but not #[rust_gpu ...]
(None, Vec::new())
(None, Default::default())
}
}
AttrKind::DocComment(..) => (None, Vec::new()), // doccomment
AttrKind::DocComment(..) => (None, Default::default()), // doccomment
};
whole_attr_error

View File

@ -1,7 +1,7 @@
[toolchain]
channel = "nightly-2023-02-15"
channel = "nightly-2023-03-04"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
# commit_hash = 0416b1a6f6d5c42696494e1a3a33580fd3f669d8
# commit_hash = 44cfafe2fafe816395d3acc434663a45d5178c41
# 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.

View File

@ -1,7 +1,7 @@
error: Cannot memcpy dynamically sized data
--> $CORE_SRC/intrinsics.rs:2456:9
--> $CORE_SRC/intrinsics.rs:2460:9
|
2456 | copy(src, dst, count)
2460 | copy(src, dst, count)
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: Stack:

View File

@ -34,7 +34,7 @@ pub fn main(
let newtype_slice = Newtype(slice);
*out = newtype_slice.get()[0];
*out += newtype_slice.slice_get()[1];
*out += newtype_slice.deref_index(2);
*out += *newtype_slice.deref_index(2);
let newtype_custom_pair = Newtype(CustomPair(*out, *out + 1));
*out += newtype_custom_pair.get().0;