Skip to content
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

Remove misleading ?Sized requirement - Deserialize requires Sized #2559

Closed
wants to merge 1 commit into from

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented Aug 7, 2023

Deserialize trait requires Sized types, so there no sense to declare ?Sized bounds:

pub trait Deserialize<'de>: Sized {

@Mingun
Copy link
Contributor Author

Mingun commented Mar 3, 2024

Implemented in 89139e2.

@Mingun Mingun closed this Mar 3, 2024
@Mingun Mingun deleted the sized branch March 3, 2024 17:59
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you — sorry I missed that there was already a PR for this. I noticed the redundant bounds as part of resolving clippy::multiple_bound_locations lints (c9cab49).

Would you want to follow up with a Clippy feature request to detect this case with ?Sized?

@Mingun
Copy link
Contributor Author

Mingun commented Mar 3, 2024

Probably this should be compile time error instead of a lint error. Actually, this case can be reduced to Sized + ?Sized boundary and compiler should not silently assume any concrete behavior here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants