mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
12 lines
225 B
Rust
12 lines
225 B
Rust
// run-pass
|
|
|
|
const A: [u8; 1] = ['h' as u8];
|
|
const B: u8 = (&A)[0];
|
|
const C: &'static &'static &'static &'static [u8; 1] = & & & &A;
|
|
const D: u8 = (&C)[0];
|
|
|
|
pub fn main() {
|
|
assert_eq!(B, A[0]);
|
|
assert_eq!(D, A[0]);
|
|
}
|