Skip to content

Commit b048396

Browse files
committed
Update field-offset and enable unstable_offset_of
This enables usage of the offset_of!() macro in the compiler, through the wrappers in memoffset and then in field-offset.
1 parent 8ebf042 commit b048396

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

Cargo.lock

+14-5
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ dependencies = [
849849
"autocfg",
850850
"cfg-if",
851851
"crossbeam-utils",
852-
"memoffset",
852+
"memoffset 0.8.0",
853853
"scopeguard",
854854
]
855855

@@ -1204,11 +1204,11 @@ dependencies = [
12041204

12051205
[[package]]
12061206
name = "field-offset"
1207-
version = "0.3.5"
1207+
version = "0.3.6"
12081208
source = "registry+https://github.com/rust-lang/crates.io-index"
1209-
checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535"
1209+
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
12101210
dependencies = [
1211-
"memoffset",
1211+
"memoffset 0.9.0",
12121212
"rustc_version",
12131213
]
12141214

@@ -2157,6 +2157,15 @@ dependencies = [
21572157
"autocfg",
21582158
]
21592159

2160+
[[package]]
2161+
name = "memoffset"
2162+
version = "0.9.0"
2163+
source = "registry+https://github.com/rust-lang/crates.io-index"
2164+
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
2165+
dependencies = [
2166+
"autocfg",
2167+
]
2168+
21602169
[[package]]
21612170
name = "mime"
21622171
version = "0.3.16"
@@ -3988,7 +3997,7 @@ version = "0.0.0"
39883997
dependencies = [
39893998
"field-offset",
39903999
"measureme",
3991-
"memoffset",
4000+
"memoffset 0.9.0",
39924001
"rustc-rayon-core",
39934002
"rustc_ast",
39944003
"rustc_data_structures",

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)