Skip to content

Commit

Permalink
global_allocator_cfg_not_test
Browse files Browse the repository at this point in the history
Apparently this works now. Closes #67
  • Loading branch information
Orycterope committed Mar 13, 2019
1 parent 1fd45da commit 03c7d91
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions libuser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,9 @@ pub use kfs_libutils::io;

use kfs_libutils as utils;

// TODO: report #[cfg(not(test))] and #[global_allocator]
// BODY: `#[cfg(not(test))]` still compiles this item with cargo test,
// BODY: but `#[cfg(target_os = "none")] does not. I think this is a bug,
// BODY: we should report it.
/// Global allocator. Every implicit allocation in the rust liballoc library (for
/// instance for Vecs, Arcs, etc...) are allocated with this allocator.
#[cfg(target_os = "none")]
#[cfg(not(test))]
#[global_allocator]
static ALLOCATOR: allocator::Allocator = allocator::Allocator::new();

Expand Down

0 comments on commit 03c7d91

Please sign in to comment.