Skip to content

Commit 20eb00c

Browse files
authored
Fix iss3495 (#3501)
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.
1 parent fde5fbb commit 20eb00c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

library/kani_macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ proc-macro = true
1313

1414
[dependencies]
1515
proc-macro2 = "1.0"
16-
proc-macro-error2 = "2.0.0"
16+
proc-macro-error2 = { version = "2.0.0", features = ["nightly"] }
1717
quote = "1.0.20"
1818
syn = { version = "2.0.18", features = ["full", "visit-mut", "visit", "extra-traits"] }
1919

tests/ui/derive-arbitrary/union/expected

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ error: Cannot derive `Arbitrary` for `Wrapper` union
33
|\
44
| #[derive(kani::Arbitrary)]\
55
| ^^^^^^^^^^^^^^^\
6-
|
6+
|\
77
note: `#[derive(Arbitrary)]` cannot be used for unions such as `Wrapper`
88

9+
|\
10+
| union Wrapper {\
11+
| ^^^^^^^\
912
= note: this error originates in the derive macro `kani::Arbitrary`

0 commit comments

Comments
 (0)