blob: 7c34d926d3e9fe34a77321deb2845d3eef36867c (
plain)
| 1
2
3
4
5
6
7
8
9
 | //@ run-crash
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
//@ error-pattern: unsafe precondition(s) violated: invalid value for `char`
fn main() {
    unsafe {
        char::from_u32_unchecked(0xD801);
    }
}
 |