diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index ef01364b7..c29432bf9 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -421,7 +421,11 @@ fn check_clippy_lint_names(cx: &LateContext<'_>, ident: &str, items: &[NestedMet .iter() .map(|l| Symbol::intern(&l.name_lower())) .collect::>(); - let sugg = find_best_match_for_name(symbols.iter(), &format!("clippy::{}", name_lower), None); + let sugg = find_best_match_for_name( + symbols.iter(), + Symbol::intern(&format!("clippy::{}", name_lower)), + None, + ); if lint_name.chars().any(char::is_uppercase) && lint_store.find_lints(&format!("clippy::{}", name_lower)).is_ok() { diff --git a/clippy_lints/src/consts.rs b/clippy_lints/src/consts.rs index 2f963dfcf..5917968c9 100644 --- a/clippy_lints/src/consts.rs +++ b/clippy_lints/src/consts.rs @@ -332,7 +332,13 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> { let result = self .lcx .tcx - .const_eval_resolve(self.param_env, def_id, substs, None, None) + .const_eval_resolve( + self.param_env, + ty::WithOptConstParam::unknown(def_id), + substs, + None, + None, + ) .ok() .map(|val| rustc_middle::ty::Const::from_value(self.lcx.tcx, val, ty))?; let result = miri_to_const(&result);