Skip to content

Commit 66b212e

Browse files
diliopfacebook-github-bot
authored andcommitted
replace anymap with anymap3
Summary: [#136764](rust-lang/rust#136764) breaks the [`anymap`](https://github.com/chris-morgan/anymap) crate via: ``` error[E0804]: cannot add auto traits `Send` and `Sync` to dyn bound via pointer cast --> third-party/rust/vendor/anymap-1.0.0-beta.2/src/any.rs:37:40 | 19 | / macro_rules! impl_clone { 20 | | ($t:ty) => { 21 | | impl Clone for Box<$t> { 22 | | #[inline] ... | 37 | | unsafe { Box::from_raw(raw as *mut $t) } | | ^^^^^^^^^^^^^^ unsupported cast ... | 48 | | } | |_- in this expansion of `impl_clone!` ... 145 | impl_clone!(dyn CloneAny + Send + Sync); | --------------------------------------- in this macro invocation | = note: this could allow UB elsewhere = help: use `transmute` if you're sure this is sound ``` Since `anymap` is not maintained any more, switching everyone to a fork that is i.e. [`anymap3`](https://github.com/reivilibre/anymap3) which also solves the above using the suggested `transmute`. Reviewed By: jsgf Differential Revision: D75098213 fbshipit-source-id: dace0feaca2960508c57d02d229c4a32747ba588
1 parent 620096f commit 66b212e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ repository = "https://github.com/facebook/buck2"
125125

126126
[workspace.dependencies]
127127
anyhow = "1.0.65"
128-
anymap = "1.0.0-beta.2"
128+
anymap3 = "1.0.1"
129129
arc-swap = "1.6.0"
130130
argfile = "0.1.0"
131131
assert_matches = "1.5"

dice/dice/BUCK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rust_library(
1717
],
1818
deps = [
1919
"fbsource//third-party/rust:anyhow",
20-
"fbsource//third-party/rust:anymap",
20+
"fbsource//third-party/rust:anymap3",
2121
"fbsource//third-party/rust:async-trait",
2222
"fbsource//third-party/rust:dashmap",
2323
"fbsource//third-party/rust:derivative",

dice/dice/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version = "0.1.0"
88
[dependencies]
99
allocative = { workspace = true }
1010
anyhow = "1.0.65"
11-
anymap = "1.0.0-beta.2"
11+
anymap3 = "1.0.1"
1212
async-trait = "0.1.24"
1313
buck2_futures = { path = "../../app/buck2_futures" }
1414
cmp_any = { workspace = true }

dice/dice/src/api/data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ use std::any::Any;
5353
use std::collections::BTreeSet;
5454

5555
use allocative::Allocative;
56-
use anymap::Map;
56+
use anymap3::Map;
5757
use itertools::Itertools;
5858
use thiserror::Error;
5959

shim/third-party/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ path = "top/main.rs"
2828
[dependencies]
2929
annotate-snippets = { version = "0.9.0", features = ["color"] }
3030
anyhow = "1.0.65"
31-
anymap = "1.0.0-beta.2"
31+
anymap3 = "1.0.1"
3232
arc-swap = "1.6.0"
3333
argfile = "0.1.0"
3434
assert_matches = "1.5"

0 commit comments

Comments
 (0)