compiletest: Validate pass modes harder

This commit is contained in:
Vadim Petrochenkov 2019-06-12 17:56:51 +03:00
parent 6203f68735
commit 8e8fba1b3b
11 changed files with 49 additions and 32 deletions

View file

@ -2,7 +2,7 @@
// rustc_on_unimplemented, but with this bug we are seeing it fire (on
// subsequent runs) if incremental compilation is enabled.
// revisions: rpass1 rpass2
// revisions: cfail1 cfail2
// compile-pass
#![feature(on_unimplemented)]

View file

@ -3,7 +3,7 @@
// seeing it fire (on subsequent runs) if incremental compilation is
// enabled.
// revisions: rpass1 rpass2
// revisions: cfail1 cfail2
// compile-pass
#![feature(rustc_attrs)]

View file

@ -1,4 +1,4 @@
// compile-pass
// error-pattern:returned Box<dyn Error> from main()
// failure-status: 1
use std::error::Error;

View file

@ -1,4 +1,4 @@
// compile-pass
// error-pattern:returned Box<Error> from main()
// failure-status: 1
use std::io::{Error, ErrorKind};

View file

@ -1,4 +1,3 @@
// compile-pass
// run-pass
#![feature(const_fn_union)]

View file

@ -1,4 +1,3 @@
// compile-pass
// run-pass
enum Foo {

View file

@ -1,5 +1,4 @@
// skip-codegen
// compile-pass
// check-pass
macro_rules! mac {
{} => {
@ -19,5 +18,4 @@ macro_rules! mac {
mac! {}
fn main() {}

View file

@ -1,5 +1,5 @@
// skip-codegen
// compile-pass
// check-pass
#![feature(unboxed_closures, fn_traits)]
struct Foo;

View file

@ -1,10 +1,8 @@
// skip-codegen
// compile-pass
// check-pass
#![warn(unused)]
type Z = dyn for<'x> Send;
//~^ WARN type alias is never used
fn main() {
}
fn main() {}

View file

@ -1,20 +1,16 @@
// compile-pass
#![deny(single_use_lifetimes)]
#![allow(dead_code)]
#![allow(unused_variables)]
// Test that we DO NOT warn when lifetime name is used only
// once in a fn return type -- using `'_` is not legal there,
// as it must refer back to an argument.
//
// (Normally, using `'static` would be preferred, but there are
// times when that is not what you want.)
//
// run-pass
// compile-pass
#![deny(single_use_lifetimes)]
fn b<'a>() -> &'a u32 { // OK: used only in return type
&22
}
fn main() { }
fn main() {}