about summary refs log tree commit diff
path: root/tests/ui/slow_vector_initialization.rs
AgeCommit message (Collapse)AuthorLines
2019-01-08Remove all copyright license headersPhilipp Hansch-9/+0
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2018-12-09rustfmt testsMatthias Krüger-4/+2
2018-12-03Remove unsafe_vector_initialization lintDavid Tolnay-11/+0
2018-12-01Keep testing unsafe_vector_initialization as ui testDavid Tolnay-0/+2
2018-11-25Lint only the first statment/expression after allocGuillem Nieto-3/+14
Instead of searching for all the successive expressions after a vector allocation, check only the first expression. This is done to minimize the amount of false positives of the lint.
2018-11-25Add unsafe set_len initializationGuillem Nieto-0/+9
2018-11-25Add slow zero-filled vector initialization lintGuillem Nieto-0/+63
Add lint to detect slow zero-filled vector initialization. It detects when a vector is zero-filled with extended with `repeat(0).take(len)` or `resize(len, 0)`. This zero-fillings are usually slower than simply using `vec![0; len]`.