-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19b6023
commit d7ce8c7
Showing
5 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// In future, it might make sense to move these specs to yet another crate or have a feature to disable the std parts of this crate. | ||
// alloc is usable in some no_std environments, so it would be helpful to support the use case of core + alloc without std. | ||
// These specs can't be built-in like the core specs since some no_std crates may not even have an allocator. | ||
// Instead, prusti-std supports no_std through a feature. | ||
|
||
pub mod string; | ||
pub mod vec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
#![feature(allocator_api)] // to specify Vec | ||
#![no_std] // disable std by default | ||
|
||
// link to std if the feature is set | ||
#[cfg(feature = "std")] | ||
extern crate std; | ||
|
||
// Even alloc can be disabled for consistency with std, and in preparation for future specs for other, possibly no_std, crates. | ||
#[cfg(feature = "alloc")] | ||
extern crate alloc; | ||
|
||
// modules have a `_spec` suffix to avoid name conflicts with their crates. | ||
#[cfg(feature = "alloc")] | ||
pub mod alloc_spec; | ||
pub mod collections; | ||
#[cfg(feature = "std")] | ||
pub mod std_spec; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod collections; |