-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Impl AsRef, Borrow for Ref, RefMut #101981
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
Conversation
r? @m-ou-se (rust-highfive 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
|
Hmm, the
But Unfortunately neither |
@rustbot label +T-libs-api -T-libs |
This comment has been minimized.
This comment has been minimized.
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #105951) made this pull request unmergeable. Please resolve the merge conflicts. |
Hello @dhardy! I noticed that there's a merge conflict for this PR, what's the status of it? :) |
Status: no feedback. I'm not going to waste time resolving CI/merge issues on a PR that no one wants to comment on. |
Hi, thank you for your PR! The process for adding new library APIs was changed and if you want to push your PR forward, you should open an ACP instead to get additional visibility. The libs API team does not have enough time to go though everything, but your change seems simple enough that it could get approved. |
Closing (see the ACP, rust-lang/libs-team#215). |
Summary: Implement
AsRef
,Borrow
forstd::cell::Ref
,RefMut
.Sorry if I didn't exactly follow a guide. This is too small to need an RFC?
I'm not certain about the
#[stable]
attrs, but it seems there's little choice in the matter (given that one can't have unstable impls of existing traits).Motivation
Why? Because we can. This is what
AsRef
andBorrow
are for? (More generally: any impl ofDeref
should implAsRef
too?)Further motivation:
ACP: rust-lang/libs-team#215