Skip to content

Commit 999a864

Browse files
committed
rustup: update to nightly-2023-12-21.
This is the last nightly tagged as 1.76.0
1 parent d70c077 commit 999a864

18 files changed

+57
-35
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333
- [PR#1127](https://github.com/EmbarkStudios/rust-gpu/pull/1127) updated `spirv-tools` to `0.10.0`, which follows `vulkan-sdk-1.3.275`
3434
- [PR#1101](https://github.com/EmbarkStudios/rust-gpu/pull/1101) added `ignore` and `no_run` to documentation to make `cargo test` pass
3535
- [PR#1112](https://github.com/EmbarkStudios/rust-gpu/pull/1112) updated wgpu and winit in example runners
36-
- [PR#1102](https://github.com/EmbarkStudios/rust-gpu/pull/1102) updated toolchain to `nightly-2023-11-26`
36+
- [PR#1134](https://github.com/EmbarkStudios/rust-gpu/pull/1134) updated toolchain to `nightly-2023-12-21`
3737
- [PR#1100](https://github.com/EmbarkStudios/rust-gpu/pull/1100) updated toolchain to `nightly-2023-09-30`
3838
- [PR#1091](https://github.com/EmbarkStudios/rust-gpu/pull/1091) updated toolchain to `nightly-2023-08-29`
3939
- [PR#1085](https://github.com/EmbarkStudios/rust-gpu/pull/1085) updated toolchain to `nightly-2023-07-08`

crates/rustc_codegen_spirv/build.rs

+2-2
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.toml");
1212
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
13-
channel = "nightly-2023-11-26"
13+
channel = "nightly-2023-12-21"
1414
components = ["rust-src", "rustc-dev", "llvm-tools"]
15-
# commit_hash = f5dc2653fdd8b5d177b2ccbd84057954340a89fc"#;
15+
# commit_hash = 5ac4c8a63ee305742071ac6dd11817f7c24adce2"#;
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/attr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ impl AggregatedSpirvAttributes {
148148
pub fn parse<'tcx>(cx: &CodegenCx<'tcx>, attrs: &'tcx [Attribute]) -> Self {
149149
let mut aggregated_attrs = Self::default();
150150

151-
// NOTE(eddyb) `delay_span_bug` ensures that if attribute checking fails
151+
// NOTE(eddyb) `span_delayed_bug` ensures that if attribute checking fails
152152
// to see an attribute error, it will cause an ICE instead.
153153
for parse_attr_result in crate::symbols::parse_attrs_for_checking(&cx.sym, attrs) {
154154
let (span, parsed_attr) = match parse_attr_result {
155155
Ok(span_and_parsed_attr) => span_and_parsed_attr,
156156
Err((span, msg)) => {
157-
cx.tcx.sess.delay_span_bug(span, msg);
157+
cx.tcx.sess.span_delayed_bug(span, msg);
158158
continue;
159159
}
160160
};
@@ -166,7 +166,7 @@ impl AggregatedSpirvAttributes {
166166
}) => {
167167
cx.tcx
168168
.sess
169-
.delay_span_bug(span, format!("multiple {category} attributes"));
169+
.span_delayed_bug(span, format!("multiple {category} attributes"));
170170
}
171171
}
172172
}

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ impl<'tcx> ConstMethods<'tcx> for CodegenCx<'tcx> {
290290
}
291291
}
292292
Scalar::Ptr(ptr, _) => {
293-
let (alloc_id, offset) = ptr.into_parts();
293+
let (prov, offset) = ptr.into_parts();
294+
let alloc_id = prov.alloc_id();
294295
let (base_addr, _base_addr_space) = match self.tcx.global_alloc(alloc_id) {
295296
GlobalAlloc::Memory(alloc) => {
296297
let pointee = match self.lookup_type(ty) {

crates/rustc_codegen_spirv/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ use rustc_codegen_ssa::traits::{
9999
};
100100
use rustc_codegen_ssa::{CodegenResults, CompiledModule, ModuleCodegen, ModuleKind};
101101
use rustc_data_structures::fx::FxIndexMap;
102-
use rustc_errors::{ErrorGuaranteed, FatalError, Handler};
102+
use rustc_errors::{DiagCtxt, ErrorGuaranteed, FatalError};
103103
use rustc_metadata::EncodedMetadata;
104104
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
105105
use rustc_middle::mir::mono::{MonoItem, MonoItemData};
@@ -294,7 +294,7 @@ impl WriteBackendMethods for SpirvCodegenBackend {
294294

295295
fn run_link(
296296
_cgcx: &CodegenContext<Self>,
297-
_diag_handler: &Handler,
297+
_diag_handler: &DiagCtxt,
298298
_modules: Vec<ModuleCodegen<Self::Module>>,
299299
) -> Result<ModuleCodegen<Self::Module>, FatalError> {
300300
todo!()
@@ -326,7 +326,7 @@ impl WriteBackendMethods for SpirvCodegenBackend {
326326

327327
unsafe fn optimize(
328328
_: &CodegenContext<Self>,
329-
_: &Handler,
329+
_: &DiagCtxt,
330330
_: &ModuleCodegen<Self::Module>,
331331
_: &ModuleConfig,
332332
) -> Result<(), FatalError> {
@@ -357,7 +357,7 @@ impl WriteBackendMethods for SpirvCodegenBackend {
357357

358358
unsafe fn codegen(
359359
cgcx: &CodegenContext<Self>,
360-
_diag_handler: &Handler,
360+
_diag_handler: &DiagCtxt,
361361
module: ModuleCodegen<Self::Module>,
362362
_config: &ModuleConfig,
363363
) -> Result<CompiledModule, FatalError> {
@@ -500,7 +500,7 @@ pub fn __rustc_codegen_backend() -> Box<dyn CodegenBackend> {
500500
rustc_driver::install_ice_hook(
501501
"https://github.com/EmbarkStudios/rust-gpu/issues/new",
502502
|handler| {
503-
handler.note_without_error(concat!(
503+
handler.note(concat!(
504504
"`rust-gpu` version `",
505505
env!("CARGO_PKG_VERSION"),
506506
"`"

crates/rustc_codegen_spirv/src/link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ fn do_spirv_opt(
350350
}
351351
Level::Error => sess.struct_err(msg.message).forget_guarantee(),
352352
Level::Warning => sess.struct_warn(msg.message),
353-
Level::Info | Level::Debug => sess.struct_note_without_error(msg.message),
353+
Level::Info | Level::Debug => sess.struct_note(msg.message),
354354
};
355355

356356
err.note(format!("module `{}`", filename.display()));

crates/rustc_codegen_spirv/src/linker/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ pub fn link(
534534
}
535535

536536
if any_spirt_bugs {
537-
let mut note = sess.struct_note_without_error("SPIR-T bugs were reported");
537+
let mut note = sess.struct_note("SPIR-T bugs were reported");
538538
note.help(format!(
539539
"pretty-printed SPIR-T was saved to {}.html",
540540
dump_spirt_file_path.as_ref().unwrap().display()

crates/rustc_codegen_spirv/src/linker/test.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ fn link_with_linker_opts(
122122
// is really a silent unwinding device, that should be treated the same as
123123
// `Err(ErrorGuaranteed)` returns from `link`).
124124
rustc_driver::catch_fatal_errors(|| {
125-
let mut early_error_handler = rustc_session::EarlyErrorHandler::new(
126-
rustc_session::config::ErrorOutputType::default(),
127-
);
125+
let mut early_error_handler =
126+
rustc_session::EarlyDiagCtxt::new(rustc_session::config::ErrorOutputType::default());
127+
early_error_handler.initialize_checked_jobserver();
128128
let matches = rustc_driver::handle_options(
129129
&early_error_handler,
130130
&["".to_string(), "x.rs".to_string()],
@@ -135,7 +135,7 @@ fn link_with_linker_opts(
135135

136136
rustc_span::create_session_globals_then(sopts.edition, || {
137137
let mut sess = rustc_session::build_session(
138-
&early_error_handler,
138+
early_error_handler,
139139
sopts,
140140
CompilerIO {
141141
input: Input::Str {
@@ -160,7 +160,7 @@ fn link_with_linker_opts(
160160

161161
// HACK(eddyb) inject `write_diags` into `sess`, to work around
162162
// the removals in https://github.com/rust-lang/rust/pull/102992.
163-
sess.parse_sess.span_diagnostic = {
163+
sess.parse_sess.dcx = {
164164
let fallback_bundle = {
165165
extern crate rustc_error_messages;
166166
rustc_error_messages::fallback_fluent_bundle(
@@ -172,8 +172,8 @@ fn link_with_linker_opts(
172172
rustc_errors::emitter::EmitterWriter::new(Box::new(buf), fallback_bundle)
173173
.sm(Some(sess.parse_sess.clone_source_map()));
174174

175-
rustc_errors::Handler::with_emitter(Box::new(emitter))
176-
.with_flags(sess.opts.unstable_opts.diagnostic_handler_flags(true))
175+
rustc_errors::DiagCtxt::with_emitter(Box::new(emitter))
176+
.with_flags(sess.opts.unstable_opts.dcx_flags(true))
177177
};
178178

179179
let res = link(

crates/rustc_codegen_spirv/src/symbols.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ fn parse_local_size_attr(arg: &NestedMetaItem) -> Result<[u32; 3], ParseAttrErro
569569
}
570570
Ok(local_size)
571571
}
572-
Some(tuple) if tuple.is_empty() => Err((
572+
Some([]) => Err((
573573
arg.span,
574574
"#[spirv(compute(threads(x, y, z)))] must have the x dimension specified, trailing ones may be elided".to_string(),
575575
)),

crates/spirv-builder/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- markdownlint-disable-file MD033 -->
33
# `spirv-builder`
44

5-
![Rust version](https://img.shields.io/badge/rust-nightly--2023--05--27-purple.svg)
5+
![Rust version](https://img.shields.io/badge/rust-nightly--2023--12--21-purple.svg)
66

77
This crate gives you `SpirvBuilder`, a tool to build shaders using [rust-gpu][rustgpu].
88

@@ -31,12 +31,13 @@ const SHADER: &[u8] = include_bytes!(env!("my_shaders.spv"));
3131

3232
As `spirv-builder` relies on `rustc_codegen_spirv` being built for it (by Cargo, as a direct dependency), and due to the special nature of the latter (as a `rustc` codegen backend "plugin"), both end up sharing the requirement for a very specific nightly toolchain version of Rust.
3333

34-
**The current Rust toolchain version is: `nightly-2023-05-27`.**
34+
**The current Rust toolchain version is: `nightly-2023-12-21`.**
3535

3636
Rust toolchain version history across [rust-gpu releases](https://github.com/EmbarkStudios/rust-gpu/releases) (since `0.4`):
3737

3838
|`spirv-builder`<br>version|Rust toolchain<br>version|
3939
|:-:|:-:|
40+
|`0.10`|`nightly-2023-12-21`|
4041
|`0.9`|`nightly-2023-05-27`|
4142
|`0.8`|`nightly-2023-04-15`|
4243
|`0.7`|`nightly-2023-03-04`|

rust-toolchain.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[toolchain]
2-
channel = "nightly-2023-11-26"
2+
channel = "nightly-2023-12-21"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
4-
# commit_hash = f5dc2653fdd8b5d177b2ccbd84057954340a89fc
4+
# commit_hash = 5ac4c8a63ee305742071ac6dd11817f7c24adce2
55

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

tests/ui/dis/ptr_copy.normal.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: cannot memcpy dynamically sized data
2-
--> $CORE_SRC/intrinsics.rs:2776:9
2+
--> $CORE_SRC/intrinsics.rs:2793:9
33
|
4-
2776 | copy(src, dst, count)
4+
2793 | copy(src, dst, count)
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: used from within `core::intrinsics::copy::<f32>`
8-
--> $CORE_SRC/intrinsics.rs:2762:21
8+
--> $CORE_SRC/intrinsics.rs:2779:21
99
|
10-
2762 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
10+
2779 | pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
1111
| ^^^^
1212
note: called by `ptr_copy::copy_via_raw_ptr`
1313
--> $DIR/ptr_copy.rs:28:18

tests/ui/dis/ptr_read.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%4 = OpFunctionParameter %5
33
%6 = OpFunctionParameter %5
44
%7 = OpLabel
5-
OpLine %8 1200 8
5+
OpLine %8 1215 8
66
%9 = OpLoad %10 %4
77
OpLine %11 7 13
88
OpStore %6 %9

tests/ui/dis/ptr_read_method.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%4 = OpFunctionParameter %5
33
%6 = OpFunctionParameter %5
44
%7 = OpLabel
5-
OpLine %8 1200 8
5+
OpLine %8 1215 8
66
%9 = OpLoad %10 %4
77
OpLine %11 7 13
88
OpStore %6 %9

tests/ui/dis/ptr_write.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%7 = OpLabel
55
OpLine %8 7 35
66
%9 = OpLoad %10 %4
7-
OpLine %11 1400 8
7+
OpLine %11 1415 8
88
OpStore %6 %9
99
OpNoLine
1010
OpReturn

tests/ui/dis/ptr_write_method.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%7 = OpLabel
55
OpLine %8 7 37
66
%9 = OpLoad %10 %4
7-
OpLine %11 1400 8
7+
OpLine %11 1415 8
88
OpStore %6 %9
99
OpNoLine
1010
OpReturn

tests/ui/lang/core/ptr/allocate_const_scalar.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
warning: the feature `ptr_internals` is internal to the compiler or standard library
2+
--> $DIR/allocate_const_scalar.rs:6:12
3+
|
4+
6 | #![feature(ptr_internals)]
5+
| ^^^^^^^^^^^^^
6+
|
7+
= note: using it is strongly discouraged
8+
= note: `#[warn(internal_features)]` on by default
9+
110
error: pointer has non-null integer address
211
|
312
note: used from within `allocate_const_scalar::main`
@@ -11,5 +20,5 @@ note: called by `main`
1120
15 | pub fn main(output: &mut Unique<[u8; 4]>) {
1221
| ^^^^
1322

14-
error: aborting due to 1 previous error
23+
error: aborting due to 1 previous error; 1 warning emitted
1524

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `ptr_internals` is internal to the compiler or standard library
2+
--> $DIR/allocate_vec_like.rs:4:12
3+
|
4+
4 | #![feature(ptr_internals)]
5+
| ^^^^^^^^^^^^^
6+
|
7+
= note: using it is strongly discouraged
8+
= note: `#[warn(internal_features)]` on by default
9+
10+
warning: 1 warning emitted
11+

0 commit comments

Comments
 (0)