Skip to content

Commit bbbf06d

Browse files
committed
Manual rustfmt
1 parent 926bfe5 commit bbbf06d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

compiler/rustc_hir_analysis/src/check/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ fn check_static_inhabited(tcx: TyCtxt<'_>, def_id: LocalDefId) {
226226
Ok(l) => l,
227227
// Foreign statics that overflow their allowed size should emit an error
228228
Err(LayoutError::SizeOverflow(_))
229-
if matches!(tcx.def_kind(def_id), DefKind::Static{..}
229+
if matches!(tcx.def_kind(def_id), DefKind::Static{ .. }
230230
if tcx.def_kind(tcx.local_parent(def_id)) == DefKind::ForeignMod) =>
231231
{
232232
tcx.dcx().emit_err(errors::TooLargeStatic { span });

compiler/rustc_resolve/src/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
574574
ResolutionError::GenericParamsFromOuterItem(outer_res, has_generic_params, def_kind) => {
575575
use errs::GenericParamsFromOuterItemLabel as Label;
576576
let static_or_const = match def_kind {
577-
DefKind::Static{..} => Some(errs::GenericParamsFromOuterItemStaticOrConst::Static),
577+
DefKind::Static{ .. } => Some(errs::GenericParamsFromOuterItemStaticOrConst::Static),
578578
DefKind::Const => Some(errs::GenericParamsFromOuterItemStaticOrConst::Const),
579579
_ => None,
580580
};

compiler/rustc_resolve/src/late.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3645,7 +3645,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
36453645
}
36463646
Some(res)
36473647
}
3648-
Res::Def(DefKind::Ctor(..) | DefKind::Const | DefKind::Static{..}, _) => {
3648+
Res::Def(DefKind::Ctor(..) | DefKind::Const | DefKind::Static { .. }, _) => {
36493649
// This is unambiguously a fresh binding, either syntactically
36503650
// (e.g., `IDENT @ PAT` or `ref IDENT`) or because `IDENT` resolves
36513651
// to something unusable as a pattern (e.g., constructor function),

compiler/rustc_ty_utils/src/sig_types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ pub fn walk_types<'tcx, V: SpannedTypeVisitor<'tcx>>(
4141
}
4242
}
4343
// Walk over the type behind the alias
44-
DefKind::TyAlias {..} | DefKind::AssocTy |
44+
DefKind::TyAlias { .. } | DefKind::AssocTy |
4545
// Walk over the type of the item
46-
DefKind::Static{..} | DefKind::Const | DefKind::AssocConst | DefKind::AnonConst => {
46+
DefKind::Static { .. } | DefKind::Const | DefKind::AssocConst | DefKind::AnonConst => {
4747
if let Some(ty) = tcx.hir_node_by_def_id(item).ty() {
4848
// If the type of the item uses `_`, we're gonna error out anyway, but
4949
// typeck (which type_of invokes below), will call back into opaque_types_defined_by

0 commit comments

Comments
 (0)