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

ICE: assert! on Non Boolean #31592

Closed
nixpulvis opened this issue Feb 12, 2016 · 1 comment
Closed

ICE: assert! on Non Boolean #31592

nixpulvis opened this issue Feb 12, 2016 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@nixpulvis
Copy link

Running the following yields an unhelpful error message, and ICE in the span printing.

fn main() {
    assert!(Ok(1));
}

With error

error: cannot apply unary operator `!` to type `core::result::Result<_, _>`

A potential solution could be if $cond { } else { panic! ... }

Either way there is some problem with span printing on this bad use of assert!.

@Aatch Aatch added the A-diagnostics Area: Messages for errors, warnings, and lints label Feb 12, 2016
@arielb1
Copy link
Contributor

arielb1 commented Feb 12, 2016

No ICE in the span printing on nightly.

@arielb1 arielb1 closed this as completed Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

3 participants