-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Improve suggestion when casting usize to (possibly) wide pointer #92150
Improve suggestion when casting usize to (possibly) wide pointer #92150
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@matthewjasper, do you plan on reviewing this any time soon? If not, do you mind reassigning? |
it's been some time since this got a review |
91a896c
to
d9e64ba
Compare
Addressed comments! @rustbot ready |
d9e64ba
to
05f9f78
Compare
05f9f78
to
814c18a
Compare
Actually there's no reason why we need to limit this diagnostic to isize/usize. We allow all int types => thin pointer. Also simplifies the PR. @rustbot ready |
@bors r+ |
📌 Commit 814c18a has been approved by |
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#92150 (Improve suggestion when casting usize to (possibly) wide pointer) - rust-lang#94635 (Merge `#[deprecated]` and `#[rustc_deprecated]`) - rust-lang#94657 (Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`) - rust-lang#94746 (diagnostics: use rustc_on_unimplemented to recommend `[].iter()`) - rust-lang#94788 (Account for suggestions for complete removal of lines) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I thought #92125 was a wonderful idea, so I went ahead and took a stab at it. Not sure if my approach is the best going forward, but I'm happy with the improvement in the error message.
Iwill definitely address any changes if people are more opinionated with the wordings or want more features.
Also, do I need to add a new error code?
(Fixes #92125)