Function clippy_utils::is_inside_always_const_context

source ยท
pub fn is_inside_always_const_context(tcx: TyCtxt<'_>, hir_id: HirId) -> bool
Expand description

Returns true if the given HirId is inside an always constant context.

This context includes:

  • const/static items
  • const blocks (or inline consts)
  • associated constants