Skip to content

Commit fc8deb7

Browse files
committed
---
yaml --- r: 179576 b: refs/heads/master c: de8bc44 h: refs/heads/master v: v3
1 parent 5a57fc3 commit fc8deb7

File tree

27 files changed

+3013
-218
lines changed

27 files changed

+3013
-218
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f9c577e5141dda6413efcfd036389d7d2480e528
2+
refs/heads/master: de8bc44753881aacdaf435f5ba61de3c20916761
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 0ba9e1fa52627404a1e5b90f745f96a872a0c564
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/configure

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,7 @@ probe CFG_GRUN grun
653653
probe CFG_FLEX flex
654654
probe CFG_BISON bison
655655
probe CFG_PANDOC pandoc
656-
probe CFG_PDFLATEX pdflatex
657656
probe CFG_XELATEX xelatex
658-
probe CFG_LUALATEX lualatex
659657
probe CFG_GDB gdb
660658
probe CFG_LLDB lldb
661659

trunk/mk/docs.mk

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,16 @@ else
8585
HTML_DEPS :=
8686
endif
8787

88-
# Check for the various external utilities for the EPUB/PDF docs:
89-
90-
ifeq ($(CFG_LUALATEX),)
91-
$(info cfg: no lualatex found, deferring to xelatex)
92-
ifeq ($(CFG_XELATEX),)
93-
$(info cfg: no xelatex found, deferring to pdflatex)
94-
ifeq ($(CFG_PDFLATEX),)
95-
$(info cfg: no pdflatex found, disabling LaTeX docs)
96-
NO_PDF_DOCS = 1
97-
else
98-
CFG_LATEX := $(CFG_PDFLATEX)
99-
endif
100-
else
88+
# Check for xelatex
89+
90+
ifeq ($(CFG_XELATEX),)
10191
CFG_LATEX := $(CFG_XELATEX)
10292
XELATEX = 1
103-
endif
104-
else
105-
CFG_LATEX := $(CFG_LUALATEX)
93+
else
94+
$(info cfg: no xelatex found, disabling LaTeX docs)
95+
NO_PDF_DOCS = 1
10696
endif
10797

108-
10998
ifeq ($(CFG_PANDOC),)
11099
$(info cfg: no pandoc found, omitting PDF and EPUB docs)
111100
ONLY_HTML_DOCS = 1

trunk/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub use core::str::{Lines, LinesAny, MatchIndices, SplitStr, CharRange};
8080
pub use core::str::{Split, SplitTerminator};
8181
pub use core::str::{SplitN, RSplitN};
8282
pub use core::str::{from_utf8, CharEq, Chars, CharIndices, Bytes};
83-
pub use core::str::{from_utf8_unchecked, from_c_str};
83+
pub use core::str::{from_utf8_unchecked, from_c_str, ParseBoolError};
8484
pub use unicode::str::{Words, Graphemes, GraphemeIndices};
8585

