Skip to content

Commit c49ec58

Browse files
committed
Update rustc again
1 parent ec0d627 commit c49ec58

File tree

8 files changed

+28
-19
lines changed

8 files changed

+28
-19
lines changed

engine/lib/import_thir.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,8 +1101,6 @@ end) : EXPR = struct
11011101
match non_traits with
11021102
| [] -> TDyn { witness = W.dyn; goals }
11031103
| _ -> assertion_failure [ span ] "type Dyn with non trait predicate")
1104-
| Dynamic (_, _, DynStar) ->
1105-
unimplemented ~issue_id:931 [ span ] "type DynStar"
11061104
| Coroutine _ ->
11071105
unimplemented ~issue_id:924 [ span ]
11081106
"Got type `Coroutine`: coroutines are not supported by hax"

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/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "hax-frontend-exporter"
3+
edition = "2024"
34
version.workspace = true
45
authors.workspace = true
56
license.workspace = true
67
homepage.workspace = true
7-
edition.workspace = true
88
repository.workspace = true
99
readme.workspace = true
1010
description = "Provides mirrors of the algebraic data types used in the Rust compilers, removing indirections and inlining various pieces of information."

frontend/exporter/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(rustdoc::private_intra_doc_links)]
22
#![cfg_attr(feature = "rustc", feature(if_let_guard))]
3-
#![cfg_attr(feature = "rustc", feature(let_chains))]
43
#![cfg_attr(feature = "rustc", feature(macro_metavar_expr))]
54
#![cfg_attr(feature = "rustc", feature(rustc_private))]
65
#![cfg_attr(feature = "rustc", feature(sized_hierarchy))]

frontend/exporter/src/types/def_id.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ use crate::{AdtInto, JsonSchema};
2121
use {rustc_hir as hir, rustc_hir::def_id::DefId as RDefId, rustc_middle::ty};
2222

2323
pub type Symbol = String;
24+
#[cfg(not(feature = "extract_names_mode"))]
25+
pub type ByteSymbol = Vec<u8>;
2426

2527
#[cfg(all(not(feature = "extract_names_mode"), feature = "rustc"))]
2628
impl<'t, S> SInto<S, Symbol> for rustc_span::symbol::Symbol {
@@ -29,6 +31,13 @@ impl<'t, S> SInto<S, Symbol> for rustc_span::symbol::Symbol {
2931
}
3032
}
3133

34+
#[cfg(all(not(feature = "extract_names_mode"), feature = "rustc"))]
35+
impl<'t, S> SInto<S, ByteSymbol> for rustc_span::symbol::ByteSymbol {
36+
fn sinto(&self, _s: &S) -> ByteSymbol {
37+
self.as_byte_str().to_owned()
38+
}
39+
}
40+
3241
/// Reflects [`hir::Safety`]
3342
#[cfg_attr(not(feature = "extract_names_mode"), derive(AdtInto, JsonSchema))]
3443
#[cfg_attr(not(feature = "extract_names_mode"), args(<S>, from: hir::Safety, state: S as _s))]

frontend/exporter/src/types/hir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,8 +1051,8 @@ pub enum StrStyle {
10511051
#[derive(Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)]
10521052
pub enum LitKind {
10531053
Str(Symbol, StrStyle),
1054-
ByteStr(Vec<u8>, StrStyle),
1055-
CStr(Vec<u8>, StrStyle),
1054+
ByteStr(ByteSymbol, StrStyle),
1055+
CStr(ByteSymbol, StrStyle),
10561056
Byte(u8),
10571057
Char(char),
10581058
Int(

frontend/exporter/src/types/ty.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,22 @@ pub struct ExistentialProjection {
9494
#[args(<S>, from: ty::DynKind, state: S as _s)]
9595
pub enum DynKind {
9696
Dyn,
97-
DynStar,
9897
}
9998

10099
/// Reflects [`ty::BoundTyKind`]
101100
#[derive_group(Serializers)]
102101
#[derive(AdtInto, Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)]
103-
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::BoundTyKind, state: S as gstate)]
102+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::BoundTyKind, state: S as s)]
104103
pub enum BoundTyKind {
105104
Anon,
105+
#[custom_arm(&FROM_TYPE::Param(def_id) => TO_TYPE::Param(def_id.sinto(s), s.base().tcx.item_name(def_id).sinto(s)),)]
106106
Param(DefId, Symbol),
107107
}
108108

