Skip to content

Commit 38d490c

Browse files
authored
Add safety dependency to alloc and std crates (rust-lang#121)
Just as previously done for core: this will enable future use of `safety::{ensures,requires}` in those crates.
1 parent 0a8ba7b commit 38d490c

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

Diff for: library/alloc/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ edition = "2021"
1111
[dependencies]
1212
core = { path = "../core" }
1313
compiler_builtins = { version = "0.1.123", features = ['rustc-dep-of-std'] }
14+
safety = { path = "../contracts/safety" }
1415

1516
[dev-dependencies]
1617
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }

Diff for: library/alloc/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
//
9292
// Library features:
9393
// tidy-alphabetical-start
94+
#![cfg_attr(kani, feature(kani))]
9495
#![cfg_attr(not(no_global_oom_handling), feature(const_alloc_error))]
9596
#![cfg_attr(not(no_global_oom_handling), feature(const_btree_len))]
9697
#![feature(alloc_layout_extra)]

Diff for: library/std/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ hashbrown = { version = "0.14", default-features = false, features = [
2626
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = [
2727
'rustc-dep-of-std',
2828
] }
29+
safety = { path = "../contracts/safety" }
2930

3031
# Dependencies of the `backtrace` crate
3132
rustc-demangle = { version = "0.1.24", features = ['rustc-dep-of-std'] }

Diff for: library/std/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@
269269
#![cfg_attr(any(windows, target_os = "uefi"), feature(round_char_boundary))]
270270
#![cfg_attr(target_family = "wasm", feature(stdarch_wasm_atomic_wait))]
271271
#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
272+
#![cfg_attr(kani, feature(kani))]
272273
//
273274
// Language features:
274275
// tidy-alphabetical-start

0 commit comments

Comments
 (0)