Small tweaks to parser errors

This commit is contained in:
Esteban Küber 2019-01-11 22:04:54 -08:00
parent de3c4be099
commit 7feb802d89
5 changed files with 39 additions and 24 deletions

View file

@ -2,49 +2,49 @@ error: ABI spec with a suffix is invalid
--> $DIR/bad-lit-suffixes.rs:5:5
|
LL | "C"suffix //~ ERROR ABI spec with a suffix is invalid
| ^^^^^^^^^
| ^^^^^^^^^ ABI spec with a suffix is invalid
error: ABI spec with a suffix is invalid
--> $DIR/bad-lit-suffixes.rs:9:5
|
LL | "C"suffix //~ ERROR ABI spec with a suffix is invalid
| ^^^^^^^^^
| ^^^^^^^^^ ABI spec with a suffix is invalid
error: string literal with a suffix is invalid
--> $DIR/bad-lit-suffixes.rs:13:5
|
LL | ""suffix; //~ ERROR string literal with a suffix is invalid
| ^^^^^^^^
| ^^^^^^^^ string literal with a suffix is invalid
error: byte string literal with a suffix is invalid
--> $DIR/bad-lit-suffixes.rs:14:5
|
LL | b""suffix; //~ ERROR byte string literal with a suffix is invalid
| ^^^^^^^^^
| ^^^^^^^^^ byte string literal with a suffix is invalid
error: string literal with a suffix is invalid
--> $DIR/bad-lit-suffixes.rs:15:5
|
LL | r#""#suffix; //~ ERROR string literal with a suffix is invalid
| ^^^^^^^^^^^
| ^^^^^^^^^^^ string literal with a suffix is invalid
error: byte string literal with a suffix is invalid
--> $DIR/bad-lit-suffixes.rs:16:5
|
LL | br#""#suffix; //~ ERROR byte string literal with a suffix is invalid
| ^^^^^^^^^^^^
| ^^^^^^^^^^^^ byte string literal with a suffix is invalid
error: char literal with a suffix is invalid
--> $DIR/bad-lit-suffixes.rs:17:5
|
LL | 'a'suffix; //~ ERROR char literal with a suffix is invalid
| ^^^^^^^^^
| ^^^^^^^^^ char literal with a suffix is invalid
error: byte literal with a suffix is invalid
--> $DIR/bad-lit-suffixes.rs:18:5
|
LL | b'a'suffix; //~ ERROR byte literal with a suffix is invalid
| ^^^^^^^^^^
| ^^^^^^^^^^ byte literal with a suffix is invalid
error: invalid width `1024` for integer literal
--> $DIR/bad-lit-suffixes.rs:20:5

View file

@ -1,5 +1,5 @@
fn foo(_: *()) {
//~^ expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
//~^ ERROR expected mut or const in raw pointer type
}
fn main() {}

View file

@ -1,8 +1,10 @@
error: expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
error: expected mut or const in raw pointer type
--> $DIR/bad-pointer-type.rs:1:11
|
LL | fn foo(_: *()) {
| ^
| ^ expected mut or const in raw pointer type
|
= help: use `*mut T` or `*const T` as appropriate
error: aborting due to previous error

View file

@ -2,37 +2,37 @@ error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:4:17
|
LL | fn foo(*mut self); //~ ERROR cannot pass `self` by raw pointer
| ^^^^
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:5:19
|
LL | fn baz(*const self); //~ ERROR cannot pass `self` by raw pointer
| ^^^^
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:6:13
|
LL | fn bar(*self); //~ ERROR cannot pass `self` by raw pointer
| ^^^^
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:11:17
|
LL | fn foo(*mut self) { } //~ ERROR cannot pass `self` by raw pointer
| ^^^^
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:12:19
|
LL | fn baz(*const self) { } //~ ERROR cannot pass `self` by raw pointer
| ^^^^
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:13:13
|
LL | fn bar(*self) { } //~ ERROR cannot pass `self` by raw pointer
| ^^^^
| ^^^^ cannot pass `self` by raw pointer
error: aborting due to 6 previous errors