8686
/*

trunk/src/libcollections/vec.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,8 @@ impl<T> Vec<T> {
690690
/// Panics if the number of elements in the vector overflows a `usize`.
691691
///
692692
/// # Examples
693-
/// ```rust
693+
///
694+
/// ```
694695
/// let mut vec = vec![1, 2, 3];
695696
/// let mut vec2 = vec![4, 5, 6];
696697
/// vec.append(&mut vec2);
@@ -1002,8 +1003,13 @@ impl<T> Vec<T> {
10021003
///
10031004
/// Note that the capacity of `self` does not change.
10041005
///
1006+
/// # Panics
1007+
///
1008+
/// Panics if `at > len`.
1009+
///
10051010
/// # Examples
1006-
/// ```rust
1011+
///
1012+
/// ```
10071013
/// let mut vec = vec![1,2,3];
10081014
/// let vec2 = vec.split_off(1);
10091015
/// assert_eq!(vec, vec![1]);
@@ -1013,7 +1019,7 @@ impl<T> Vec<T> {
10131019
#[unstable(feature = "collections",
10141020
reason = "new API, waiting for dust to settle")]
10151021
pub fn split_off(&mut self, at: usize) -> Self {
1016-
assert!(at < self.len(), "`at` out of bounds");
1022+
assert!(at <= self.len(), "`at` out of bounds");
10171023

10181024
let other_len = self.len - at;
10191025
let mut other = Vec::with_capacity(other_len);

trunk/src/librustc/session/config.rs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ use syntax::diagnostic::{ColorConfig, Auto, Always, Never, SpanHandler};
3333
use syntax::parse;
3434
use syntax::parse::token::InternedString;
3535

36+
use getopts;
3637
use std::collections::HashMap;
3738
use std::collections::hash_map::Entry::{Occupied, Vacant};
38-
use getopts;
39+
use std::env;
3940
use std::fmt;
4041

4142
use llvm;
@@ -821,7 +822,6 @@ pub fn parse_cfgspecs(cfgspecs: Vec<String> ) -> ast::CrateConfig {
821822
}
822823

823824
pub fn build_session_options(matches: &getopts::Matches) -> Options {
824-
825825
let unparsed_crate_types = matches.opt_strs("crate-type");
826826
let crate_types = parse_crate_types_from_list(unparsed_crate_types)
827827
.unwrap_or_else(|e| early_error(&e[]));
@@ -1041,7 +1041,22 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
10411041
crate_name: crate_name,
10421042
alt_std_name: None,
10431043
libs: libs,
1044-
unstable_features: UnstableFeatures::Disallow
1044+
unstable_features: get_unstable_features_setting(),
1045+
}
1046+
}
1047+
1048+
pub fn get_unstable_features_setting() -> UnstableFeatures {
1049+
// Whether this is a feature-staged build, i.e. on the beta or stable channel
1050+
let disable_unstable_features = option_env!("CFG_DISABLE_UNSTABLE_FEATURES").is_some();
1051+
// The secret key needed to get through the rustc build itself by
1052+
// subverting the unstable features lints
1053+
let bootstrap_secret_key = option_env!("CFG_BOOTSTRAP_KEY");
1054+
// The matching key to the above, only known by the build system
1055+
let bootstrap_provided_key = env::var_string("RUSTC_BOOTSTRAP_KEY").ok();
1056+
match (disable_unstable_features, bootstrap_secret_key, bootstrap_provided_key) {
1057+
(_, Some(ref s), Some(ref p)) if s == p => UnstableFeatures::Cheat,
1058+
(true, _, _) => UnstableFeatures::Disallow,
1059+
(false, _, _) => UnstableFeatures::Default
10451060
}
10461061
}
10471062

trunk/src/librustc_driver/driver.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -27,6 +27,7 @@ use rustc_trans::back::write;
2727
use rustc_trans::trans;
2828
use rustc_typeck as typeck;
2929
use rustc_privacy;
30+
use super::Compilation;
3031

3132
use serialize::json;
3233

@@ -55,7 +56,7 @@ pub fn compile_input(sess: Session,
5556
let state = $make_state;
5657
(control.$point.callback)(state);
5758
}
58-
if control.$point.stop {
59+
if control.$point.stop == Compilation::Stop {
5960
return;
6061
}
6162
})}
@@ -206,14 +207,14 @@ impl<'a> CompileController<'a> {
206207
}
207208

208209
pub struct PhaseController<'a> {
209-
pub stop: bool,
210+
pub stop: Compilation,
210211
pub callback: Box<Fn(CompileState) -> () + 'a>,
211212
}
212213

213214
impl<'a> PhaseController<'a> {
214215
pub fn basic() -> PhaseController<'a> {
215216
PhaseController {
216-
stop: false,
217+
stop: Compilation::Continue,
217218
callback: box |_| {},
218219
}
219220
}

0 commit comments

Comments
 (0)