Skip to content

Commit 298d13e

Browse files
committed
Revert "fixup warnings around the compiler"
This reverts commit f201752.
1 parent 099308a commit 298d13e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clippy_lints/src/manual_non_exhaustive.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualNonExhaustive {
9292
(matches!(v.data, VariantData::Unit(_, _)) && is_doc_hidden(cx.tcx.hir_attrs(v.hir_id)))
9393
.then_some((v.def_id, v.span))
9494
});
95-
// FIXME: rewrite in terms of `#![feature(exact_length_collection)]`. See: #149266
96-
if let Ok((id, span)) = Itertools::exactly_one(iter)
95+
if let Ok((id, span)) = iter.exactly_one()
9796
&& !find_attr!(cx.tcx.hir_attrs(item.hir_id()), AttributeKind::NonExhaustive(..))
9897
{
9998
self.potential_enums.push((item.owner_id.def_id, id, item.span, span));
@@ -105,8 +104,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualNonExhaustive {
105104
.iter()
106105
.filter(|field| !cx.effective_visibilities.is_exported(field.def_id));
107106
if fields.len() > 1
108-
// FIXME: rewrite in terms of `#![feature(exact_length_collection)]`. See: #149266
109-
&& let Ok(field) = Itertools::exactly_one(private_fields)
107+
&& let Ok(field) = private_fields.exactly_one()
110108
&& let TyKind::Tup([]) = field.ty.kind
111109
{
112110
span_lint_and_then(

0 commit comments

Comments
 (0)