1
Fork 0

Update stage0 bootstrap compiler

We've got a freshly minted beta compiler, let's update to use that on nightly!
This has a few other changes associated with it as well

* A bump to the rustc version number (to 1.19.0)
* Movement of the `cargo` and `rls` submodules to their "proper" location in
  `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude`
  option this can work.
* Updates of the `cargo` and `rls` submodules to their master branches.
* Tweak to the `src/stage0.txt` format to be more amenable for Cargo version
  numbers. On the beta channel Cargo will bootstrap from a different version
  than rustc (e.g. the version numbers are different), so we need different
  configuration for this.
* Addition of `dev` as a readable key in the `src/stage0.txt` format. If present
  then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead
  of `static.rust-lang.org`. This is added to accomodate our updated release
  process with Travis and AppVeyor.
This commit is contained in:
Alex Crichton 2017-04-20 14:32:54 -07:00
parent 95467d33cb
commit 5daf557a77
25 changed files with 100 additions and 152 deletions

11
.gitmodules vendored
View file

@ -22,15 +22,14 @@
path = src/doc/nomicon path = src/doc/nomicon
url = https://github.com/rust-lang-nursery/nomicon.git url = https://github.com/rust-lang-nursery/nomicon.git
[submodule "src/tools/cargo"] [submodule "src/tools/cargo"]
path = cargo path = src/tools/cargo
url = https://github.com/rust-lang/cargo.git url = https://github.com/rust-lang/cargo
[submodule "reference"] [submodule "reference"]
path = src/doc/reference path = src/doc/reference
url = https://github.com/rust-lang-nursery/reference.git url = https://github.com/rust-lang-nursery/reference.git
[submodule "book"] [submodule "book"]
path = src/doc/book path = src/doc/book
url = https://github.com/rust-lang/book.git url = https://github.com/rust-lang/book.git
[submodule "rls"] [submodule "src/tools/rls"]
path = rls path = src/tools/rls
url = https://github.com/rust-lang-nursery/rls.git url = https://github.com/rust-lang-nursery/rls

1
cargo

@ -1 +0,0 @@
Subproject commit 03efb7fc8b0dbb54973ee1b6188f3faf14fffe36

1
rls

@ -1 +0,0 @@
Subproject commit 6ecff95fdc3ee7ceed2b9b0cc1a3a64876860bce

View file

@ -15,6 +15,12 @@ members = [
"tools/remote-test-server", "tools/remote-test-server",
] ]
# These projects have their own Cargo.lock
exclude = [
"tools/cargo",
"tools/rls",
]
# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit # Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
# MSVC when running the compile-fail test suite when a should-fail test panics. # MSVC when running the compile-fail test suite when a should-fail test panics.
# But hey if this is removed and it gets past the bots, sounds good to me. # But hey if this is removed and it gets past the bots, sounds good to me.

View file

