Skip to content

Commit d1bcc3b

Browse files
Toolchain upgrade to nightly-2025-10-09 (#1271)
1 parent e01e0cd commit d1bcc3b

File tree

9 files changed

+20
-45
lines changed

9 files changed

+20
-45
lines changed

crates/flux-infer/src/projections.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl<'a, 'infcx, 'genv, 'tcx> Normalizer<'a, 'infcx, 'genv, 'tcx> {
223223
let assoc_type_id = tcx
224224
.associated_items(impl_def_id)
225225
.in_definition_order()
226-
.find(|item| item.trait_item_def_id == Some(obligation.def_id))
226+
.find(|item| item.trait_item_def_id() == Some(obligation.def_id))
227227
.map(|item| item.def_id)
228228
.ok_or_else(|| {
229229
query_bug!("no associated type for {obligation:?} in impl {impl_def_id:?}")
@@ -368,7 +368,7 @@ impl<'a, 'infcx, 'genv, 'tcx> Normalizer<'a, 'infcx, 'genv, 'tcx> {
368368
candidates: &mut Vec<Candidate>,
369369
) -> QueryResult {
370370
let trait_ref = obligation.to_rustc(self.tcx()).trait_ref(self.tcx());
371-
let trait_ref = self.tcx().erase_regions(trait_ref);
371+
let trait_ref = self.tcx().erase_and_anonymize_regions(trait_ref);
372372
let trait_pred = Obligation::new(
373373
self.tcx(),
374374
ObligationCause::dummy(),
@@ -727,7 +727,7 @@ fn normalize_projection_ty_with_rustc<'tcx>(
727727
) -> QueryResult<(bool, SubsetTyCtor)> {
728728
let tcx = genv.tcx();
729729
let projection_ty = obligation.to_rustc(tcx);
730-
let projection_ty = tcx.erase_regions(projection_ty);
730+
let projection_ty = tcx.erase_and_anonymize_regions(projection_ty);
731731
let cause = ObligationCause::dummy();
732732
let param_env = tcx.param_env(def_id);
733733

@@ -813,7 +813,7 @@ fn get_impl_data_for_alias_reft<'tcx>(
813813
let tcx = infcx.tcx;
814814
let mut selcx = SelectionContext::new(infcx);
815815
let trait_ref = alias_reft.to_rustc_trait_ref(tcx);
816-
let trait_ref = tcx.erase_regions(trait_ref);
816+
let trait_ref = tcx.erase_and_anonymize_regions(trait_ref);
817817
let trait_pred =
818818
Obligation::new(tcx, ObligationCause::dummy(), tcx.param_env(def_id), trait_ref);
819819
match selcx.select(&trait_pred) {

crates/flux-middle/src/rty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,7 @@ impl<'tcx> ToRustc<'tcx> for BaseTy {
20062006
.map(|pred| pred.to_rustc(tcx))
20072007
.collect_vec();
20082008
let preds = tcx.mk_poly_existential_predicates(&preds);
2009-
ty::Ty::new_dynamic(tcx, preds, re.to_rustc(tcx), rustc_middle::ty::DynKind::Dyn)
2009+
ty::Ty::new_dynamic(tcx, preds, re.to_rustc(tcx))
20102010
}
20112011
BaseTy::Coroutine(def_id, resume_ty, upvars) => {
20122012
bug!("TODO: Generator {def_id:?} {resume_ty:?} {upvars:?}")

crates/flux-refineck/src/checker.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ fn find_trait_item(
400400
&& let Some(impl_trait_ref) = genv.impl_trait_ref(impl_id)?
401401
{
402402
let impl_trait_ref = impl_trait_ref.instantiate_identity();
403-
let trait_item_id = tcx.associated_item(def_id).trait_item_def_id.unwrap();
403+
let trait_item_id = tcx.associated_item(def_id).trait_item_def_id().unwrap();
404404
return Ok(Some((impl_trait_ref, trait_item_id)));
405405
}
406406
Ok(None)
@@ -1266,7 +1266,6 @@ impl<'ck, 'genv, 'tcx, M: Mode> Checker<'ck, 'genv, 'tcx, M> {
12661266
.with_span(stmt_span)
12671267
}
12681268
Rvalue::NullaryOp(null_op, ty) => Ok(self.check_nullary_op(*null_op, ty)),
1269-
Rvalue::Len(place) => self.check_len(infcx, env, stmt_span, place),
12701269
Rvalue::UnaryOp(UnOp::PtrMetadata, Operand::Copy(place))
12711270
| Rvalue::UnaryOp(UnOp::PtrMetadata, Operand::Move(place)) => {
12721271
self.check_raw_ptr_metadata(infcx, env, stmt_span, place)
@@ -1366,26 +1365,6 @@ impl<'ck, 'genv, 'tcx, M: Mode> Checker<'ck, 'genv, 'tcx, M> {
13661365
}
13671366
}
13681367

1369-
fn check_len(
1370-
&mut self,
1371-
infcx: &mut InferCtxt,
1372-
env: &mut TypeEnv,
1373-
stmt_span: Span,
1374-
place: &Place,
1375-
) -> Result<Ty> {
1376-
let ty = env
1377-
.lookup_place(&mut infcx.at(stmt_span), place)
1378-
.with_span(stmt_span)?;
1379-
1380-
let idx = match ty.kind() {
1381-
TyKind::Indexed(BaseTy::Array(_, len), _) => Expr::from_const(self.genv.tcx(), len),
1382-
TyKind::Indexed(BaseTy::Slice(_), idx) => idx.clone(),
1383-
_ => tracked_span_bug!("check_len: expected array or slice type found `{ty:?}`"),
1384-
};
1385-
1386-
Ok(Ty::indexed(BaseTy::Uint(UintTy::Usize), idx))
1387-
}
1388-
13891368
fn check_binary_op(
13901369
&mut self,
13911370
infcx: &mut InferCtxt,

crates/flux-refineck/src/ghost_statements/fold_unfold.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,6 @@ impl<M: Mode> FoldUnfoldAnalysis<'_, '_, '_, M> {
298298
}
299299
StatementKind::Assign(place, rvalue) => {
300300
match rvalue {
301-
Rvalue::Len(place) => {
302-
M::projection(self, env, place)?;
303-
}
304301
Rvalue::UnaryOp(UnOp::PtrMetadata, Operand::Copy(place))
305302
| Rvalue::UnaryOp(UnOp::PtrMetadata, Operand::Move(place)) => {
306303
let deref_place = place.deref();

crates/flux-rustc-bridge/src/lowering.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn trait_ref_impl_id<'tcx>(
9292
param_env: ParamEnv<'tcx>,
9393
trait_ref: rustc_ty::TraitRef<'tcx>,
9494
) -> Option<(DefId, rustc_middle::ty::GenericArgsRef<'tcx>)> {
95-
let trait_ref = tcx.erase_regions(trait_ref);
95+
let trait_ref = tcx.erase_and_anonymize_regions(trait_ref);
9696
let obligation = Obligation::new(tcx, ObligationCause::dummy(), param_env, trait_ref);
9797
let impl_source = selcx.select(&obligation).ok()??;
9898
let impl_source = selcx.infcx.resolve_vars_if_possible(impl_source);
@@ -455,7 +455,6 @@ impl<'sess, 'tcx> MirLoweringCtxt<'_, 'sess, 'tcx> {
455455
rustc_mir::Rvalue::RawPtr(kind, place) => {
456456
Ok(Rvalue::RawPtr(*kind, lower_place(self.tcx, place)?))
457457
}
458-
rustc_mir::Rvalue::Len(place) => Ok(Rvalue::Len(lower_place(self.tcx, place)?)),
459458
rustc_mir::Rvalue::Cast(kind, op, ty) => {
460459
let kind = self.lower_cast_kind(*kind).ok_or_else(|| {
461460
UnsupportedReason::new(format!("unsupported cast `{kind:?}`"))
@@ -897,7 +896,7 @@ impl<'tcx> Lower<'tcx> for rustc_ty::Ty<'tcx> {
897896
let args = args.lower(tcx)?;
898897
Ok(Ty::mk_generator_witness(*did, args))
899898
}
900-
rustc_ty::Dynamic(predicates, region, rustc_ty::DynKind::Dyn) => {
899+
rustc_ty::Dynamic(predicates, region) => {
901900
let region = region.lower(tcx)?;
902901

903902
let exi_preds = List::from_vec(
@@ -1020,19 +1019,22 @@ impl<'tcx> Lower<'tcx> for rustc_middle::ty::Region<'tcx> {
10201019
type R = Result<Region, UnsupportedReason>;
10211020

10221021
fn lower(self, _tcx: TyCtxt<'tcx>) -> Self::R {
1023-
use rustc_middle::ty::RegionKind;
1022+
use rustc_middle::ty;
10241023
match self.kind() {
1025-
RegionKind::ReVar(rvid) => Ok(Region::ReVar(rvid)),
1026-
RegionKind::ReBound(debruijn, bregion) => {
1024+
ty::ReVar(rvid) => Ok(Region::ReVar(rvid)),
1025+
ty::ReBound(ty::BoundVarIndexKind::Bound(debruijn), bregion) => {
10271026
Ok(Region::ReBound(
10281027
debruijn,
10291028
Ok(BoundRegion { kind: bregion.kind, var: bregion.var })?,
10301029
))
10311030
}
1032-
RegionKind::ReEarlyParam(bregion) => Ok(Region::ReEarlyParam(bregion)),
1033-
RegionKind::ReStatic => Ok(Region::ReStatic),
1034-
RegionKind::ReErased => Ok(Region::ReErased),
1035-
RegionKind::ReLateParam(_) | RegionKind::RePlaceholder(_) | RegionKind::ReError(_) => {
1031+
ty::ReEarlyParam(bregion) => Ok(Region::ReEarlyParam(bregion)),
1032+
ty::ReStatic => Ok(Region::ReStatic),
1033+
ty::ReErased => Ok(Region::ReErased),
1034+
ty::ReBound(ty::BoundVarIndexKind::Canonical, _)
1035+
| ty::ReLateParam(_)
1036+
| ty::RePlaceholder(_)
1037+
| ty::ReError(_) => {
10361038
Err(UnsupportedReason::new(format!("unsupported region `{self:?}`")))
10371039
}
10381040
}

crates/flux-rustc-bridge/src/mir.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ pub enum Rvalue {
207207
Repeat(Operand, Const),
208208
Ref(Region, BorrowKind, Place),
209209
RawPtr(RawPtrKind, Place),
210-
Len(Place),
211210
Cast(CastKind, Operand, Ty),
212211
BinaryOp(BinOp, Operand, Operand),
213212
NullaryOp(NullOp, Ty),
@@ -721,7 +720,6 @@ impl fmt::Debug for Rvalue {
721720
Rvalue::Aggregate(AggregateKind::Tuple, args) => {
722721
write!(f, "({:?})", args.iter().format(", "))
723722
}
724-
Rvalue::Len(place) => write!(f, "Len({place:?})"),
725723
Rvalue::Cast(kind, op, ty) => write!(f, "{op:?} as {ty:?} [{kind:?}]"),
726724
Rvalue::Repeat(op, c) => write!(f, "[{op:?}; {c:?}]"),
727725
Rvalue::ShallowInitBox(op, ty) => write!(f, "ShallowInitBox({op:?}, {ty:?})"),

crates/flux-rustc-bridge/src/ty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ impl<'tcx> ToRustc<'tcx> for Ty {
963963
.collect_vec();
964964

965965
let preds = tcx.mk_poly_existential_predicates(&preds);
966-
rustc_ty::Ty::new_dynamic(tcx, preds, re.to_rustc(tcx), rustc_ty::DynKind::Dyn)
966+
rustc_ty::Ty::new_dynamic(tcx, preds, re.to_rustc(tcx))
967967
}
968968
TyKind::Coroutine(_, _) | TyKind::CoroutineWitness(_, _) => {
969969
bug!("TODO: to_rustc for `{self:?}`")

crates/flux-syntax/src/symbols.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ symbols! {
2323
Symbols {
2424
Map,
2525
Set,
26-
hide,
2726
int,
2827
real,
2928
}

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-2025-09-09"
2+
channel = "nightly-2025-10-09"
33
components = ["rust-src", "rustc-dev", "llvm-tools", "rustfmt", "clippy"]

0 commit comments

Comments
 (0)