Skip to content

vec_box lint should not fire if the allocators between the Vec and Box are different #7114

@repnop

Description

@repnop

As the title suggests, now that there are custom allocators available to Box and Vec, the lint should take those into account when deciding to suggest vec_box. I hit this when I had a Vec<Box<MyType, MyTypeAllocator>> where it was not valid to use a Vec<MyType, MyTypeAllocator>.

Meta

  • cargo clippy -V: clippy 0.1.53 (d0695c9 2021-04-12)
  • rustc -Vv:
rustc 1.53.0-nightly (d0695c908 2021-04-12)
binary: rustc
commit-hash: d0695c9081b16077d0aed368bccaf437d77ff497
commit-date: 2021-04-12
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't havegood first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions