Skip to content

"this could sometimes panic" lint #959

Open
@oli-obk

Description

@oli-obk

minimal range analysis (lots of snippets like if x == 0 { return; } x -= 1; around, for example) to eliminate false positives (range analysis by itself can provide useful optimizations)
the hardest thing to reason about is that v1.len() + v2.len() can't ever overflow if v1, v2: Vec<T> and size_of::<T>() > 0

idea by @eddyb https://botbot.me/mozilla/rust-internals/2016-05-27/?msg=66824497&page=3

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsE-hardCall for participation: This a hard problem and requires more experience or effort to work onL-correctnessLint: Belongs in the correctness lint groupT-MIRType: This lint will require working with the MIR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions