-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
A-lintArea: New lintsArea: New lintsE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work onL-correctnessLint: Belongs in the correctness lint groupLint: Belongs in the correctness lint groupT-MIRType: This lint will require working with the MIRType: This lint will require working with the MIR
Description
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 thatv1.len() + v2.len()
can't ever overflow ifv1, v2: Vec<T>
andsize_of::<T>() > 0
idea by @eddyb https://botbot.me/mozilla/rust-internals/2016-05-27/?msg=66824497&page=3
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work onL-correctnessLint: Belongs in the correctness lint groupLint: Belongs in the correctness lint groupT-MIRType: This lint will require working with the MIRType: This lint will require working with the MIR