Skip to content

Commit f6b35d0

Browse files
committed
---
yaml --- r: 114172 b: refs/heads/master c: bfbd732 h: refs/heads/master v: v3
1 parent 6143ab4 commit f6b35d0

File tree

10 files changed

+17
-51
lines changed

10 files changed

+17
-51
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: 182c96c9212a2b7e830fe5f9a6662e72f73775ec
2+
refs/heads/master: bfbd732daebe5f7cd26e3244a6377f0e3ab34d0f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#
6969
# * `TESTNAME=...` - Specify the name of tests to run
7070
# * `CHECK_IGNORED=1` - Run normally-ignored tests
71-
# * `NO_BENCH=1` - Don't run crate benchmarks (disable `--bench` flag)
71+
# * `PLEASE_BENCH=1` - Run crate benchmarks (enable `--bench` flag)
7272
#
7373
# * `CFG_ENABLE_VALGRIND=1` - Run tests under valgrind
7474
# * `VALGRIND_COMPILE=1` - Run the compiler itself under valgrind

trunk/mk/tests.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ ifdef CHECK_IGNORED
3232
TESTARGS += --ignored
3333
endif
3434

35-
TEST_BENCH = --bench
35+
TEST_BENCH =
3636

3737
# Arguments to the cfail/rfail/rpass/bench tests
3838
ifdef CFG_VALGRIND
3939
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
4040
TEST_BENCH =
4141
endif
4242

43-
ifdef NO_BENCH
44-
TEST_BENCH =
43+
ifdef PLEASE_BENCH
44+
TEST_BENCH = --bench
4545
endif
4646

4747
# Arguments to the perf tests

trunk/src/librustc/driver/config.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use syntax::ast;
2727
use syntax::ast::{IntTy, UintTy};
2828
use syntax::attr;
2929
use syntax::attr::AttrMetaMethods;
30-
use syntax::diagnostic::{ColorConfig, Auto, Always, Never};
3130
use syntax::parse;
3231
use syntax::parse::token::InternedString;
3332

@@ -93,7 +92,6 @@ pub struct Options {
9392
/// Crate id-related things to maybe print. It's (crate_id, crate_name, crate_file_name).
9493
pub print_metas: (bool, bool, bool),
9594
pub cg: CodegenOptions,
96-
pub color: ColorConfig,
9795
}
9896

9997
/// Some reasonable defaults
@@ -117,7 +115,6 @@ pub fn basic_options() -> Options {
117115
write_dependency_info: (false, None),
118116
print_metas: (false, false, false),
119117
cg: basic_codegen_options(),
120-
color: Auto,
121118
}
122119
}
123120

@@ -539,11 +536,7 @@ pub fn optgroups() -> Vec<getopts::OptGroup> {
539536
optmulti("F", "forbid", "Set lint forbidden", "OPT"),
540537
optmulti("C", "codegen", "Set a codegen option", "OPT[=VALUE]"),
541538
optmulti("Z", "", "Set internal debugging options", "FLAG"),
542-
optflag("v", "version", "Print version info and exit"),
543-
optopt("", "color", "Configure coloring of output:
544-
auto = colorize, if output goes to a tty (default);
545-
always = always colorize output;
546-
never = never colorize output", "auto|always|never")
539+
optflag( "v", "version", "Print version info and exit")
547540
)
548541
}
549542

@@ -714,18 +707,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
714707
matches.opt_present("crate-file-name"));
715708
let cg = build_codegen_options(matches);
716709

717-
let color = match matches.opt_str("color").as_ref().map(|s| s.as_slice()) {
718-
Some("auto") => Auto,
719-
Some("always") => Always,
720-
Some("never") => Never,
721-
722-
None => Auto,
723-
724-
Some(arg) => early_error(format!(
725-
"argument for --color must be auto, always or never (instead was `{}`)",
726-
arg))
727-
};
728-
729710
Options {
730711
crate_types: crate_types,
731712
gc: gc,
@@ -745,7 +726,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
745726
write_dependency_info: write_dependency_info,
746727
print_metas: print_metas,
747728
cg: cg,
748-
color: color
749729
}
750730
}
751731

trunk/src/librustc/driver/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ fn parse_crate_attrs(sess: &Session, input: &Input) ->
323323
}
324324

325325
pub fn early_error(msg: &str) -> ! {
326-
let mut emitter = diagnostic::EmitterWriter::stderr(diagnostic::Auto);
326+
let mut emitter = diagnostic::EmitterWriter::stderr();
327327
emitter.emit(None, msg, diagnostic::Fatal);
328328
fail!(diagnostic::FatalError);
329329
}
@@ -368,7 +368,7 @@ fn monitor(f: proc():Send) {
368368
Err(value) => {
369369
// Task failed without emitting a fatal diagnostic
370370
if !value.is::<diagnostic::FatalError>() {
371-
let mut emitter = diagnostic::EmitterWriter::stderr(diagnostic::Auto);
371+
let mut emitter = diagnostic::EmitterWriter::stderr();
372372

373373
// a .span_bug or .bug call has already printed what
374374
// it wants to print.

trunk/src/librustc/driver/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ pub fn build_session(sopts: config::Options,
196196
-> Session {
197197
let codemap = codemap::CodeMap::new();
198198
let diagnostic_handler =
199-
diagnostic::default_handler(sopts.color);
199+
diagnostic::default_handler();
200200
let span_diagnostic_handler =
201201
diagnostic::mk_span_handler(diagnostic_handler, codemap);
202202

trunk/src/librustdoc/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn get_ast_and_resolve(cpath: &Path, libs: HashSet<Path>, cfgs: Vec<StrBuf>)
7878

7979

8080
let codemap = syntax::codemap::CodeMap::new();
81-
let diagnostic_handler = syntax::diagnostic::default_handler(syntax::diagnostic::Auto);
81+
let diagnostic_handler = syntax::diagnostic::default_handler();
8282
let span_diagnostic_handler =
8383
syntax::diagnostic::mk_span_handler(diagnostic_handler, codemap);
8484

trunk/src/librustdoc/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn run(input: &str,
5353

5454

5555
let codemap = CodeMap::new();
56-
let diagnostic_handler = diagnostic::default_handler(diagnostic::Auto);
56+
let diagnostic_handler = diagnostic::default_handler();
5757
let span_diagnostic_handler =
5858
diagnostic::mk_span_handler(diagnostic_handler, codemap);
5959

trunk/src/libsyntax/diagnostic.rs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ impl RenderSpan {
4949
}
5050
}
5151

52-
#[deriving(Clone)]
53-
pub enum ColorConfig {
54-
Auto,
55-
Always,
56-
Never
57-
}
58-
5952
pub trait Emitter {
6053
fn emit(&mut self, cmsp: Option<(&codemap::CodeMap, Span)>,
6154
msg: &str, lvl: Level);
@@ -183,8 +176,8 @@ pub fn mk_span_handler(handler: Handler, cm: codemap::CodeMap) -> SpanHandler {
183176
}
184177
}
185178

186-
pub fn default_handler(color_config: ColorConfig) -> Handler {
187-
mk_handler(box EmitterWriter::stderr(color_config))
179+
pub fn default_handler() -> Handler {
180+
mk_handler(box EmitterWriter::stderr())
188181
}
189182

190183
pub fn mk_handler(e: Box<Emitter:Send>) -> Handler {
@@ -264,16 +257,9 @@ enum Destination {
264257
}
265258

266259
impl EmitterWriter {
267-
pub fn stderr(color_config: ColorConfig) -> EmitterWriter {
260+
pub fn stderr() -> EmitterWriter {
268261
let stderr = io::stderr();
269-
270-
let use_color = match color_config {
271-
Always => true,
272-
Never => false,
273-
Auto => stderr.get_ref().isatty()
274-
};
275-
276-
if use_color {
262+
if stderr.get_ref().isatty() {
277263
let dst = match term::Terminal::new(stderr.unwrap()) {
278264
Ok(t) => Terminal(t),
279265
Err(..) => Raw(box io::stderr()),

trunk/src/libsyntax/parse/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use ast;
1515
use codemap::{Span, CodeMap, FileMap};
16-
use diagnostic::{SpanHandler, mk_span_handler, default_handler, Auto};
16+
use diagnostic::{SpanHandler, mk_span_handler, default_handler};
1717
use parse::attr::ParserAttr;
1818
use parse::parser::Parser;
1919

@@ -41,7 +41,7 @@ pub struct ParseSess {
4141

4242
pub fn new_parse_sess() -> ParseSess {
4343
ParseSess {
44-
span_diagnostic: mk_span_handler(default_handler(Auto), CodeMap::new()),
44+
span_diagnostic: mk_span_handler(default_handler(), CodeMap::new()),
4545
included_mod_stack: RefCell::new(Vec::new()),
4646
}
4747
}

0 commit comments

Comments
 (0)