@ -159,19 +159,20 @@ def format_build_time(duration):
class RustBuild(object): class RustBuild(object):
def download_stage0(self): def download_stage0(self):
cache_dst = os.path.join(self.build_dir, "cache") cache_dst = os.path.join(self.build_dir, "cache")
rustc_cache = os.path.join(cache_dst, self.stage0_rustc_date()) rustc_cache = os.path.join(cache_dst, self.stage0_date())
if not os.path.exists(rustc_cache): if not os.path.exists(rustc_cache):
os.makedirs(rustc_cache) os.makedirs(rustc_cache)
channel = self.stage0_rustc_channel() rustc_channel = self.stage0_rustc_channel()
cargo_channel = self.stage0_cargo_channel()
if self.rustc().startswith(self.bin_root()) and \ if self.rustc().startswith(self.bin_root()) and \
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()): (not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
self.print_what_it_means_to_bootstrap() self.print_what_it_means_to_bootstrap()
if os.path.exists(self.bin_root()): if os.path.exists(self.bin_root()):
shutil.rmtree(self.bin_root()) shutil.rmtree(self.bin_root())
filename = "rust-std-{}-{}.tar.gz".format(channel, self.build) filename = "rust-std-{}-{}.tar.gz".format(rustc_channel, self.build)
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date() url = self._download_url + "/dist/" + self.stage0_date()
tarball = os.path.join(rustc_cache, filename) tarball = os.path.join(rustc_cache, filename)
if not os.path.exists(tarball): if not os.path.exists(tarball):
get("{}/{}".format(url, filename), tarball, verbose=self.verbose) get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
@ -179,8 +180,8 @@ class RustBuild(object):
match="rust-std-" + self.build, match="rust-std-" + self.build,
verbose=self.verbose) verbose=self.verbose)
filename = "rustc-{}-{}.tar.gz".format(channel, self.build) filename = "rustc-{}-{}.tar.gz".format(rustc_channel, self.build)
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date() url = self._download_url + "/dist/" + self.stage0_date()
tarball = os.path.join(rustc_cache, filename) tarball = os.path.join(rustc_cache, filename)
if not os.path.exists(tarball): if not os.path.exists(tarball):
get("{}/{}".format(url, filename), tarball, verbose=self.verbose) get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
@ -188,11 +189,11 @@ class RustBuild(object):
self.fix_executable(self.bin_root() + "/bin/rustc") self.fix_executable(self.bin_root() + "/bin/rustc")
self.fix_executable(self.bin_root() + "/bin/rustdoc") self.fix_executable(self.bin_root() + "/bin/rustdoc")
with open(self.rustc_stamp(), 'w') as f: with open(self.rustc_stamp(), 'w') as f:
f.write(self.stage0_rustc_date()) f.write(self.stage0_date())
if "pc-windows-gnu" in self.build: if "pc-windows-gnu" in self.build:
filename = "rust-mingw-{}-{}.tar.gz".format(channel, self.build) filename = "rust-mingw-{}-{}.tar.gz".format(rustc_channel, self.build)
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date() url = self._download_url + "/dist/" + self.stage0_date()
tarball = os.path.join(rustc_cache, filename) tarball = os.path.join(rustc_cache, filename)
if not os.path.exists(tarball): if not os.path.exists(tarball):
get("{}/{}".format(url, filename), tarball, verbose=self.verbose) get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
@ -201,15 +202,15 @@ class RustBuild(object):
if self.cargo().startswith(self.bin_root()) and \ if self.cargo().startswith(self.bin_root()) and \
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()): (not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
self.print_what_it_means_to_bootstrap() self.print_what_it_means_to_bootstrap()
filename = "cargo-{}-{}.tar.gz".format(channel, self.build) filename = "cargo-{}-{}.tar.gz".format(cargo_channel, self.build)
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date() url = self._download_url + "/dist/" + self.stage0_date()
tarball = os.path.join(rustc_cache, filename) tarball = os.path.join(rustc_cache, filename)
if not os.path.exists(tarball): if not os.path.exists(tarball):
get("{}/{}".format(url, filename), tarball, verbose=self.verbose) get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose) unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose)
self.fix_executable(self.bin_root() + "/bin/cargo") self.fix_executable(self.bin_root() + "/bin/cargo")
with open(self.cargo_stamp(), 'w') as f: with open(self.cargo_stamp(), 'w') as f:
f.write(self.stage0_rustc_date()) f.write(self.stage0_date())
def fix_executable(self, fname): def fix_executable(self, fname):
# If we're on NixOS we need to change the path to the dynamic loader # If we're on NixOS we need to change the path to the dynamic loader
@ -264,12 +265,15 @@ class RustBuild(object):
print("warning: failed to call patchelf: %s" % e) print("warning: failed to call patchelf: %s" % e)
return return
def stage0_rustc_date(self): def stage0_date(self):
return self._rustc_date return self._date
def stage0_rustc_channel(self): def stage0_rustc_channel(self):
return self._rustc_channel return self._rustc_channel
def stage0_cargo_channel(self):
return self._cargo_channel
def rustc_stamp(self): def rustc_stamp(self):
return os.path.join(self.bin_root(), '.rustc-stamp') return os.path.join(self.bin_root(), '.rustc-stamp')
@ -280,13 +284,13 @@ class RustBuild(object):
if not os.path.exists(self.rustc_stamp()) or self.clean: if not os.path.exists(self.rustc_stamp()) or self.clean:
return True return True
with open(self.rustc_stamp(), 'r') as f: with open(self.rustc_stamp(), 'r') as f:
return self.stage0_rustc_date() != f.read() return self.stage0_date() != f.read()
def cargo_out_of_date(self): def cargo_out_of_date(self):
if not os.path.exists(self.cargo_stamp()) or self.clean: if not os.path.exists(self.cargo_stamp()) or self.clean:
return True return True
with open(self.cargo_stamp(), 'r') as f: with open(self.cargo_stamp(), 'r') as f:
return self.stage0_rustc_date() != f.read() return self.stage0_date() != f.read()
def bin_root(self): def bin_root(self):
return os.path.join(self.build_dir, self.build, "stage0") return os.path.join(self.build_dir, self.build, "stage0")
@ -585,7 +589,13 @@ def bootstrap():
shutil.rmtree('.cargo') shutil.rmtree('.cargo')
data = stage0_data(rb.rust_root) data = stage0_data(rb.rust_root)
rb._rustc_channel, rb._rustc_date = data['rustc'].split('-', 1) rb._date = data['date']
rb._rustc_channel = data['rustc']
rb._cargo_channel = data['cargo']
if 'dev' in data:
rb._download_url = 'https://dev-static.rust-lang.org'
else:
rb._download_url = 'https://static.rust-lang.org'
# Fetch/build the bootstrap # Fetch/build the bootstrap
rb.build = rb.build_triple() rb.build = rb.build_triple()

View file

@ -23,7 +23,7 @@ use build_helper::output;
use Build; use Build;
// The version number // The version number
pub const CFG_RELEASE_NUM: &'static str = "1.18.0"; pub const CFG_RELEASE_NUM: &'static str = "1.19.0";
// An optional number to put after the label, e.g. '.2' -> '-beta.2' // An optional number to put after the label, e.g. '.2' -> '-beta.2'
// Be sure to make this starts with a dot to conform to semver pre-release // Be sure to make this starts with a dot to conform to semver pre-release

View file

@ -106,7 +106,7 @@ pub fn cargo(build: &Build, stage: u32, host: &str) {
let ref newpath = format!("{}{}{}", path.display(), sep, old_path); let ref newpath = format!("{}{}{}", path.display(), sep, old_path);
let mut cargo = build.cargo(compiler, Mode::Tool, host, "test"); let mut cargo = build.cargo(compiler, Mode::Tool, host, "test");
cargo.arg("--manifest-path").arg(build.src.join("cargo/Cargo.toml")); cargo.arg("--manifest-path").arg(build.src.join("src/tools/cargo/Cargo.toml"));
// Don't build tests dynamically, just a pain to work with // Don't build tests dynamically, just a pain to work with
cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");

View file

@ -461,10 +461,7 @@ pub fn tool(build: &Build, stage: u32, target: &str, tool: &str) {
let compiler = Compiler::new(stage, &build.config.build); let compiler = Compiler::new(stage, &build.config.build);
let mut cargo = build.cargo(&compiler, Mode::Tool, target, "build"); let mut cargo = build.cargo(&compiler, Mode::Tool, target, "build");
let mut dir = build.src.join(tool); let dir = build.src.join("src/tools").join(tool);
if !dir.exists() {
dir = build.src.join("src/tools").join(tool);
}
cargo.arg("--manifest-path").arg(dir.join("Cargo.toml")); cargo.arg("--manifest-path").arg(dir.join("Cargo.toml"));
// We don't want to build tools dynamically as they'll be running across // We don't want to build tools dynamically as they'll be running across

View file

@ -394,8 +394,6 @@ pub fn rust_src(build: &Build) {
let src_dirs = [ let src_dirs = [
"man", "man",
"src", "src",
"cargo",
"rls",
]; ];
let filter_fn = move |path: &Path| { let filter_fn = move |path: &Path| {
@ -576,7 +574,7 @@ pub fn cargo(build: &Build, stage: u32, target: &str) {
println!("Dist cargo stage{} ({})", stage, target); println!("Dist cargo stage{} ({})", stage, target);
let compiler = Compiler::new(stage, &build.config.build); let compiler = Compiler::new(stage, &build.config.build);
let src = build.src.join("cargo"); let src = build.src.join("src/tools/cargo");
let etc = src.join("src/etc"); let etc = src.join("src/etc");
let release_num = build.release_num("cargo"); let release_num = build.release_num("cargo");
let name = pkgname(build, "cargo"); let name = pkgname(build, "cargo");
@ -637,7 +635,7 @@ pub fn rls(build: &Build, stage: u32, target: &str) {
println!("Dist RLS stage{} ({})", stage, target); println!("Dist RLS stage{} ({})", stage, target);
let compiler = Compiler::new(stage, &build.config.build); let compiler = Compiler::new(stage, &build.config.build);
let src = build.src.join("rls"); let src = build.src.join("src/tools/rls");
let release_num = build.release_num("rls"); let release_num = build.release_num("rls");
let name = pkgname(build, "rls"); let name = pkgname(build, "rls");
let version = build.rls_info.version(build, &release_num); let version = build.rls_info.version(build, &release_num);

View file

@ -234,8 +234,8 @@ impl Build {
None => false, None => false,
}; };
let rust_info = channel::GitInfo::new(&src); let rust_info = channel::GitInfo::new(&src);
let cargo_info = channel::GitInfo::new(&src.join("cargo")); let cargo_info = channel::GitInfo::new(&src.join("src/tools/cargo"));
let rls_info = channel::GitInfo::new(&src.join("rls")); let rls_info = channel::GitInfo::new(&src.join("src/tools/rls"));
let src_is_git = src.join(".git").exists(); let src_is_git = src.join(".git").exists();
Build { Build {
@ -1071,7 +1071,7 @@ impl Build {
/// Returns the `a.b.c` version that the given package is at. /// Returns the `a.b.c` version that the given package is at.
fn release_num(&self, package: &str) -> String { fn release_num(&self, package: &str) -> String {
let mut toml = String::new(); let mut toml = String::new();
let toml_file_name = self.src.join(&format!("{}/Cargo.toml", package)); let toml_file_name = self.src.join(&format!("src/tools/{}/Cargo.toml", package));
t!(t!(File::open(toml_file_name)).read_to_string(&mut toml)); t!(t!(File::open(toml_file_name)).read_to_string(&mut toml));
for line in toml.lines() { for line in toml.lines() {
let prefix = "version = \""; let prefix = "version = \"";

View file

@ -574,7 +574,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
.dep(|s| s.name("maybe-clean-tools")) .dep(|s| s.name("maybe-clean-tools"))
.dep(|s| s.name("libstd-tool")) .dep(|s| s.name("libstd-tool"))
.run(move |s| compile::tool(build, s.stage, s.target, "remote-test-client")); .run(move |s| compile::tool(build, s.stage, s.target, "remote-test-client"));
rules.build("tool-cargo", "cargo") rules.build("tool-cargo", "src/tools/cargo")
.host(true) .host(true)
.default(build.config.extended) .default(build.config.extended)
.dep(|s| s.name("maybe-clean-tools")) .dep(|s| s.name("maybe-clean-tools"))
@ -588,7 +588,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
.host(&build.config.build) .host(&build.config.build)
}) })
.run(move |s| compile::tool(build, s.stage, s.target, "cargo")); .run(move |s| compile::tool(build, s.stage, s.target, "cargo"));
rules.build("tool-rls", "rls") rules.build("tool-rls", "src/tools/rls")
.host(true) .host(true)
.default(build.config.extended) .default(build.config.extended)
.dep(|s| s.name("librustc-tool")) .dep(|s| s.name("librustc-tool"))

View file

@ -87,7 +87,6 @@
#![feature(needs_allocator)] #![feature(needs_allocator)]
#![feature(optin_builtin_traits)] #![feature(optin_builtin_traits)]
#![feature(placement_in_syntax)] #![feature(placement_in_syntax)]
#![cfg_attr(stage0, feature(pub_restricted))]
#![feature(shared)] #![feature(shared)]
#![feature(staged_api)] #![feature(staged_api)]
#![feature(unboxed_closures)] #![feature(unboxed_closures)]

View file

@ -46,7 +46,6 @@
issue = "0")] issue = "0")]
#![allow(missing_docs)] #![allow(missing_docs)]
#[cfg(not(stage0))]
#[stable(feature = "drop_in_place", since = "1.8.0")] #[stable(feature = "drop_in_place", since = "1.8.0")]
#[rustc_deprecated(reason = "no longer an intrinsic - use `ptr::drop_in_place` directly", #[rustc_deprecated(reason = "no longer an intrinsic - use `ptr::drop_in_place` directly",
since = "1.18.0")] since = "1.18.0")]
@ -645,27 +644,6 @@ extern "rust-intrinsic" {
pub fn size_of_val<T: ?Sized>(_: &T) -> usize; pub fn size_of_val<T: ?Sized>(_: &T) -> usize;
pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize; pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
#[cfg(stage0)]
/// Executes the destructor (if any) of the pointed-to value.
///
/// This has two use cases:
///
/// * It is *required* to use `drop_in_place` to drop unsized types like
/// trait objects, because they can't be read out onto the stack and
/// dropped normally.
///
/// * It is friendlier to the optimizer to do this over `ptr::read` when
/// dropping manually allocated memory (e.g. when writing Box/Rc/Vec),
/// as the compiler doesn't need to prove that it's sound to elide the
/// copy.
///
/// # Undefined Behavior
///
/// This has all the same safety problems as `ptr::read` with respect to
/// invalid pointers, types, and double drops.
#[stable(feature = "drop_in_place", since = "1.8.0")]
pub fn drop_in_place<T: ?Sized>(to_drop: *mut T);
/// Gets a static string slice containing the name of a type. /// Gets a static string slice containing the name of a type.
pub fn type_name<T: ?Sized>() -> &'static str; pub fn type_name<T: ?Sized>() -> &'static str;
@ -1261,11 +1239,9 @@ extern "rust-intrinsic" {
/// Performs an unchecked left shift, resulting in undefined behavior when /// Performs an unchecked left shift, resulting in undefined behavior when
/// y < 0 or y >= N, where N is the width of T in bits. /// y < 0 or y >= N, where N is the width of T in bits.
#[cfg(not(stage0))]
pub fn unchecked_shl<T>(x: T, y: T) -> T; pub fn unchecked_shl<T>(x: T, y: T) -> T;
/// Performs an unchecked right shift, resulting in undefined behavior when /// Performs an unchecked right shift, resulting in undefined behavior when
/// y < 0 or y >= N, where N is the width of T in bits. /// y < 0 or y >= N, where N is the width of T in bits.
#[cfg(not(stage0))]
pub fn unchecked_shr<T>(x: T, y: T) -> T; pub fn unchecked_shr<T>(x: T, y: T) -> T;
/// Returns (a + b) mod 2<sup>N</sup>, where N is the width of T in bits. /// Returns (a + b) mod 2<sup>N</sup>, where N is the width of T in bits.

View file

@ -559,7 +559,7 @@ mod impls {
/// any `UnsafeCell` internally, but not through an indirection. /// any `UnsafeCell` internally, but not through an indirection.
/// This affects, for example, whether a `static` of that type is /// This affects, for example, whether a `static` of that type is
/// placed in read-only static memory or writable static memory. /// placed in read-only static memory or writable static memory.
#[cfg_attr(not(stage0), lang = "freeze")] #[lang = "freeze"]
unsafe trait Freeze {} unsafe trait Freeze {}
unsafe impl Freeze for .. {} unsafe impl Freeze for .. {}

View file

@ -778,21 +778,12 @@ macro_rules! int_impl {
/// ``` /// ```
#[stable(feature = "num_wrapping", since = "1.2.0")] #[stable(feature = "num_wrapping", since = "1.2.0")]
#[inline(always)] #[inline(always)]
#[cfg(not(stage0))]
pub fn wrapping_shl(self, rhs: u32) -> Self { pub fn wrapping_shl(self, rhs: u32) -> Self {
unsafe { unsafe {
intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT) intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
} }
} }
/// Stage 0
#[stable(feature = "num_wrapping", since = "1.2.0")]
#[inline(always)]
#[cfg(stage0)]
pub fn wrapping_shl(self, rhs: u32) -> Self {
self.overflowing_shl(rhs).0
}
/// Panic-free bitwise shift-right; yields `self >> mask(rhs)`, /// Panic-free bitwise shift-right; yields `self >> mask(rhs)`,
/// where `mask` removes any high-order bits of `rhs` that /// where `mask` removes any high-order bits of `rhs` that
/// would cause the shift to exceed the bitwidth of the type. /// would cause the shift to exceed the bitwidth of the type.
@ -814,21 +805,12 @@ macro_rules! int_impl {
/// ``` /// ```
#[stable(feature = "num_wrapping", since = "1.2.0")] #[stable(feature = "num_wrapping", since = "1.2.0")]
#[inline(always)] #[inline(always)]
#[cfg(not(stage0))]
pub fn wrapping_shr(self, rhs: u32) -> Self { pub fn wrapping_shr(self, rhs: u32) -> Self {
unsafe { unsafe {
intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
} }
} }
/// Stage 0
#[stable(feature = "num_wrapping", since = "1.2.0")]
#[inline(always)]
#[cfg(stage0)]
pub fn wrapping_shr(self, rhs: u32) -> Self {
self.overflowing_shr(rhs).0
}
/// Wrapping (modular) absolute value. Computes `self.abs()`, /// Wrapping (modular) absolute value. Computes `self.abs()`,
/// wrapping around at the boundary of the type. /// wrapping around at the boundary of the type.
/// ///
@ -1039,19 +1021,10 @@ macro_rules! int_impl {
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "wrapping", since = "1.7.0")] #[stable(feature = "wrapping", since = "1.7.0")]
#[cfg(not(stage0))]
pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) { pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
(self.wrapping_shl(rhs), (rhs > ($BITS - 1))) (self.wrapping_shl(rhs), (rhs > ($BITS - 1)))
} }
/// Stage 0
#[inline]
#[stable(feature = "wrapping", since = "1.7.0")]
#[cfg(stage0)]
pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
(self << (rhs & ($BITS - 1)), (rhs > ($BITS - 1)))
}
/// Shifts self right by `rhs` bits. /// Shifts self right by `rhs` bits.
/// ///
/// Returns a tuple of the shifted version of self along with a boolean /// Returns a tuple of the shifted version of self along with a boolean
@ -1070,19 +1043,10 @@ macro_rules! int_impl {
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "wrapping", since = "1.7.0")] #[stable(feature = "wrapping", since = "1.7.0")]
#[cfg(not(stage0))]
pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) { pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
(self.wrapping_shr(rhs), (rhs > ($BITS - 1))) (self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
} }
/// Stage 0
#[inline]
#[stable(feature = "wrapping", since = "1.7.0")]
#[cfg(stage0)]
pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
(self >> (rhs & ($BITS - 1)), (rhs > ($BITS - 1)))
}
/// Computes the absolute value of `self`. /// Computes the absolute value of `self`.
/// ///
/// Returns a tuple of the absolute version of self along with a /// Returns a tuple of the absolute version of self along with a
@ -1946,21 +1910,12 @@ macro_rules! uint_impl {
/// ``` /// ```
#[stable(feature = "num_wrapping", since = "1.2.0")] #[stable(feature = "num_wrapping", since = "1.2.0")]
#[inline(always)] #[inline(always)]
#[cfg(not(stage0))]
pub fn wrapping_shl(self, rhs: u32) -> Self { pub fn wrapping_shl(self, rhs: u32) -> Self {
unsafe { unsafe {
intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT) intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT)
} }
} }
/// Stage 0
#[stable(feature = "num_wrapping", since = "1.2.0")]
#[inline(always)]
#[cfg(stage0)]
pub fn wrapping_shl(self, rhs: u32) -> Self {
self.overflowing_shl(rhs).0
}
/// Panic-free bitwise shift-right; yields `self >> mask(rhs)`, /// Panic-free bitwise shift-right; yields `self >> mask(rhs)`,
/// where `mask` removes any high-order bits of `rhs` that /// where `mask` removes any high-order bits of `rhs` that
/// would cause the shift to exceed the bitwidth of the type. /// would cause the shift to exceed the bitwidth of the type.
@ -1982,21 +1937,12 @@ macro_rules! uint_impl {
/// ``` /// ```
#[stable(feature = "num_wrapping", since = "1.2.0")] #[stable(feature = "num_wrapping", since = "1.2.0")]
#[inline(always)] #[inline(always)]
#[cfg(not(stage0))]
pub fn wrapping_shr(self, rhs: u32) -> Self { pub fn wrapping_shr(self, rhs: u32) -> Self {
unsafe { unsafe {
intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT)
} }
} }
/// Stage 0
#[stable(feature = "num_wrapping", since = "1.2.0")]
#[inline(always)]
#[cfg(stage0)]
pub fn wrapping_shr(self, rhs: u32) -> Self {
self.overflowing_shr(rhs).0
}
/// Calculates `self` + `rhs` /// Calculates `self` + `rhs`
/// ///
/// Returns a tuple of the addition along with a boolean indicating /// Returns a tuple of the addition along with a boolean indicating
@ -2160,19 +2106,10 @@ macro_rules! uint_impl {
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "wrapping", since = "1.7.0")] #[stable(feature = "wrapping", since = "1.7.0")]
#[cfg(not(stage0))]
pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) { pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
(self.wrapping_shl(rhs), (rhs > ($BITS - 1))) (self.wrapping_shl(rhs), (rhs > ($BITS - 1)))
} }
/// Stage 0
#[inline]
#[stable(feature = "wrapping", since = "1.7.0")]
#[cfg(stage0)]
pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) {
(self << (rhs & ($BITS - 1)), (rhs > ($BITS - 1)))
}
/// Shifts self right by `rhs` bits. /// Shifts self right by `rhs` bits.
/// ///
/// Returns a tuple of the shifted version of self along with a boolean /// Returns a tuple of the shifted version of self along with a boolean
@ -2191,20 +2128,11 @@ macro_rules! uint_impl {
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "wrapping", since = "1.7.0")] #[stable(feature = "wrapping", since = "1.7.0")]
#[cfg(not(stage0))]
pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) { pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
(self.wrapping_shr(rhs), (rhs > ($BITS - 1))) (self.wrapping_shr(rhs), (rhs > ($BITS - 1)))
} }
/// Stage 0
#[inline]
#[stable(feature = "wrapping", since = "1.7.0")]
#[cfg(stage0)]
pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
(self >> (rhs & ($BITS - 1)), (rhs > ($BITS - 1)))
}
/// Raises self to the power of `exp`, using exponentiation by squaring. /// Raises self to the power of `exp`, using exponentiation by squaring.
/// ///
/// # Examples /// # Examples

View file

@ -37,11 +37,6 @@ pub use intrinsics::copy;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use intrinsics::write_bytes; pub use intrinsics::write_bytes;
#[cfg(stage0)]
#[stable(feature = "drop_in_place", since = "1.8.0")]
pub use intrinsics::drop_in_place;
#[cfg(not(stage0))]
/// Executes the destructor (if any) of the pointed-to value. /// Executes the destructor (if any) of the pointed-to value.
/// ///
/// This has two use cases: /// This has two use cases:

View file

@ -34,7 +34,6 @@
#![feature(loop_break_value)] #![feature(loop_break_value)]
#![feature(never_type)] #![feature(never_type)]
#![feature(nonzero)] #![feature(nonzero)]
#![cfg_attr(stage0, feature(pub_restricted))]
#![feature(quote)] #![feature(quote)]
#![feature(rustc_diagnostic_macros)] #![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)] #![feature(rustc_private)]

View file

@ -24,7 +24,6 @@
#![feature(rand)] #![feature(rand)]
#![feature(conservative_impl_trait)] #![feature(conservative_impl_trait)]
#![feature(sort_unstable)] #![feature(sort_unstable)]
#![cfg_attr(stage0, feature(pub_restricted))]
extern crate graphviz; extern crate graphviz;
#[macro_use] extern crate rustc; #[macro_use] extern crate rustc;

