From 4d67f5bfc3b02da5d3cb37b6f9bc482eff9fb2f3 Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Wed, 29 Jun 2022 15:14:09 -0700 Subject: [PATCH 1/3] Remove needless FIXME In this case, it seems fine to have the field be the inverse of the flag, especially the `enable` vs `disable` terminology is clear. --- src/librustdoc/config.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 6e3651665c8c4..1ae4c65f5aa6a 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -240,9 +240,6 @@ pub(crate) struct RenderOptions { pub(crate) resource_suffix: String, /// Whether to run the static CSS/JavaScript through a minifier when outputting them. `true` by /// default. - // - // FIXME(misdreavus): the flag name is `--disable-minification` but the meaning is inverted - // once read. pub(crate) enable_minification: bool, /// Whether to create an index page in the root of the output directory. If this is true but /// `enable_index_page` is None, generate a static listing of crates instead. From 8192288ee067054faf255335bfc249ed5cafa6d3 Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Wed, 29 Jun 2022 15:24:15 -0700 Subject: [PATCH 2/3] Replace weird handling of edge case with panic --- src/librustdoc/clean/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 12467001271fd..c64df71f41ddc 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1704,8 +1704,8 @@ fn clean_ty<'tcx>(this: Ty<'tcx>, cx: &mut DocContext<'tcx>, def_id: Option Tuple(vec![]), // FIXME(pcwalton) - + ty::Closure(..) => panic!("Closure"), + ty::Generator(..) => panic!("Generator"), ty::Bound(..) => panic!("Bound"), ty::Placeholder(..) => panic!("Placeholder"), ty::GeneratorWitness(..) => panic!("GeneratorWitness"), From 2d2fd3168707567a1349230c0be609a860e60759 Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Wed, 29 Jun 2022 15:25:14 -0700 Subject: [PATCH 3/3] Remove FIXME that hasn't been an issue in practice --- src/librustdoc/clean/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index c64df71f41ddc..181416a2b4ac9 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1759,7 +1759,6 @@ fn is_field_vis_inherited(tcx: TyCtxt<'_>, def_id: DefId) -> bool { match tcx.def_kind(parent) { DefKind::Struct | DefKind::Union => false, DefKind::Variant => true, - // FIXME: what about DefKind::Ctor? parent_kind => panic!("unexpected parent kind: {:?}", parent_kind), } }