Skip to content

lint generic type argument of a generic type that could be : ?Sized #1368

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

Open
oli-obk opened this issue Nov 28, 2016 · 0 comments · May be fixed by #8526
Open

lint generic type argument of a generic type that could be : ?Sized #1368

oli-obk opened this issue Nov 28, 2016 · 0 comments · May be fixed by #8526
Labels
A-lint Area: New lints E-hard Call for participation: This a hard problem and requires more experience or effort to work on L-correctness Lint: Belongs in the correctness lint group L-unnecessary Lint: Warn about unnecessary code T-middle Type: Probably requires verifiying types

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Nov 28, 2016

struct A<T: Trait>(Box<T>);

should lint that one should write T: Trait + ?Sized.

Motivation: http://stackoverflow.com/questions/40846232/rust-compiler-does-not-see-structure-as-sized

To reduce false positives, this should only lint if the impl X for A and impl A, will continue working if they are also changed.

@oli-obk oli-obk added L-correctness Lint: Belongs in the correctness lint group L-unnecessary Lint: Warn about unnecessary code E-hard Call for participation: This a hard problem and requires more experience or effort to work on A-lint Area: New lints T-middle Type: Probably requires verifiying types labels Nov 28, 2016
@Jarcho Jarcho linked a pull request Mar 18, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints E-hard Call for participation: This a hard problem and requires more experience or effort to work on L-correctness Lint: Belongs in the correctness lint group L-unnecessary Lint: Warn about unnecessary code T-middle Type: Probably requires verifiying types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant