-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use associated items of char
instead of freestanding items in core::char
#105671
Conversation
r? @scottmcm (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
1415e0b
to
9fd0fe1
Compare
core::char
core::char
Is there a libs-api decision to do this? I think future-deprecated shows up in the docs, so it's probably up to them whether to do this. Alternatively, if you wanted to split this into the changes to stop using those constants, in favour of the associated ones, and a separate one to actually do the deprecated, I'd be happy to sign of on no longer using these constants in other examples and such. @rustbot author |
9fd0fe1
to
76e216f
Compare
core::char
char
instead of freestanding items in core::char
Yeah, the idea was that the deprecation message shows up in the docs, because to me the current docs read like these are already deprecated. But if the deprecation needs a libs-api decision we can land it separately. I've removed the deprecation from this PR for now, but kept the updates from @rustbot ready |
Thanks! Updating the library and particularly the docs like this is a great improvement. (And, unlike deprecations, something I can sign off on 🙃) @bors r+ rollup |
…tmcm Use associated items of `char` instead of freestanding items in `core::char` The associated functions and constants on `char` have been stable since 1.52 and the freestanding items have soft-deprecated since 1.62 (rust-lang#95566). This PR ~~marks them as "deprecated in future", similar to the integer and floating point modules (`core::{i32, f32}` etc)~~ replaces all uses of `core::char::*` with `char::*` to prepare for future deprecation of `core::char::*`.
…tmcm Use associated items of `char` instead of freestanding items in `core::char` The associated functions and constants on `char` have been stable since 1.52 and the freestanding items have soft-deprecated since 1.62 (rust-lang#95566). This PR ~~marks them as "deprecated in future", similar to the integer and floating point modules (`core::{i32, f32}` etc)~~ replaces all uses of `core::char::*` with `char::*` to prepare for future deprecation of `core::char::*`.
☀️ Test successful - checks-actions |
Finished benchmarking commit (adb4bfd): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
The associated functions and constants on
char
have been stable since 1.52 and the freestanding items have soft-deprecated since 1.62 (#95566). This PRmarks them as "deprecated in future", similar to the integer and floating point modules (replaces all uses ofcore::{i32, f32}
etc)core::char::*
withchar::*
to prepare for future deprecation ofcore::char::*
.