]> git.lizzy.rs Git - rust.git/commit
Generalize `array_into_iter` lint to also lint for boxed arrays
authorLukas Kalbertodt <lukas.kalbertodt@gmail.com>
Sun, 22 Dec 2019 13:26:28 +0000 (14:26 +0100)
committerLukas Kalbertodt <lukas.kalbertodt@gmail.com>
Tue, 24 Dec 2019 17:30:04 +0000 (18:30 +0100)
commitf934b836ce3768915388880696256dffad2f00ca
tree5fa5f36758304b1bac4e72dcfe3f19a304124754
parent005cf38f7e66757b32b03ea35fedca372eb063e3
Generalize `array_into_iter` lint to also lint for boxed arrays

`Box` is special in that a method call on a box can move the value out
of the box. Thus, the same backwards-compatibility problem can arise
for boxed arrays as for simple arrays.
src/librustc_lint/array_into_iter.rs
src/test/ui/iterators/into-iter-on-arrays-lint.fixed
src/test/ui/iterators/into-iter-on-arrays-lint.rs
src/test/ui/iterators/into-iter-on-arrays-lint.stderr