Re-format let-else per rustfmt update
This commit is contained in:
parent
67b0cfc761
commit
cc907f80b9
162 changed files with 1404 additions and 947 deletions
|
@ -739,7 +739,10 @@ fn build_foreign_type_di_node<'ll, 'tcx>(
|
|||
debug!("build_foreign_type_di_node: {:?}", t);
|
||||
|
||||
let &ty::Foreign(def_id) = unique_type_id.expect_ty().kind() else {
|
||||
bug!("build_foreign_type_di_node() called with unexpected type: {:?}", unique_type_id.expect_ty());
|
||||
bug!(
|
||||
"build_foreign_type_di_node() called with unexpected type: {:?}",
|
||||
unique_type_id.expect_ty()
|
||||
);
|
||||
};
|
||||
|
||||
build_type_with_children(
|
||||
|
|
|
@ -199,7 +199,7 @@ pub(super) fn build_enum_type_di_node<'ll, 'tcx>(
|
|||
let enum_type = unique_type_id.expect_ty();
|
||||
let &ty::Adt(enum_adt_def, _) = enum_type.kind() else {
|
||||
bug!("build_enum_type_di_node() called with non-enum type: `{:?}`", enum_type)
|
||||
};
|
||||
};
|
||||
|
||||
let enum_type_and_layout = cx.layout_of(enum_type);
|
||||
let enum_type_name = compute_debuginfo_type_name(cx.tcx, enum_type, false);
|
||||
|
@ -667,7 +667,9 @@ fn build_union_fields_for_direct_tag_generator<'ll, 'tcx>(
|
|||
generator_type_and_layout: TyAndLayout<'tcx>,
|
||||
generator_type_di_node: &'ll DIType,
|
||||
) -> SmallVec<&'ll DIType> {
|
||||
let Variants::Multiple { tag_encoding: TagEncoding::Direct, tag_field, .. } = generator_type_and_layout.variants else {
|
||||
let Variants::Multiple { tag_encoding: TagEncoding::Direct, tag_field, .. } =
|
||||
generator_type_and_layout.variants
|
||||
else {
|
||||
bug!("This function only supports layouts with directly encoded tags.")
|
||||
};
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ pub(super) fn build_enum_type_di_node<'ll, 'tcx>(
|
|||
let enum_type = unique_type_id.expect_ty();
|
||||
let &ty::Adt(enum_adt_def, _) = enum_type.kind() else {
|
||||
bug!("build_enum_type_di_node() called with non-enum type: `{:?}`", enum_type)
|
||||
};
|
||||
};
|
||||
|
||||
let enum_type_and_layout = cx.layout_of(enum_type);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ pub(super) fn build_enum_type_di_node<'ll, 'tcx>(
|
|||
let enum_type = unique_type_id.expect_ty();
|
||||
let &ty::Adt(enum_adt_def, _) = enum_type.kind() else {
|
||||
bug!("build_enum_type_di_node() called with non-enum type: `{:?}`", enum_type)
|
||||
};
|
||||
};
|
||||
|
||||
let containing_scope = get_namespace_for_item(cx, enum_adt_def.did());
|
||||
let enum_type_and_layout = cx.layout_of(enum_type);
|
||||
|
@ -132,9 +132,9 @@ pub(super) fn build_generator_di_node<'ll, 'tcx>(
|
|||
unique_type_id: UniqueTypeId<'tcx>,
|
||||
) -> DINodeCreationResult<'ll> {
|
||||
let generator_type = unique_type_id.expect_ty();
|
||||
let &ty::Generator(generator_def_id, _, _ ) = generator_type.kind() else {
|
||||
let &ty::Generator(generator_def_id, _, _) = generator_type.kind() else {
|
||||
bug!("build_generator_di_node() called with non-generator type: `{:?}`", generator_type)
|
||||
};
|
||||
};
|
||||
|
||||
let containing_scope = get_namespace_for_item(cx, generator_def_id);
|
||||
let generator_type_and_layout = cx.layout_of(generator_type);
|
||||
|
@ -158,7 +158,9 @@ pub(super) fn build_generator_di_node<'ll, 'tcx>(
|
|||
let generator_layout =
|
||||
cx.tcx.optimized_mir(generator_def_id).generator_layout().unwrap();
|
||||
|
||||
let Variants::Multiple { tag_encoding: TagEncoding::Direct, ref variants, .. } = generator_type_and_layout.variants else {
|
||||
let Variants::Multiple { tag_encoding: TagEncoding::Direct, ref variants, .. } =
|
||||
generator_type_and_layout.variants
|
||||
else {
|
||||
bug!(
|
||||
"Encountered generator with non-direct-tag layout: {:?}",
|
||||
generator_type_and_layout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue