blob: 7d2eb46c056eba68ace92fd0f61c0dcfd5a55396 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// 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);
}
|