Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Jun 9, 2025

Some raw pointer casts now have the signature fn(PtrInner) -> PtrInner
instead of fn(PtrInner) -> NonNull. Simplify the implementations of
some Ptr methods.

Co-authored-by: Jack Wrenn [email protected]


This PR is on branch transmute-ref-dst.

@joshlf joshlf force-pushed the I1945c8e554dd80a0475462d0dc5e0ae1eb2e9ac4 branch from 5774b01 to 30ab41e Compare June 9, 2025 17:44
@joshlf joshlf changed the title SizeCompat::cast_from_raw operates on PtrInner Simplify some Ptr operations Jun 9, 2025
@joshlf joshlf requested a review from jswrenn June 9, 2025 17:44
@joshlf joshlf enabled auto-merge June 9, 2025 17:44
// those terms.

use core::{marker::PhantomData, ops::Range, ptr::NonNull};
use core::{marker::PhantomData, mem, ops::Range, ptr::NonNull};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need a #[cfg(doc)] use core::ptr::NonNull; to get CI to pass.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@joshlf joshlf force-pushed the I1945c8e554dd80a0475462d0dc5e0ae1eb2e9ac4 branch from 30ab41e to 077c7bd Compare June 9, 2025 18:12
Some raw pointer casts now have the signature `fn(PtrInner) -> PtrInner`
instead of `fn(PtrInner) -> NonNull`. Simplify the implementations of
some `Ptr` methods.

Co-authored-by: Jack Wrenn <[email protected]>
gherrit-pr-id: I1945c8e554dd80a0475462d0dc5e0ae1eb2e9ac4
@joshlf joshlf force-pushed the I1945c8e554dd80a0475462d0dc5e0ae1eb2e9ac4 branch from 077c7bd to a6f8897 Compare June 9, 2025 18:15
@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 97.05882% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.91%. Comparing base (570601f) to head (a6f8897).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/pointer/inner.rs 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2577      +/-   ##
==========================================
+ Coverage   88.85%   88.91%   +0.05%     
==========================================
  Files          20       20              
  Lines        5312     5313       +1     
==========================================
+ Hits         4720     4724       +4     
+ Misses        592      589       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshlf joshlf added this pull request to the merge queue Jun 9, 2025
Merged via the queue into main with commit 71bc399 Jun 9, 2025
89 checks passed
@joshlf joshlf deleted the I1945c8e554dd80a0475462d0dc5e0ae1eb2e9ac4 branch June 9, 2025 18:50
@joshlf joshlf restored the I1945c8e554dd80a0475462d0dc5e0ae1eb2e9ac4 branch June 9, 2025 19:11
@joshlf joshlf deleted the I1945c8e554dd80a0475462d0dc5e0ae1eb2e9ac4 branch June 9, 2025 19:12
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.

4 participants