-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 min_specialization in liballoc #71321
Conversation
0fbe5c2
to
52faacf
Compare
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -215,59 +215,6 @@ impl<K: Clone, V: Clone> Clone for BTreeMap<K, V> { | |||
clone_subtree(self.root.as_ref().unwrap().as_ref()) | |||
} | |||
} | |||
|
|||
fn clone_from(&mut self, other: &Self) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @crgl for the removal here
// FIXME(matthewjasper) This allows copying a type that doesn't implement | ||
// `Copy` because of unsatisfied lifetime bounds (copying `A<'_>` when only | ||
// `A<'static>: Copy` and `A<'_>: Clone`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this apply only to specialization or to all uses of Copy
? I'm surprised there is no test that makes sure we fail to copy something when the Copy
impl is lifetime-dependent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only for specializations.
52faacf
to
7476600
Compare
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
- Remove a type parameter from `[A]RcFromIter`. - Remove an implementation of `[A]RcFromIter` that didn't actually specialize anything. - Remove unused implementation of `IsZero` for `Option<&mut T>`. - Change specializations of `[A]RcEqIdent` to use a marker trait version of `Eq`. - Remove `BTreeClone`. I couldn't find a way to make this work with `min_specialization`. - Add `rustc_unsafe_specialization_marker` to `Copy` and `TrustedLen`.
7476600
to
cb27039
Compare
@bors r+ |
📌 Commit cb27039 has been approved by |
⌛ Testing commit cb27039 with merge adbeb04256d09dbc524d24e4922f9b330e35bab0... |
…ckler Use min_specialization in liballoc - Remove a type parameter from `[A]RcFromIter`. - Remove an implementation of `[A]RcFromIter` that didn't actually specialize anything. - Remove unused implementation of `IsZero` for `Option<&mut T>`. - Change specializations of `[A]RcEqIdent` to use a marker trait version of `Eq`. - Remove `BTreeClone`. I couldn't find a way to make this work with `min_specialization`. - Add `rustc_unsafe_specialization_marker` to `Copy` and `TrustedLen`. After this only libcore is the only standard library crate using `feature(specialization)`. cc rust-lang#31844
@bors retry yield |
@Dylan-DPC did we race? I just created a rollup, hopefully we didn't both do that? |
⌛ Testing commit cb27039 with merge b9badca586f6cf1d3b2b58756f994f3b4606fcc4... |
@bors retry yield |
⌛ Testing commit cb27039 with merge 9a09b0537fb8a2ef090efda2d519777bff9dc879... |
@bors retry yield |
☀️ Test successful - checks-azure |
This was a perf regression for |
[A]RcFromIter
.[A]RcFromIter
that didn't actuallyspecialize anything.
IsZero
forOption<&mut T>
.[A]RcEqIdent
to use a marker trait versionof
Eq
.BTreeClone
. I couldn't find a way to make this work withmin_specialization
.rustc_unsafe_specialization_marker
toCopy
andTrustedLen
.After this only libcore is the only standard library crate using
feature(specialization)
.cc #31844