-
Notifications
You must be signed in to change notification settings - Fork 432
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 redundant bounds #1207
Remove redundant bounds #1207
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. Looks fine if it passes CI.
Which it doesn't (this is using Rust 1.36.0):
|
Oh, so Rust used to not support this? Interesting... |
I'll investigate later what changed when, etc. Keeping these bounds really is only an issue of documentation after all, so it's not too bad. If we need to keep them, I might change this PR so that comments are added in the source code on these bounds, pointing out they're redundant but used to be needed and are kept for MSRV support. |
1.36.0 is 2.5 years old by now; when we asked there was generally little interest in support beyond six months old, so an MSRV bump is not out of the question (even if this is only a minor thing). |
The relevant fix in rustc was apparently rust-lang/rust#73905. The code without the extra bound (i.e. the code in this PR) works from Rust |
This needs an update to the changelog and a bump to Rust 1.51 (see #1165). |
52a61d9
to
116d75a
Compare
Rebased |
There were 3 trait implementations that placed redundant
AsRef
/AsMut
bounds on<R as BlockRngCore>::Results
which were already implied by the bounds in theBlockRngCore
trait definition.Noticed those because they show up in the documentation, e.g. here.
Also fix 2 warnings (one clippy warning, one rustc warning).