From 16d0f724b6544a87148e5fc34e251af41ac63da5 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 7 Apr 2022 15:55:44 +0200 Subject: [PATCH] use stdx::never --- crates/hir_def/src/data.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs index 6571b2a9276..5140a9d4ca5 100644 --- a/crates/hir_def/src/data.rs +++ b/crates/hir_def/src/data.rs @@ -58,10 +58,17 @@ pub(crate) fn fn_data_query(db: &dyn DefDatabase, func: FunctionId) -> Arc { + !item_tree.attrs(db, krate, param.into()).is_cfg_enabled(cfg_options) + } + None => { + stdx::never!("fn HAS_SELF_PARAM but no parameters allocated"); + true + } + }; + if is_cfgd_out { + cov_mark::hit!(cfgd_out_self_param); flags.bits &= !FnFlags::HAS_SELF_PARAM; } }