Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Bump nightly -> 2023-11-16 #314

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cargo-marker/src/backend/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn marker_driver_bin_name() -> String {
pub(crate) fn default_driver_info() -> DriverVersionInfo {
DriverVersionInfo {
// region replace rust toolchain dev
toolchain: "nightly-2023-10-05".to_string(),
toolchain: "nightly-2023-11-16".to_string(),
// endregion replace rust toolchain dev
// region replace marker version dev
version: "0.5.0-dev".to_string(),
Expand Down
1 change: 1 addition & 0 deletions marker_api/src/ast/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use crate::{
#[repr(C)]
#[derive(Debug)]
pub struct Lifetime<'ast> {
#[allow(clippy::struct_field_names)]
_lifetime: PhantomData<&'ast ()>,
span: FfiOption<SpanId>,
kind: LifetimeKind,
Expand Down
27 changes: 13 additions & 14 deletions marker_rustc_driver/src/conversion/marker/ast/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
) -> ExprKind<'ast> {
let body_id = closure.body;
let body = self.rustc_cx.hir().body(body_id);
match body.generator_kind {
Some(hir::GeneratorKind::Async(hir::AsyncGeneratorKind::Fn)) => {
match body.coroutine_kind {
Some(hir::CoroutineKind::Async(hir::CoroutineSource::Fn)) => {
if let hir::ExprKind::Block(block, None) = body.value.kind
&& let Some(temp_drop) = block.expr
&& let hir::ExprKind::DropTemps(inner_block) = temp_drop.kind
Expand All @@ -435,7 +435,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {

unreachable!("`async fn` body desugar always has the same structure")
},
Some(hir::GeneratorKind::Async(hir::AsyncGeneratorKind::Block)) => {
Some(hir::CoroutineKind::Async(hir::CoroutineSource::Block)) => {
let block_expr = body.value;
if let hir::ExprKind::Block(block, None) = block_expr.kind {
let api_block_expr = self.with_body(body_id, || {
Expand All @@ -451,9 +451,11 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
}
unreachable!("`async` block desugar always has the same structure")
},
Some(hir::GeneratorKind::Async(hir::AsyncGeneratorKind::Closure) | hir::GeneratorKind::Gen) => {
ExprKind::Unstable(self.alloc(UnstableExpr::new(data, ExprPrecedence::Closure)))
},
Some(
hir::CoroutineKind::Async(hir::CoroutineSource::Closure)
| hir::CoroutineKind::Coroutine
| hir::CoroutineKind::Gen(_),
) => ExprKind::Unstable(self.alloc(UnstableExpr::new(data, ExprPrecedence::Closure))),
None => ExprKind::Closure(self.alloc(self.to_closure_expr(data, closure))),
}
}
Expand Down Expand Up @@ -493,7 +495,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {

fn to_capture_kind(&self, capture: hir::CaptureBy) -> CaptureKind {
match capture {
rustc_ast::CaptureBy::Value => CaptureKind::Move,
rustc_ast::CaptureBy::Value { .. } => CaptureKind::Move,
rustc_ast::CaptureBy::Ref => CaptureKind::Default,
}
}
Expand Down Expand Up @@ -550,7 +552,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
CommonExprData::new(self.to_expr_id(local.hir_id), self.to_span_id(local.span)),
self.to_pat_with_hls(local.pat, &lhs_map),
self.to_expr(local.init.unwrap()),
None
None,
)
} else {
unreachable!("assignment expr desugar always has a local as the first statement")
Expand Down Expand Up @@ -641,14 +643,14 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
let body = self.to_expr(some_arm.body);
let data = CommonExprData::new(
self.to_expr_id(loop_expr.hir_id),
self.to_resugared_span_id(into_match.span)
self.to_resugared_span_id(into_match.span),
);
return ForExpr::new(
data,
label.map(|label| self.to_ident(label.ident)),
pat,
iter_expr,
body
body,
);
}

Expand Down Expand Up @@ -691,10 +693,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
&& let hir::ExprKind::Call(_into_future_path, [future_expr]) = &into_scrutinee.kind
{
return AwaitExpr::new(
CommonExprData::new(
self.to_expr_id(await_expr.hir_id),
self.to_span_id(await_expr.span),
),
CommonExprData::new(self.to_expr_id(await_expr.hir_id), self.to_span_id(await_expr.span)),
self.to_expr(future_expr),
);
}
Expand Down
8 changes: 4 additions & 4 deletions marker_rustc_driver/src/conversion/marker/ast/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
fn to_external_item(&self, rustc_item: &'tcx hir::ForeignItemRef, abi: Abi) -> ExternItemKind<'ast> {
let id = self.to_item_id(rustc_item.id.owner_id);
if let Some(item) = self.items.borrow().get(&id) {
#[expect(non_exhaustive_omitted_patterns)]
return match item {
ItemKind::Static(data) => ExternItemKind::Static(data, CtorBlocker::new()),
ItemKind::Fn(data) => ExternItemKind::Fn(data, CtorBlocker::new()),
#[expect(non_exhaustive_omitted_patterns)]
_ => unreachable!("only static and `Static` and `Fn` items can be found a foreign item id"),
};
}
Expand Down Expand Up @@ -362,11 +362,11 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
fn to_assoc_item(&self, rustc_item: &hir::TraitItemRef) -> AssocItemKind<'ast> {
let id = self.to_item_id(rustc_item.id.owner_id);
if let Some(item) = self.items.borrow().get(&id) {
#[expect(non_exhaustive_omitted_patterns)]
return match item {
ItemKind::TyAlias(item) => AssocItemKind::TyAlias(item, CtorBlocker::new()),
ItemKind::Const(item) => AssocItemKind::Const(item, CtorBlocker::new()),
ItemKind::Fn(item) => AssocItemKind::Fn(item, CtorBlocker::new()),
#[expect(non_exhaustive_omitted_patterns)]
_ => unreachable!("only static and `TyAlias`, `Const` and `Fn` items can be found as an assoc item"),
};
}
Expand Down Expand Up @@ -420,11 +420,11 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
fn to_assoc_item_from_impl(&self, rustc_item: &hir::ImplItemRef) -> AssocItemKind<'ast> {
let id = self.to_item_id(rustc_item.id.owner_id);
if let Some(item) = self.items.borrow().get(&id) {
#[expect(non_exhaustive_omitted_patterns)]
return match item {
ItemKind::TyAlias(item) => AssocItemKind::TyAlias(item, CtorBlocker::new()),
ItemKind::Const(item) => AssocItemKind::Const(item, CtorBlocker::new()),
ItemKind::Fn(item) => AssocItemKind::Fn(item, CtorBlocker::new()),
#[expect(non_exhaustive_omitted_patterns)]
_ => unreachable!("only static and `TyAlias`, `Const` and `Fn` items can be found by an impl ref item"),
};
}
Expand Down Expand Up @@ -481,7 +481,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
}

// Yield expressions are currently unstable
if let Some(hir::GeneratorKind::Gen) = body.generator_kind {
if let Some(hir::CoroutineKind::Coroutine) = body.coroutine_kind {
return self.alloc(Body::new(
self.to_item_id(self.rustc_cx.hir().body_owner_def_id(body.id())),
ast::ExprKind::Unstable(self.alloc(ast::UnstableExpr::new(
Expand Down
2 changes: 1 addition & 1 deletion marker_rustc_driver/src/conversion/marker/sem/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl<'ast, 'tcx> MarkerConverterInner<'ast, 'tcx> {
self.to_ty_def_id(*id),
self.to_sem_generic_args(generics),
))),
mid::ty::TyKind::Generator(_, _, _) | mid::ty::TyKind::GeneratorWitness(_, _) => {
mid::ty::TyKind::Coroutine(_, _, _) | mid::ty::TyKind::CoroutineWitness(_, _) => {
TyKind::Unstable(self.alloc(UnstableTy::new()))
},
mid::ty::TyKind::Never => TyKind::Never(self.alloc(NeverTy::new())),
Expand Down
2 changes: 1 addition & 1 deletion marker_rustc_driver/src/conversion/rustc/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl<'ast, 'tcx> RustcConverter<'ast, 'tcx> {
edition_lint_opts: None,
report_in_external_macro,
future_incompatible: None,
is_plugin: true,
is_loaded: true,
feature_gate: None,
crate_level_only: false,
}))
Expand Down
2 changes: 1 addition & 1 deletion marker_rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use marker_error::Context;
use crate::conversion::rustc::RustcConverter;

// region replace rust toolchain dev
const RUSTC_TOOLCHAIN_VERSION: &str = "nightly-2023-10-05";
const RUSTC_TOOLCHAIN_VERSION: &str = "nightly-2023-11-16";
// endregion replace rust toolchain dev

struct DefaultCallbacks {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[toolchain]
# region replace rust toolchain dev
channel = "nightly-2023-10-05"
channel = "nightly-2023-11-16"
# endregion replace rust toolchain dev
components = [
"cargo",
Expand Down
Loading