-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Replace std::util::unreachable with a macro #8991
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
Comments
chris-morgan
added a commit
to chris-morgan/rust
that referenced
this issue
Sep 5, 2013
Rationale: having a function which fails means that the location of failure which is output is that of the unreachable() function, rather than the caller. This is part of rust-lang#8991 but is not all of it; current usage of ``std::util::unreachable()`` must remain so for the moment, until a new snapshot is made; then I will remove that function entirely in favour of using this macro.
bors
added a commit
that referenced
this issue
Sep 5, 2013
Rationale: having a function which fails means that the location of failure which is output is that of the unreachable() function, rather than the caller. This is part of #8991 but is not all of it; current usage of ``std::util::unreachable()`` must remain so for the moment, until a new snapshot is made; then I will remove that function entirely in favour of using this macro.
bors
added a commit
that referenced
this issue
Sep 20, 2013
…-two-containing-the-destruction-of-the-unreachable-function, r=alexcrichton This is the second of two parts of #8991, now possible as a new snapshot has been made. (The first part implemented the unreachable!() macro; it was #8992, 6b7b8f2.) ``std::util::unreachable()`` is removed summarily; any code which used it should now use the ``unreachable!()`` macro. Closes #9312. Closes #8991.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rationale
fail!()
expansion evaluatingfile!()
andline!()
in the caller rather than inside theunreachable
function.fail!()
).Demonstration
With a function
With a macro
The text was updated successfully, but these errors were encountered: