Skip to content

Commit 59ea62e

Browse files
authored
Use modern syntax for optional dependencies (mmtk#1229)
Use the "dep:" prefix to specify optional dependencies in Cargo features. An optional crate dependency implicitly generates a feature of the same name, and can be leaked to the user of the current crate. But if a feature specifies a crate dependency with the "dep:" prefix, it will not implicitly generate the feature, hiding it from the users. The "dep:" prefix was introduced in Rust 1.60.
1 parent 3575521 commit 59ea62e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ builtin_env_logger = ["dep:env_logger"]
7575

7676
# This feature is only supported on x86-64 for now
7777
# It's manually added to CI scripts
78-
perf_counter = ["pfm"]
78+
perf_counter = ["dep:pfm"]
7979

8080
# This feature is only used for tests with MockVM.
8181
# CI scripts run those tests with this feature.
@@ -184,8 +184,8 @@ bpftrace_workaround = []
184184
# Group:malloc
185185
# only one of the following features should be enabled, or none to use the default malloc from libc
186186
# this does not replace the global Rust allocator, but provides these libraries for GC implementation
187-
malloc_mimalloc = ["mimalloc-sys"]
188-
malloc_jemalloc = ["jemalloc-sys"]
187+
malloc_mimalloc = ["dep:mimalloc-sys"]
188+
malloc_jemalloc = ["dep:jemalloc-sys"]
189189

190190
# Use the native mimalloc allocator for malloc. This is not tested by me (Yi) yet, and it is only used to make sure that some code
191191
# is not compiled in default builds.

0 commit comments

Comments
 (0)