-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn for Vec<Box<T>> where T: Sized #3530
Labels
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-complexity
Lint: Belongs in the complexity lint group
Comments
For example, it might make sense when |
flip1995
added
A-lint
Area: New lints
L-complexity
Lint: Belongs in the complexity lint group
good-first-issue
These issues are a good way to get started with Clippy
labels
Dec 12, 2018
Kampfkarren
added a commit
to Kampfkarren/rust-clippy
that referenced
this issue
Dec 13, 2018
bors
added a commit
that referenced
this issue
Dec 14, 2018
Adds lint for Vec<Box<T: Sized>> This adds, and subsequently closes #3530. This is the first time I've ever worked with anything remotely close to internal Rust code, so I'm very much unsure about the if_chain! to figure this out! I can't get rustfmt working on WSL with nightly 2018-12-07: `error: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is unavailable for download`
bors
added a commit
that referenced
this issue
Dec 14, 2018
Adds lint for Vec<Box<T: Sized>> This adds, and subsequently closes #3530. This is the first time I've ever worked with anything remotely close to internal Rust code, so I'm very much unsure about the if_chain! to figure this out! I can't get rustfmt working on WSL with nightly 2018-12-07: `error: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is unavailable for download`
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this issue
May 5, 2020
Changes: ```` rustup rust-lang/rust#52994 Fix test Line length fix Remove references to sized for end users Remove DUMMY_SP Add suggestion for replacement Update lint definitions Lint for Vec<Box<T: Sized>> - Closes rust-lang#3530 Fix doc_markdown mixed case false positive question_mark: Suggest Some(opt?) for if-else redundant_field_names: Do not trigger on path with type params question_mark: Lint only early returns question_mark: Fix applicability Remove obsolete comment new_without_default, partialeq_ne_impl: Use span_lint_node Update .stderr after rebase cargo fmt and remove stabilized feature Make suggestion Applicability::MachineApplicable Address review feedback Extract method Check array lengths to prevent OOB access Add suggestion for explicit_write lint Fix write_with_newline escaping false positive ````
Another example: reallocation of the vector when growing it is slower and copies more bytes when the size of |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-complexity
Lint: Belongs in the complexity lint group
A fellow Rust programmer pointed me to this mistake in my code:
I'm quite new to Rust, but is there ever a point where Vec<Box<T: Sized>> is correct?
The text was updated successfully, but these errors were encountered: