Skip to content

Commit 72176cf

Browse files
committed
Auto merge of rust-lang#47141 - alexcrichton:bump-bootstrap, r=alexcrichton
Bump to 1.25.0 * Bump the release version to 1.25 * Bump the bootstrap compiler to the recent beta * Allow using unstable rustdoc features on beta - this fix has been applied to the beta branch but needed to go to the master branch as well.
2 parents a9a03d9 + fcdca7f commit 72176cf

File tree

25 files changed

+46
-62
lines changed

25 files changed

+46
-62
lines changed

Diff for: src/bootstrap/builder.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ impl<'a> Builder<'a> {
419419
.env("RUSTC_LIBDIR", self.sysroot_libdir(compiler, self.build.build))
420420
.env("CFG_RELEASE_CHANNEL", &self.build.config.channel)
421421
.env("RUSTDOC_REAL", self.rustdoc(host))
422-
.env("RUSTDOC_CRATE_VERSION", self.build.rust_version());
422+
.env("RUSTDOC_CRATE_VERSION", self.build.rust_version())
423+
.env("RUSTC_BOOTSTRAP", "1");
423424
if let Some(linker) = self.build.linker(host) {
424425
cmd.env("RUSTC_TARGET_LINKER", linker);
425426
}
@@ -483,8 +484,8 @@ impl<'a> Builder<'a> {
483484
} else {
484485
PathBuf::from("/path/to/nowhere/rustdoc/not/required")
485486
})
486-
.env("TEST_MIRI", self.config.test_miri.to_string());
487-
487+
.env("TEST_MIRI", self.config.test_miri.to_string())
488+
.env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir());
488489
if let Some(n) = self.config.rust_codegen_units {
489490
cargo.env("RUSTC_CODEGEN_UNITS", n.to_string());
490491
}

Diff for: src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use Build;
2424
use config::Config;
2525

2626
// The version number
27-
pub const CFG_RELEASE_NUM: &str = "1.24.0";
27+
pub const CFG_RELEASE_NUM: &str = "1.25.0";
2828

2929
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
3030
// Be sure to make this starts with a dot to conform to semver pre-release

Diff for: src/bootstrap/check.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,8 @@ impl Step for ErrorIndex {
975975
build.run(builder.tool_cmd(Tool::ErrorIndex)
976976
.arg("markdown")
977977
.arg(&output)
978-
.env("CFG_BUILD", &build.build));
978+
.env("CFG_BUILD", &build.build)
979+
.env("RUSTC_ERROR_METADATA_DST", build.extended_error_dir()));
979980

980981
markdown_test(builder, compiler, &output);
981982
}

Diff for: src/bootstrap/doc.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,8 @@ impl Step for ErrorIndex {
671671
index.arg(out.join("error-index.html"));
672672

673673
// FIXME: shouldn't have to pass this env var
674-
index.env("CFG_BUILD", &build.build);
674+
index.env("CFG_BUILD", &build.build)
675+
.env("RUSTC_ERROR_METADATA_DST", build.extended_error_dir());
675676

676677
build.run(&mut index);
677678
}

Diff for: src/bootstrap/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,11 @@ impl Build {
718718
self.config.python.as_ref().unwrap()
719719
}
720720

721+
/// Temporary directory that extended error information is emitted to.
722+
fn extended_error_dir(&self) -> PathBuf {
723+
self.out.join("tmp/extended-error-metadata")
724+
}
725+
721726
/// Tests whether the `compiler` compiling for `target` should be forced to
722727
/// use a stage1 compiler instead.
723728
///

Diff for: src/bootstrap/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ pub fn symlink_dir(src: &Path, dest: &Path) -> io::Result<()> {
315315
let mut data = [0u8; MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
316316
let db = data.as_mut_ptr()
317317
as *mut REPARSE_MOUNTPOINT_DATA_BUFFER;
318-
let buf = &mut (*db).ReparseTarget as *mut _;
318+
let buf = &mut (*db).ReparseTarget as *mut u16;
319319
let mut i = 0;
320320
// FIXME: this conversion is very hacky
321321
let v = br"\??\";

Diff for: src/ci/docker/x86_64-gnu-incremental/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ RUN sh /scripts/sccache.sh
1919
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu
2020
ENV RUSTFLAGS -Zincremental=/tmp/rust-incr-cache
2121
ENV RUST_CHECK_TARGET check
22+
ENV CARGO_INCREMENTAL 0

Diff for: src/libcore/intrinsics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,5 @@ extern "rust-intrinsic" {
13901390

13911391
/// Emits a `!nontemporal` store according to LLVM (see their docs).
13921392
/// Probably will never become stable.
1393-
#[cfg(not(stage0))]
13941393
pub fn nontemporal_store<T>(ptr: *mut T, val: T);
13951394
}

Diff for: src/librustc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,5 @@ fn noop() {
175175

176176

177177
// Build the diagnostics array at the end so that the metadata includes error use sites.
178+
#[cfg(not(stage0))] // remove after the next snapshot
178179
__build_diagnostic_array! { librustc, DIAGNOSTICS }

Diff for: src/librustc/session/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ impl Session {
642642
IncrCompSession::Active { ref session_directory, .. } => {
643643
session_directory.clone()
644644
}
645+
IncrCompSession::InvalidBecauseOfErrors { .. } => return,
645646
_ => bug!("Trying to invalidate IncrCompSession `{:?}`",
646647
*incr_comp_session),
647648
};

Diff for: src/librustc_const_eval/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ pub fn provide(providers: &mut Providers) {
5656
}
5757

5858
// Build the diagnostics array at the end so that the metadata includes error use sites.
59+
#[cfg(not(stage0))] // remove after the next snapshot
5960
__build_diagnostic_array! { librustc_const_eval, DIAGNOSTICS }

Diff for: src/librustc_driver/lib.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,14 @@ fn exit_on_err() -> ! {
12681268
panic!();
12691269
}
12701270

1271+
#[cfg(stage0)]
1272+
pub fn diagnostics_registry() -> errors::registry::Registry {
1273+
use errors::registry::Registry;
1274+
1275+
Registry::new(&[])
1276+
}
1277+
1278+
#[cfg(not(stage0))]
12711279
pub fn diagnostics_registry() -> errors::registry::Registry {
12721280
use errors::registry::Registry;
12731281

Diff for: src/librustc_metadata/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,5 @@ pub mod cstore;
5858
pub mod dynamic_lib;
5959
pub mod locator;
6060

61+
#[cfg(not(stage0))] // remove after the next snapshot
6162
__build_diagnostic_array! { librustc_metadata, DIAGNOSTICS }

Diff for: src/librustc_mir/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ pub fn provide(providers: &mut Providers) {
7979
providers.const_eval = interpret::const_eval_provider;
8080
}
8181

82+
#[cfg(not(stage0))] // remove after the next snapshot
8283
__build_diagnostic_array! { librustc_mir, DIAGNOSTICS }

Diff for: src/librustc_passes/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ mod mir_stats;
4545
pub mod no_asm;
4646
pub mod static_recursion;
4747

48+
#[cfg(not(stage0))] // remove after the next snapshot
4849
__build_diagnostic_array! { librustc_passes, DIAGNOSTICS }
4950

5051
pub fn provide(providers: &mut Providers) {

Diff for: src/librustc_plugin/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,5 @@ pub mod registry;
8282
pub mod load;
8383
pub mod build;
8484

85+
#[cfg(not(stage0))] // remove after the next snapshot
8586
__build_diagnostic_array! { librustc_plugin, DIAGNOSTICS }

Diff for: src/librustc_privacy/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1725,4 +1725,5 @@ fn privacy_access_levels<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
17251725
Rc::new(visitor.access_levels)
17261726
}
17271727

1728+
#[cfg(not(stage0))] // remove after the next snapshot
17281729
__build_diagnostic_array! { librustc_privacy, DIAGNOSTICS }

Diff for: src/librustc_resolve/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4089,4 +4089,5 @@ pub enum MakeGlobMap {
40894089
No,
40904090
}
40914091

4092+
#[cfg(not(stage0))] // remove after the next snapshot
40924093
__build_diagnostic_array! { librustc_resolve, DIAGNOSTICS }

Diff for: src/librustc_trans/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -328,4 +328,5 @@ pub struct CrateInfo {
328328
used_crates_dynamic: Vec<(CrateNum, LibSource)>,
329329
}
330330

331+
#[cfg(not(stage0))] // remove after the next snapshot
331332
__build_diagnostic_array! { librustc_trans, DIAGNOSTICS }

Diff for: src/librustc_typeck/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -380,4 +380,5 @@ pub fn hir_trait_to_predicates<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, hir_trait:
380380
(principal, projections)
381381
}
382382

383+
#[cfg(not(stage0))] // remove after the next snapshot
383384
__build_diagnostic_array! { librustc_typeck, DIAGNOSTICS }

Diff for: src/libstd/rt.rs

+2-47
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub use panicking::{begin_panic, begin_panic_fmt, update_panic_count};
2828

2929
// To reduce the generated code of the new `lang_start`, this function is doing
3030
// the real work.
31-
#[cfg(not(any(test, stage0)))]
31+
#[cfg(not(test))]
3232
fn lang_start_internal(main: &(Fn() -> i32 + Sync + ::panic::RefUnwindSafe),
3333
argc: isize, argv: *const *const u8) -> isize {
3434
use panic;
@@ -66,55 +66,10 @@ fn lang_start_internal(main: &(Fn() -> i32 + Sync + ::panic::RefUnwindSafe),
6666
}
6767
}
6868

69-
#[cfg(not(any(test, stage0)))]
69+
#[cfg(not(test))]
7070
#[lang = "start"]
7171
fn lang_start<T: ::termination::Termination + 'static>
7272
(main: fn() -> T, argc: isize, argv: *const *const u8) -> isize
7373
{
7474
lang_start_internal(&move || main().report(), argc, argv)
7575
}
76-
77-
#[cfg(all(not(test), stage0))]
78-
#[lang = "start"]
79-
fn lang_start(main: fn(), argc: isize, argv: *const *const u8) -> isize {
80-
use panic;
81-
use sys;
82-
use sys_common;
83-
use sys_common::thread_info;
84-
use thread::Thread;
85-
#[cfg(not(feature = "backtrace"))]
86-
use mem;
87-
88-
sys::init();
89-
90-
let failed = unsafe {
91-
let main_guard = sys::thread::guard::init();
92-
sys::stack_overflow::init();
93-
94-
// Next, set up the current Thread with the guard information we just
95-
// created. Note that this isn't necessary in general for new threads,
96-
// but we just do this to name the main thread and to give it correct
97-
// info about the stack bounds.
98-
let thread = Thread::new(Some("main".to_owned()));
99-
thread_info::set(main_guard, thread);
100-
101-
// Store our args if necessary in a squirreled away location
102-
sys::args::init(argc, argv);
103-
104-
// Let's run some code!
105-
#[cfg(feature = "backtrace")]
106-
let res = panic::catch_unwind(|| {
107-
::sys_common::backtrace::__rust_begin_short_backtrace(main)
108-
});
109-
#[cfg(not(feature = "backtrace"))]
110-
let res = panic::catch_unwind(mem::transmute::<_, fn()>(main));
111-
sys_common::cleanup();
112-
res.is_err()
113-
};
114-
115-
if failed {
116-
101
117-
} else {
118-
0
119-
}
120-
}

Diff for: src/libstd/termination.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod exit {
2929
///
3030
/// The default implementations are returning `libc::EXIT_SUCCESS` to indicate
3131
/// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned.
32-
#[cfg_attr(not(any(stage0, test)), lang = "termination")]
32+
#[cfg_attr(not(test), lang = "termination")]
3333
#[unstable(feature = "termination_trait", issue = "43301")]
3434
#[rustc_on_unimplemented =
3535
"`main` can only return types that implement {Termination}, not `{Self}`"]

Diff for: src/libsyntax/diagnostics/metadata.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,17 @@
1414
//! currently always a crate name.
1515
1616
use std::collections::BTreeMap;
17-
use std::path::PathBuf;
17+
use std::env;
1818
use std::fs::{remove_file, create_dir_all, File};
1919
use std::io::Write;
20+
use std::path::PathBuf;
2021
use std::error::Error;
2122
use rustc_serialize::json::as_json;
2223

2324
use syntax_pos::{Span, FileName};
2425
use ext::base::ExtCtxt;
2526
use diagnostics::plugin::{ErrorMap, ErrorInfo};
2627

27-
// Default metadata directory to use for extended error JSON.
28-
const ERROR_METADATA_PREFIX: &'static str = "tmp/extended-errors";
29-
3028
/// JSON encodable/decodable version of `ErrorInfo`.
3129
#[derive(PartialEq, RustcDecodable, RustcEncodable)]
3230
pub struct ErrorMetadata {
@@ -59,7 +57,10 @@ impl ErrorLocation {
5957
///
6058
/// See `output_metadata`.
6159
pub fn get_metadata_dir(prefix: &str) -> PathBuf {
62-
PathBuf::from(ERROR_METADATA_PREFIX).join(prefix)
60+
env::var_os("RUSTC_ERROR_METADATA_DST")
61+
.map(PathBuf::from)
62+
.expect("env var `RUSTC_ERROR_METADATA_DST` isn't set")
63+
.join(prefix)
6364
}
6465

6566
/// Map `name` to a path in the given directory: <directory>/<name>.json

Diff for: src/libsyntax/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,5 @@ pub mod ext {
151151
#[cfg(test)]
152152
mod test_snippet;
153153

154+
#[cfg(not(stage0))] // remove after the next snapshot
154155
__build_diagnostic_array! { libsyntax, DIAGNOSTICS }

Diff for: src/stage0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
1313
# `0.x.0` for Cargo where they were released on `date`.
1414

15-
date: 2017-11-21
15+
date: 2018-01-02
1616
rustc: beta
1717
cargo: beta
1818

0 commit comments

Comments
 (0)