Skip to content
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

Merged
merged 7 commits into from
Sep 24, 2022
Merged

Conversation

Manishearth
Copy link
Member

From #2599

@Manishearth Manishearth requested a review from sffc as a code owner September 23, 2022 18:27
@Manishearth
Copy link
Member Author

ugh, we're hitting dropck eyepatch stuff

sffc
sffc previously approved these changes Sep 23, 2022
Copy link
Member

@sffc sffc left a 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 :)

utils/zerovec/src/zerovec/mod.rs Outdated Show resolved Hide resolved
Comment on lines +122 to +123
// After https://github.com/rust-lang/rust/issues/34761 stabilizes,
// we should remove this type and use #[may_dangle]
Copy link
Member

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

Copy link
Member Author

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

Comment on lines +854 to +856
// The borrowed destructor is a no-op, but we want to prevent
// the check being run
mem::forget(self);
Copy link
Member

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?

Copy link
Member Author

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.

utils/zerovec/src/zerovec/mod.rs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2022

Codecov Report

Merging #2622 (bb0788f) into main (ff1d4b3) will decrease coverage by 0.65%.
The diff coverage is 100.00%.

❗ Current head bb0788f differs from pull request most recent head 1d0a186. Consider uploading reports for the commit 1d0a186 to get more accurate results

@@            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     
Impacted Files Coverage Δ
utils/zerovec/src/zerovec/mod.rs 85.71% <100.00%> (+1.62%) ⬆️
components/collections/src/codepointtrie/serde.rs 80.00% <0.00%> (-4.22%) ⬇️
...r/datagen/src/transform/cldr/datetime/skeletons.rs 90.90% <0.00%> (-2.85%) ⬇️
components/datetime/src/pattern/runtime/pattern.rs 94.73% <0.00%> (-2.57%) ⬇️
...er/datagen/src/transform/icuexport/collator/mod.rs 75.00% <0.00%> (-2.42%) ⬇️
...c/transform/icuexport/uprops/enum_codepointtrie.rs 79.54% <0.00%> (-1.85%) ⬇️
experimental/segmenter/src/dictionary.rs 95.83% <0.00%> (-1.61%) ⬇️
...nsform/cldr/locale_canonicalizer/likely_subtags.rs 91.52% <0.00%> (-1.58%) ⬇️
...er/datagen/src/transform/cldr/datetime/patterns.rs 23.25% <0.00%> (-1.14%) ⬇️
components/datetime/src/skeleton/helpers.rs 90.76% <0.00%> (-0.90%) ⬇️
... and 27 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants