Skip to content

Commit

Permalink
Fix iss3495 (#3501)
Browse files Browse the repository at this point in the history
As suggested in
GnomedDev/proc-macro-error-2#1 (comment),
turning on the `nightly` feature for `proc-macro-error2` to restore the
previous error message for `derive(Arbitrary)`.

Resolves #3495 

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
  • Loading branch information
zhassan-aws committed Sep 7, 2024
1 parent fde5fbb commit 20eb00c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/kani_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ proc-macro = true

[dependencies]
proc-macro2 = "1.0"
proc-macro-error2 = "2.0.0"
proc-macro-error2 = { version = "2.0.0", features = ["nightly"] }
quote = "1.0.20"
syn = { version = "2.0.18", features = ["full", "visit-mut", "visit", "extra-traits"] }

Expand Down
5 changes: 4 additions & 1 deletion tests/ui/derive-arbitrary/union/expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ error: Cannot derive `Arbitrary` for `Wrapper` union
|\
| #[derive(kani::Arbitrary)]\
| ^^^^^^^^^^^^^^^\
|
|\
note: `#[derive(Arbitrary)]` cannot be used for unions such as `Wrapper`

|\
| union Wrapper {\
| ^^^^^^^\
= note: this error originates in the derive macro `kani::Arbitrary`

0 comments on commit 20eb00c

Please sign in to comment.