-
Notifications
You must be signed in to change notification settings - Fork 182
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
Post-review zerovec fixes #2622
Conversation
ugh, we're hitting dropck eyepatch stuff |
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.
Looks good but please make it compile :)
// After https://github.com/rust-lang/rust/issues/34761 stabilizes, | ||
// we should remove this type and use #[may_dangle] |
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.
Suggestion (optional): add a canary test?
I think this solution is just fine, though
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.
Yeah, I'm not in a rush to remove this fix, I think we can leave it in without a test and if we notice it later we can fix it.
I've been monitoring the eyepatch thread, anyway
// The borrowed destructor is a no-op, but we want to prevent | ||
// the check being run | ||
mem::forget(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.
Nit: Shouldn't the compiler be able to figure this out on its own?
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.
Usually, yes, but it doesn't hurt to help the compiler here.
Codecov Report
@@ Coverage Diff @@
## main #2622 +/- ##
==========================================
- Coverage 73.97% 73.31% -0.66%
==========================================
Files 420 427 +7
Lines 35052 36726 +1674
==========================================
+ Hits 25929 26927 +998
- Misses 9123 9799 +676
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: Shane F. Carr <shane@unicode.org>
From #2599