From 3c3cbfa8195bf56efc826eeda3f437d9d7883113 Mon Sep 17 00:00:00 2001 From: xFrednet Date: Thu, 9 Mar 2023 16:22:34 +0100 Subject: [PATCH] bump nightly -> 2023-01-26 --- .github/workflows/rust.yml | 2 +- .github/workflows/rust_bors.yml | 2 +- cargo-marker/src/driver.rs | 2 +- marker_adapter/src/loader.rs | 1 + marker_driver_rustc/src/conversion/marker/common.rs | 1 - marker_driver_rustc/src/conversion/marker/expr.rs | 2 +- marker_driver_rustc/src/conversion/marker/generics.rs | 3 +-- marker_driver_rustc/src/conversion/marker/item.rs | 3 +-- marker_driver_rustc/src/conversion/marker/ty.rs | 2 +- marker_driver_rustc/src/main.rs | 2 +- rust-toolchain | 2 +- util/update-toolchain.sh | 2 +- 12 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e526d8f0..c51eedf5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2023-01-26 + toolchain: nightly-2023-03-09 components: cargo, clippy, rustfmt - run: rustc -vV - run: cargo build diff --git a/.github/workflows/rust_bors.yml b/.github/workflows/rust_bors.yml index 68c2a334..44544afb 100644 --- a/.github/workflows/rust_bors.yml +++ b/.github/workflows/rust_bors.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2023-01-26 + toolchain: nightly-2023-03-09 components: cargo, clippy, rustfmt - run: rustc -vV - run: cargo build diff --git a/cargo-marker/src/driver.rs b/cargo-marker/src/driver.rs index 15dcea5b..93d09974 100644 --- a/cargo-marker/src/driver.rs +++ b/cargo-marker/src/driver.rs @@ -21,7 +21,7 @@ use crate::ExitStatus; /// This is the driver version and toolchain, that is used by the setup command /// to install the driver. static DEFAULT_DRIVER_INFO: Lazy = Lazy::new(|| RustcDriverInfo { - toolchain: "nightly-2023-01-26".to_string(), + toolchain: "nightly-2023-03-09".to_string(), version: "0.1.0".to_string(), api_version: "0.1.0".to_string(), }); diff --git a/marker_adapter/src/loader.rs b/marker_adapter/src/loader.rs index d0a284b2..7ad5f63e 100644 --- a/marker_adapter/src/loader.rs +++ b/marker_adapter/src/loader.rs @@ -189,6 +189,7 @@ macro_rules! gen_LoadedLintCrate { // safe wrapper to external functions $( + #[allow(clippy::extra_unused_lifetimes)] fn $fn_name<'ast>(&self $(, $arg_name: $arg_ty)*) -> $ret_ty { unsafe { (self.$fn_name)($($arg_name,)*) diff --git a/marker_driver_rustc/src/conversion/marker/common.rs b/marker_driver_rustc/src/conversion/marker/common.rs index 52e5df60..f106cf91 100644 --- a/marker_driver_rustc/src/conversion/marker/common.rs +++ b/marker_driver_rustc/src/conversion/marker/common.rs @@ -7,7 +7,6 @@ use marker_api::ast::{ }; use rustc_hir as hir; use rustc_middle as mid; -use rustc_middle::ty::DefIdTree; use crate::conversion::common::{ BodyIdLayout, ExprIdLayout, GenericIdLayout, ItemIdLayout, SpanSourceInfo, TyDefIdLayout, VarIdLayout, diff --git a/marker_driver_rustc/src/conversion/marker/expr.rs b/marker_driver_rustc/src/conversion/marker/expr.rs index 80284851..f25e5e25 100644 --- a/marker_driver_rustc/src/conversion/marker/expr.rs +++ b/marker_driver_rustc/src/conversion/marker/expr.rs @@ -240,7 +240,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> { // order during HIR lowering. Marker can for now ignore this and // convert the inner expression directly hir::ExprKind::DropTemps(inner) => return self.to_expr(inner), - hir::ExprKind::Err => unreachable!("would have triggered a rustc error"), + hir::ExprKind::Err(..) => unreachable!("would have triggered a rustc error"), _ => { eprintln!("skipping not implemented expr at: {:?}", expr.span); ExprKind::Unstable( diff --git a/marker_driver_rustc/src/conversion/marker/generics.rs b/marker_driver_rustc/src/conversion/marker/generics.rs index 3d921449..e9c03caa 100644 --- a/marker_driver_rustc/src/conversion/marker/generics.rs +++ b/marker_driver_rustc/src/conversion/marker/generics.rs @@ -121,8 +121,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> { hir::ParamName::Plain(ident) => self.to_symbol_id(ident.name), _ => return None, }; - let def_id = self.rustc_cx.hir().local_def_id(rustc_param.hir_id); - let id = self.to_generic_id(def_id.to_def_id()); + let id = self.to_generic_id(rustc_param.def_id); let span = self.to_span_id(rustc_param.span); match rustc_param.kind { hir::GenericParamKind::Lifetime { diff --git a/marker_driver_rustc/src/conversion/marker/item.rs b/marker_driver_rustc/src/conversion/marker/item.rs index 2a1929b3..4194cc9a 100644 --- a/marker_driver_rustc/src/conversion/marker/item.rs +++ b/marker_driver_rustc/src/conversion/marker/item.rs @@ -188,9 +188,8 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> { self.alloc_slice(fields.iter().map(|field| { // FIXME update Visibility creation to use the stored local def id inside the // field after the next sync. See #55 - let def_id = self.rustc_cx.hir().local_def_id(field.hir_id); Field::new( - Visibility::new(self.to_item_id(def_id)), + Visibility::new(self.to_item_id(field.def_id)), self.to_symbol_id(field.ident.name), self.to_ty(field.ty), self.to_span_id(field.span), diff --git a/marker_driver_rustc/src/conversion/marker/ty.rs b/marker_driver_rustc/src/conversion/marker/ty.rs index 1a853a5f..7e6b08b0 100644 --- a/marker_driver_rustc/src/conversion/marker/ty.rs +++ b/marker_driver_rustc/src/conversion/marker/ty.rs @@ -64,7 +64,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> { }, hir::TyKind::Path(qpath) => self.to_syn_ty_from_qpath(data, qpath, rustc_ty), // Continue ty conversion - hir::TyKind::Err => unreachable!("would have triggered a rustc error"), + hir::TyKind::Err(..) => unreachable!("would have triggered a rustc error"), hir::TyKind::Typeof(_) => unreachable!("docs state: 'Unused for now.'"), hir::TyKind::OpaqueDef(id, _, _) => { // `impl Trait` in rustc are implemented as Items with the kind `OpaqueTy` diff --git a/marker_driver_rustc/src/main.rs b/marker_driver_rustc/src/main.rs index 96eacd38..a1cb8518 100644 --- a/marker_driver_rustc/src/main.rs +++ b/marker_driver_rustc/src/main.rs @@ -41,7 +41,7 @@ use std::ops::Deref; use std::path::{Path, PathBuf}; use std::process::{exit, Command}; -const RUSTC_TOOLCHAIN_VERSION: &str = "nightly-2023-01-26"; +const RUSTC_TOOLCHAIN_VERSION: &str = "nightly-2023-03-09"; struct DefaultCallbacks; impl rustc_driver::Callbacks for DefaultCallbacks {} diff --git a/rust-toolchain b/rust-toolchain index 4d9574e0..f3209c5f 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2023-01-26" +channel = "nightly-2023-03-09" components = ["cargo", "llvm-tools-preview", "rust-src", "rust-std", "rustc", "rustc-dev", "rustfmt"] # This has to be synced with the toolchain in `github/workflows` diff --git a/util/update-toolchain.sh b/util/update-toolchain.sh index 193b1d02..91e7f011 100755 --- a/util/update-toolchain.sh +++ b/util/update-toolchain.sh @@ -2,7 +2,7 @@ if [[ $1 == nightly-????-??-?? ]] then - sed -i "s/nightly-2023-01-26/$1/g" ./marker_driver_rustc/src/main.rs ./rust-toolchain .github/workflows/* ./util/update-toolchain.sh cargo-marker/src/driver.rs + sed -i "s/nightly-2023-03-09/$1/g" ./marker_driver_rustc/src/main.rs ./rust-toolchain .github/workflows/* ./util/update-toolchain.sh cargo-marker/src/driver.rs else echo "Please enter a valid toolchain like \`nightly-2022-01-01\`" fi;