Skip to main content

## OVERFLOWING_LITERALS

# Static OVERFLOWING_LITERALS

Source

    static OVERFLOWING_LITERALS: &Lint

Expand description

The `overflowing_literals` lint detects literals out of range for their type.

#### §Example

ⓘ

    let x: u8 = 1000;

{{produces}}

#### §Explanation

It is usually a mistake to use a literal that overflows its type Change either the literal or its type such that the literal is within the range of its type.