-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rename <*{mut,const} T>::as_{const,mut}
to cast_
#98174
Rename <*{mut,const} T>::as_{const,mut}
to cast_
#98174
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @scottmcm (rust-highfive has picked a reviewer for you, use r? to override) |
@rustbot label +T-libs-api -T-libs |
I marked this as blocked because ACP, though I'm new to ACP too so I'm not sure what the process is here. I probably would have been fine with just approving it because nightly, but let's see what the libs-api folks say. |
|
@CryZe good point! |
As someone who liked the |
With the ACP decided, please update this PR and I'll approve it! @rustbot author |
f1deafa
to
5934cab
Compare
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@rustbot ready |
This renames the methods to use the `cast_` prefix instead of `as_` to make it more readable and avoid confusion with `<*mut T>::as_mut()` which is `unsafe` and returns a reference. See rust-lang#92675
5934cab
to
eb5acc9
Compare
Thanks for the idea & PR! @bors r+ rollup |
…cast, r=scottmcm Rename `<*{mut,const} T>::as_{const,mut}` to `cast_` This renames the methods to use the `cast_` prefix instead of `as_` to make it more readable and avoid confusion with `<*mut T>::as_mut()` which is `unsafe` and returns a reference. Sorry, didn't notice ACP process exists, opened rust-lang/libs-team#51 See rust-lang#92675
Rollup of 6 pull requests Successful merges: - rust-lang#98174 (Rename `<*{mut,const} T>::as_{const,mut}` to `cast_`) - rust-lang#98868 (Fix unreachable coverage generation for inlined functions) - rust-lang#99393 (feat: omit suffixes in const generics (e.g. `1_i32`)) - rust-lang#99423 (Group CSS font rule) - rust-lang#99539 (Improve suggestions for returning binding) - rust-lang#99579 (Add same warning to Result::expect as Result::unwrap) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This renames the methods to use the
cast_
prefix instead ofas_
tomake it more readable and avoid confusion with
<*mut T>::as_mut()
which is
unsafe
and returns a reference.Sorry, didn't notice ACP process exists, opened rust-lang/libs-team#51
See #92675