Skip to content

Commit

Permalink
Merge pull request sunriseos#212 from Orycterope/global_allocator_cfg…
Browse files Browse the repository at this point in the history
…_not_test

global_allocator_cfg_not_test
  • Loading branch information
Orycterope authored Mar 14, 2019
2 parents 3f95a57 + 03c7d91 commit 1d4a9ac
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 @@ -57,13 +57,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 1d4a9ac

Please sign in to comment.