-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks #56110
Conversation
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
Is it possible to write tests that show examples of how this changes things? |
r=me with a test added. |
This comment has been minimized.
This comment has been minimized.
I've added a test and removed one that I don't think should apply any more, because the infinite type errors kick in before the infinite uninhabitedness checking ones (as references were the only way to cause this kind of infinite checking). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1b3e434
to
3de817c
Compare
@cramertj: this required changing a few tests in the end, so it'd be great if you could re-check the changes! |
@bors r+ |
📌 Commit 3de817cf07ecef20732504ee0a903d2cdceda0b6 has been approved by |
3de817c
to
1cdf5df
Compare
@bors r=cramertj |
…cramertj Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types. This will also be more important in light of the changes at rust-lang#54125. cc @RalfJung
Rollup of 9 pull requests Successful merges: - #55010 (Add template parameter debuginfo to generic types) - #56110 (Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks) - #56305 (update miri) - #56372 (Refer to the second borrow as the "second borrow" in E0501.rs) - #56394 (Deal with EINTR in net timeout tests) - #56395 (Stabilize dbg!(...)) - #56402 (Improve the unstable book example for #56408 [marker] trait) - #56406 (Update RLS and Rustfmt) - #56366 (Stabilize self_in_typedefs feature) Failed merges: r? @ghost
@varkor Same error seems to have turned up in #56408 (comment) which included this PR. |
…cramertj Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types. This will also be more important in light of the changes at rust-lang#54125. cc @RalfJung
#56396 landed... Thanks for you patience, this is probably due for a retry |
@bors retry |
…cramertj Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types. This will also be more important in light of the changes at rust-lang#54125. cc @RalfJung
Rollup of 14 pull requests Successful merges: - #56110 (Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks) - #56305 (update miri) - #56366 (Stabilize self_in_typedefs feature) - #56372 (Refer to the second borrow as the "second borrow" in E0501.rs) - #56394 (Deal with EINTR in net timeout tests) - #56395 (Stabilize dbg!(...)) - #56401 (Move VecDeque::resize_with out of the impl<T:Clone> block) - #56402 (Improve the unstable book example for #[marker] trait) - #56412 (Update tracking issue for `extern_crate_self`) - #56416 (Remove unneeded body class selector) - #56418 (Fix failing tidy (line endings on Windows)) - #56419 (Remove some uses of try!) - #56424 (Mention raw-ident syntax) - #56432 (Update issue number of `shrink_to` methods to point the tracking issue) Failed merges: r? @ghost
@bors rollup- |
Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types. This will also be more important in light of the changes at #54125. cc @RalfJung
☀️ Test successful - status-appveyor, status-travis |
It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types.
This will also be more important in light of the changes at #54125.
cc @RalfJung