Re-format let-else per rustfmt update

This commit is contained in:
Mark Rousskov 2023-07-12 21:49:27 -04:00
parent 67b0cfc761
commit cc907f80b9
162 changed files with 1404 additions and 947 deletions

View file

@ -186,7 +186,11 @@ fn calculate_debuginfo_offset<
} => {
let offset = indirect_offsets.last_mut().unwrap_or(&mut direct_offset);
let FieldsShape::Array { stride, count: _ } = place.layout().fields else {
span_bug!(var.source_info.span, "ConstantIndex on non-array type {:?}", place.layout())
span_bug!(
var.source_info.span,
"ConstantIndex on non-array type {:?}",
place.layout()
)
};
*offset += stride * index;
place = place.project_constant_index(bx, index);

View file

@ -369,13 +369,9 @@ pub fn from_target_feature(
// We allow comma separation to enable multiple features.
target_features.extend(value.as_str().split(',').filter_map(|feature| {
let Some(feature_gate) = supported_target_features.get(feature) else {
let msg =
format!("the feature named `{}` is not valid for this target", feature);
let msg = format!("the feature named `{}` is not valid for this target", feature);
let mut err = tcx.sess.struct_span_err(item.span(), msg);
err.span_label(
item.span(),
format!("`{}` is not valid for this target", feature),
);
err.span_label(item.span(), format!("`{}` is not valid for this target", feature));
if let Some(stripped) = feature.strip_prefix('+') {
let valid = supported_target_features.contains_key(stripped);
if valid {