From 27527142bdde26917d2f58a14551d0d6f3e12050 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Wed, 1 Nov 2023 14:28:26 +0100 Subject: [PATCH] Update rust version to "nightly-2023-03-18" (#30630) This is necessary to update the network stack. --- components/script_plugins/lib.rs | 5 ++--- components/script_plugins/trace_in_no_trace.rs | 4 ++-- components/script_plugins/unrooted_must_root.rs | 6 +++--- rust-toolchain.toml | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs index 4d475637ee8..de1ee5f7e53 100644 --- a/components/script_plugins/lib.rs +++ b/components/script_plugins/lib.rs @@ -32,7 +32,7 @@ use rustc_hir::{ImplItemRef, ItemKind, Node, OwnerId, PrimTy, TraitItemRef}; use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use rustc_infer::infer::TyCtxtInferExt; use rustc_lint::LateContext; -use rustc_middle::ty::{self, GenericArg, ParamEnv, Ty, TyCtxt, TypeVisitable}; +use rustc_middle::ty::{self, GenericArg, ParamEnv, Ty, TyCtxt, TypeVisitableExt}; use rustc_span::source_map::{ExpnKind, MacroKind, Span}; use rustc_span::symbol::{Ident, Symbol}; use rustc_span::DUMMY_SP; @@ -332,8 +332,7 @@ pub fn implements_trait_with_env<'tcx>( kind: TypeVariableOriginKind::MiscVariable, span: DUMMY_SP, }; - // in new nightlies: mk_substs -> mk_substs_from_iter - let ty_params = tcx.mk_substs( + let ty_params = tcx.mk_substs_from_iter( ty_params .into_iter() .map(|arg| arg.unwrap_or_else(|| infcx.next_ty_var(orig).into())), diff --git a/components/script_plugins/trace_in_no_trace.rs b/components/script_plugins/trace_in_no_trace.rs index 50349cfcfbd..102f1ae68de 100644 --- a/components/script_plugins/trace_in_no_trace.rs +++ b/components/script_plugins/trace_in_no_trace.rs @@ -178,7 +178,7 @@ impl<'tcx> LateLintPass<'tcx> for NotracePass { if let hir::ItemKind::Struct(def, ..) = &item.kind { for ref field in def.fields() { let field_type = cx.tcx.type_of(field.def_id); - incorrect_no_trace(&self.symbols, cx, field_type, field.span); + incorrect_no_trace(&self.symbols, cx, field_type.0, field.span); } } } @@ -188,7 +188,7 @@ impl<'tcx> LateLintPass<'tcx> for NotracePass { hir::VariantData::Tuple(fields, ..) => { for field in fields { let field_type = cx.tcx.type_of(field.def_id); - incorrect_no_trace(&self.symbols, cx, field_type, field.ty.span); + incorrect_no_trace(&self.symbols, cx, field_type.0, field.ty.span); } }, _ => (), // Struct variants already caught by check_struct_def diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs index 90728d64cfa..2daea47146c 100644 --- a/components/script_plugins/unrooted_must_root.rs +++ b/components/script_plugins/unrooted_must_root.rs @@ -191,7 +191,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass { if let hir::ItemKind::Struct(def, ..) = &item.kind { for ref field in def.fields() { let field_type = cx.tcx.type_of(field.def_id); - if is_unrooted_ty(&self.symbols, cx, field_type, false) { + if is_unrooted_ty(&self.symbols, cx, field_type.0, false) { cx.lint( UNROOTED_MUST_ROOT, "Type must be rooted, use #[unrooted_must_root_lint::must_root] \ @@ -214,7 +214,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass { hir::VariantData::Tuple(fields, ..) => { for field in fields { let field_type = cx.tcx.type_of(field.def_id); - if is_unrooted_ty(&self.symbols, cx, field_type, false) { + if is_unrooted_ty(&self.symbols, cx, field_type.0, false) { cx.lint( UNROOTED_MUST_ROOT, "Type must be rooted, \ @@ -247,7 +247,7 @@ impl<'tcx> LateLintPass<'tcx> for UnrootedPass { }; if !in_derive_expn(span) { - let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx); + let sig = cx.tcx.type_of(def_id).0.fn_sig(cx.tcx); for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().iter()) { if is_unrooted_ty(&self.symbols, cx, *ty, false) { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index fbaacf021be..436b347fabc 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2023-02-01" +channel = "nightly-2023-03-18" components = [ # https://github.com/rust-lang/rust/issues/72594#issuecomment-633779564 "llvm-tools",