-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
39 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,48 +1,15 @@ | ||
error: expected identifier, found `,` | ||
--> $DIR/issue-114701.rs:1:16 | ||
| | ||
LL | enum Enum<T> { , SVariant { v: T }, UVariant } | ||
| ^ | ||
| | | ||
| expected identifier | ||
| help: remove this comma | ||
|
||
error: this `if` expression is missing a block after the condition | ||
--> $DIR/issue-114701.rs:8:17 | ||
| | ||
LL | assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, | ||
| ^^ | ||
... | ||
LL | is_variant!(UVariant, Enum::<()>::UVariant); | ||
| ------------------------------------------- in this macro invocation | ||
| | ||
help: add a block here | ||
--> $DIR/issue-114701.rs:8:64 | ||
| | ||
LL | assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, | ||
| ^ | ||
... | ||
LL | is_variant!(UVariant, Enum::<()>::UVariant); | ||
| ------------------------------------------- in this macro invocation | ||
= note: this error originates in the macro `is_variant` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
help: remove the `if` if you meant to write a `let...else` statement | ||
| | ||
LL - assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, | ||
LL + assert!(let Enum::$variant::<()> $matcher = $expr () else { false }, | ||
| | ||
|
||
error[E0618]: expected function, found `Enum<()>` | ||
--> $DIR/issue-114701.rs:14:27 | ||
| | ||
LL | enum Enum<T> { , SVariant { v: T }, UVariant } | ||
| -------- `Enum::UVariant` defined here | ||
LL | enum Enum<T> { SVariant { v: T }, UVariant } | ||
| -------- `Enum::UVariant` defined here | ||
... | ||
LL | assert!(if let Enum::$variant::<()> $matcher = $expr () else { false }, | ||
LL | assert!(if let Enum::$variant::<()> $matcher = $expr () { true } else { false }, | ||
| -------- call expression requires function | ||
... | ||
LL | is_variant!(UVariant, Enum::<()>::UVariant); | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0618`. |