aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/issue-1024.rs
blob: 819e329058c5bd1eca32613f47ae57910702f9a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(intrinsics)]

#[lang = "sized"]
pub trait Sized {}

extern "rust-intrinsic" {
    pub fn size_of<T>() -> usize;
}

fn test() -> usize {
    unsafe { size_of::<i32>() }
}

fn main() {
    let _a = test();
}