109109
/// Reflects [`ty::BoundTy`]
110110
#[derive_group(Serializers)]
111111
#[derive(AdtInto, Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)]
112-
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::BoundTy, state: S as gstate)]
112+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::BoundTy, state: S as s)]
113113
pub struct BoundTy {
114114
pub var: BoundVar,
115115
pub kind: BoundTyKind,
@@ -120,17 +120,19 @@ sinto_as_usize!(rustc_middle::ty, BoundVar);
120120
/// Reflects [`ty::BoundRegionKind`]
121121
#[derive_group(Serializers)]
122122
#[derive(AdtInto, Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)]
123-
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::BoundRegionKind, state: S as gstate)]
123+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::BoundRegionKind, state: S as s)]
124124
pub enum BoundRegionKind {
125125
Anon,
126+
NamedAnon(Symbol),
127+
#[custom_arm(&FROM_TYPE::Named(def_id) => TO_TYPE::Named(def_id.sinto(s), s.base().tcx.item_name(def_id).sinto(s)),)]
126128
Named(DefId, Symbol),
127129
ClosureEnv,
128130
}
129131

130132
/// Reflects [`ty::BoundRegion`]
131133
#[derive_group(Serializers)]
132134
#[derive(AdtInto, Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)]
133-
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::BoundRegion, state: S as gstate)]
135+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::BoundRegion, state: S as s)]
134136
pub struct BoundRegion {
135137
pub var: BoundVar,
136138
pub kind: BoundRegionKind,
@@ -370,7 +372,7 @@ impl VariantDef {
370372
/// Reflects [`ty::EarlyParamRegion`]
371373
#[derive_group(Serializers)]
372374
#[derive(AdtInto, Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)]
373-
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::EarlyParamRegion, state: S as gstate)]
375+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::EarlyParamRegion, state: S as s)]
374376
pub struct EarlyParamRegion {
375377
pub index: u32,
376378
pub name: Symbol,
@@ -379,7 +381,7 @@ pub struct EarlyParamRegion {
379381
/// Reflects [`ty::LateParamRegion`]
380382
#[derive_group(Serializers)]
381383
#[derive(AdtInto, Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)]
382-
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::LateParamRegion, state: S as gstate)]
384+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::LateParamRegion, state: S as s)]
383385
pub struct LateParamRegion {
384386
pub scope: DefId,
385387
pub kind: LateParamRegionKind,
@@ -388,9 +390,11 @@ pub struct LateParamRegion {
388390
/// Reflects [`ty::LateParamRegionKind`]
389391
#[derive_group(Serializers)]
390392
#[derive(AdtInto, Clone, Debug, JsonSchema, Hash, PartialEq, Eq, PartialOrd, Ord)]
391-
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::LateParamRegionKind, state: S as gstate)]
393+
#[args(<'tcx, S: UnderOwnerState<'tcx>>, from: ty::LateParamRegionKind, state: S as s)]
392394
pub enum LateParamRegionKind {
393395
Anon(u32),
396+
NamedAnon(u32, Symbol),
397+
#[custom_arm(&FROM_TYPE::Named(def_id) => TO_TYPE::Named(def_id.sinto(s), s.base().tcx.item_name(def_id).sinto(s)),)]
394398
Named(DefId, Symbol),
395399
ClosureEnv,
396400
}
@@ -1078,7 +1082,6 @@ pub enum PointerCoercion {
10781082
ClosureFnPointer(Safety),
10791083
MutToConstPointer,
10801084
ArrayToPointer,
1081-
DynStar,
10821085
Unsize,
10831086
}
10841087

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-06-30"
2+
channel = "nightly-2025-07-08"
33
components = [ "rustc-dev", "llvm-tools-preview" , "rust-analysis" , "rust-src" , "rustfmt" ]

0 commit comments

Comments
 (0)