View file

@ -318,7 +318,6 @@
#![feature(unwind_attributes)] #![feature(unwind_attributes)]
#![feature(vec_push_all)] #![feature(vec_push_all)]
#![cfg_attr(test, feature(update_panic_count))] #![cfg_attr(test, feature(update_panic_count))]
#![cfg_attr(stage0, feature(pub_restricted))]
#![cfg_attr(test, feature(float_bits_conv))] #![cfg_attr(test, feature(float_bits_conv))]
// Explicitly import the prelude. The compiler uses this same unstable attribute // Explicitly import the prelude. The compiler uses this same unstable attribute

View file

@ -34,10 +34,17 @@ trait Sync {}
impl Sync for .. {} impl Sync for .. {}
#[lang = "copy"] #[lang = "copy"]
trait Copy {} trait Copy {}
#[cfg_attr(not(stage0), lang = "freeze")] #[lang = "freeze"]
trait Freeze {} trait Freeze {}
impl Freeze for .. {} impl Freeze for .. {}
#[lang="drop_in_place"]
#[inline]
#[allow(unconditional_recursion)]
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
drop_in_place(to_drop);
}
#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))] #[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
pub mod eh_frames { pub mod eh_frames {
#[no_mangle] #[no_mangle]

View file

@ -10,7 +10,7 @@
// See rsbegin.rs for details. // See rsbegin.rs for details.
#![feature(no_core, lang_items)] #![feature(no_core, lang_items, optin_builtin_traits)]
#![crate_type="rlib"] #![crate_type="rlib"]
#![no_core] #![no_core]
@ -19,6 +19,18 @@ trait Sized {}
#[lang = "sync"] #[lang = "sync"]
trait Sync {} trait Sync {}
impl<T> Sync for T {} impl<T> Sync for T {}
#[lang = "copy"]
trait Copy {}
#[lang = "freeze"]
trait Freeze {}
impl Freeze for .. {}
#[lang="drop_in_place"]
#[inline]
#[allow(unconditional_recursion)]
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
drop_in_place(to_drop);
}
#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))] #[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
pub mod eh_frames { pub mod eh_frames {

View file

@ -8,8 +8,30 @@
# release. # release.
# #
# If you're looking at this file on the master branch, you'll likely see that # If you're looking at this file on the master branch, you'll likely see that
# rustc bootstraps from `beta-$date`, whereas if you're looking at a source # rustc and cargo are configured to `beta`, whereas if you're looking at a
# tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was # source tarball for a stable release you'll likely see `1.x.0` for rustc and
# released on `$date` # `0.x.0` for Cargo where they were released on `date`.
rustc: beta-2017-04-05 date: 2017-04-25
rustc: beta
cargo: beta
# When making a stable release the process currently looks like:
#
# 1. Produce stable build, upload it to dev-static
# 2. Produce a beta build from the previous stable build, upload to static
# 3. Produce a nightly build from previous beta, upload to static
# 4. Upload stable build to static, publish full release
#
# This means that there's a small window of time (a few days) where artifacts
# are downloaded from dev-static.rust-lang.org instead of static.rust-lang.org.
# In order to ease this transition we have an extra key is in this configuration
# file below. When uncommented this will instruct the bootstrap.py script to
# download from dev-static.rust-lang.org.
#
# This key is typically commented out at all times. If you're looking at a
# stable release tarball it should *definitely* be commented out. If you're
# looking at a beta source tarball and it's uncommented we'll shortly comment it
# out.
#dev: 1

1
src/tools/cargo Submodule

@ -0,0 +1 @@
Subproject commit fa7584c1495c2d9c04a6416f8e7b546abfa88a52

1
src/tools/rls Submodule

@ -0,0 +1 @@
Subproject commit 67babd2d63710444a3071dfd9184648fd85a6a3d

View file

@ -85,6 +85,8 @@ fn filter_dirs(path: &Path) -> bool {
"src/liblibc", "src/liblibc",
"src/vendor", "src/vendor",
"src/rt/hoedown", "src/rt/hoedown",
"src/tools/cargo",
"src/tools/rls",
]; ];
skip.iter().any(|p| path.ends_with(p)) skip.iter().any(|p| path.ends_with(p))
} }