rustup: update to nightly-2022-02-01.

This commit is contained in:
Eduard-Mihai Burtescu 2022-04-11 11:15:31 +00:00 committed by Eduard-Mihai Burtescu
parent 2a61baf907
commit 57eed8394e
7 changed files with 24 additions and 52 deletions

View File

@ -8,9 +8,9 @@ use rspirv::spirv::{BuiltIn, ExecutionMode, ExecutionModel, StorageClass};
use rustc_ast::Attribute; use rustc_ast::Attribute;
use rustc_hir as hir; use rustc_hir as hir;
use rustc_hir::def_id::LocalDefId; use rustc_hir::def_id::LocalDefId;
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor}; use rustc_hir::intravisit::{self, Visitor};
use rustc_hir::{HirId, MethodKind, Target, CRATE_HIR_ID}; use rustc_hir::{HirId, MethodKind, Target, CRATE_HIR_ID};
use rustc_middle::hir::map::Map; use rustc_middle::hir::nested_filter;
use rustc_middle::ty::query::Providers; use rustc_middle::ty::query::Providers;
use rustc_middle::ty::TyCtxt; use rustc_middle::ty::TyCtxt;
use rustc_span::{Span, Symbol}; use rustc_span::{Span, Symbol};
@ -235,8 +235,7 @@ fn target_from_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item: &hir::ImplItem<'_>)
match impl_item.kind { match impl_item.kind {
hir::ImplItemKind::Const(..) => Target::AssocConst, hir::ImplItemKind::Const(..) => Target::AssocConst,
hir::ImplItemKind::Fn(..) => { hir::ImplItemKind::Fn(..) => {
let parent_hir_id = tcx.hir().get_parent_item(impl_item.hir_id()); let parent_local_def_id = tcx.hir().get_parent_item(impl_item.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_item = tcx.hir().expect_item(parent_local_def_id);
let containing_impl_is_for_trait = match &containing_item.kind { let containing_impl_is_for_trait = match &containing_item.kind {
hir::ItemKind::Impl(hir::Impl { of_trait, .. }) => of_trait.is_some(), hir::ItemKind::Impl(hir::Impl { of_trait, .. }) => of_trait.is_some(),
@ -403,10 +402,10 @@ impl CheckSpirvAttrVisitor<'_> {
// FIXME(eddyb) DRY this somehow and make it reusable from somewhere in `rustc`. // FIXME(eddyb) DRY this somehow and make it reusable from somewhere in `rustc`.
impl<'tcx> Visitor<'tcx> for CheckSpirvAttrVisitor<'tcx> { impl<'tcx> Visitor<'tcx> for CheckSpirvAttrVisitor<'tcx> {
type Map = Map<'tcx>; type NestedFilter = nested_filter::OnlyBodies;
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> { fn nested_visit_map(&mut self) -> Self::Map {
NestedVisitorMap::OnlyBodies(self.tcx.hir()) self.tcx.hir()
} }
fn visit_item(&mut self, item: &'tcx hir::Item<'tcx>) { fn visit_item(&mut self, item: &'tcx hir::Item<'tcx>) {

View File

@ -1890,23 +1890,20 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
.with_type(agg_val.ty) .with_type(agg_val.ty)
} }
fn landing_pad( fn set_personality_fn(&mut self, _personality: Self::Value) {
&mut self,
_ty: Self::Type,
_pers_fn: Self::Value,
_num_clauses: usize,
) -> Self::Value {
todo!() todo!()
} }
fn set_cleanup(&mut self, _landing_pad: Self::Value) { // These are used by everyone except msvc
fn cleanup_landing_pad(&mut self, _ty: Self::Type, _pers_fn: Self::Value) -> Self::Value {
todo!() todo!()
} }
fn resume(&mut self, _exn: Self::Value) -> Self::Value { fn resume(&mut self, _exn: Self::Value) {
todo!() todo!()
} }
// These are used only by msvc
fn cleanup_pad( fn cleanup_pad(
&mut self, &mut self,
_parent: Option<Self::Value>, _parent: Option<Self::Value>,
@ -1915,11 +1912,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
todo!() todo!()
} }
fn cleanup_ret( fn cleanup_ret(&mut self, _funclet: &Self::Funclet, _unwind: Option<Self::BasicBlock>) {
&mut self,
_funclet: &Self::Funclet,
_unwind: Option<Self::BasicBlock>,
) -> Self::Value {
todo!() todo!()
} }
@ -1931,19 +1924,11 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
&mut self, &mut self,
_parent: Option<Self::Value>, _parent: Option<Self::Value>,
_unwind: Option<Self::BasicBlock>, _unwind: Option<Self::BasicBlock>,
_num_handlers: usize, _handlers: &[Self::BasicBlock],
) -> Self::Value { ) -> Self::Value {
todo!() todo!()
} }
fn add_handler(&mut self, _catch_switch: Self::Value, _handler: Self::BasicBlock) {
todo!()
}
fn set_personality_fn(&mut self, _personality: Self::Value) {
todo!()
}
fn atomic_cmpxchg( fn atomic_cmpxchg(
&mut self, &mut self,
dst: Self::Value, dst: Self::Value,

View File

@ -12,7 +12,6 @@ use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
use rustc_codegen_ssa::mir::place::PlaceRef; use rustc_codegen_ssa::mir::place::PlaceRef;
use rustc_codegen_ssa::traits::{AsmBuilderMethods, InlineAsmOperandRef}; use rustc_codegen_ssa::traits::{AsmBuilderMethods, InlineAsmOperandRef};
use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_hir::LlvmInlineAsmInner;
use rustc_middle::{bug, ty::Instance}; use rustc_middle::{bug, ty::Instance};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_target::asm::{InlineAsmRegClass, InlineAsmRegOrRegClass, SpirVInlineAsmRegClass}; use rustc_target::asm::{InlineAsmRegClass, InlineAsmRegOrRegClass, SpirVInlineAsmRegClass};
@ -32,17 +31,6 @@ impl InstructionTable {
} }
impl<'a, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'tcx> { impl<'a, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'tcx> {
fn codegen_llvm_inline_asm(
&mut self,
_: &LlvmInlineAsmInner,
_: Vec<PlaceRef<'tcx, Self::Value>>,
_: Vec<Self::Value>,
_: Span,
) -> bool {
self.err("LLVM asm not supported");
true
}
/* Example asm and the template it compiles to: /* Example asm and the template it compiles to:
asm!( asm!(
"mov {0}, {1}", "mov {0}, {1}",

View File

@ -210,7 +210,7 @@ fn is_blocklisted_fn<'tcx>(
if let Some(debug_trait_def_id) = tcx.get_diagnostic_item(sym::Debug) { if let Some(debug_trait_def_id) = tcx.get_diagnostic_item(sym::Debug) {
// Helper for detecting `<_ as core::fmt::Debug>::fmt` (in impls). // Helper for detecting `<_ as core::fmt::Debug>::fmt` (in impls).
let is_debug_fmt_method = |def_id| match tcx.opt_associated_item(def_id) { let is_debug_fmt_method = |def_id| match tcx.opt_associated_item(def_id) {
Some(assoc) if assoc.ident.name == sym::fmt => match assoc.container { Some(assoc) if assoc.ident(tcx).name == sym::fmt => match assoc.container {
ty::ImplContainer(impl_def_id) => { ty::ImplContainer(impl_def_id) => {
tcx.impl_trait_ref(impl_def_id).map(|tr| tr.def_id) tcx.impl_trait_ref(impl_def_id).map(|tr| tr.def_id)
== Some(debug_trait_def_id) == Some(debug_trait_def_id)

View File

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

View File

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

View File

@ -4,30 +4,30 @@ OpLine %5 11 11
%6 = OpCompositeInsert %7 %8 %9 0 %6 = OpCompositeInsert %7 %8 %9 0
OpLine %5 11 11 OpLine %5 11 11
%10 = OpCompositeExtract %11 %6 1 %10 = OpCompositeExtract %11 %6 1
OpLine %12 754 14 OpLine %12 777 14
%13 = OpBitcast %14 %8 %13 = OpBitcast %14 %8
OpLine %12 754 8 OpLine %12 777 8
OpSelectionMerge %15 None OpSelectionMerge %15 None
OpSwitch %13 %16 0 %17 1 %18 OpSwitch %13 %16 0 %17 1 %18
%16 = OpLabel %16 = OpLabel
OpLine %12 754 14 OpLine %12 777 14
OpUnreachable OpUnreachable
%17 = OpLabel %17 = OpLabel
OpLine %12 756 20 OpLine %12 779 20
OpBranch %15 OpBranch %15
%18 = OpLabel %18 = OpLabel
OpLine %12 755 23 OpLine %12 778 23
OpBranch %15 OpBranch %15
%15 = OpLabel %15 = OpLabel
%19 = OpPhi %20 %21 %17 %22 %18 %19 = OpPhi %20 %21 %17 %22 %18
%23 = OpPhi %11 %24 %17 %10 %18 %23 = OpPhi %11 %24 %17 %10 %18
OpBranch %25 OpBranch %25
%25 = OpLabel %25 = OpLabel
OpLine %12 758 4 OpLine %12 781 4
OpSelectionMerge %26 None OpSelectionMerge %26 None
OpBranchConditional %19 %27 %28 OpBranchConditional %19 %27 %28
%27 = OpLabel %27 = OpLabel
OpLine %12 758 4 OpLine %12 781 4
OpBranch %26 OpBranch %26
%28 = OpLabel %28 = OpLabel
OpBranch %26 OpBranch %26