Skip to content

Commit e3656ff

Browse files
authored
Rollup merge of rust-lang#112298 - est31:update_field_offset, r=Mark-Simulacrum
Update field-offset and enable unstable_offset_of This makes the compiler use the builtin `offset_of!()` macro, through the wrappers in memoffset and then in field-offset. cc rust-lang#111839
2 parents 04e41dd + b048396 commit e3656ff

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

Diff for: Cargo.lock

+14-5
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ dependencies = [
848848
"autocfg",
849849
"cfg-if",
850850
"crossbeam-utils",
851-
"memoffset",
851+
"memoffset 0.8.0",
852852
"scopeguard",
853853
]
854854

@@ -1193,11 +1193,11 @@ dependencies = [
11931193

11941194
[[package]]
11951195
name = "field-offset"
1196-
version = "0.3.5"
1196+
version = "0.3.6"
11971197
source = "registry+https://github.com/rust-lang/crates.io-index"
1198-
checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535"
1198+
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
11991199
dependencies = [
1200-
"memoffset",
1200+
"memoffset 0.9.0",
12011201
"rustc_version",
12021202
]
12031203

@@ -2145,6 +2145,15 @@ dependencies = [
21452145
"autocfg",
21462146
]
21472147

2148+
[[package]]
2149+
name = "memoffset"
2150+
version = "0.9.0"
2151+
source = "registry+https://github.com/rust-lang/crates.io-index"
2152+
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
2153+
dependencies = [
2154+
"autocfg",
2155+
]
2156+
21482157
[[package]]
21492158
name = "mime"
21502159
version = "0.3.16"
@@ -3976,7 +3985,7 @@ version = "0.0.0"
39763985
dependencies = [
39773986
"field-offset",
39783987
"measureme",
3979-
"memoffset",
3988+
"memoffset 0.9.0",
39803989
"rustc-rayon-core",
39813990
"rustc_ast",
39823991
"rustc_data_structures",

Diff for: compiler/rustc_query_impl/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ edition = "2021"
77

88

99
[dependencies]
10-
memoffset = { version = "0.8.0", features = ["unstable_const"] }
1110
field-offset = "0.3.5"
1211
measureme = "10.0.0"
1312
rustc_ast = { path = "../rustc_ast" }
@@ -25,5 +24,8 @@ rustc_span = { path = "../rustc_span" }
2524
thin-vec = "0.2.12"
2625
tracing = "0.1"
2726

27+
# Not used directly, but included to enable the unstable_offset_of feature
28+
memoffset = { version = "0.9.0", features = ["unstable_offset_of"] }
29+
2830
[features]
2931
rustc_use_parallel_compiler = ["rustc-rayon-core", "rustc_query_system/rustc_use_parallel_compiler"]

0 commit comments

Comments
 (0)