Commit 277ecdc
committed
lang/rust: update to version 1.81.0, taken from pkgsrc-wip.
Pkgsrc changes:
* Adapt patches, apply to new vendored crates where needed.
* Back-port rust pull request 130110, "make dist vendoring configurable"
* Disable "dist vendoring", otherwise cargo would try to access
the network during the build phase.
Upstream changes:
Version 1.81.0 (2024-09-05)
==========================
Language
--------
- [Abort on uncaught panics in `extern "C"` functions.]
(rust-lang/rust#116088)
- [Fix ambiguous cases of multiple `&` in elided self lifetimes.]
(rust-lang/rust#117967)
- [Stabilize `#[expect]` for lints (RFC 2383),]
(rust-lang/rust#120924) like `#[allow]`
with a warning if the lint is _not_ fulfilled.
- [Change method resolution to constrain hidden types instead of
rejecting method candidates.]
(rust-lang/rust#123962)
- [Bump `elided_lifetimes_in_associated_constant` to deny.]
(rust-lang/rust#124211)
- [`offset_from`: always allow pointers to point to the same
address.] (rust-lang/rust#124921)
- [Allow constraining opaque types during subtyping in the trait
system.] (rust-lang/rust#125447)
- [Allow constraining opaque types during various unsizing casts.]
(rust-lang/rust#125610)
- [Deny keyword lifetimes pre-expansion.]
(rust-lang/rust#126762)
Compiler
--------
- [Make casts of pointers to trait objects stricter.]
(rust-lang/rust#120248)
- [Check alias args for well-formedness even if they have escaping
bound vars.] (rust-lang/rust#123737)
- [Deprecate no-op codegen option `-Cinline-threshold=...`.]
(rust-lang/rust#124712)
- [Re-implement a type-size based limit.]
(rust-lang/rust#125507)
- [Properly account for alignment in `transmute` size checks.]
(rust-lang/rust#125740)
- [Remove the `box_pointers` lint.]
(rust-lang/rust#126018)
- [Ensure the interpreter checks bool/char for validity when they
are used in a cast.] (rust-lang/rust#126265)
- [Improve coverage instrumentation for functions containing nested
items.] (rust-lang/rust#127199)
- Target changes:
- [Add Tier 3 `no_std` Xtensa targets:]
(rust-lang/rust#125141) `xtensa-esp32-none-elf`,
`xtensa-esp32s2-none-elf`, `xtensa-esp32s3-none-elf`
- [Add Tier 3 `std` Xtensa targets:]
(rust-lang/rust#126380) `xtensa-esp32-espidf`,
`xtensa-esp32s2-espidf`, `xtensa-esp32s3-espidf`
- [Add Tier 3 i686 Redox OS target:]
(rust-lang/rust#126192) `i686-unknown-redox`
- [Promote `arm64ec-pc-windows-msvc` to Tier 2.]
(rust-lang/rust#126039)
- [Promote `wasm32-wasip2` to Tier 2.]
(rust-lang/rust#126967)
- [Promote `loongarch64-unknown-linux-musl` to Tier 2 with host
tools.] (rust-lang/rust#126298)
- [Enable full tools and profiler for LoongArch Linux targets.]
(rust-lang/rust#127078)
- [Unconditionally warn on usage of `wasm32-wasi`.]
(rust-lang/rust#126662) (see compatibility
note below)
- Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.
Libraries
---------
- [Split core's `PanicInfo` and std's `PanicInfo`.]
(rust-lang/rust#115974) (see compatibility
note below)
- [Generalize `{Rc,Arc}::make_mut()` to unsized types.]
(rust-lang/rust#116113)
- [Replace sort implementations with stable `driftsort` and unstable
`ipnsort`.] (rust-lang/rust#124032) All
`slice::sort*` and `slice::select_nth*` methods are expected to
see significant performance improvements. See the [research
project] (https://github.com/Voultapher/sort-research-rs) for
more details.
- [Document behavior of `create_dir_all` with respect to empty
paths.] (rust-lang/rust#125112)
- [Fix interleaved output in the default panic hook when multiple
threads panic simultaneously.]
(rust-lang/rust#127397)
- Fix `Command`'s batch files argument escaping not working when
file name has trailing whitespace or periods (CVE-2024-43402).
Stabilized APIs
---------------
- [`core::error`] (https://doc.rust-lang.org/stable/core/error/index.html)
- [`hint::assert_unchecked`]
(https://doc.rust-lang.org/stable/core/hint/fn.assert_unchecked.html)
- [`fs::exists`] (https://doc.rust-lang.org/stable/std/fs/fn.exists.html)
- [`AtomicBool::fetch_not`]
(https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicBool.html#method.fetch_not)
- [`Duration::abs_diff`]
(https://doc.rust-lang.org/stable/core/time/struct.Duration.html#method.abs_diff)
- [`IoSlice::advance`]
(https://doc.rust-lang.org/stable/std/io/struct.IoSlice.html#method.advance)
- [`IoSlice::advance_slices`]
(https://doc.rust-lang.org/stable/std/io/struct.IoSlice.html#method.advance_slices)
- [`IoSliceMut::advance`]
(https://doc.rust-lang.org/stable/std/io/struct.IoSliceMut.html#method.advance)
- [`IoSliceMut::advance_slices`]
(https://doc.rust-lang.org/stable/std/io/struct.IoSliceMut.html#method.advance_slices)
- [`PanicHookInfo`]
(https://doc.rust-lang.org/stable/std/panic/struct.PanicHookInfo.html)
- [`PanicInfo::message`]
(https://doc.rust-lang.org/stable/core/panic/struct.PanicInfo.html#method.message)
- [`PanicMessage`]
(https://doc.rust-lang.org/stable/core/panic/struct.PanicMessage.html)
These APIs are now stable in const contexts:
- [`char::from_u32_unchecked`]
(https://doc.rust-lang.org/stable/core/char/fn.from_u32_unchecked.html)
(function)
- [`char::from_u32_unchecked`]
(https://doc.rust-lang.org/stable/core/primitive.char.html#method.from_u32_unchecked)
(method)
- [`CStr::count_bytes`]
(https://doc.rust-lang.org/stable/core/ffi/c_str/struct.CStr.html#method.count_bytes)
- [`CStr::from_ptr`]
(https://doc.rust-lang.org/stable/core/ffi/c_str/struct.CStr.html#method.from_ptr)
Cargo
-----
- [Generated `.cargo_vcs_info.json` is always included, even when
`--allow-dirty` is passed.]
(rust-lang/cargo#13960)
- [Disallow `package.license-file` and `package.readme` pointing
to non-existent files during packaging.]
(rust-lang/cargo#13921)
- [Disallow passing `--release`/`--debug` flag along with the
`--profile` flag.] (rust-lang/cargo#13971)
- [Remove `lib.plugin` key support in `Cargo.toml`. Rust plugin
support has been deprecated for four years and was removed in
1.75.0.] (rust-lang/cargo#13902)
Compatibility Notes
-------------------
* Usage of the `wasm32-wasi` target will now issue a compiler
warning and request users switch to the `wasm32-wasip1` target
instead. Both targets are the same, `wasm32-wasi` is only being
renamed, and this [change to the WASI target]
(https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets.html)
is being done to enable removing `wasm32-wasi` in January 2025.
* We have renamed `std::panic::PanicInfo` to `std::panic::PanicHookInfo`.
The old name will continue to work as an alias, but will result in
a deprecation warning starting in Rust 1.82.0.
`core::panic::PanicInfo` will remain unchanged, however, as this
is now a *different type*.
The reason is that these types have different roles:
`std::panic::PanicHookInfo` is the argument to the [panic
hook](https://doc.rust-lang.org/stable/std/panic/fn.set_hook.html)
in std context (where panics can have an arbitrary payload),
while `core::panic::PanicInfo` is the argument to the
[`#[panic_handler]`](https://doc.rust-lang.org/nomicon/panic-handler.html)
in no_std context (where panics always carry a formatted *message*).
Separating these types allows us to add more useful methods to
these types, such as `std::panic::PanicHookInfo::payload_as_str()`
and `core::panic::PanicInfo::message()`.
* The new sort implementations may panic if a type's implementation
of [`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html) (or
the given comparison function) does not implement a [total
order](https://en.wikipedia.org/wiki/Total_order) as the trait
requires. `Ord`'s supertraits (`PartialOrd`, `Eq`, and `PartialEq`)
must also be consistent. The previous implementations would not
"notice" any problem, but the new implementations have a good chance
of detecting inconsistencies, throwing a panic rather than returning
knowingly unsorted data.
* [In very rare cases, a change in the internal evaluation order of the trait
solver may result in new fatal overflow errors.]
(rust-lang/rust#126128)
Internal Changes
----------------
These changes do not affect any public interfaces of Rust, but they
represent significant improvements to the performance or internals
of rustc and related tools.
- [Add a Rust-for Linux `auto` CI job to check kernel builds.]
(rust-lang/rust#125209)1 parent b714e07 commit 277ecdc
File tree
23 files changed
+552
-271
lines changed- lang/rust
- patches
23 files changed
+552
-271
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
| |||
201 | 209 | | |
202 | 210 | | |
203 | 211 | | |
204 | | - | |
205 | | - | |
206 | 212 | | |
207 | | - | |
| 213 | + | |
208 | 214 | | |
209 | 215 | | |
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
214 | | - | |
| 220 | + | |
215 | 221 | | |
216 | 222 | | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
221 | | - | |
| 227 | + | |
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
228 | | - | |
| 234 | + | |
229 | 235 | | |
230 | 236 | | |
231 | 237 | | |
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
235 | | - | |
| 241 | + | |
236 | 242 | | |
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
242 | | - | |
| 248 | + | |
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
248 | 254 | | |
249 | | - | |
| 255 | + | |
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
| |||
258 | 264 | | |
259 | 265 | | |
260 | 266 | | |
261 | | - | |
| 267 | + | |
262 | 268 | | |
263 | 269 | | |
264 | 270 | | |
| |||
271 | 277 | | |
272 | 278 | | |
273 | 279 | | |
274 | | - | |
| 280 | + | |
275 | 281 | | |
276 | 282 | | |
277 | 283 | | |
278 | 284 | | |
279 | 285 | | |
280 | 286 | | |
281 | | - | |
| 287 | + | |
282 | 288 | | |
283 | 289 | | |
284 | 290 | | |
| |||
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
301 | | - | |
| 307 | + | |
302 | 308 | | |
303 | 309 | | |
304 | 310 | | |
305 | 311 | | |
306 | 312 | | |
307 | 313 | | |
308 | | - | |
| 314 | + | |
309 | 315 | | |
310 | 316 | | |
311 | 317 | | |
| |||
317 | 323 | | |
318 | 324 | | |
319 | 325 | | |
320 | | - | |
| 326 | + | |
321 | 327 | | |
322 | | - | |
323 | | - | |
| 328 | + | |
| 329 | + | |
324 | 330 | | |
325 | 331 | | |
326 | 332 | | |
| |||
335 | 341 | | |
336 | 342 | | |
337 | 343 | | |
338 | | - | |
| 344 | + | |
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
| |||
345 | 351 | | |
346 | 352 | | |
347 | 353 | | |
348 | | - | |
349 | | - | |
350 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
351 | 357 | | |
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
355 | 361 | | |
356 | 362 | | |
357 | | - | |
358 | | - | |
359 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
360 | 366 | | |
361 | 367 | | |
362 | 368 | | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
366 | | - | |
| 372 | + | |
367 | 373 | | |
368 | 374 | | |
369 | 375 | | |
| |||
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
375 | | - | |
| 381 | + | |
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
| |||
432 | 438 | | |
433 | 439 | | |
434 | 440 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | 441 | | |
440 | 442 | | |
441 | 443 | | |
| |||
456 | 458 | | |
457 | 459 | | |
458 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
459 | 473 | | |
460 | 474 | | |
461 | 475 | | |
| |||
634 | 648 | | |
635 | 649 | | |
636 | 650 | | |
637 | | - | |
| 651 | + | |
638 | 652 | | |
639 | 653 | | |
640 | 654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments