Update Tests
This commit is contained in:
parent
94885bc699
commit
265cd14cd4
6
tests/ui/parser/misspelled-keywords/assoc-type.rs
Normal file
6
tests/ui/parser/misspelled-keywords/assoc-type.rs
Normal file
@ -0,0 +1,6 @@
|
||||
trait Animal {
|
||||
Type Result = u8;
|
||||
//~^ ERROR expected one of
|
||||
}
|
||||
|
||||
fn main() {}
|
13
tests/ui/parser/misspelled-keywords/assoc-type.stderr
Normal file
13
tests/ui/parser/misspelled-keywords/assoc-type.stderr
Normal file
@ -0,0 +1,13 @@
|
||||
error: expected one of `!` or `::`, found `Result`
|
||||
--> $DIR/assoc-type.rs:2:10
|
||||
|
|
||||
LL | trait Animal {
|
||||
| - while parsing this item list starting here
|
||||
LL | Type Result = u8;
|
||||
| ^^^^^^ expected one of `!` or `::`
|
||||
LL |
|
||||
LL | }
|
||||
| - the item list ends here
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
6
tests/ui/parser/misspelled-keywords/async-move.rs
Normal file
6
tests/ui/parser/misspelled-keywords/async-move.rs
Normal file
@ -0,0 +1,6 @@
|
||||
//@ edition: 2018
|
||||
|
||||
fn main() {
|
||||
async Move {}
|
||||
//~^ ERROR expected one of
|
||||
}
|
8
tests/ui/parser/misspelled-keywords/async-move.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/async-move.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `move`, `|`, or `||`, found `Move`
|
||||
--> $DIR/async-move.rs:4:11
|
||||
|
|
||||
LL | async Move {}
|
||||
| ^^^^ expected one of `move`, `|`, or `||`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
5
tests/ui/parser/misspelled-keywords/const-fn.rs
Normal file
5
tests/ui/parser/misspelled-keywords/const-fn.rs
Normal file
@ -0,0 +1,5 @@
|
||||
cnst fn code() {}
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {
|
||||
}
|
8
tests/ui/parser/misspelled-keywords/const-fn.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/const-fn.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!` or `::`, found keyword `fn`
|
||||
--> $DIR/const-fn.rs:1:6
|
||||
|
|
||||
LL | cnst fn code() {}
|
||||
| ^^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/const-generics.rs
Normal file
4
tests/ui/parser/misspelled-keywords/const-generics.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn foo<consta N: usize>(_arr: [i32; N]) {}
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
@ -0,0 +1,8 @@
|
||||
error: expected one of `,`, `:`, `=`, or `>`, found `N`
|
||||
--> $DIR/const-generics.rs:1:15
|
||||
|
|
||||
LL | fn foo<consta N: usize>(_arr: [i32; N]) {}
|
||||
| ^ expected one of `,`, `:`, `=`, or `>`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/const.rs
Normal file
4
tests/ui/parser/misspelled-keywords/const.rs
Normal file
@ -0,0 +1,4 @@
|
||||
cons A: u8 = 10;
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/const.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/const.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!` or `::`, found `A`
|
||||
--> $DIR/const.rs:1:6
|
||||
|
|
||||
LL | cons A: u8 = 10;
|
||||
| ^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/for-loop.rs
Normal file
4
tests/ui/parser/misspelled-keywords/for-loop.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
form i in 1..10 {}
|
||||
//~^ ERROR expected one of
|
||||
}
|
8
tests/ui/parser/misspelled-keywords/for-loop.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/for-loop.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `i`
|
||||
--> $DIR/for-loop.rs:2:10
|
||||
|
|
||||
LL | form i in 1..10 {}
|
||||
| ^ expected one of 8 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
16
tests/ui/parser/misspelled-keywords/hrdt.rs
Normal file
16
tests/ui/parser/misspelled-keywords/hrdt.rs
Normal file
@ -0,0 +1,16 @@
|
||||
struct Closure<F> {
|
||||
data: (u8, u16),
|
||||
func: F,
|
||||
}
|
||||
|
||||
impl<F> Closure<F>
|
||||
Where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8,
|
||||
//~^ ERROR expected one of
|
||||
{
|
||||
fn call(&self) -> &u8 {
|
||||
(self.func)(&self.data)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/hrdt.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/hrdt.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!`, `(`, `+`, `::`, `<`, `where`, or `{`, found keyword `for`
|
||||
--> $DIR/hrdt.rs:7:11
|
||||
|
|
||||
LL | Where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8,
|
||||
| ^^^ expected one of 7 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
6
tests/ui/parser/misspelled-keywords/impl-block.rs
Normal file
6
tests/ui/parser/misspelled-keywords/impl-block.rs
Normal file
@ -0,0 +1,6 @@
|
||||
struct Human;
|
||||
|
||||
ipml Human {}
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/impl-block.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/impl-block.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!` or `::`, found `Human`
|
||||
--> $DIR/impl-block.rs:3:6
|
||||
|
|
||||
LL | ipml Human {}
|
||||
| ^^^^^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/impl-return.rs
Normal file
4
tests/ui/parser/misspelled-keywords/impl-return.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn code() -> Impl Display {}
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/impl-return.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/impl-return.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!`, `(`, `+`, `::`, `<`, `where`, or `{`, found `Display`
|
||||
--> $DIR/impl-return.rs:1:19
|
||||
|
|
||||
LL | fn code() -> Impl Display {}
|
||||
| ^^^^^^^ expected one of 7 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
6
tests/ui/parser/misspelled-keywords/impl-trait-for.rs
Normal file
6
tests/ui/parser/misspelled-keywords/impl-trait-for.rs
Normal file
@ -0,0 +1,6 @@
|
||||
struct Human;
|
||||
|
||||
impl Debug form Human {}
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
@ -0,0 +1,8 @@
|
||||
error: expected one of `!`, `(`, `+`, `::`, `<`, `where`, or `{`, found `Human`
|
||||
--> $DIR/impl-trait-for.rs:3:17
|
||||
|
|
||||
LL | impl Debug form Human {}
|
||||
| ^^^^^ expected one of 7 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/impl-trait.rs
Normal file
4
tests/ui/parser/misspelled-keywords/impl-trait.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn code<T: impll Debug>() -> u8 {}
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
13
tests/ui/parser/misspelled-keywords/impl-trait.stderr
Normal file
13
tests/ui/parser/misspelled-keywords/impl-trait.stderr
Normal file
@ -0,0 +1,13 @@
|
||||
error: expected one of `(`, `+`, `,`, `::`, `<`, `=`, or `>`, found `Debug`
|
||||
--> $DIR/impl-trait.rs:1:18
|
||||
|
|
||||
LL | fn code<T: impll Debug>() -> u8 {}
|
||||
| ^^^^^ expected one of 7 possible tokens
|
||||
|
|
||||
help: you might have meant to end the type parameters here
|
||||
|
|
||||
LL | fn code<T: impll> Debug>() -> u8 {}
|
||||
| +
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/let-else.rs
Normal file
4
tests/ui/parser/misspelled-keywords/let-else.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
let Some(a) = Some(10) elze {}
|
||||
//~^ ERROR expected one of
|
||||
}
|
8
tests/ui/parser/misspelled-keywords/let-else.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/let-else.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `elze`
|
||||
--> $DIR/let-else.rs:2:28
|
||||
|
|
||||
LL | let Some(a) = Some(10) elze {}
|
||||
| ^^^^ expected one of `.`, `;`, `?`, `else`, or an operator
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/let-mut.rs
Normal file
4
tests/ui/parser/misspelled-keywords/let-mut.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
let muta a = 10;
|
||||
//~^ ERROR expected one of
|
||||
}
|
8
tests/ui/parser/misspelled-keywords/let-mut.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/let-mut.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `:`, `;`, `=`, `@`, or `|`, found `a`
|
||||
--> $DIR/let-mut.rs:2:14
|
||||
|
|
||||
LL | let muta a = 10;
|
||||
| ^ expected one of `:`, `;`, `=`, `@`, or `|`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
9
tests/ui/parser/misspelled-keywords/let.rs
Normal file
9
tests/ui/parser/misspelled-keywords/let.rs
Normal file
@ -0,0 +1,9 @@
|
||||
fn main() {
|
||||
Let a = 10;
|
||||
//~^ ERROR expected one of
|
||||
}
|
||||
|
||||
fn code() {
|
||||
lett a = 10;
|
||||
//~^ ERROR expected one of
|
||||
}
|
14
tests/ui/parser/misspelled-keywords/let.stderr
Normal file
14
tests/ui/parser/misspelled-keywords/let.stderr
Normal file
@ -0,0 +1,14 @@
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `a`
|
||||
--> $DIR/let.rs:2:9
|
||||
|
|
||||
LL | Let a = 10;
|
||||
| ^ expected one of 8 possible tokens
|
||||
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `a`
|
||||
--> $DIR/let.rs:7:10
|
||||
|
|
||||
LL | lett a = 10;
|
||||
| ^ expected one of 8 possible tokens
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
5
tests/ui/parser/misspelled-keywords/match.rs
Normal file
5
tests/ui/parser/misspelled-keywords/match.rs
Normal file
@ -0,0 +1,5 @@
|
||||
fn main() {
|
||||
let a = 10;
|
||||
matche a {}
|
||||
//~^ ERROR expected one of
|
||||
}
|
8
tests/ui/parser/misspelled-keywords/match.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/match.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `a`
|
||||
--> $DIR/match.rs:3:12
|
||||
|
|
||||
LL | matche a {}
|
||||
| ^ expected one of 8 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/mod.rs
Normal file
4
tests/ui/parser/misspelled-keywords/mod.rs
Normal file
@ -0,0 +1,4 @@
|
||||
mode parser;
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/mod.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/mod.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!` or `::`, found `parser`
|
||||
--> $DIR/mod.rs:1:6
|
||||
|
|
||||
LL | mode parser;
|
||||
| ^^^^^^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
5
tests/ui/parser/misspelled-keywords/pub-fn.rs
Normal file
5
tests/ui/parser/misspelled-keywords/pub-fn.rs
Normal file
@ -0,0 +1,5 @@
|
||||
puB fn code() {}
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {
|
||||
}
|
8
tests/ui/parser/misspelled-keywords/pub-fn.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/pub-fn.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `#`, `async`, `auto`, `const`, `default`, `enum`, `extern`, `fn`, `gen`, `impl`, `macro_rules`, `macro`, `mod`, `pub`, `safe`, `static`, `struct`, `trait`, `type`, `unsafe`, or `use`, found `puB`
|
||||
--> $DIR/pub-fn.rs:1:1
|
||||
|
|
||||
LL | puB fn code() {}
|
||||
| ^^^ expected one of 21 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
9
tests/ui/parser/misspelled-keywords/ref.rs
Normal file
9
tests/ui/parser/misspelled-keywords/ref.rs
Normal file
@ -0,0 +1,9 @@
|
||||
fn main() {
|
||||
let a = Some(vec![1, 2]);
|
||||
match a {
|
||||
Some(refe list) => println!("{list:?}"),
|
||||
//~^ ERROR expected one of
|
||||
//~| ERROR this pattern has 2 fields,
|
||||
_ => println!("none"),
|
||||
}
|
||||
}
|
20
tests/ui/parser/misspelled-keywords/ref.stderr
Normal file
20
tests/ui/parser/misspelled-keywords/ref.stderr
Normal file
@ -0,0 +1,20 @@
|
||||
error: expected one of `)`, `,`, `@`, or `|`, found `list`
|
||||
--> $DIR/ref.rs:4:19
|
||||
|
|
||||
LL | Some(refe list) => println!("{list:?}"),
|
||||
| -^^^^ expected one of `)`, `,`, `@`, or `|`
|
||||
| |
|
||||
| help: missing `,`
|
||||
|
||||
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field
|
||||
--> $DIR/ref.rs:4:14
|
||||
|
|
||||
LL | Some(refe list) => println!("{list:?}"),
|
||||
| ^^^^ ^^^^ expected 1 field, found 2
|
||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||
|
|
||||
= note: tuple variant has 1 field
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0023`.
|
7
tests/ui/parser/misspelled-keywords/return.rs
Normal file
7
tests/ui/parser/misspelled-keywords/return.rs
Normal file
@ -0,0 +1,7 @@
|
||||
fn code() -> u8 {
|
||||
let a = 10;
|
||||
returnn a;
|
||||
//~^ ERROR expected one of
|
||||
}
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/return.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/return.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `a`
|
||||
--> $DIR/return.rs:3:13
|
||||
|
|
||||
LL | returnn a;
|
||||
| ^ expected one of 8 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
5
tests/ui/parser/misspelled-keywords/static-mut.rs
Normal file
5
tests/ui/parser/misspelled-keywords/static-mut.rs
Normal file
@ -0,0 +1,5 @@
|
||||
static muta a: u8 = 0;
|
||||
//~^ ERROR expected one of
|
||||
//~| ERROR missing type for
|
||||
|
||||
fn main() {}
|
19
tests/ui/parser/misspelled-keywords/static-mut.stderr
Normal file
19
tests/ui/parser/misspelled-keywords/static-mut.stderr
Normal file
@ -0,0 +1,19 @@
|
||||
error: expected one of `:`, `;`, or `=`, found `a`
|
||||
--> $DIR/static-mut.rs:1:13
|
||||
|
|
||||
LL | static muta a: u8 = 0;
|
||||
| ^ expected one of `:`, `;`, or `=`
|
||||
|
||||
error: missing type for `static` item
|
||||
--> $DIR/static-mut.rs:1:12
|
||||
|
|
||||
LL | static muta a: u8 = 0;
|
||||
| ^
|
||||
|
|
||||
help: provide a type for the item
|
||||
|
|
||||
LL | static muta: <type> a: u8 = 0;
|
||||
| ++++++++
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
4
tests/ui/parser/misspelled-keywords/static.rs
Normal file
4
tests/ui/parser/misspelled-keywords/static.rs
Normal file
@ -0,0 +1,4 @@
|
||||
Static a = 0;
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/static.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/static.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!` or `::`, found `a`
|
||||
--> $DIR/static.rs:1:8
|
||||
|
|
||||
LL | Static a = 0;
|
||||
| ^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/struct.rs
Normal file
4
tests/ui/parser/misspelled-keywords/struct.rs
Normal file
@ -0,0 +1,4 @@
|
||||
Struct Foor {
|
||||
//~^ ERROR expected one of
|
||||
hello: String,
|
||||
}
|
8
tests/ui/parser/misspelled-keywords/struct.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/struct.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!` or `::`, found `Foor`
|
||||
--> $DIR/struct.rs:1:8
|
||||
|
|
||||
LL | Struct Foor {
|
||||
| ^^^^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/unsafe-fn.rs
Normal file
4
tests/ui/parser/misspelled-keywords/unsafe-fn.rs
Normal file
@ -0,0 +1,4 @@
|
||||
unsafee fn code() {}
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/unsafe-fn.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/unsafe-fn.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!` or `::`, found keyword `fn`
|
||||
--> $DIR/unsafe-fn.rs:1:9
|
||||
|
|
||||
LL | unsafee fn code() {}
|
||||
| ^^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
4
tests/ui/parser/misspelled-keywords/use.rs
Normal file
4
tests/ui/parser/misspelled-keywords/use.rs
Normal file
@ -0,0 +1,4 @@
|
||||
usee a::b;
|
||||
//~^ ERROR expected one of
|
||||
|
||||
fn main() {}
|
8
tests/ui/parser/misspelled-keywords/use.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/use.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!` or `::`, found `a`
|
||||
--> $DIR/use.rs:1:6
|
||||
|
|
||||
LL | usee a::b;
|
||||
| ^ expected one of `!` or `::`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
8
tests/ui/parser/misspelled-keywords/where-clause.rs
Normal file
8
tests/ui/parser/misspelled-keywords/where-clause.rs
Normal file
@ -0,0 +1,8 @@
|
||||
fn code<T>() -> u8
|
||||
wheree
|
||||
//~^ ERROR expected one of
|
||||
T: Debug,
|
||||
{
|
||||
}
|
||||
|
||||
fn main() {}
|
10
tests/ui/parser/misspelled-keywords/where-clause.stderr
Normal file
10
tests/ui/parser/misspelled-keywords/where-clause.stderr
Normal file
@ -0,0 +1,10 @@
|
||||
error: expected one of `!`, `(`, `+`, `::`, `<`, `where`, or `{`, found `wheree`
|
||||
--> $DIR/where-clause.rs:2:1
|
||||
|
|
||||
LL | fn code<T>() -> u8
|
||||
| - expected one of 7 possible tokens
|
||||
LL | wheree
|
||||
| ^^^^^^ unexpected token
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
7
tests/ui/parser/misspelled-keywords/while-loop.rs
Normal file
7
tests/ui/parser/misspelled-keywords/while-loop.rs
Normal file
@ -0,0 +1,7 @@
|
||||
fn main() {
|
||||
whilee a < b {
|
||||
//~^ ERROR expected one of
|
||||
|
||||
}
|
||||
}
|
||||
|
8
tests/ui/parser/misspelled-keywords/while-loop.stderr
Normal file
8
tests/ui/parser/misspelled-keywords/while-loop.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `a`
|
||||
--> $DIR/while-loop.rs:2:12
|
||||
|
|
||||
LL | whilee a < b {
|
||||
| ^ expected one of 8 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
whilee 2 > 1 {}
|
||||
//~^ ERROR expected one of
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `2`
|
||||
--> $DIR/while-without-identifiers.rs:2:12
|
||||
|
|
||||
LL | whilee 2 > 1 {}
|
||||
| ^ expected one of 8 possible tokens
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
Loading…
x
Reference in New Issue
Block a user