-
Notifications
You must be signed in to change notification settings - Fork 32
/
issue-17233.rs
44 lines (40 loc) · 908 Bytes
/
issue-17233.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//@ run-pass
const X1: &'static [u8] = &[b'1'];
const X2: &'static [u8] = b"1";
const X3: &'static [u8; 1] = &[b'1'];
const X4: &'static [u8; 1] = b"1";
static Y1: u8 = X1[0];
static Y2: u8 = X2[0];
static Y3: u8 = X3[0];
static Y4: u8 = X4[0];
fn main() {
assert_eq!(Y1, Y2);
assert_eq!(Y1, Y3);
assert_eq!(Y1, Y4);
}
// ferrocene-annotations: fls_ixjc5jaamx84
// Constants
//
// ferrocene-annotations: fls_142vncdktbin
// Reference Types
//
// ferrocene-annotations: fls_yqcygq3y6m5j
// Lifetimes
//
// ferrocene-annotations: fls_vpbikb73dw4k
// Slice Types
//
// ferrocene-annotations: fls_2ifjqwnw03ms
// Byte Literals
//
// ferrocene-annotations: fls_msbaxfc09vkk
// Simple Byte String Literals
//
// ferrocene-annotations: fls_h0dvogc64tfh
// Literal Expressions
//
// ferrocene-annotations: fls_94a8v54bufn8
// Values
//
// ferrocene-annotations: fls_e7zgqroy2qxn
// Value Expressions