Skip to content

Commit 208fbd6

Browse files
authored
Merge pull request #838 from Nadrieril/update-rustc
Bump rustc version
2 parents bea9074 + 25223de commit 208fbd6

File tree

7 files changed

+37
-12
lines changed

7 files changed

+37
-12
lines changed

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/exporter/src/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ pub mod rustc {
454454
use rustc_infer::infer::TyCtxtInferExt;
455455
use rustc_middle::traits::CodegenObligationError;
456456
use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt};
457-
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt;
457+
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
458458
use rustc_trait_selection::traits::{
459459
Obligation, ObligationCause, ObligationCtxt, ScrubbedTraitError, SelectionContext,
460460
Unimplemented,

frontend/exporter/src/types/copied.rs

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,7 @@ pub struct GenericParamDef {
16861686
match self.kind {
16871687
ty::GenericParamDefKind::Lifetime => GenericParamDefKind::Lifetime,
16881688
ty::GenericParamDefKind::Type { has_default, synthetic } => GenericParamDefKind::Type { has_default, synthetic },
1689-
ty::GenericParamDefKind::Const { has_default, is_host_effect } => {
1689+
ty::GenericParamDefKind::Const { has_default, is_host_effect, .. } => {
16901690
let ty = s.base().tcx.type_of(self.def_id).instantiate_identity().sinto(s);
16911691
GenericParamDefKind::Const { has_default, is_host_effect, ty }
16921692
},
@@ -2371,7 +2371,8 @@ pub struct AttrItem {
23712371
#[cfg(feature = "rustc")]
23722372
impl<S> SInto<S, String> for rustc_ast::tokenstream::LazyAttrTokenStream {
23732373
fn sinto(&self, st: &S) -> String {
2374-
self.to_attr_token_stream().to_tokenstream().sinto(st)
2374+
rustc_ast::tokenstream::TokenStream::new(self.to_attr_token_stream().to_token_trees())
2375+
.sinto(st)
23752376
}
23762377
}
23772378

@@ -2982,6 +2983,25 @@ pub struct AnonConst<Body: IsBody> {
29822983
pub body: Body,
29832984
}
29842985

2986+
/// Reflects [`rustc_hir::ConstArg`]
2987+
#[derive_group(Serializers)]
2988+
#[derive(AdtInto, Clone, Debug, JsonSchema)]
2989+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: rustc_hir::ConstArg<'tcx>, state: S as s)]
2990+
pub struct ConstArg<Body: IsBody> {
2991+
pub hir_id: HirId,
2992+
pub kind: ConstArgKind<Body>,
2993+
pub is_desugared_from_effects: bool,
2994+
}
2995+
2996+
/// Reflects [`rustc_hir::ConstArgKind`]
2997+
#[derive_group(Serializers)]
2998+
#[derive(AdtInto, Clone, Debug, JsonSchema)]
2999+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: rustc_hir::ConstArgKind<'tcx>, state: S as s)]
3000+
pub enum ConstArgKind<Body: IsBody> {
3001+
Path(QPath),
3002+
Anon(AnonConst<Body>),
3003+
}
3004+
29853005
/// Reflects [`rustc_hir::GenericParamKind`]
29863006
#[derive_group(Serializers)]
29873007
#[derive(AdtInto, Clone, Debug, JsonSchema)]
@@ -2997,7 +3017,7 @@ pub enum GenericParamKind<Body: IsBody> {
29973017
},
29983018
Const {
29993019
ty: Ty,
3000-
default: Option<AnonConst<Body>>,
3020+
default: Option<ConstArg<Body>>,
30013021
},
30023022
}
30033023

@@ -3125,7 +3145,7 @@ pub struct Impl<Body: IsBody> {
31253145
let (tcx, owner_id) = (s.base().tcx, s.owner_id());
31263146
let trait_did = tcx.trait_id_of_impl(owner_id);
31273147
if let Some(trait_did) = trait_did {
3128-
tcx.super_predicates_of(trait_did)
3148+
tcx.explicit_super_predicates_of(trait_did)
31293149
.predicates
31303150
.iter()
31313151
.copied()

frontend/exporter/src/types/mir.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ pub struct MirBody<KIND> {
153153
pub spread_arg: Option<Local>,
154154
pub var_debug_info: Vec<VarDebugInfo>,
155155
pub span: Span,
156-
pub required_consts: Vec<Constant>,
157156
pub is_polymorphic: bool,
158157
pub injection_phase: Option<MirPhase>,
159158
pub tainted_by_errors: Option<ErrorGuaranteed>,
@@ -570,6 +569,11 @@ pub enum TerminatorKind {
570569
trait_refs: Vec<ImplExpr>,
571570
trait_info: Option<ImplExpr>,
572571
},
572+
TailCall {
573+
func: Operand,
574+
args: Vec<Spanned<Operand>>,
575+
fn_span: Span,
576+
},
573577
Assert {
574578
cond: Operand,
575579
expected: bool,

frontend/exporter/src/types/todo.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ sinto_todo!(rustc_hir, GenericArgs<'a> as HirGenericArgs);
1515
sinto_todo!(rustc_hir, InlineAsm<'a>);
1616
sinto_todo!(rustc_target::spec::abi, Abi);
1717
sinto_todo!(rustc_hir, MissingLifetimeKind);
18+
sinto_todo!(rustc_hir, QPath<'tcx>);
1819
sinto_todo!(rustc_hir, WhereRegionPredicate<'tcx>);
1920
sinto_todo!(rustc_hir, WhereEqPredicate<'tcx>);
2021
sinto_todo!(rustc_hir, OwnerId);

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2024-06-25"
2+
channel = "nightly-2024-08-11"
33
components = [ "rustc-dev", "llvm-tools-preview" , "rust-analysis" , "rust-src" , "rustfmt" ]

test-harness/src/snapshots/toolchain__traits into-fstar.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,11 @@ let impl (#v_TypeArg: Type0) (v_ConstArg: usize) : t_Trait Prims.unit v_TypeArg
329329
}
330330

331331
class t_SubTrait (v_Self: Type0) (v_TypeArg: Type0) (v_ConstArg: usize) = {
332-
[@@@ FStar.Tactics.Typeclasses.no_method]_super_9139092951006237722:t_Trait v_Self
332+
[@@@ FStar.Tactics.Typeclasses.no_method]_super_2645671271498264788:t_Trait v_Self
333333
v_TypeArg
334334
v_ConstArg;
335335
f_AssocType:Type0;
336-
f_AssocType_11599353381930848827:t_Trait f_AssocType v_TypeArg v_ConstArg
336+
f_AssocType_1171953828677564027:t_Trait f_AssocType v_TypeArg v_ConstArg
337337
}
338338

339339
let associated_function_caller

0 commit comments

Comments
 (0)