Skip to content

Commit

Permalink
Rollup merge of rust-lang#125637 - nnethercote:rustfmt-fixes, r=Guill…
Browse files Browse the repository at this point in the history
…aumeGomez

rustfmt fixes

The `rmake.rs` entries in `rustfmt.toml` are causing major problems for `x fmt`. This PR removes them and does some minor related cleanups.

r? ``@GuillaumeGomez``
  • Loading branch information
matthiaskrgr authored May 28, 2024
2 parents 6fcf130 + 3548389 commit 914d2c0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/src/ptr/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,14 @@ impl<Dyn: ?Sized> DynMetadata<Dyn> {
// Consider a reference like `&(i32, dyn Send)`: the vtable will only store the size of the
// `Send` part!
// SAFETY: DynMetadata always contains a valid vtable pointer
return unsafe {
crate::intrinsics::vtable_size(self.vtable_ptr() as *const ())
};
return unsafe { crate::intrinsics::vtable_size(self.vtable_ptr() as *const ()) };
}

/// Returns the alignment of the type associated with this vtable.
#[inline]
pub fn align_of(self) -> usize {
// SAFETY: DynMetadata always contains a valid vtable pointer
return unsafe {
crate::intrinsics::vtable_align(self.vtable_ptr() as *const ())
};
return unsafe { crate::intrinsics::vtable_align(self.vtable_ptr() as *const ()) };
}

/// Returns the size and alignment together as a `Layout`
Expand Down

0 comments on commit 914d2c0

Please sign in to comment.