Commit Graph

19 Commits

Author SHA1 Message Date
Jacob Pratt
26be558650
Rollup merge of #136749 - mzeitlin11:extend-asciichar, r=scottmcm
Implement Extend<AsciiChar> for String

Implement `Extend<AsciiChar>` for `String` as suggested in https://github.com/rust-lang/rust/issues/110998#issuecomment-2590122968. Also implements `Extend<&AsciiChar>` since there's an analogous impl for `Extend<&char>`, but happy to remove if not thought useful.

r? `@scottmcm`
since you requested it, but no pressure to review!
2025-02-15 02:37:28 -05:00
Jubilee
922119b79c
Rollup merge of #136983 - ehuss:misc-2024-prep, r=tgross35
Prepare standard library for Rust 2024 migration

This includes a variety of commits preparing the standard library for migration to Rust 2024.

The actual migration is blocked on a few things, so I wanted to get this out of the way in a relatively digestable PR.
2025-02-14 14:05:24 -08:00
Eric Huss
0aa634e71a Migrate coretests to Rust 2024 2025-02-13 13:10:21 -08:00
bors
a567209daa Auto merge of #134633 - GrigorenkoPV:get_disjoint_mut, r=cuviper
Stabilize `get_many_mut` as `get_disjoint_mut`

Tracking issue: #104642

Closes #104642

FCP completed in https://github.com/rust-lang/rust/issues/104642#issuecomment-2558161073
2025-02-13 21:09:31 +00:00
Eric Huss
b7c975b22e library: Update rand to 0.9.0 2025-02-13 12:20:55 -08:00
Jubilee
72f0205d28
Rollup merge of #136705 - compiler-errors:edition-library, r=jhpratt
Some miscellaneous edition-related library tweaks

Some library edition tweaks that can be done separately from upgrading the whole standard library to edition 2024 (which is blocked on getting the submodules upgraded, for example)
2025-02-10 00:51:54 -08:00
Michael Goulet
a4e7f8f9bf Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
bjorn3
1fcae03369 Rustfmt 2025-02-08 22:12:13 +00:00
Matthew Zeitlin
d566b5db9b
Implement Extend<AsciiChar> for String 2025-02-08 16:51:04 -05:00
Matthias Krüger
26b288760e
Rollup merge of #135945 - estebank:useless-parens, r=compiler-errors
Remove some unnecessary parens in `assert!` conditions

While working on #122661, some of these started triggering our "unnecessary parens" lints due to a change in the `assert!` desugaring. A cursory search identified a few more. Some of these have been carried from before 1.0, were a bulk rename from the previous name of `assert!` left them in that state. I went and removed as many of these unnecessary parens as possible in order to have fewer annoyances in the future if we make the lint smarter.
2025-02-07 18:26:26 +01:00
Waffle Lapkin
3c94d3e60f
remove use of feature(trait_upcasting) from core tests 2025-02-06 23:44:23 +01:00
Esteban Küber
3815ed63ed Remove some unnecessary parens in assert! conditions
While working on #122661, some of these started triggering our "unnecessary parens" lints due to a change in the `assert!` desugaring. A cursory search identified a few more. Some of these have been carried from before 1.0, were a bulk rename from the previous name of `assert!` left them in that state. I went and removed as many of these unnecessary parens as possible in order to have fewer annoyances in the future if we make the lint smarter.
2025-02-06 22:28:44 +00:00
Taylor Cramer
07cf20e987 Rename slice::take methods to split_off 2025-02-04 11:09:17 -08:00
bors
019fc4de2f Auto merge of #135265 - pascaldekloe:fmt-int-speed, r=tgross35,ChrisDenton
Display of integers without raw pointers and without overflowing_literals

The benchmarks as is measure formatting speed of literals. The first commit `black_box`-es input to simulate runtime speed instead.

The second commit replaces `unsafe` pointer optimizations with plain array indices. The performance is equivalent on Apple M1. Needs peer review on Intel.

Happy to do the 128-bit version too if such change is welcome.
2025-02-04 09:15:53 +00:00
Pascal S. de Kloe
962fec2193 black_box integer-input on fmt benches 2025-01-30 18:57:23 +01:00
Pavel Grigorenko
1abc853562 Stabilize get_many_mut as get_disjoint_mut
* Renames the methods:
	* `get_many_mut` -> `get_disjoint_mut`
	* `get_many_unchecked_mut` -> `get_disjoint_unchecked_mut`
* Does not rename the feature flag: `get_many_mut`
* Marks the feature as stable
* Renames some helper stuff:
	* `GetManyMutError` -> `GetDisjointMutError`
	* `GetManyMutIndex` -> `GetDisjointMutIndex`
	* `get_many_mut_helpers` -> `get_disjoint_mut_helpers`
	* `get_many_check_valid` -> `get_disjoint_check_valid`

This only touches slice methods.
HashMap's methods and feature gates are not renamed here
(nor are they stabilized).
2025-01-28 17:59:31 +03:00
Trevor Gross
395f0c9ecd Stabilize const_black_box
This has been unstably const since [1], but a tracking issue was never
created. Per discussion on Zulip [2], there should not be any blockers
to making this const-stable. The function does not provide any
functionality at compile time but does allow code reuse between const-
and non-const functions, so stabilize it here.

[1]: https://github.com/rust-lang/rust/pull/92226
[2]: https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/const_black_box
2025-01-27 07:54:58 +00:00
bjorn3
2f4dd6e689 Actually run the bstr test
It previously didn't get run because of a missing mod bstr.
2025-01-26 10:45:09 +00:00
bjorn3
b6a3841942 Put all coretests in a separate crate 2025-01-26 10:26:36 +00:00