-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Make sure that some stdlib method signatures aren't accidental refinements #110958
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@bors r+ rollup |
Can we add a lint for std/core to use to prevent this by default? (IIRC, there was some discussion of not implicitly refining anyway, so maybe that's the plan still). |
@Mark-Simulacrum: Yeah, that'll eventually come around, but I've gotta work out some problems with lifetime false positives first |
… r=cuviper Make sure that some stdlib method signatures aren't accidental refinements In the process of implementing https://rust-lang.github.io/rfcs/3245-refined-impls.html, I found a bunch of stdlib implementations that accidentally "refined" their method signatures by dropping (unnecessary) bounds. This isn't currently a problem, but may become one if/when method signature refining is stabilized in the future. Shouldn't hurt to make these signatures a bit more accurate anyways. NOTE (just to be clear lol): This does not affect behavior at all, since we don't actually take advantage of refined implementations yet!
Rollup of 6 pull requests Successful merges: - rust-lang#110614 (Clear response values for overflow in new solver) - rust-lang#110894 (Bump libffi-sys to 2.3.0) - rust-lang#110932 (include source error for LoadLibraryExW) - rust-lang#110958 (Make sure that some stdlib method signatures aren't accidental refinements) - rust-lang#110962 (Make drop_flags an IndexVec.) - rust-lang#110965 (Don't duplicate anonymous lifetimes for async fn in traits) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
In the process of implementing https://rust-lang.github.io/rfcs/3245-refined-impls.html, I found a bunch of stdlib implementations that accidentally "refined" their method signatures by dropping (unnecessary) bounds.
This isn't currently a problem, but may become one if/when method signature refining is stabilized in the future. Shouldn't hurt to make these signatures a bit more accurate anyways.
NOTE (just to be clear lol): This does not affect behavior at all, since we don't actually take advantage of refined implementations yet!