Function rustc_lint::types::lint_overflowing_range_endpoint

source ·
fn lint_overflowing_range_endpoint<'tcx>(
    cx: &LateContext<'tcx>,
    lit: &Lit,
    lit_val: u128,
    max: u128,
    expr: &'tcx Expr<'tcx>,
    ty: &str
) -> bool
Expand description

Attempts to special-case the overflowing literal lint when it occurs as a range endpoint (expr..MAX+1). Returns true iff the lint was emitted.