Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit914d2c0

Browse files
authored
Rollup merge ofrust-lang#125637 - nnethercote:rustfmt-fixes, r=GuillaumeGomez
rustfmt fixesThe `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``
2 parents6fcf130 +3548389 commit914d2c0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

‎core/src/ptr/metadata.rs‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,14 @@ impl<Dyn: ?Sized> DynMetadata<Dyn> {
209209
// Consider a reference like `&(i32, dyn Send)`: the vtable will only store the size of the
210210
// `Send` part!
211211
// SAFETY: DynMetadata always contains a valid vtable pointer
212-
returnunsafe{
213-
crate::intrinsics::vtable_size(self.vtable_ptr()as*const())
214-
};
212+
returnunsafe{crate::intrinsics::vtable_size(self.vtable_ptr()as*const())};
215213
}
216214

217215
/// Returns the alignment of the type associated with this vtable.
218216
#[inline]
219217
pubfnalign_of(self) ->usize{
220218
// SAFETY: DynMetadata always contains a valid vtable pointer
221-
returnunsafe{
222-
crate::intrinsics::vtable_align(self.vtable_ptr()as*const())
223-
};
219+
returnunsafe{crate::intrinsics::vtable_align(self.vtable_ptr()as*const())};
224220
}
225221

226222
/// Returns the size and alignment together as a `Layout`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp