Commit 2300eed
Replace deprecated proc-macro-error2 with proc-macro2-diagnostics (#4613)
proc-macro-error2 is unmaintained (RUSTSEC-2026-0173). Migrate the
kani_macros crate to proc-macro2-diagnostics, one of the alternatives
recommended by the advisory.
The abort!/abort_call_site! macros (which panicked and were caught by
the #[proc_macro_error] wrapper) are replaced by threading
Result<TokenStream, Diagnostic> through the macro helpers and emitting
the diagnostic at each entry point via
Diagnostic::emit_as_item_tokens(). The structured note/help
sub-diagnostics and spans are preserved, and proc-macro2-diagnostics
auto-enables native nightly emission, so the compiler output is
unchanged.
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
---------
Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>1 parent 4c0fce8 commit 2300eed
6 files changed
Lines changed: 277 additions & 158 deletions
File tree
- library/kani_macros
- src
- sysroot/loop_contracts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
1110 | 1110 | | |
1111 | 1111 | | |
1112 | 1112 | | |
1113 | | - | |
1114 | 1113 | | |
| 1114 | + | |
1115 | 1115 | | |
1116 | 1116 | | |
1117 | 1117 | | |
| |||
1675 | 1675 | | |
1676 | 1676 | | |
1677 | 1677 | | |
1678 | | - | |
1679 | | - | |
| 1678 | + | |
| 1679 | + | |
1680 | 1680 | | |
1681 | | - | |
| 1681 | + | |
1682 | 1682 | | |
1683 | | - | |
1684 | | - | |
| 1683 | + | |
1685 | 1684 | | |
1686 | 1685 | | |
1687 | 1686 | | |
1688 | | - | |
1689 | | - | |
| 1687 | + | |
| 1688 | + | |
1690 | 1689 | | |
1691 | | - | |
| 1690 | + | |
1692 | 1691 | | |
1693 | | - | |
1694 | 1692 | | |
1695 | 1693 | | |
1696 | 1694 | | |
1697 | | - | |
1698 | | - | |
1699 | | - | |
1700 | | - | |
1701 | | - | |
1702 | | - | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
| 1695 | + | |
1706 | 1696 | | |
1707 | 1697 | | |
1708 | 1698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments