diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2015-07-27 03:49:38 +0300 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2015-07-29 01:59:31 +0300 |
| commit | cca0ea718d363acb85e075aee41223f4da009e82 (patch) | |
| tree | 7c5686962bd85a27ff754f57a107b60086aac3b3 /src/test | |
| parent | ffcdf0881b37340c9c90bdfd8b96149090a62378 (diff) | |
| download | rust-cca0ea718d363acb85e075aee41223f4da009e82.tar.gz rust-cca0ea718d363acb85e075aee41223f4da009e82.zip | |
Replace illegal with invalid in most diagnostics
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/bad-expr-lhs.rs | 10 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-13407.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/old-suffixes-are-really-forbidden.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/regions-name-static.rs | 2 | ||||
| -rw-r--r-- | src/test/parse-fail/bad-lit-suffixes.rs | 32 | ||||
| -rw-r--r-- | src/test/parse-fail/byte-literals.rs | 2 | ||||
| -rw-r--r-- | src/test/parse-fail/byte-string-literals.rs | 2 | ||||
| -rw-r--r-- | src/test/parse-fail/issue-23620-invalid-escapes.rs | 14 | ||||
| -rw-r--r-- | src/test/parse-fail/issue-8537.rs | 2 | ||||
| -rw-r--r-- | src/test/parse-fail/new-unicode-escapes-3.rs | 2 | ||||
| -rw-r--r-- | src/test/parse-fail/new-unicode-escapes-4.rs | 6 | ||||
| -rw-r--r-- | src/test/parse-fail/raw-str-delim.rs | 2 |
12 files changed, 40 insertions, 40 deletions
diff --git a/src/test/compile-fail/bad-expr-lhs.rs b/src/test/compile-fail/bad-expr-lhs.rs index 6907bf4b5b8..c7d2f2c472f 100644 --- a/src/test/compile-fail/bad-expr-lhs.rs +++ b/src/test/compile-fail/bad-expr-lhs.rs @@ -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 } diff --git a/src/test/compile-fail/issue-13407.rs b/src/test/compile-fail/issue-13407.rs index f845eba4060..311280bd497 100644 --- a/src/test/compile-fail/issue-13407.rs +++ b/src/test/compile-fail/issue-13407.rs @@ -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 } diff --git a/src/test/compile-fail/old-suffixes-are-really-forbidden.rs b/src/test/compile-fail/old-suffixes-are-really-forbidden.rs index b18741d3932..9a71dc98014 100644 --- a/src/test/compile-fail/old-suffixes-are-really-forbidden.rs +++ b/src/test/compile-fail/old-suffixes-are-really-forbidden.rs @@ -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 } diff --git a/src/test/compile-fail/regions-name-static.rs b/src/test/compile-fail/regions-name-static.rs index 29896aa486b..69d63f3820c 100644 --- a/src/test/compile-fail/regions-name-static.rs +++ b/src/test/compile-fail/regions-name-static.rs @@ -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 } diff --git a/src/test/parse-fail/bad-lit-suffixes.rs b/src/test/parse-fail/bad-lit-suffixes.rs index a64ee6a9ce2..a2ee2f6e88c 100644 --- a/src/test/parse-fail/bad-lit-suffixes.rs +++ b/src/test/parse-fail/bad-lit-suffixes.rs @@ -12,28 +12,28 @@ extern - "C"suffix //~ ERROR ABI spec with a suffix is illegal + "C"suffix //~ ERROR ABI spec with a suffix is invalid fn foo() {} extern - "C"suffix //~ ERROR ABI spec with a suffix is illegal + "C"suffix //~ ERROR ABI spec with a suffix is invalid {} fn main() { - ""suffix; //~ ERROR str literal with a suffix is illegal - b""suffix; //~ ERROR binary str literal with a suffix is illegal - r#""#suffix; //~ ERROR str literal with a suffix is illegal - br#""#suffix; //~ ERROR binary str literal with a suffix is illegal - 'a'suffix; //~ ERROR char literal with a suffix is illegal - b'a'suffix; //~ ERROR byte literal with a suffix is illegal + ""suffix; //~ ERROR str literal with a suffix is invalid + b""suffix; //~ ERROR binary str literal with a suffix is invalid + r#""#suffix; //~ ERROR str literal with a suffix is invalid + br#""#suffix; //~ ERROR binary str literal with a suffix is invalid + 'a'suffix; //~ ERROR char literal with a suffix is invalid + b'a'suffix; //~ ERROR byte literal with a suffix is invalid - 1234u1024; //~ ERROR illegal width `1024` for integer literal - 1234i1024; //~ ERROR illegal width `1024` for integer literal - 1234f1024; //~ ERROR illegal width `1024` for float literal - 1234.5f1024; //~ ERROR illegal width `1024` for float literal + 1234u1024; //~ ERROR invalid width `1024` for integer literal + 1234i1024; //~ ERROR invalid width `1024` for integer literal + 1234f1024; //~ ERROR invalid width `1024` for float literal + 1234.5f1024; //~ ERROR invalid width `1024` for float literal - 1234suffix; //~ ERROR illegal suffix `suffix` for numeric literal - 0b101suffix; //~ ERROR illegal suffix `suffix` for numeric literal - 1.0suffix; //~ ERROR illegal suffix `suffix` for float literal - 1.0e10suffix; //~ ERROR illegal suffix `suffix` for float literal + 1234suffix; //~ ERROR invalid suffix `suffix` for numeric literal + 0b101suffix; //~ ERROR invalid suffix `suffix` for numeric literal + 1.0suffix; //~ ERROR invalid suffix `suffix` for float literal + 1.0e10suffix; //~ ERROR invalid suffix `suffix` for float literal } diff --git a/src/test/parse-fail/byte-literals.rs b/src/test/parse-fail/byte-literals.rs index 6685a29bb42..3321f2450c1 100644 --- a/src/test/parse-fail/byte-literals.rs +++ b/src/test/parse-fail/byte-literals.rs @@ -17,7 +17,7 @@ static FOO: u8 = b'\f'; //~ ERROR unknown byte escape pub fn main() { b'\f'; //~ ERROR unknown byte escape - b'\x0Z'; //~ ERROR illegal character in numeric character escape: Z + b'\x0Z'; //~ ERROR invalid character in numeric character escape: Z b' '; //~ ERROR byte constant must be escaped b'''; //~ ERROR byte constant must be escaped b'é'; //~ ERROR byte constant must be ASCII diff --git a/src/test/parse-fail/byte-string-literals.rs b/src/test/parse-fail/byte-string-literals.rs index 7049363c21b..22f123416f2 100644 --- a/src/test/parse-fail/byte-string-literals.rs +++ b/src/test/parse-fail/byte-string-literals.rs @@ -17,7 +17,7 @@ static FOO: &'static [u8] = b"\f"; //~ ERROR unknown byte escape pub fn main() { b"\f"; //~ ERROR unknown byte escape - b"\x0Z"; //~ ERROR illegal character in numeric character escape: Z + b"\x0Z"; //~ ERROR invalid character in numeric character escape: Z b"é"; //~ ERROR byte constant must be ASCII b"a //~ ERROR unterminated double quote byte string } diff --git a/src/test/parse-fail/issue-23620-invalid-escapes.rs b/src/test/parse-fail/issue-23620-invalid-escapes.rs index 1790b9164b7..d2f78ef897b 100644 --- a/src/test/parse-fail/issue-23620-invalid-escapes.rs +++ b/src/test/parse-fail/issue-23620-invalid-escapes.rs @@ -23,25 +23,25 @@ fn main() { //~^ ERROR numeric character escape is too short let _ = b'\xxy'; - //~^ ERROR illegal character in numeric character escape: x - //~^^ ERROR illegal character in numeric character escape: y + //~^ ERROR invalid character in numeric character escape: x + //~^^ ERROR invalid character in numeric character escape: y let _ = '\x5'; //~^ ERROR numeric character escape is too short let _ = '\xxy'; - //~^ ERROR illegal character in numeric character escape: x - //~^^ ERROR illegal character in numeric character escape: y + //~^ ERROR invalid character in numeric character escape: x + //~^^ ERROR invalid character in numeric character escape: y let _ = b"\u{a4a4} \xf \u"; //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string - //~^^ ERROR illegal character in numeric character escape: + //~^^ ERROR invalid character in numeric character escape: //~^^^ ERROR incorrect unicode escape sequence //~^^^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string let _ = "\u{ffffff} \xf \u"; - //~^ ERROR illegal unicode character escape - //~^^ ERROR illegal character in numeric character escape: + //~^ ERROR invalid unicode character escape + //~^^ ERROR invalid character in numeric character escape: //~^^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f] //~^^^^ ERROR incorrect unicode escape sequence } diff --git a/src/test/parse-fail/issue-8537.rs b/src/test/parse-fail/issue-8537.rs index 5996b744566..e152a369290 100644 --- a/src/test/parse-fail/issue-8537.rs +++ b/src/test/parse-fail/issue-8537.rs @@ -11,7 +11,7 @@ // compile-flags: -Z parse-only pub extern - "invalid-ab_isize" //~ ERROR illegal ABI + "invalid-ab_isize" //~ ERROR invalid ABI fn foo() {} fn main() {} diff --git a/src/test/parse-fail/new-unicode-escapes-3.rs b/src/test/parse-fail/new-unicode-escapes-3.rs index 5e8bc16ac6e..d12bb63111b 100644 --- a/src/test/parse-fail/new-unicode-escapes-3.rs +++ b/src/test/parse-fail/new-unicode-escapes-3.rs @@ -11,5 +11,5 @@ // compile-flags: -Z parse-only pub fn main() { - let s = "\u{d805}"; //~ ERROR illegal unicode character escape + let s = "\u{d805}"; //~ ERROR invalid unicode character escape } diff --git a/src/test/parse-fail/new-unicode-escapes-4.rs b/src/test/parse-fail/new-unicode-escapes-4.rs index 896751bd4a7..fe125da1755 100644 --- a/src/test/parse-fail/new-unicode-escapes-4.rs +++ b/src/test/parse-fail/new-unicode-escapes-4.rs @@ -12,7 +12,7 @@ pub fn main() { let s = "\u{lol}"; - //~^ ERROR illegal character in unicode escape: l - //~^^ ERROR illegal character in unicode escape: o - //~^^^ ERROR illegal character in unicode escape: l + //~^ ERROR invalid character in unicode escape: l + //~^^ ERROR invalid character in unicode escape: o + //~^^^ ERROR invalid character in unicode escape: l } diff --git a/src/test/parse-fail/raw-str-delim.rs b/src/test/parse-fail/raw-str-delim.rs index c7ef91f14f5..3fc5f8aae18 100644 --- a/src/test/parse-fail/raw-str-delim.rs +++ b/src/test/parse-fail/raw-str-delim.rs @@ -11,5 +11,5 @@ // compile-flags: -Z parse-only static s: &'static str = - r#x"#"x# //~ ERROR only `#` is allowed in raw string delimitation; found illegal character + r#x"#"x# //~ ERROR found invalid character; only `#` is allowed in raw string delimitation ; |
