]> git.proxmox.com Git - rustc.git/blame - src/test/run-make/target-specs/foo.rs
Imported Upstream version 1.0.0~beta
[rustc.git] / src / test / run-make / target-specs / foo.rs
CommitLineData
1a4d82fc 1// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
223e47cc
LB
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
85aaf69f 11#![feature(lang_items, no_std)]
1a4d82fc
JJ
12#![no_std]
13
85aaf69f
SL
14#[lang="phantom_fn"]
15trait PhantomFn<A:?Sized,R:?Sized=()> { }
16impl<A:?Sized, R:?Sized, U:?Sized> PhantomFn<A,R> for U { }
17
1a4d82fc 18#[lang="copy"]
85aaf69f 19trait Copy : PhantomFn<Self> { }
1a4d82fc
JJ
20
21#[lang="sized"]
85aaf69f 22trait Sized : PhantomFn<Self> { }
1a4d82fc
JJ
23
24#[lang="start"]
c34b1796 25fn start(_main: *const u8, _argc: isize, _argv: *const *const u8) -> isize { 0 }
223e47cc 26
223e47cc 27extern {
1a4d82fc
JJ
28 fn _foo() -> [u8; 16];
29}
30
31fn _main() {
32 let _a = unsafe { _foo() };
223e47cc 33}