]> git.lizzy.rs Git - rust.git/commitdiff
Replace weird handling of edge case with panic
authorNoah Lev <camelidcamel@gmail.com>
Wed, 29 Jun 2022 22:24:15 +0000 (15:24 -0700)
committerNoah Lev <camelidcamel@gmail.com>
Wed, 29 Jun 2022 22:24:15 +0000 (15:24 -0700)
src/librustdoc/clean/mod.rs

index 12467001271fd060822f14ead12ac8bef766d7ff..c64df71f41ddc78a7b4bd703718a6863e06bf4d2 100644 (file)
@@ -1704,8 +1704,8 @@ fn clean_ty<'tcx>(this: Ty<'tcx>, cx: &mut DocContext<'tcx>, def_id: Option<DefI
             ImplTrait(bounds)
         }
 
-        ty::Closure(..) | ty::Generator(..) => Tuple(vec![]), // FIXME(pcwalton)
-
+        ty::Closure(..) => panic!("Closure"),
+        ty::Generator(..) => panic!("Generator"),
         ty::Bound(..) => panic!("Bound"),
         ty::Placeholder(..) => panic!("Placeholder"),
         ty::GeneratorWitness(..) => panic!("GeneratorWitness"),