Replace illegal with invalid in most diagnostics

This commit is contained in:
Simonas Kazlauskas 2015-07-27 03:49:38 +03:00
parent ffcdf0881b
commit cca0ea718d
19 changed files with 61 additions and 62 deletions

View file

@ -9,12 +9,12 @@
// except according to those terms.
fn main() {
1 = 2; //~ ERROR illegal left-hand side expression
1 += 2; //~ ERROR illegal left-hand side expression
(1, 2) = (3, 4); //~ ERROR illegal left-hand side expression
1 = 2; //~ ERROR invalid left-hand side expression
1 += 2; //~ ERROR invalid left-hand side expression
(1, 2) = (3, 4); //~ ERROR invalid left-hand side expression
let (a, b) = (1, 2);
(a, b) = (3, 4); //~ ERROR illegal left-hand side expression
(a, b) = (3, 4); //~ ERROR invalid left-hand side expression
None = Some(3); //~ ERROR illegal left-hand side expression
None = Some(3); //~ ERROR invalid left-hand side expression
}

View file

@ -14,6 +14,6 @@ mod A {
fn main() {
A::C = 1;
//~^ ERROR: illegal left-hand side expression
//~^ ERROR: invalid left-hand side expression
//~| ERROR: mismatched types
}

View file

@ -9,6 +9,6 @@
// except according to those terms.
fn main() {
let a = 1_is; //~ ERROR illegal suffix
let b = 2_us; //~ ERROR illegal suffix
let a = 1_is; //~ ERROR invalid suffix
let b = 2_us; //~ ERROR invalid suffix
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
struct Foo<'static> { //~ ERROR illegal lifetime parameter name: `'static`
struct Foo<'static> { //~ ERROR invalid lifetime parameter name: `'static`
x: &'static isize
}