Skip to content

Commit 57eed83

Browse files
committed
rustup: update to nightly-2022-02-01.
1 parent 2a61baf commit 57eed83

File tree

7 files changed

+24
-52
lines changed

7 files changed

+24
-52
lines changed

crates/rustc_codegen_spirv/src/attr.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ use rspirv::spirv::{BuiltIn, ExecutionMode, ExecutionModel, StorageClass};
88
use rustc_ast::Attribute;
99
use rustc_hir as hir;
1010
use rustc_hir::def_id::LocalDefId;
11-
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
11+
use rustc_hir::intravisit::{self, Visitor};
1212
use rustc_hir::{HirId, MethodKind, Target, CRATE_HIR_ID};
13-
use rustc_middle::hir::map::Map;
13+
use rustc_middle::hir::nested_filter;
1414
use rustc_middle::ty::query::Providers;
1515
use rustc_middle::ty::TyCtxt;
1616
use rustc_span::{Span, Symbol};
@@ -235,8 +235,7 @@ fn target_from_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item: &hir::ImplItem<'_>)
235235
match impl_item.kind {
236236
hir::ImplItemKind::Const(..) => Target::AssocConst,
237237
hir::ImplItemKind::Fn(..) => {
238-
let parent_hir_id = tcx.hir().get_parent_item(impl_item.hir_id());
239-
let parent_local_def_id = tcx.hir().local_def_id(parent_hir_id);
238+
let parent_local_def_id = tcx.hir().get_parent_item(impl_item.hir_id());
240239
let containing_item = tcx.hir().expect_item(parent_local_def_id);
241240
let containing_impl_is_for_trait = match &containing_item.kind {
242241
hir::ItemKind::Impl(hir::Impl { of_trait, .. }) => of_trait.is_some(),
@@ -403,10 +402,10 @@ impl CheckSpirvAttrVisitor<'_> {
403402

404403
// FIXME(eddyb) DRY this somehow and make it reusable from somewhere in `rustc`.
405404
impl<'tcx> Visitor<'tcx> for CheckSpirvAttrVisitor<'tcx> {
406-
type Map = Map<'tcx>;
405+
type NestedFilter = nested_filter::OnlyBodies;
407406

408-
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
409-
NestedVisitorMap::OnlyBodies(self.tcx.hir())
407+
fn nested_visit_map(&mut self) -> Self::Map {
408+
self.tcx.hir()
410409
}
411410

412411
fn visit_item(&mut self, item: &'tcx hir::Item<'tcx>) {

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,23 +1890,20 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
18901890
.with_type(agg_val.ty)
18911891
}
18921892

1893-
fn landing_pad(
1894-
&mut self,
1895-
_ty: Self::Type,
1896-
_pers_fn: Self::Value,
1897-
_num_clauses: usize,
1898-
) -> Self::Value {
1893+
fn set_personality_fn(&mut self, _personality: Self::Value) {
18991894
todo!()
19001895
}
19011896

1902-
fn set_cleanup(&mut self, _landing_pad: Self::Value) {
1897+
// These are used by everyone except msvc
1898+
fn cleanup_landing_pad(&mut self, _ty: Self::Type, _pers_fn: Self::Value) -> Self::Value {
19031899
todo!()
19041900
}
19051901

1906-
fn resume(&mut self, _exn: Self::Value) -> Self::Value {
1902+
fn resume(&mut self, _exn: Self::Value) {
19071903
todo!()
19081904
}
19091905

1906+
// These are used only by msvc
19101907
fn cleanup_pad(
19111908
&mut self,
19121909
_parent: Option<Self::Value>,
@@ -1915,11 +1912,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
19151912
todo!()
19161913
}
19171914

1918-
fn cleanup_ret(
1919-
&mut self,
1920-
_funclet: &Self::Funclet,
1921-
_unwind: Option<Self::BasicBlock>,
1922-
) -> Self::Value {
1915+
fn cleanup_ret(&mut self, _funclet: &Self::Funclet, _unwind: Option<Self::BasicBlock>) {
19231916
todo!()
19241917
}
19251918

@@ -1931,19 +1924,11 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
19311924
&mut self,
19321925
_parent: Option<Self::Value>,
19331926
_unwind: Option<Self::BasicBlock>,
1934-
_num_handlers: usize,
1927+
_handlers: &[Self::BasicBlock],
19351928
) -> Self::Value {
19361929
todo!()
19371930
}
19381931

1939-
fn add_handler(&mut self, _catch_switch: Self::Value, _handler: Self::BasicBlock) {
1940-
todo!()
1941-
}
1942-
1943-
fn set_personality_fn(&mut self, _personality: Self::Value) {
1944-
todo!()
1945-
}
1946-
19471932
fn atomic_cmpxchg(
19481933
&mut self,
19491934
dst: Self::Value,

crates/rustc_codegen_spirv/src/builder/spirv_asm.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
1212
use rustc_codegen_ssa::mir::place::PlaceRef;
1313
use rustc_codegen_ssa::traits::{AsmBuilderMethods, InlineAsmOperandRef};
1414
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
15-
use rustc_hir::LlvmInlineAsmInner;
1615
use rustc_middle::{bug, ty::Instance};
1716
use rustc_span::{Span, DUMMY_SP};
1817
use rustc_target::asm::{InlineAsmRegClass, InlineAsmRegOrRegClass, SpirVInlineAsmRegClass};
@@ -32,17 +31,6 @@ impl InstructionTable {
3231
}
3332

3433
impl<'a, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'tcx> {
35-
fn codegen_llvm_inline_asm(
36-
&mut self,
37-
_: &LlvmInlineAsmInner,
38-
_: Vec<PlaceRef<'tcx, Self::Value>>,
39-
_: Vec<Self::Value>,
40-
_: Span,
41-
) -> bool {
42-
self.err("LLVM asm not supported");
43-
true
44-
}
45-
4634
/* Example asm and the template it compiles to:
4735
asm!(
4836
"mov {0}, {1}",

crates/rustc_codegen_spirv/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ fn is_blocklisted_fn<'tcx>(
210210
if let Some(debug_trait_def_id) = tcx.get_diagnostic_item(sym::Debug) {
211211
// Helper for detecting `<_ as core::fmt::Debug>::fmt` (in impls).
212212
let is_debug_fmt_method = |def_id| match tcx.opt_associated_item(def_id) {
213-
Some(assoc) if assoc.ident.name == sym::fmt => match assoc.container {
213+
Some(assoc) if assoc.ident(tcx).name == sym::fmt => match assoc.container {
214214
ty::ImplContainer(impl_def_id) => {
215215
tcx.impl_trait_ref(impl_def_id).map(|tr| tr.def_id)
216216
== Some(debug_trait_def_id)

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
66

77
[toolchain]
8-
channel = "nightly-2022-01-13"
8+
channel = "nightly-2022-02-01"
99
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

tests/ui/dis/ptr_copy.normal.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: Cannot memcpy dynamically sized data
2-
--> $CORE_SRC/intrinsics.rs:2173:14
2+
--> $CORE_SRC/intrinsics.rs:2194:14
33
|
4-
2173 | unsafe { copy(src, dst, count) }
4+
2194 | unsafe { copy(src, dst, count) }
55
| ^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to previous error

tests/ui/lang/core/unwrap_or.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@ OpLine %5 11 11
44
%6 = OpCompositeInsert %7 %8 %9 0
55
OpLine %5 11 11
66
%10 = OpCompositeExtract %11 %6 1
7-
OpLine %12 754 14
7+
OpLine %12 777 14
88
%13 = OpBitcast %14 %8
9-
OpLine %12 754 8
9+
OpLine %12 777 8
1010
OpSelectionMerge %15 None
1111
OpSwitch %13 %16 0 %17 1 %18
1212
%16 = OpLabel
13-
OpLine %12 754 14
13+
OpLine %12 777 14
1414
OpUnreachable
1515
%17 = OpLabel
16-
OpLine %12 756 20
16+
OpLine %12 779 20
1717
OpBranch %15
1818
%18 = OpLabel
19-
OpLine %12 755 23
19+
OpLine %12 778 23
2020
OpBranch %15
2121
%15 = OpLabel
2222
%19 = OpPhi %20 %21 %17 %22 %18
2323
%23 = OpPhi %11 %24 %17 %10 %18
2424
OpBranch %25
2525
%25 = OpLabel
26-
OpLine %12 758 4
26+
OpLine %12 781 4
2727
OpSelectionMerge %26 None
2828
OpBranchConditional %19 %27 %28
2929
%27 = OpLabel
30-
OpLine %12 758 4
30+
OpLine %12 781 4
3131
OpBranch %26
3232
%28 = OpLabel
3333
OpBranch %26

0 commit comments

Comments
 (0)