Rollup merge of #125637 - nnethercote:rustfmt-fixes, r=GuillaumeGomez

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``
This commit is contained in:
Matthias Krüger 2024-05-28 18:04:33 +02:00 committed by GitHub
commit faabc74625
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 37 additions and 40 deletions

View file

@ -219,10 +219,8 @@ impl<'tcx> InstSimplifyContext<'tcx, '_> {
for (i, field) in variant.fields.iter_enumerated() {
let field_ty = field.ty(self.tcx, args);
if field_ty == *cast_ty {
let place = place.project_deeper(
&[ProjectionElem::Field(i, *cast_ty)],
self.tcx,
);
let place = place
.project_deeper(&[ProjectionElem::Field(i, *cast_ty)], self.tcx);
let operand = if operand.is_move() {
Operand::Move(place)
} else {

View file

@ -691,7 +691,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
location,
format!(
"You can't project to field {f:?} of `DynMetadata` because \
layout is weird and thinks it doesn't have fields."
layout is weird and thinks it doesn't have fields."
),
);
}