test fallout
This commit is contained in:
parent
585cf6fb5f
commit
f3b525fb97
16 changed files with 46 additions and 34 deletions
|
@ -70,6 +70,7 @@ pub fn compile_input(sess: Session,
|
|||
(control.$point.callback)(state);
|
||||
|
||||
if control.$point.stop == Compilation::Stop {
|
||||
$tsess.abort_if_errors();
|
||||
return;
|
||||
}
|
||||
})}
|
||||
|
@ -469,7 +470,11 @@ pub fn phase_2_configure_and_expand(sess: &Session,
|
|||
|
||||
let mut feature_gated_cfgs = vec![];
|
||||
krate = time(time_passes, "configuration 1", || {
|
||||
syntax::config::strip_unconfigured_items(sess.diagnostic(), krate, &mut feature_gated_cfgs)
|
||||
sess.abort_if_new_errors(|| {
|
||||
syntax::config::strip_unconfigured_items(sess.diagnostic(),
|
||||
krate,
|
||||
&mut feature_gated_cfgs)
|
||||
})
|
||||
});
|
||||
|
||||
*sess.crate_types.borrow_mut() = collect_crate_types(sess, &krate.attrs);
|
||||
|
@ -605,17 +610,23 @@ pub fn phase_2_configure_and_expand(sess: &Session,
|
|||
// JBC: make CFG processing part of expansion to avoid this problem:
|
||||
|
||||
// strip again, in case expansion added anything with a #[cfg].
|
||||
krate = time(time_passes, "configuration 2", || {
|
||||
syntax::config::strip_unconfigured_items(sess.diagnostic(), krate, &mut feature_gated_cfgs)
|
||||
});
|
||||
krate = sess.abort_if_new_errors(|| {
|
||||
let krate = time(time_passes, "configuration 2", || {
|
||||
syntax::config::strip_unconfigured_items(sess.diagnostic(),
|
||||
krate,
|
||||
&mut feature_gated_cfgs)
|
||||
});
|
||||
|
||||
time(time_passes, "gated configuration checking", || {
|
||||
let features = sess.features.borrow();
|
||||
feature_gated_cfgs.sort();
|
||||
feature_gated_cfgs.dedup();
|
||||
for cfg in &feature_gated_cfgs {
|
||||
cfg.check_and_emit(sess.diagnostic(), &features, sess.codemap());
|
||||
}
|
||||
time(time_passes, "gated configuration checking", || {
|
||||
let features = sess.features.borrow();
|
||||
feature_gated_cfgs.sort();
|
||||
feature_gated_cfgs.dedup();
|
||||
for cfg in &feature_gated_cfgs {
|
||||
cfg.check_and_emit(sess.diagnostic(), &features, sess.codemap());
|
||||
}
|
||||
});
|
||||
|
||||
krate
|
||||
});
|
||||
|
||||
krate = time(time_passes, "maybe building test harness", || {
|
||||
|
|
|
@ -4229,7 +4229,9 @@ pub fn check_enum_variants<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>,
|
|||
}
|
||||
// Check for unrepresentable discriminant values
|
||||
match hint {
|
||||
attr::ReprAny | attr::ReprExtern => (),
|
||||
attr::ReprAny | attr::ReprExtern => {
|
||||
disr_vals.push(current_disr_val);
|
||||
}
|
||||
attr::ReprInt(sp, ity) => {
|
||||
if !disr_in_range(ccx, ity, current_disr_val) {
|
||||
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>,
|
|||
err.emit();
|
||||
}
|
||||
}
|
||||
attr::ReprSimd => {
|
||||
ccx.tcx.sess.bug("range_to_inttype: found ReprSimd on an enum");
|
||||
}
|
||||
attr::ReprPacked => {
|
||||
ccx.tcx.sess.bug("range_to_inttype: found ReprPacked on an enum");
|
||||
}
|
||||
// Error reported elsewhere.
|
||||
attr::ReprSimd | attr::ReprPacked => {}
|
||||
}
|
||||
disr_vals.push(current_disr_val);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(stmt_expr_attributes)]
|
||||
|
||||
fn main() {
|
||||
let _ = #[cfg(unset)] ();
|
||||
//~^ ERROR removing an expression is not supported in this position
|
||||
|
|
|
@ -20,5 +20,5 @@ mod foo {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let _ = foo::X;
|
||||
let _ = foo::X; //~ ERROR unresolved name `foo::X`
|
||||
}
|
||||
|
|
|
@ -16,3 +16,4 @@ mod spam {
|
|||
}
|
||||
|
||||
fn main() { ham(); eggs(); }
|
||||
//~^ ERROR unresolved name `eggs`
|
||||
|
|
|
@ -16,4 +16,4 @@ use zed::baz;
|
|||
mod zed {
|
||||
pub fn bar() { println!("bar"); }
|
||||
}
|
||||
fn main(args: Vec<String>) { bar(); }
|
||||
fn main() { bar(); }
|
||||
|
|
|
@ -16,4 +16,5 @@ mod baz {}
|
|||
mod zed {
|
||||
pub fn bar() { println!("bar3"); }
|
||||
}
|
||||
fn main(args: Vec<String>) { bar(); }
|
||||
fn main() { bar(); }
|
||||
//~^ ERROR unresolved name `bar`
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![no_std]
|
||||
#![feature(macro_reexport)]
|
||||
|
||||
#[macro_reexport] //~ ERROR bad macro reexport
|
||||
extern crate std;
|
||||
|
||||
fn main() { }
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![no_std]
|
||||
#![feature(macro_reexport)]
|
||||
|
||||
#[macro_reexport="foo"] //~ ERROR bad macro reexport
|
||||
extern crate std;
|
||||
|
||||
fn main() { }
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![no_std]
|
||||
#![feature(macro_reexport)]
|
||||
|
||||
#[macro_reexport(foo="bar")] //~ ERROR bad macro reexport
|
||||
extern crate std;
|
||||
|
||||
fn main() { }
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
// aux-build:two_macros.rs
|
||||
|
||||
#![feature(macro_reexport)]
|
||||
|
||||
#[macro_use(macro_two)]
|
||||
#[macro_reexport(no_way)] //~ ERROR reexported macro not found
|
||||
extern crate two_macros;
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![no_std]
|
||||
|
||||
#[macro_use(foo(bar))] //~ ERROR bad macro import
|
||||
extern crate std;
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![no_std]
|
||||
|
||||
#[macro_use(foo="bar")] //~ ERROR bad macro import
|
||||
extern crate std;
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ fn test1() {
|
|||
use bar::gpriv;
|
||||
//~^ ERROR unresolved import `bar::gpriv`. There is no `gpriv` in `bar`
|
||||
gpriv();
|
||||
//~^ ERROR unresolved name `gpriv`
|
||||
}
|
||||
|
||||
#[start] fn main(_: isize, _: *const *const u8) -> isize { 3 }
|
||||
|
|
|
@ -29,6 +29,7 @@ pub fn main() {
|
|||
//~^ ERROR expected identifier, found keyword `Self`
|
||||
Self!() => (),
|
||||
//~^ ERROR expected identifier, found keyword `Self`
|
||||
//~^^ ERROR macro undefined: 'Self!'
|
||||
Foo { x: Self } => (),
|
||||
//~^ ERROR expected identifier, found keyword `Self`
|
||||
Foo { Self } => (),
|
||||
|
|
|
@ -14,6 +14,7 @@ use foo::bar::{
|
|||
Bar,
|
||||
self
|
||||
//~^ NOTE another `self` import appears here
|
||||
//~^^ ERROR a module named `bar` has already been imported in this module
|
||||
};
|
||||
|
||||
use {self};
|
||||
|
|
Loading…
Add table
Reference in a new issue