]> git.lizzy.rs Git - rust.git/commitdiff
Update #[no_core] users with the "freeze" lang item.
authorEduard-Mihai Burtescu <edy.burt@gmail.com>
Tue, 18 Apr 2017 08:02:21 +0000 (11:02 +0300)
committerEduard-Mihai Burtescu <edy.burt@gmail.com>
Fri, 21 Apr 2017 12:48:35 +0000 (15:48 +0300)
src/bootstrap/compile.rs
src/rtstartup/rsbegin.rs
src/test/run-make/simd-ffi/simd.rs
src/test/run-make/target-specs/foo.rs

index bddd570a13d2640bfc26b8d63fb769e9f76fad95..cd87b27d4f1aa65650ce896b85ecf0411d4f0c08 100644 (file)
@@ -151,6 +151,7 @@ pub fn build_startup_objects(build: &Build, for_compiler: &Compiler, target: &st
         if !up_to_date(src_file, dst_file) {
             let mut cmd = Command::new(&compiler_path);
             build.run(cmd.env("RUSTC_BOOTSTRAP", "1")
+                        .arg("--cfg").arg(format!("stage{}", compiler.stage))
                         .arg("--target").arg(target)
                         .arg("--emit=obj")
                         .arg("--out-dir").arg(dst_dir)
index 65c85697ce720f6842a2fd52d6bb70626ac98d71..e8b92aab1da1e556f2518b9f7aac050ace6cd928 100644 (file)
@@ -22,7 +22,7 @@
 // object (usually called `crtX.o), which then invokes initialization callbacks
 // of other runtime components (registered via yet another special image section).
 
-#![feature(no_core, lang_items)]
+#![feature(no_core, lang_items, optin_builtin_traits)]
 #![crate_type="rlib"]
 #![no_core]
 #![allow(non_camel_case_types)]
 trait Sized {}
 #[lang = "sync"]
 trait Sync {}
+impl Sync for .. {}
 #[lang = "copy"]
 trait Copy {}
-impl<T> Sync for T {}
+#[cfg_attr(not(stage0), lang = "freeze")]
+trait Freeze {}
+impl Freeze for .. {}
 
 #[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
 pub mod eh_frames {
index 49fec6f3619e4fa9c7ed48562281a8cfaf8d50e9..8ab8f4715755ddbef149777ab726c29d023afe0f 100644 (file)
@@ -12,7 +12,7 @@
 #![crate_type = "lib"]
 // we can compile to a variety of platforms, because we don't need
 // cross-compiled standard libraries.
-#![feature(no_core)]
+#![feature(no_core, optin_builtin_traits)]
 #![no_core]
 
 #![feature(repr_simd, simd_ffi, link_llvm_intrinsics, lang_items)]
@@ -78,3 +78,7 @@ pub trait Copy { }
 pub mod marker {
     pub use Copy;
 }
+
+#[lang = "freeze"]
+trait Freeze {}
+impl Freeze for .. {}
index 15b56977232169cf5b8721ba0994cd9947712839..af24c3b460b2e844d43123eb9aaf9f6725967996 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(lang_items, no_core)]
+#![feature(lang_items, no_core, optin_builtin_traits)]
 #![no_core]
 
 #[lang="copy"]
@@ -17,6 +17,10 @@ trait Copy { }
 #[lang="sized"]
 trait Sized { }
 
+#[lang = "freeze"]
+trait Freeze {}
+impl Freeze for .. {}
+
 #[lang="start"]
 fn start(_main: *const u8, _argc: isize, _argv: *const *const u8) -> isize { 0 }