]> git.lizzy.rs Git - rust.git/blob - tests/codegen/x86_64-no-macosx-deployment-target.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / codegen / x86_64-no-macosx-deployment-target.rs
1 //
2 // Checks that we leave the target alone when MACOSX_DEPLOYMENT_TARGET is unset.
3 // See issue #60235.
4
5 // compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib
6 // needs-llvm-components: x86
7 // unset-rustc-env:MACOSX_DEPLOYMENT_TARGET
8 #![feature(no_core, lang_items)]
9 #![no_core]
10
11 #[lang="sized"]
12 trait Sized { }
13 #[lang="freeze"]
14 trait Freeze { }
15 #[lang="copy"]
16 trait Copy { }
17
18 #[repr(C)]
19 pub struct Bool {
20     b: bool,
21 }
22
23 // CHECK: target triple = "x86_64-apple-macosx10.7.0"
24 #[no_mangle]
25 pub extern "C" fn structbool() -> Bool {
26     Bool { b: true }
27 }