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

Fix compilation on latest nightly #236

Merged
merged 2 commits into from
May 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
/// We exclusively operate on pointers here so we only need a single function
/// pointer in the meta-table for both `&T` and `&mut T` cases.
#[cfg(not(feature = "nightly"))]
fn attach_vtable<TraitObject: ?Sized, T>(value: *mut ()) -> *mut TraitObject

Check failure on line 259 in src/meta.rs

View workflow job for this annotation

GitHub Actions / Build and Test (Linux) (stable)

bound is defined in more than one place
where
TraitObject: CastFrom<T> + 'static,
T: core::any::Any,
Expand Down Expand Up @@ -399,7 +399,7 @@
{
let ty_id = TypeId::of::<R>();
// use self.addr() for unpredictable address to use for checking consistency below
let invalid_ptr = core::ptr::invalid_mut::<R>((self as *mut Self).addr());
let invalid_ptr = core::ptr::without_provenance_mut::<R>((self as *mut Self).addr());
let trait_ptr = <T as CastFrom<R>>::cast(invalid_ptr);
// assert that address not changed (to catch some mistakes in CastFrom impl)
assert_eq!(
Expand Down
Loading