diff --git a/library/kani_macros/Cargo.toml b/library/kani_macros/Cargo.toml index a1aeb743952b..6930366b84fc 100644 --- a/library/kani_macros/Cargo.toml +++ b/library/kani_macros/Cargo.toml @@ -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"] } diff --git a/tests/ui/derive-arbitrary/union/expected b/tests/ui/derive-arbitrary/union/expected index e54592a47ca6..3acea286d7ca 100644 --- a/tests/ui/derive-arbitrary/union/expected +++ b/tests/ui/derive-arbitrary/union/expected @@ -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`