-
Notifications
You must be signed in to change notification settings - Fork 13k
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 unwrap from get_vtable #97595
Conversation
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
Does this fix #97491? It might actually turn that into a different ICE with the delayed bug. Maybe we should turn this into a hard error? |
You are right it turns it into different ICE, this motivated me so I am going to take another shot at solving this if I can't I will make it return a hard error. |
Thanks! |
I think this just fixes #97491 as well now. |
@@ -0,0 +1,19 @@ | |||
// run-pass |
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.
I think this is OK with just build-pass, also can you rustfmt this file?
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.
If you have extra time, I would also be interested in adding a revision (or copy of this test) that tries to use the code, like trying to subtract two dyn Vector2
types. I want to ensure that the code fails to compile.
One piece of feedback I have is that this will want commits to be squashed and reworded to something more meaningful before landing. |
squashed and reworded hope it makes more sense now. |
@bors r+ |
📌 Commit 8f1fff0 has been approved by |
Remove unwrap from get_vtable This avoids ICE on issue rust-lang#97381 I think the bug is a bit deeper though, it compiles fine when `v` is `&v` which makes me think `Deref` is causing some issue with borrowck but it's fine I guess since this thing crashes since `nightly-2020-09-17` 😅
Rollup of 5 pull requests Successful merges: - rust-lang#97595 (Remove unwrap from get_vtable) - rust-lang#97597 (Preserve unused pointer to address casts) - rust-lang#97819 (Recover `import` instead of `use` in item) - rust-lang#97823 (Recover missing comma after match arm) - rust-lang#97851 (Use repr(C) when depending on struct layout in ptr tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This avoids ICE on issue #97381 I think the bug is a bit deeper though, it compiles fine when
v
is&v
which makes me thinkDeref
is causing some issue with borrowck but it's fine I guess since this thing crashes sincenightly-2020-09-17
😅