rustup update (#816)

* rustup update

* Test fixes
This commit is contained in:
Ashley Hauck 2021-12-06 11:31:43 +01:00 committed by GitHub
parent 340f4bb70a
commit 2ca5826e55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 126 additions and 85 deletions

View File

@ -9,7 +9,7 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_errors::ErrorReported;
use rustc_index::vec::Idx;
use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout};
use rustc_middle::ty::query::Providers;
use rustc_middle::ty::query::{ExternProviders, Providers};
use rustc_middle::ty::subst::SubstsRef;
use rustc_middle::ty::{
self, Const, FloatTy, GeneratorSubsts, IntTy, ParamEnv, PolyFnSig, Ty, TyCtxt, TyKind,
@ -167,7 +167,7 @@ pub(crate) fn provide(providers: &mut Providers) {
};
}
pub(crate) fn provide_extern(providers: &mut Providers) {
pub(crate) fn provide_extern(providers: &mut ExternProviders) {
// Reset providers overriden in `provide`, that need to still go through the
// `rustc_metadata::rmeta` decoding, as opposed to being locally computed.
providers.fn_sig = rustc_interface::DEFAULT_EXTERN_QUERY_PROVIDERS.fn_sig;

View File

@ -236,7 +236,8 @@ fn target_from_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item: &hir::ImplItem<'_>)
hir::ImplItemKind::Const(..) => Target::AssocConst,
hir::ImplItemKind::Fn(..) => {
let parent_hir_id = tcx.hir().get_parent_item(impl_item.hir_id());
let containing_item = tcx.hir().expect_item(parent_hir_id);
let parent_local_def_id = tcx.hir().local_def_id(parent_hir_id);
let containing_item = tcx.hir().expect_item(parent_local_def_id);
let containing_impl_is_for_trait = match &containing_item.kind {
hir::ItemKind::Impl(hir::Impl { of_trait, .. }) => of_trait.is_some(),
_ => unreachable!("parent of an ImplItem must be an Impl"),

View File

@ -991,6 +991,14 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
// ignore
}
fn type_metadata(&mut self, _function: Self::Function, _typeid: String) {
// ignore
}
fn typeid_metadata(&mut self, _typeid: String) -> Self::Value {
todo!()
}
fn store(&mut self, val: Self::Value, ptr: Self::Value, _align: Align) -> Self::Value {
let ptr_elem_ty = match self.lookup_type(ptr.ty) {
SpirvType::Pointer { pointee } => pointee,

View File

@ -350,9 +350,8 @@ impl<'a, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'tcx> {
cond
}
fn sideeffect(&mut self) {
// TODO: This is currently ignored.
// It corresponds to the llvm.sideeffect intrinsic - does spir-v have an equivalent?
fn type_test(&mut self, _pointer: Self::Value, _typeid: Self::Value) -> Self::Value {
todo!()
}
fn va_start(&mut self, _val: Self::Value) -> Self::Value {

View File

@ -329,7 +329,7 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> {
impl<'a, 'tcx> AbiBuilderMethods<'tcx> for Builder<'a, 'tcx> {
fn apply_attrs_callsite(&mut self, _fn_abi: &FnAbi<'tcx, Ty<'tcx>>, _callsite: Self::Value) {}
fn get_param(&self, index: usize) -> Self::Value {
fn get_param(&mut self, index: usize) -> Self::Value {
self.function_parameter_values.borrow()[&self.current_fn.def(self)][index]
}
}

View File

@ -13,7 +13,7 @@ use rustc_codegen_ssa::mir::place::PlaceRef;
use rustc_codegen_ssa::traits::{AsmBuilderMethods, InlineAsmOperandRef};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_hir::LlvmInlineAsmInner;
use rustc_middle::bug;
use rustc_middle::{bug, ty::Instance};
use rustc_span::{Span, DUMMY_SP};
use rustc_target::asm::{InlineAsmRegClass, InlineAsmRegOrRegClass, SpirVInlineAsmRegClass};
use std::convert::TryFrom;
@ -70,6 +70,7 @@ impl<'a, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'tcx> {
operands: &[InlineAsmOperandRef<'tcx, Self>],
options: InlineAsmOptions,
_line_spans: &[Span],
_instance: Instance<'_>,
) {
const SUPPORTED_OPTIONS: InlineAsmOptions = InlineAsmOptions::NORETURN;
let unsupported_options = options & !SUPPORTED_OPTIONS;

View File

@ -290,7 +290,7 @@ impl CodegenBackend for SpirvCodegenBackend {
crate::attr::provide(providers);
}
fn provide_extern(&self, providers: &mut query::Providers) {
fn provide_extern(&self, providers: &mut query::ExternProviders) {
crate::abi::provide_extern(providers);
}

View File

@ -68,7 +68,7 @@
)]
// END - Embark standard lints v0.4
// crate-specific exceptions:
#![allow()]
// #![allow()]
mod depfile;
#[cfg(feature = "watch")]

View File

@ -2,12 +2,14 @@
#![cfg_attr(
target_arch = "spirv",
feature(
abi_unadjusted,
asm,
register_attr,
repr_simd,
asm_const,
asm_experimental_arch,
core_intrinsics,
lang_items,
abi_unadjusted
register_attr,
repr_simd,
),
register_attr(spirv)
)]

View File

@ -68,7 +68,7 @@
)]
// END - Embark standard lints v0.4
// crate-specific exceptions:
#![allow()]
// #![allow()]
use ash::{
extensions::{ext, khr},

View File

@ -68,7 +68,7 @@
)]
// END - Embark standard lints v0.4
// crate-specific exceptions:
#![allow()]
// #![allow()]
use minifb::{Key, Window, WindowOptions};
use rayon::prelude::*;

View File

@ -68,7 +68,7 @@
)]
// END - Embark standard lints v0.4
// crate-specific exceptions:
#![allow()]
// #![allow()]
use structopt::StructOpt;
use strum::{Display, EnumString};

View File

@ -5,5 +5,5 @@
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
[toolchain]
channel = "nightly-2021-10-26"
channel = "nightly-2021-12-02"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

View File

@ -122,7 +122,7 @@ impl Runner {
"--crate-type dylib",
"-Zunstable-options",
"-Zcrate-attr=no_std",
"-Zcrate-attr=feature(register_attr,asm)",
"-Zcrate-attr=feature(register_attr,asm,asm_const,asm_experimental_arch)",
"-Zcrate-attr=register_attr(spirv)",
]
.join(" ")

View File

@ -96,9 +96,9 @@ error[E0277]: the trait bound `{float}: Vector<f32, 2_usize>` is not satisfied
<DVec2 as Vector<f64, 2_usize>>
and 13 others
note: required by a bound in `debug_printf_assert_is_vector`
--> $SPIRV_STD_SRC/lib.rs:146:8
--> $SPIRV_STD_SRC/lib.rs:148:8
|
146 | V: crate::vector::Vector<TY, SIZE>,
148 | V: crate::vector::Vector<TY, SIZE>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `debug_printf_assert_is_vector`
error[E0308]: mismatched types

View File

@ -1,7 +1,7 @@
error: Cannot memcpy dynamically sized data
--> $CORE_SRC/intrinsics.rs:2137:14
--> $CORE_SRC/intrinsics.rs:2171:14
|
2137 | unsafe { copy(src, dst, count) }
2171 | unsafe { copy(src, dst, count) }
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View File

@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 699 8
OpLine %8 701 8
%9 = OpLoad %10 %4
OpLine %11 7 13
OpStore %6 %9

View File

@ -2,7 +2,7 @@
%4 = OpFunctionParameter %5
%6 = OpFunctionParameter %5
%7 = OpLabel
OpLine %8 699 8
OpLine %8 701 8
%9 = OpLoad %10 %4
OpLine %11 7 13
OpStore %6 %9

View File

@ -4,7 +4,7 @@
%7 = OpLabel
OpLine %8 7 35
%9 = OpLoad %10 %4
OpLine %11 890 8
OpLine %11 892 8
OpStore %6 %9
OpLine %8 8 1
OpReturn

View File

@ -4,7 +4,7 @@
%7 = OpLabel
OpLine %8 7 37
%9 = OpLoad %10 %4
OpLine %11 890 8
OpLine %11 892 8
OpStore %6 %9
OpLine %8 8 1
OpReturn

View File

@ -8,6 +8,11 @@ error[E0277]: the trait bound `Image<f32, 0_u32, 2_u32, 0_u32, 0_u32, 1_u32, 0_u
<Image<SampledType, 1_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasGather>
<Image<SampledType, 3_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasGather>
<Image<SampledType, 4_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasGather>
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, {_: u32}, SAMPLED, FORMAT>::gather`
--> $SPIRV_STD_SRC/image.rs:161:15
|
161 | Self: HasGather,
| ^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, {_: u32}, SAMPLED, FORMAT>::gather`
error[E0277]: the trait bound `Image<f32, 2_u32, 2_u32, 0_u32, 0_u32, 1_u32, 0_u32>: HasGather` is not satisfied
--> $DIR/gather_err.rs:16:34
@ -19,6 +24,11 @@ error[E0277]: the trait bound `Image<f32, 2_u32, 2_u32, 0_u32, 0_u32, 1_u32, 0_u
<Image<SampledType, 1_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasGather>
<Image<SampledType, 3_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasGather>
<Image<SampledType, 4_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasGather>
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, {_: u32}, SAMPLED, FORMAT>::gather`
--> $SPIRV_STD_SRC/image.rs:161:15
|
161 | Self: HasGather,
| ^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, {_: u32}, SAMPLED, FORMAT>::gather`
error: aborting due to 2 previous errors

View File

@ -9,6 +9,11 @@ error[E0277]: the trait bound `Image<f32, 4_u32, 2_u32, 0_u32, 0_u32, 1_u32, 0_u
<Image<SampledType, 1_u32, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT> as HasQueryLevels>
<Image<SampledType, 2_u32, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT> as HasQueryLevels>
<Image<SampledType, 3_u32, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT> as HasQueryLevels>
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT>::query_levels`
--> $SPIRV_STD_SRC/image.rs:818:15
|
818 | Self: HasQueryLevels,
| ^^^^^^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT>::query_levels`
error: aborting due to previous error

View File

@ -9,6 +9,11 @@ error[E0277]: the trait bound `Image<f32, 4_u32, 2_u32, 0_u32, 0_u32, 1_u32, 0_u
<Image<SampledType, 1_u32, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT> as HasQueryLevels>
<Image<SampledType, 2_u32, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT> as HasQueryLevels>
<Image<SampledType, 3_u32, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT> as HasQueryLevels>
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT>::query_lod`
--> $SPIRV_STD_SRC/image.rs:844:15
|
844 | Self: HasQueryLevels,
| ^^^^^^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT>::query_lod`
error: aborting due to previous error

View File

@ -10,6 +10,11 @@ error[E0277]: the trait bound `Image<f32, 1_u32, 2_u32, 0_u32, 0_u32, 1_u32, 0_u
<Image<SampledType, 0_u32, DEPTH, ARRAYED, 1_u32, SAMPLED, FORMAT> as HasQuerySize>
<Image<SampledType, 1_u32, DEPTH, ARRAYED, 0_u32, 0_u32, FORMAT> as HasQuerySize>
and 10 others
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT>::query_size`
--> $SPIRV_STD_SRC/image.rs:875:15
|
875 | Self: HasQuerySize,
| ^^^^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT>::query_size`
error: aborting due to previous error

View File

@ -9,6 +9,11 @@ error[E0277]: the trait bound `Image<f32, 4_u32, 2_u32, 0_u32, 0_u32, 1_u32, 0_u
<Image<SampledType, 1_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasQuerySizeLod>
<Image<SampledType, 2_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasQuerySizeLod>
<Image<SampledType, 3_u32, DEPTH, ARRAYED, 0_u32, SAMPLED, FORMAT> as HasQuerySizeLod>
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, {_: u32}, SAMPLED, FORMAT>::query_size_lod`
--> $SPIRV_STD_SRC/image.rs:908:15
|
908 | Self: HasQuerySizeLod,
| ^^^^^^^^^^^^^^^ required by this bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, {_: u32}, SAMPLED, FORMAT>::query_size_lod`
error: aborting due to previous error