mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
21 lines
556 B
Rust
21 lines
556 B
Rust
// check-pass
|
|
// aux-build:offset-of-staged-api.rs
|
|
|
|
#![feature(offset_of, unstable_test_feature)]
|
|
|
|
use std::mem::offset_of;
|
|
|
|
extern crate offset_of_staged_api;
|
|
|
|
use offset_of_staged_api::*;
|
|
|
|
fn main() {
|
|
offset_of!(Unstable, unstable);
|
|
offset_of!(Stable, stable);
|
|
offset_of!(StableWithUnstableField, unstable);
|
|
offset_of!(StableWithUnstableFieldType, stable);
|
|
offset_of!(StableWithUnstableFieldType, stable.unstable);
|
|
offset_of!(UnstableWithStableFieldType, unstable);
|
|
offset_of!(UnstableWithStableFieldType, unstable.stable);
|
|
}
|