// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![feature(rustc_attrs)]
+
+// ignore-pretty : (#23623) problems when ending with // comments
use std::{str, string};
const B: &'static [u8; 2] = &A;
const C: *const u8 = B as *const u8;
+#[rustc_no_mir] // FIXME #27840 MIR can't do rvalue promotion yet.
pub fn main() {
unsafe {
let foo = &A as *const u8;
+ assert_eq!(foo, C);
assert_eq!(str::from_utf8_unchecked(&A), "hi");
- assert!(*C == A[0]);
- assert!(*(&B[0] as *const u8) == A[0]);
+ assert_eq!(*C, A[0]);
+ assert_eq!(*(&B[0] as *const u8), A[0]);
}
}