Skip to content

Commit 3548389

Browse files
committed
Don't format tests/run-make/*/rmake.rs.
It's reasonable to want to, but in the current implementation this causes multiple problems. - All the `rmake.rs` files are formatted every time even when they haven't changed. This is because they get whitelisted unconditionally in the `OverrideBuilder`, before the changed files get added. - The way `OverrideBuilder` works, if any files gets whitelisted then no unmentioned files will get traversed. This is surprising, and means that the `rmake.rs` entries broke the use of explicit paths to `x fmt`, and also broke `GITHUB_ACTIONS=true git check --fmt`. The commit removes the `rmake.rs` entries, fixes the formatting of a couple of files that were misformatted (not previously caught due to the `GITHUB_ACTIONS` breakage), and bans `!`-prefixed entries in `rustfmt.toml` because they cause all these problems.
1 parent 3578f42 commit 3548389

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

core/src/ptr/metadata.rs

+2-6
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-
return unsafe {
213-
crate::intrinsics::vtable_size(self.vtable_ptr() as *const ())
214-
};
212+
return unsafe { 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
pub fn align_of(self) -> usize {
220218
// SAFETY: DynMetadata always contains a valid vtable pointer
221-
return unsafe {
222-
crate::intrinsics::vtable_align(self.vtable_ptr() as *const ())
223-
};
219+
return unsafe { 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)