Skip to content
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

Book: explain statically checked unreachable #87

Open
SuperFluffy opened this issue Aug 20, 2019 · 2 comments
Open

Book: explain statically checked unreachable #87

SuperFluffy opened this issue Aug 20, 2019 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@SuperFluffy
Copy link

SuperFluffy commented Aug 20, 2019

The current version of the Handling Disconnects section of the book states:

In the shutdown case we use match void {} as a statically-checked unreachable!().

Please explain the significance of this statement. In how far is this a statically checked version of unreachable!?

This is the first time I am encountering this pattern and I am confused by the statement.

@skade skade added the documentation Improvements or additions to documentation label Aug 26, 2019
@skade
Copy link
Collaborator

skade commented Aug 26, 2019

cc @matklad

@tomasol
Copy link

tomasol commented Dec 31, 2019

I also struggled with that section, reading about Empty types helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants