Skip to content

Provide nicer parse errors and suggest "full-syntax"#39

Merged
bors[bot] merged 2 commits into
rust-num:masterfrom
cuviper:parse-errors
Jul 29, 2020
Merged

Provide nicer parse errors and suggest "full-syntax"#39
bors[bot] merged 2 commits into
rust-num:masterfrom
cuviper:parse-errors

Conversation

@cuviper

@cuviper cuviper commented Jul 27, 2020

Copy link
Copy Markdown
Member

The included compile_fail test has this output:

error: expected `,`
  --> src/test.rs:13:24
   |
10 |     VarA = get_an_isize!(), // error without "syn/full"
   |                        ^

error: this might need the "full-syntax" feature of `num-derive`
 --> src/test.rs:11:10
  |
8 | #[derive(num_derive::FromPrimitive)]
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

Closes #16.

@cuviper

cuviper commented Jul 29, 2020

Copy link
Copy Markdown
Member Author

bors r+

@bors

bors Bot commented Jul 29, 2020

Copy link
Copy Markdown
Contributor

@bors bors Bot merged commit 77c551f into rust-num:master Jul 29, 2020
@cuviper cuviper deleted the parse-errors branch July 5, 2023 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

derives panic when a discriminant is given by a macro

1 participant