-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: Result::unwrap()
on an Err
value: Utf8Error
#29122
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
It looks like this comes from the linker producing output (normal or error) that is not valid UTF-8. Fixing this in any other way than just using a lossy conversion is going to be really painful because it goes through the error logging infrastructure, which all works with |
Just dump the bytes as hexadecimal? I am not sure what is going on here. |
My first thought was that the path was probably not UTF-8, but because of the way cargo invokes it that crashes rustc long before it tries to link anything, so that can't be it. I'm not sure why else the message would be non-UTF-8. (I can't reproduce the ICE on that crate (I just get a normal link error), but I can reproduce the ICE by constructing a situation where the linker prints non-UTF-8 messages.) But yeah, some kind of lossy conversion with hex escapes is probably the way to go. I'm not aware of an existing function to do that. |
Actually, mapping with |
Not great, but not an ICE and probably good enough until we have a dedicated function to do this sort of thing since this should be a very rare error. |
The escaped form isn't pretty, but this should be a very rare error. Having a general binary-escaping string creation function might be a good idea, though. Closes rust-lang#29122
The escaped form isn't pretty, but this should be a very rare error. Having a general binary-escaping string creation function might be a good idea, though. Closes #29122
Compiler crashes while compiling https://github.com/CrystalGamma/rusttype/tree/bugrep0 using Cargo.
Cargo version: cargo 0.6.0-nightly (18e496a 2015-10-17)
rustc version: 1.3.0
The text was updated successfully, but these errors were encountered: