Skip to content

Commit 54f9bc4

Browse files
committed
nightly feature tracking: get rid of the per-feature bool fields
1 parent 088f07a commit 54f9bc4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/empty_enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl LateLintPass<'_> for EmptyEnum {
6464
fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
6565
if let ItemKind::Enum(..) = item.kind
6666
// Only suggest the `never_type` if the feature is enabled
67-
&& cx.tcx.features().never_type
67+
&& cx.tcx.features().never_type()
6868
&& let Some(adt) = cx.tcx.type_of(item.owner_id).instantiate_identity().ty_adt_def()
6969
&& adt.variants().is_empty()
7070
{

clippy_lints/src/matches/match_same_arms.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, arms: &'tcx [Arm<'_>]) {
114114
let indexed_arms: Vec<(usize, &Arm<'_>)> = arms.iter().enumerate().collect();
115115
for (&(i, arm1), &(j, arm2)) in search_same(&indexed_arms, hash, eq) {
116116
if matches!(arm2.pat.kind, PatKind::Wild) {
117-
if !cx.tcx.features().non_exhaustive_omitted_patterns_lint
117+
if !cx.tcx.features().non_exhaustive_omitted_patterns_lint()
118118
|| is_lint_allowed(cx, NON_EXHAUSTIVE_OMITTED_PATTERNS, arm2.hir_id)
119119
{
120120
let arm_span = adjusted_arm_span(cx, arm1.span);

clippy_lints/src/matches/redundant_guards.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ fn emit_redundant_guards<'tcx>(
251251
fn expr_can_be_pat(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
252252
for_each_expr_without_closures(expr, |expr| {
253253
if match expr.kind {
254-
ExprKind::ConstBlock(..) => cx.tcx.features().inline_const_pat,
254+
ExprKind::ConstBlock(..) => cx.tcx.features().inline_const_pat(),
255255
ExprKind::Call(c, ..) if let ExprKind::Path(qpath) = c.kind => {
256256
// Allow ctors
257257
matches!(cx.qpath_res(&qpath, c.hir_id), Res::Def(DefKind::Ctor(..), ..))

0 commit comments

Comments
 (0)