Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add error message for c# style named arguments
bless tests
- Loading branch information
Showing
8 changed files
with
239 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
fn main() { | ||
let my = monad_bind(mx, T: Try); //~ ERROR invalid `struct` delimiters or `fn` call arguments | ||
let my = monad_bind(mx, T: Try); | ||
//~^ ERROR expected identifier, found `:` | ||
//~| ERROR cannot find value `mx` | ||
//~| ERROR cannot find value `Try` | ||
//~| ERROR cannot find function `monad_bind` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
error: invalid `struct` delimiters or `fn` call arguments | ||
--> $DIR/issue-111416.rs:2:14 | ||
error: expected identifier, found `:` | ||
--> $DIR/issue-111416.rs:2:30 | ||
| | ||
LL | let my = monad_bind(mx, T: Try); | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
help: if `monad_bind` is a struct, use braces as delimiters | ||
| ^ expected identifier | ||
| | ||
LL | let my = monad_bind { mx, T: Try }; | ||
| ~ ~ | ||
help: if `monad_bind` is a function, use the arguments directly | ||
help: if this is a parameter, remove the name for the parameter | ||
| | ||
LL - let my = monad_bind(mx, T: Try); | ||
LL + let my = monad_bind(mx, Try); | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
error[E0425]: cannot find value `mx` in this scope | ||
--> $DIR/issue-111416.rs:2:25 | ||
| | ||
LL | let my = monad_bind(mx, T: Try); | ||
| ^^ not found in this scope | ||
|
||
error[E0425]: cannot find value `Try` in this scope | ||
--> $DIR/issue-111416.rs:2:32 | ||
| | ||
LL | let my = monad_bind(mx, T: Try); | ||
| ^^^ not found in this scope | ||
|
||
error[E0425]: cannot find function `monad_bind` in this scope | ||
--> $DIR/issue-111416.rs:2:14 | ||
| | ||
LL | let my = monad_bind(mx, T: Try); | ||
| ^^^^^^^^^^ not found in this scope | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
error: invalid `struct` delimiters or `fn` call arguments | ||
--> $DIR/issue-34255-1.rs:8:5 | ||
error: expected expression, found `:` | ||
--> $DIR/issue-34255-1.rs:8:22 | ||
| | ||
LL | Test::Drill(field: 42); | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
help: if `Test::Drill` is a struct, use braces as delimiters | ||
| ^ expected expression | ||
| | ||
LL | Test::Drill { field: 42 }; | ||
| ~ ~ | ||
help: if `Test::Drill` is a function, use the arguments directly | ||
help: if this is a parameter, remove the name for the parameter | ||
| | ||
LL - Test::Drill(field: 42); | ||
LL + Test::Drill(42); | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found `:` | ||
--> $DIR/issue-34255-1.rs:8:22 | ||
| | ||
LL | Test::Drill(field: 42); | ||
| ^ | ||
| | | ||
| expected one of 8 possible tokens | ||
| help: missing `,` | ||
|
||
error[E0425]: cannot find value `field` in this scope | ||
--> $DIR/issue-34255-1.rs:8:17 | ||
| | ||
LL | Test::Drill(field: 42); | ||
| ^^^^^ not found in this scope | ||
|
||
error[E0533]: expected value, found struct variant `Test::Drill` | ||
--> $DIR/issue-34255-1.rs:8:5 | ||
| | ||
LL | Test::Drill(field: 42); | ||
| ^^^^^^^^^^^ not a value | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
Some errors have detailed explanations: E0425, E0533. | ||
For more information about an error, try `rustc --explain E0425`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,55 @@ | ||
error: invalid `struct` delimiters or `fn` call arguments | ||
--> $DIR/issue-44406.rs:3:9 | ||
error: expected expression, found `:` | ||
--> $DIR/issue-44406.rs:3:16 | ||
| | ||
LL | bar(baz: $rest) | ||
| ^^^^^^^^^^^^^^^ | ||
| ^ expected expression | ||
... | ||
LL | foo!(true); | ||
| ---------- in this macro invocation | ||
| | ||
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
help: if `bar` is a struct, use braces as delimiters | ||
| | ||
LL | bar { baz: $rest } | ||
| ~ ~ | ||
help: if `bar` is a function, use the arguments directly | ||
help: if this is a parameter, remove the name for the parameter | ||
| | ||
LL - bar(baz: $rest) | ||
LL + bar(: $rest) | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found `:` | ||
--> $DIR/issue-44406.rs:3:16 | ||
| | ||
LL | bar(baz: $rest) | ||
| ^ | ||
| | | ||
| expected one of 8 possible tokens | ||
| help: missing `,` | ||
... | ||
LL | foo!(true); | ||
| ---------- in this macro invocation | ||
| | ||
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0425]: cannot find value `baz` in this scope | ||
--> $DIR/issue-44406.rs:3:13 | ||
| | ||
LL | bar(baz: $rest) | ||
| ^^^ not found in this scope | ||
... | ||
LL | foo!(true); | ||
| ---------- in this macro invocation | ||
| | ||
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0425]: cannot find function `bar` in this scope | ||
--> $DIR/issue-44406.rs:3:9 | ||
| | ||
LL | bar(baz: $rest) | ||
| ^^^ not found in this scope | ||
... | ||
LL | foo!(true); | ||
| ---------- in this macro invocation | ||
| | ||
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
error: expected expression, found `:` | ||
--> $DIR/issue-91461.rs:2:8 | ||
| | ||
LL | a(_:b:,) | ||
| ^ expected expression | ||
| | ||
help: if this is a parameter, remove the name for the parameter | ||
| | ||
LL - a(_:b:,) | ||
LL + a(b:,) | ||
| | ||
|
||
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `:` | ||
--> $DIR/issue-91461.rs:2:8 | ||
| | ||
LL | a(_:b:,) | ||
| ^ | ||
| | | ||
| expected one of `)`, `,`, `.`, `?`, or an operator | ||
| help: missing `,` | ||
|
||
error: expected identifier, found reserved identifier `_` | ||
--> $DIR/issue-91461.rs:2:7 | ||
| | ||
LL | a(_:b:,) | ||
| ^ expected identifier, found reserved identifier | ||
|
||
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `:` | ||
--> $DIR/issue-91461.rs:2:8 | ||
error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found `:` | ||
--> $DIR/issue-91461.rs:2:10 | ||
| | ||
LL | a(_:b:,) | ||
| ^ expected one of `)`, `,`, `.`, `?`, or an operator | ||
| ^ expected one of 8 possible tokens | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to 4 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters