Commit 9483f7d
authored
Suppress deprecation warnings in generated code (#2797)
* Suppress deprecation warnings in generated code
Our derives now properly emit `#[allow(deprecated)]` in all locations where user code might be referenced, suppressing warnings when deriving traits on deprecated types.
This change adds regression tests for `ByteHash`, `ByteEq`, and `SplitAt` (and implicitly `KnownLayout` via `SplitAt`) to ensure this behavior is preserved. It also fixes missing suppressions in `KnownLayout`'s internal helpers (`Field` impls and `__ZerocopyKnownLayoutMaybeUninit` struct).
* Suppress deprecation warnings in generated code
Our derives now properly emit `#[allow(deprecated)]` in all locations where user code might be referenced, suppressing warnings when deriving traits on deprecated types.
This change adds regression tests for `ByteHash`, `ByteEq`, and `SplitAt` (and implicitly `KnownLayout` via `SplitAt`) to ensure this behavior is preserved. It also fixes missing suppressions in `KnownLayout`'s internal helpers (`Field` impls and `__ZerocopyKnownLayoutMaybeUninit` struct).
* Suppress deprecation warnings in generated code
Our derives now properly emit `#[allow(deprecated)]` in all locations where user code might be referenced, suppressing warnings when deriving traits on deprecated types.
This change adds regression tests for `ByteHash`, `ByteEq`, and `SplitAt` (and implicitly `KnownLayout` via `SplitAt`) to ensure this behavior is preserved. It also fixes missing suppressions in `KnownLayout`'s internal helpers (`Field` impls and `__ZerocopyKnownLayoutMaybeUninit` struct).
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent c2e43ce commit 9483f7d
3 files changed
+84
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
| 381 | + | |
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
| |||
403 | 405 | | |
404 | 406 | | |
405 | 407 | | |
| 408 | + | |
406 | 409 | | |
407 | 410 | | |
408 | 411 | | |
| |||
608 | 611 | | |
609 | 612 | | |
610 | 613 | | |
611 | | - | |
612 | | - | |
613 | 614 | | |
614 | 615 | | |
615 | 616 | | |
| |||
1840 | 1841 | | |
1841 | 1842 | | |
1842 | 1843 | | |
1843 | | - | |
1844 | | - | |
1845 | 1844 | | |
1846 | 1845 | | |
1847 | 1846 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
| 221 | + | |
218 | 222 | | |
219 | 223 | | |
220 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
0 commit comments