only set noalias on Box with the global allocator
This commit is contained in:
parent
5a1e5449c8
commit
f391c0793b
17 changed files with 75 additions and 28 deletions
|
@ -50,6 +50,8 @@ extern "Rust" {
|
|||
#[unstable(feature = "allocator_api", issue = "32838")]
|
||||
#[derive(Copy, Clone, Default, Debug)]
|
||||
#[cfg(not(test))]
|
||||
// the compiler needs to know when a Box uses the global allocator vs a custom one
|
||||
#[cfg_attr(not(bootstrap), lang = "global_alloc_ty")]
|
||||
pub struct Global;
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue