mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 21:53:56 +00:00
Return nonzero exit code if there are errors at a stop point
This commit is contained in:
parent
7a5754b330
commit
2a24e97c80
@ -52,11 +52,11 @@ pub fn compile_input(sess: Session,
|
||||
output: &Option<PathBuf>,
|
||||
addl_plugins: Option<Vec<String>>,
|
||||
control: CompileController) {
|
||||
macro_rules! controller_entry_point{($point: ident, $make_state: expr) => ({
|
||||
{
|
||||
macro_rules! controller_entry_point{($point: ident, $tsess: expr, $make_state: expr) => ({
|
||||
let state = $make_state;
|
||||
(control.$point.callback)(state);
|
||||
}
|
||||
|
||||
$tsess.abort_if_errors();
|
||||
if control.$point.stop == Compilation::Stop {
|
||||
return;
|
||||
}
|
||||
@ -70,6 +70,7 @@ pub fn compile_input(sess: Session,
|
||||
let krate = phase_1_parse_input(&sess, cfg, input);
|
||||
|
||||
controller_entry_point!(after_parse,
|
||||
sess,
|
||||
CompileState::state_after_parse(input,
|
||||
&sess,
|
||||
outdir,
|
||||
@ -96,6 +97,7 @@ pub fn compile_input(sess: Session,
|
||||
};
|
||||
|
||||
controller_entry_point!(after_expand,
|
||||
sess,
|
||||
CompileState::state_after_expand(input,
|
||||
&sess,
|
||||
outdir,
|
||||
@ -109,6 +111,7 @@ pub fn compile_input(sess: Session,
|
||||
write_out_deps(&sess, input, &outputs, &id[..]);
|
||||
|
||||
controller_entry_point!(after_write_deps,
|
||||
sess,
|
||||
CompileState::state_after_write_deps(input,
|
||||
&sess,
|
||||
outdir,
|
||||
@ -123,6 +126,7 @@ pub fn compile_input(sess: Session,
|
||||
control.make_glob_map);
|
||||
|
||||
controller_entry_point!(after_analysis,
|
||||
analysis.ty_cx.sess,
|
||||
CompileState::state_after_analysis(input,
|
||||
&analysis.ty_cx.sess,
|
||||
outdir,
|
||||
@ -149,6 +153,7 @@ pub fn compile_input(sess: Session,
|
||||
phase_5_run_llvm_passes(&sess, &trans, &outputs);
|
||||
|
||||
controller_entry_point!(after_llvm,
|
||||
sess,
|
||||
CompileState::state_after_llvm(input,
|
||||
&sess,
|
||||
outdir,
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
mod mod_file_disambig_aux; //~ ERROR file for module `mod_file_disambig_aux` found at both
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern: cannot declare a new module at this location
|
||||
|
||||
mod mod_file_not_owning_aux1;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// Test that the old fixed length array syntax is a parsing error.
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let x = "\x80"; //~ ERROR may only be used
|
||||
let y = "\xff"; //~ ERROR may only be used
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// Test you can't use a higher-ranked trait bound inside of a qualified
|
||||
// path (just won't parse).
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected `]`
|
||||
|
||||
// asterisk is bogus
|
||||
|
@ -8,4 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
#[derive(Debug)] //~ERROR expected item after attributes
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
#[attr] //~ ERROR expected item after attributes
|
||||
println!("hi");
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
#[attr] //~ ERROR expected item
|
||||
let __isize = 0;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected item
|
||||
|
||||
fn f() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected item
|
||||
|
||||
fn f() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected item
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
#![feature(lang_items)]
|
||||
|
||||
fn main() {}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// Constants (static variables) can be used to match in patterns, but mutable
|
||||
// statics cannot. This ensures that there's some form of error if this is
|
||||
// attempted.
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// ignore-tidy-cr
|
||||
// ignore-tidy-tab
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
|
||||
extern
|
||||
"C"suffix //~ ERROR ABI spec with a suffix is illegal
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern: expected
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern: expected
|
||||
|
||||
fn main() {
|
||||
|
@ -8,5 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn false() { } //~ ERROR expected identifier, found keyword `false`
|
||||
fn main() { }
|
||||
|
@ -8,5 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn true() { } //~ ERROR expected identifier, found keyword `true`
|
||||
fn main() { }
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let x: [isize 3]; //~ ERROR expected one of `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
struct Foo { x: isize }
|
||||
match (Foo { x: 10 }) {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
|
||||
// ignore-tidy-tab
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
|
||||
// ignore-tidy-tab
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// ignore-test: this is an auxiliary file for circular-modules-main.rs
|
||||
|
||||
mod circular_modules_main;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
#[path = "circular_modules_hello.rs"]
|
||||
mod circular_modules_hello; //~ ERROR: circular modules
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:nonexistent
|
||||
class cat : nonexistent {
|
||||
let meows: usize;
|
||||
|
@ -8,4 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
# //~ ERROR 11:1: 11:2 error: expected `[`, found `<eof>`
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
# //~ ERROR 13:1: 13:2 error: expected `[`, found `<eof>`
|
||||
|
@ -8,5 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
/// hi
|
||||
#[derive(Debug)] //~ERROR expected item after attributes
|
||||
|
@ -8,4 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
/// hi //~ERROR expected item after doc comment
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
extern {
|
||||
/// hi
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
/// hi
|
||||
println!("hi");
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
println!("Hi"); /// hi
|
||||
//~^ ERROR expected item after doc comment
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
/// hi
|
||||
;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:unmatched visibility `pub`
|
||||
extern {
|
||||
pub pub fn foo();
|
||||
|
@ -8,4 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
impl Foo; //~ ERROR expected one of `(`, `+`, `..`, `::`, `<`, `for`, `where`, or `{`, found `;`
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// Verifies that the expected token errors for `extern crate` are
|
||||
// raised
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// Verifies that the expected token errors for `extern crate` are
|
||||
// raised
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
extern {
|
||||
f(); //~ ERROR expected one of `fn`, `pub`, `static`, `unsafe`, or `}`, found `f`
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct Heap;
|
||||
|
||||
struct Vec<A = Heap, T>; //~ ERROR type parameters with a default must be trailing
|
||||
|
@ -8,5 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected
|
||||
use foo::{bar}::baz
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected
|
||||
|
||||
use foo::{bar} as baz;
|
||||
|
@ -8,5 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected
|
||||
use foo::*::bar
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected
|
||||
|
||||
use foo::* as baz;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// issue #17123
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct A { foo: isize }
|
||||
|
||||
fn a() -> A { panic!() }
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct A { foo: isize }
|
||||
|
||||
fn a() -> A { panic!() }
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
|
||||
trait Serializable<'self, T> { //~ ERROR no longer a special lifetime
|
||||
fn serialize(val : &'self T) -> Vec<u8> ; //~ ERROR no longer a special lifetime
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct Obj { //~ NOTE: unclosed delimiter
|
||||
member: usize
|
||||
) //~ ERROR: incorrect close delimiter
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
pub fn trace_option(option: Option<isize>) {
|
||||
option.map(|some| 42; //~ NOTE: unclosed delimiter
|
||||
} //~ ERROR: incorrect close delimiter
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// For style and consistency reasons, non-parametrized enum variants must
|
||||
// be used simply as `ident` instead of `ident ()`.
|
||||
// This test-case covers enum declaration.
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// ignore-test FIXME(japari) remove test
|
||||
|
||||
struct Foo {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
enum X<'a, T, 'b> {
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
A(&'a T)
|
||||
|
@ -8,5 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn foo<'a, T, 'b>(x: &'a T) {}
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
(0..4)
|
||||
.map(|x| x * 2)
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct X { x: isize }
|
||||
|
||||
impl<'a, T, 'b> X {}
|
||||
|
@ -8,5 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn bar<'a, T>(x: mymodule::X<'a, T, 'b, 'c>) {}
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct X<'a, T, 'b> {
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
x: &'a T
|
||||
|
@ -8,5 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
trait Foo<'a, T, 'b> {}
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let ref
|
||||
(); //~ ERROR expected identifier, found `(`
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:expected `[`, found `vec`
|
||||
mod blade_runner {
|
||||
#vec[doc(
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
enum X {
|
||||
A =
|
||||
b'a' //~ ERROR discriminator values can only be used with a c-like enum
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
const
|
||||
mut //~ ERROR: const globals cannot be mutable
|
||||
//~^ HELP did you mean to declare a static?
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct Baz<U> where U: Eq(U); //This is parsed as the new Fn* style parenthesis syntax.
|
||||
struct Baz<U> where U: Eq(U) -> R; // Notice this parses as well.
|
||||
struct Baz<U>(U) where U: Eq; // This rightfully signals no error as well.
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:no valid digits found for number
|
||||
fn main() {
|
||||
log(error, 0b);
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// error-pattern:no valid digits found for number
|
||||
fn main() {
|
||||
log(error, 0b_usize);
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let t = (42, 42);
|
||||
t.0::<isize>; //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `::`
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
trait T {
|
||||
extern "Rust" unsafe fn foo(); //~ ERROR expected `fn`, found `unsafe`
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl Foo {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl Foo {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
trait MyTrait<T>: Iterator {
|
||||
Item = T; //~ ERROR expected one of `extern`, `fn`, `type`, or `unsafe`, found `Item`
|
||||
}
|
||||
|
@ -8,4 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
static foo: isize = 2; } //~ ERROR incorrect close delimiter:
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn foo() { //~ HELP did you mean to close this delimiter?
|
||||
match Some(x) {
|
||||
Some(y) { panic!(); }
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// Testing that semicolon tokens are printed correctly in errors
|
||||
|
||||
fn main()
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let __isize = 18446744073709551616; // 2^64
|
||||
//~^ ERROR int literal is too large
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let __isize = 0xff_ffff_ffff_ffff_ffff;
|
||||
//~^ ERROR int literal is too large
|
||||
|
@ -13,6 +13,8 @@
|
||||
// ignore-openbsd
|
||||
// ignore-bitrig
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
#[path = "../compile-fail"]
|
||||
mod foo; //~ ERROR: a directory
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
trait Foo { fn a() } //~ ERROR expected `;` or `{`, found `}`
|
||||
|
||||
fn main() {}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
pub extern
|
||||
"invalid-ab_isize" //~ ERROR illegal ABI
|
||||
fn foo() {}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let abstract = (); //~ ERROR `abstract` is a reserved keyword
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py as'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py break'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let do = "bar"; //~ error: ident
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py else'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py enum'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py extern'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let final = (); //~ ERROR `final` is a reserved keyword
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py fn'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py for'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py if'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py impl'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py let'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py loop'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py match'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py mod'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py mut'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
fn main() {
|
||||
let override = (); //~ ERROR `override` is a reserved keyword
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py priv'
|
||||
|
||||
fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
|
||||
// This file was auto-generated using 'src/etc/generate-keyword-tests.py pub'
|
||||
|
||||
fn main() {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user