1 error[E0745]: cannot take address of a temporary
2 --> $DIR/raw-ref-temp.rs:11:31
4 LL | let ref_expr = &raw const 2;
7 error[E0745]: cannot take address of a temporary
8 --> $DIR/raw-ref-temp.rs:12:33
10 LL | let mut_ref_expr = &raw mut 3;
13 error[E0745]: cannot take address of a temporary
14 --> $DIR/raw-ref-temp.rs:13:32
16 LL | let ref_const = &raw const FOUR;
17 | ^^^^ temporary value
19 error[E0745]: cannot take address of a temporary
20 --> $DIR/raw-ref-temp.rs:14:34
22 LL | let mut_ref_const = &raw mut FOUR;
23 | ^^^^ temporary value
25 error[E0745]: cannot take address of a temporary
26 --> $DIR/raw-ref-temp.rs:16:37
28 LL | let field_ref_expr = &raw const (1, 2).0;
29 | ^^^^^^^^ temporary value
31 error[E0745]: cannot take address of a temporary
32 --> $DIR/raw-ref-temp.rs:17:39
34 LL | let mut_field_ref_expr = &raw mut (1, 2).0;
35 | ^^^^^^^^ temporary value
37 error[E0745]: cannot take address of a temporary
38 --> $DIR/raw-ref-temp.rs:18:32
40 LL | let field_ref = &raw const PAIR.0;
41 | ^^^^^^ temporary value
43 error[E0745]: cannot take address of a temporary
44 --> $DIR/raw-ref-temp.rs:19:34
46 LL | let mut_field_ref = &raw mut PAIR.0;
47 | ^^^^^^ temporary value
49 error[E0745]: cannot take address of a temporary
50 --> $DIR/raw-ref-temp.rs:21:37
52 LL | let index_ref_expr = &raw const [1, 2][0];
53 | ^^^^^^^^^ temporary value
55 error[E0745]: cannot take address of a temporary
56 --> $DIR/raw-ref-temp.rs:22:39
58 LL | let mut_index_ref_expr = &raw mut [1, 2][0];
59 | ^^^^^^^^^ temporary value
61 error[E0745]: cannot take address of a temporary
62 --> $DIR/raw-ref-temp.rs:23:32
64 LL | let index_ref = &raw const ARRAY[0];
65 | ^^^^^^^^ temporary value
67 error[E0745]: cannot take address of a temporary
68 --> $DIR/raw-ref-temp.rs:24:34
70 LL | let mut_index_ref = &raw mut ARRAY[1];
71 | ^^^^^^^^ temporary value
73 error[E0745]: cannot take address of a temporary
74 --> $DIR/raw-ref-temp.rs:26:34
76 LL | let ref_ascribe = &raw const (2: i32);
77 | ^^^^^^^^ temporary value
79 error[E0745]: cannot take address of a temporary
80 --> $DIR/raw-ref-temp.rs:27:36
82 LL | let mut_ref_ascribe = &raw mut (3: i32);
83 | ^^^^^^^^ temporary value
85 error[E0745]: cannot take address of a temporary
86 --> $DIR/raw-ref-temp.rs:29:40
88 LL | let ascribe_field_ref = &raw const (PAIR.0: i32);
89 | ^^^^^^^^^^^^^ temporary value
91 error[E0745]: cannot take address of a temporary
92 --> $DIR/raw-ref-temp.rs:30:38
94 LL | let ascribe_index_ref = &raw mut (ARRAY[0]: i32);
95 | ^^^^^^^^^^^^^^^ temporary value
97 error: aborting due to 16 previous errors
99 For more information about this error, try `rustc --explain E0745`.