-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Rename Integer divides to is_multiple_of. #16045
Conversation
I think this needs a |
You may be right. I assume I just needed to add that line? |
I think you need an explanation of how to fix it (in this case just change cc @cmr, is that correct? |
You can find documentation of our breaking changes policy here: https://mail.mozilla.org/pipermail/rust-dev/2014-April/009543.html |
Two notable changes would be placing |
Alright, thanks! |
It is being changed because the previous wording was ambiguous. `a.divides(b)` implied `a % b == 0` but it sounds like the other way around. `9.divides(&3) == true` but we might read that as "does 9 divide 3?". It has been renamed to sidestep the ambiguity. Work around the change by using `is_multiple_of` instead. [breaking-change]
@alexcrichton care to take a peek? |
Looks good @treeman, thanks! (just looking at the structure of the change) |
I'm not sure why the tests failed, to me it seems like it went fine? |
Fix panic with closure inside array len I was working on rust-lang#15947 and found out that we panic on this test: ``` fn main() { let x = [(); &(&'static: loop { |x| {}; }) as *const _ as usize] } ``` This PR fixes the panic. Closures in array len are still broken, but closure in const eval is not stable anyway.
This is a fix for #15710.
[breaking-change]