Run nightly rustfmt

This commit is contained in:
Oliver Schneider
2017-09-05 11:33:04 +02:00
parent c710ac839f
commit e4524ac4de
99 changed files with 1792 additions and 2049 deletions

View File

@@ -36,9 +36,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {
let did = cx.tcx.hir.local_def_id(item.id);
if let ItemEnum(..) = item.node {
let ty = cx.tcx.type_of(did);
let adt = ty.ty_adt_def().expect(
"already checked whether this is an enum",
);
let adt = ty.ty_adt_def()
.expect("already checked whether this is an enum");
if adt.variants.is_empty() {
span_lint_and_then(cx, EMPTY_ENUM, item.span, "enum with no variants", |db| {
db.span_help(item.span, "consider using the uninhabited type `!` or a wrapper around it");