Skip to content

Commit 2ca5826

Browse files
authored
rustup update (#816)
* rustup update * Test fixes
1 parent 340f4bb commit 2ca5826

25 files changed

+126
-85
lines changed

crates/rustc_codegen_spirv/src/abi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_data_structures::fx::FxHashMap;
99
use rustc_errors::ErrorReported;
1010
use rustc_index::vec::Idx;
1111
use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout};
12-
use rustc_middle::ty::query::Providers;
12+
use rustc_middle::ty::query::{ExternProviders, Providers};
1313
use rustc_middle::ty::subst::SubstsRef;
1414
use rustc_middle::ty::{
1515
self, Const, FloatTy, GeneratorSubsts, IntTy, ParamEnv, PolyFnSig, Ty, TyCtxt, TyKind,
@@ -167,7 +167,7 @@ pub(crate) fn provide(providers: &mut Providers) {
167167
};
168168
}
169169

170-
pub(crate) fn provide_extern(providers: &mut Providers) {
170+
pub(crate) fn provide_extern(providers: &mut ExternProviders) {
171171
// Reset providers overriden in `provide`, that need to still go through the
172172
// `rustc_metadata::rmeta` decoding, as opposed to being locally computed.
173173
providers.fn_sig = rustc_interface::DEFAULT_EXTERN_QUERY_PROVIDERS.fn_sig;

crates/rustc_codegen_spirv/src/attr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ fn target_from_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item: &hir::ImplItem<'_>)
236236
hir::ImplItemKind::Const(..) => Target::AssocConst,
237237
hir::ImplItemKind::Fn(..) => {
238238
let parent_hir_id = tcx.hir().get_parent_item(impl_item.hir_id());
239-
let containing_item = tcx.hir().expect_item(parent_hir_id);
239+
let parent_local_def_id = tcx.hir().local_def_id(parent_hir_id);
240+
let containing_item = tcx.hir().expect_item(parent_local_def_id);
240241
let containing_impl_is_for_trait = match &containing_item.kind {
241242
hir::ItemKind::Impl(hir::Impl { of_trait, .. }) => of_trait.is_some(),
242243
_ => unreachable!("parent of an ImplItem must be an Impl"),

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,14 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
991991
// ignore
992992
}
993993

994+
fn type_metadata(&mut self, _function: Self::Function, _typeid: String) {
995+
// ignore
996+
}
997+
998+
fn typeid_metadata(&mut self, _typeid: String) -> Self::Value {
999+
todo!()
1000+
}
1001+
9941002
fn store(&mut self, val: Self::Value, ptr: Self::Value, _align: Align) -> Self::Value {
9951003
let ptr_elem_ty = match self.lookup_type(ptr.ty) {
9961004
SpirvType::Pointer { pointee } => pointee,

crates/rustc_codegen_spirv/src/builder/intrinsics.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,8 @@ impl<'a, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'tcx> {
350350
cond
351351
}
352352

353-
fn sideeffect(&mut self) {
354-
// TODO: This is currently ignored.
355-
// It corresponds to the llvm.sideeffect intrinsic - does spir-v have an equivalent?
353+
fn type_test(&mut self, _pointer: Self::Value, _typeid: Self::Value) -> Self::Value {
354+
todo!()
356355
}
357356

358357
fn va_start(&mut self, _val: Self::Value) -> Self::Value {

crates/rustc_codegen_spirv/src/builder/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> {
329329
impl<'a, 'tcx> AbiBuilderMethods<'tcx> for Builder<'a, 'tcx> {
330330
fn apply_attrs_callsite(&mut self, _fn_abi: &FnAbi<'tcx, Ty<'tcx>>, _callsite: Self::Value) {}
331331

332-
fn get_param(&self, index: usize) -> Self::Value {
332+
fn get_param(&mut self, index: usize) -> Self::Value {
333333
self.function_parameter_values.borrow()[&self.current_fn.def(self)][index]
334334
}
335335
}

crates/rustc_codegen_spirv/src/builder/spirv_asm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_codegen_ssa::mir::place::PlaceRef;
1313
use rustc_codegen_ssa::traits::{AsmBuilderMethods, InlineAsmOperandRef};
1414
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1515
use rustc_hir::LlvmInlineAsmInner;
16-
use rustc_middle::bug;
16+
use rustc_middle::{bug, ty::Instance};
1717
use rustc_span::{Span, DUMMY_SP};
1818
use rustc_target::asm::{InlineAsmRegClass, InlineAsmRegOrRegClass, SpirVInlineAsmRegClass};
1919
use std::convert::TryFrom;
@@ -70,6 +70,7 @@ impl<'a, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'tcx> {
7070
operands: &[InlineAsmOperandRef<'tcx, Self>],
7171
options: InlineAsmOptions,
7272
_line_spans: &[Span],
73+
_instance: Instance<'_>,
7374
) {
7475
const SUPPORTED_OPTIONS: InlineAsmOptions = InlineAsmOptions::NORETURN;
7576
let unsupported_options = options & !SUPPORTED_OPTIONS;

crates/rustc_codegen_spirv/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ impl CodegenBackend for SpirvCodegenBackend {
290290
crate::attr::provide(providers);
291291
}
292292

293-
fn provide_extern(&self, providers: &mut query::Providers) {
293+
fn provide_extern(&self, providers: &mut query::ExternProviders) {
294294
crate::abi::provide_extern(providers);
295295
}
296296

crates/spirv-builder/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
)]
6969
// END - Embark standard lints v0.4
7070
// crate-specific exceptions:
71-
#![allow()]
71+
// #![allow()]
7272

7373
mod depfile;
7474
#[cfg(feature = "watch")]

crates/spirv-std/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
#![cfg_attr(
33
target_arch = "spirv",
44
feature(
5+
abi_unadjusted,
56
asm,
6-
register_attr,
7-
repr_simd,
7+
asm_const,
8+
asm_experimental_arch,
89
core_intrinsics,
910
lang_items,
10-
abi_unadjusted
11+
register_attr,
12+
repr_simd,
1113
),
1214
register_attr(spirv)
1315
)]

examples/runners/ash/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
)]
6969
// END - Embark standard lints v0.4
7070
// crate-specific exceptions:
71-
#![allow()]
71+
// #![allow()]
7272

7373
use ash::{
7474
extensions::{ext, khr},

0 commit comments

Comments
 (0)