Skip to content

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented May 6, 2020

Slightly expand @jumbatm's pattern macro and use it throughout validation. This ensures we never incorrectly swallow InvalidProgram errors or ICE when they occur.

Fixes #71353
r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 6, 2020
err_ub!(AlignmentCheckFailed { .. }) =>
{ "unaligned vtable pointer in wide pointer" },
err_ub!(PointerOutOfBounds { .. }) =>
{ "too small vtable" },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new macro, giving more precise errors is so easy that I just did it here. :D

@oli-obk
Copy link
Contributor

oli-obk commented May 6, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented May 6, 2020

📌 Commit 0e2a712 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 6, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 6, 2020
Rollup of 5 pull requests Successful merges: - rust-lang#70908 (Provide suggestions for type parameters missing bounds for associated types) - rust-lang#71731 (Turn off rustc-dev-guide toolstate for now) - rust-lang#71888 (refactor suggest_traits_to_import) - rust-lang#71918 (Rename methods section) - rust-lang#71950 (Miri validation error handling cleanup) Failed merges: r? @ghost
@bors bors merged commit 066eb08 into rust-lang:master May 7, 2020
@RalfJung RalfJung deleted the try-validation-cleanup branch May 7, 2020 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

4 participants