Skip to content

Commit dca8a68

Browse files
committed
---
yaml --- r: 274239 b: refs/heads/stable c: f3b525f h: refs/heads/master i: 274237: 9e763df 274235: 5a12e3a 274231: c939899 274223: 253f183 274207: d9fdc15 274175: 23ea8c6
1 parent 15bf312 commit dca8a68

17 files changed

+47
-35
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 585cf6fb5f0c2736c781b6efb4651ba6d317a753
32+
refs/heads/stable: f3b525fb97c48976c740da50a38ec8c9e5f29b7e
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_driver/driver.rs

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ pub fn compile_input(sess: Session,
7070
(control.$point.callback)(state);
7171

7272
if control.$point.stop == Compilation::Stop {
73+
$tsess.abort_if_errors();
7374
return;
7475
}
7576
})}
@@ -469,7 +470,11 @@ pub fn phase_2_configure_and_expand(sess: &Session,
469470

470471
let mut feature_gated_cfgs = vec![];
471472
krate = time(time_passes, "configuration 1", || {
472-
syntax::config::strip_unconfigured_items(sess.diagnostic(), krate, &mut feature_gated_cfgs)
473+
sess.abort_if_new_errors(|| {
474+
syntax::config::strip_unconfigured_items(sess.diagnostic(),
475+
krate,
476+
&mut feature_gated_cfgs)
477+
})
473478
});
474479

475480
*sess.crate_types.borrow_mut() = collect_crate_types(sess, &krate.attrs);
@@ -605,17 +610,23 @@ pub fn phase_2_configure_and_expand(sess: &Session,
605610
// JBC: make CFG processing part of expansion to avoid this problem:
606611

607612
// strip again, in case expansion added anything with a #[cfg].
608-
krate = time(time_passes, "configuration 2", || {
609-
syntax::config::strip_unconfigured_items(sess.diagnostic(), krate, &mut feature_gated_cfgs)
610-
});
613+
krate = sess.abort_if_new_errors(|| {
614+
let krate = time(time_passes, "configuration 2", || {
615+
syntax::config::strip_unconfigured_items(sess.diagnostic(),
616+
krate,
617+
&mut feature_gated_cfgs)
618+
});
611619

612-
time(time_passes, "gated configuration checking", || {
613-
let features = sess.features.borrow();
614-
feature_gated_cfgs.sort();
615-
feature_gated_cfgs.dedup();
616-
for cfg in &feature_gated_cfgs {
617-
cfg.check_and_emit(sess.diagnostic(), &features, sess.codemap());
618-
}
620+
time(time_passes, "gated configuration checking", || {
621+
let features = sess.features.borrow();
622+
feature_gated_cfgs.sort();
623+
feature_gated_cfgs.dedup();
624+
for cfg in &feature_gated_cfgs {
625+
cfg.check_and_emit(sess.diagnostic(), &features, sess.codemap());
626+
}
627+
});
628+
629+
krate
619630
});
620631

621632
krate = time(time_passes, "maybe building test harness", || {

branches/stable/src/librustc_typeck/check/mod.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4229,7 +4229,9 @@ pub fn check_enum_variants<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>,
42294229
}
42304230
// Check for unrepresentable discriminant values
42314231
match hint {
4232-
attr::ReprAny | attr::ReprExtern => (),
4232+
attr::ReprAny | attr::ReprExtern => {
4233+
disr_vals.push(current_disr_val);
4234+
}
42334235
attr::ReprInt(sp, ity) => {
42344236
if !disr_in_range(ccx, ity, current_disr_val) {
42354237
let mut err = struct_span_err!(ccx.tcx.sess, v.span, E0082,
@@ -4239,14 +4241,9 @@ pub fn check_enum_variants<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>,
42394241
err.emit();
42404242
}
42414243
}
4242-
attr::ReprSimd => {
4243-
ccx.tcx.sess.bug("range_to_inttype: found ReprSimd on an enum");
4244-
}
4245-
attr::ReprPacked => {
4246-
ccx.tcx.sess.bug("range_to_inttype: found ReprPacked on an enum");
4247-
}
4244+
// Error reported elsewhere.
4245+
attr::ReprSimd | attr::ReprPacked => {}
42484246
}
4249-
disr_vals.push(current_disr_val);
42504247
}
42514248
}
42524249

branches/stable/src/test/compile-fail/cfg-non-opt-expr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(stmt_expr_attributes)]
12+
1113
fn main() {
1214
let _ = #[cfg(unset)] ();
1315
//~^ ERROR removing an expression is not supported in this position

branches/stable/src/test/compile-fail/double-type-import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ mod foo {
2020
}
2121

2222
fn main() {
23-
let _ = foo::X;
23+
let _ = foo::X; //~ ERROR unresolved name `foo::X`
2424
}

branches/stable/src/test/compile-fail/import-from-missing.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ mod spam {
1616
}
1717

1818
fn main() { ham(); eggs(); }
19+
//~^ ERROR unresolved name `eggs`

branches/stable/src/test/compile-fail/import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ use zed::baz;
1616
mod zed {
1717
pub fn bar() { println!("bar"); }
1818
}
19-
fn main(args: Vec<String>) { bar(); }
19+
fn main() { bar(); }

branches/stable/src/test/compile-fail/import2.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ mod baz {}
1616
mod zed {
1717
pub fn bar() { println!("bar3"); }
1818
}
19-
fn main(args: Vec<String>) { bar(); }
19+
fn main() { bar(); }
20+
//~^ ERROR unresolved name `bar`

branches/stable/src/test/compile-fail/macro-reexport-malformed-1.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![no_std]
1112
#![feature(macro_reexport)]
1213

1314
#[macro_reexport] //~ ERROR bad macro reexport
1415
extern crate std;
15-
16-
fn main() { }

branches/stable/src/test/compile-fail/macro-reexport-malformed-2.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![no_std]
1112
#![feature(macro_reexport)]
1213

1314
#[macro_reexport="foo"] //~ ERROR bad macro reexport
1415
extern crate std;
15-
16-
fn main() { }

branches/stable/src/test/compile-fail/macro-reexport-malformed-3.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![no_std]
1112
#![feature(macro_reexport)]
1213

1314
#[macro_reexport(foo="bar")] //~ ERROR bad macro reexport
1415
extern crate std;
15-
16-
fn main() { }

branches/stable/src/test/compile-fail/macro-reexport-undef.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// aux-build:two_macros.rs
1212

13+
#![feature(macro_reexport)]
14+
1315
#[macro_use(macro_two)]
1416
#[macro_reexport(no_way)] //~ ERROR reexported macro not found
1517
extern crate two_macros;

branches/stable/src/test/compile-fail/macro-use-bad-args-1.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![no_std]
12+
1113
#[macro_use(foo(bar))] //~ ERROR bad macro import
1214
extern crate std;
13-
14-
fn main() {
15-
}

branches/stable/src/test/compile-fail/macro-use-bad-args-2.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![no_std]
12+
1113
#[macro_use(foo="bar")] //~ ERROR bad macro import
1214
extern crate std;
13-
14-
fn main() {
15-
}

branches/stable/src/test/compile-fail/privacy3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fn test1() {
2828
use bar::gpriv;
2929
//~^ ERROR unresolved import `bar::gpriv`. There is no `gpriv` in `bar`
3030
gpriv();
31+
//~^ ERROR unresolved name `gpriv`
3132
}
3233

3334
#[start] fn main(_: isize, _: *const *const u8) -> isize { 3 }

branches/stable/src/test/compile-fail/self_type_keyword.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub fn main() {
2929
//~^ ERROR expected identifier, found keyword `Self`
3030
Self!() => (),
3131
//~^ ERROR expected identifier, found keyword `Self`
32+
//~^^ ERROR macro undefined: 'Self!'
3233
Foo { x: Self } => (),
3334
//~^ ERROR expected identifier, found keyword `Self`
3435
Foo { Self } => (),

branches/stable/src/test/compile-fail/use-mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use foo::bar::{
1414
Bar,
1515
self
1616
//~^ NOTE another `self` import appears here
17+
//~^^ ERROR a module named `bar` has already been imported in this module
1718
};
1819

1920
use {self};

0 commit comments

Comments
 (0)