Skip to content

Commit 5f61271

Browse files
committed
fmt
1 parent d777cb8 commit 5f61271

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_typeck/src/collect/type_of.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
192192
let res = segment.res.filter(|&r| r != Res::Err).unwrap_or(path.res);
193193
use def::CtorOf;
194194
let generics = match res {
195-
Res::Def(DefKind::Ctor(CtorOf::Variant, _), def_id) => {
196-
tcx.generics_of(tcx.parent(def_id).and_then(|def_id| tcx.parent(def_id)).unwrap())
197-
}
195+
Res::Def(DefKind::Ctor(CtorOf::Variant, _), def_id) => tcx.generics_of(
196+
tcx.parent(def_id).and_then(|def_id| tcx.parent(def_id)).unwrap(),
197+
),
198198
Res::Def(DefKind::Variant | DefKind::Ctor(CtorOf::Struct, _), def_id) => {
199199
tcx.generics_of(tcx.parent(def_id).unwrap())
200200
}

src/test/ui/const-generics/enum-variants.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// check-pass
2-
pub enum Foo<const N: usize> {
2+
enum Foo<const N: usize> {
33
Variant,
44
Variant2(),
55
Variant3{},

0 commit comments

Comments
 (0)