forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 2
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
88a482e
commit ba2e09d
Showing
2 changed files
with
13 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use std::gc::GcAllocator; | ||
|
||
#[repr(align(1024))] | ||
struct S(u8); | ||
|
||
#[test] | ||
fn large_alignment() { | ||
let x = Box::new_in(S(123), GcAllocator); | ||
let ptr = Box::into_raw(x); | ||
assert!(!ptr.is_null()); | ||
assert!(ptr.is_aligned()); | ||
} |
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 |
---|---|---|
|
@@ -56,6 +56,7 @@ mod c_str; | |
mod const_fns; | ||
mod cow_str; | ||
mod fmt; | ||
mod gc; | ||
mod heap; | ||
mod linked_list; | ||
mod rc; | ||
|