Commit graph

8 commits

Author SHA1 Message Date
flip1995
d2dbd0b8a5
Update *.stderr files 2018-12-28 12:41:12 +01:00
David Tolnay
e632a1946e
Remove unsafe_vector_initialization lint 2018-12-03 02:48:37 -08:00
David Tolnay
67f9d24c1b
Keep testing unsafe_vector_initialization as ui test 2018-12-01 17:19:39 -08:00
Guillem Nieto
5fa04bc3cd Lint only the first statment/expression after alloc
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-25 14:34:23 -08:00
Guillem Nieto
5b77ee95dc Rename some symbols
Renamed some symbols in order to make them a little bit more accurate.
2018-11-25 14:34:23 -08:00
Guillem Nieto
2753f1cbd4 Split lint into slow and unsafe vector initalization 2018-11-25 14:34:23 -08:00
Guillem Nieto
9b4bc3b6ef Add unsafe set_len initialization 2018-11-25 14:34:23 -08:00
Guillem Nieto
e0ccc9d9af Add slow zero-filled vector initialization lint
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]`.
2018-11-25 14:34:23 -08:00