summaryrefslogtreecommitdiffstats
path: root/tests/ui/raw-ref-op/raw-ref-temp.stderr
blob: b96661625170f264dfc9bda36e564cc28c9c3b8d (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:11:31
   |
LL |     let ref_expr = &raw const 2;
   |                               ^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:12:33
   |
LL |     let mut_ref_expr = &raw mut 3;
   |                                 ^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:13:32
   |
LL |     let ref_const = &raw const FOUR;
   |                                ^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:14:34
   |
LL |     let mut_ref_const = &raw mut FOUR;
   |                                  ^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:16:37
   |
LL |     let field_ref_expr = &raw const (1, 2).0;
   |                                     ^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:17:39
   |
LL |     let mut_field_ref_expr = &raw mut (1, 2).0;
   |                                       ^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:18:32
   |
LL |     let field_ref = &raw const PAIR.0;
   |                                ^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:19:34
   |
LL |     let mut_field_ref = &raw mut PAIR.0;
   |                                  ^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:21:37
   |
LL |     let index_ref_expr = &raw const [1, 2][0];
   |                                     ^^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:22:39
   |
LL |     let mut_index_ref_expr = &raw mut [1, 2][0];
   |                                       ^^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:23:32
   |
LL |     let index_ref = &raw const ARRAY[0];
   |                                ^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:24:34
   |
LL |     let mut_index_ref = &raw mut ARRAY[1];
   |                                  ^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:26:34
   |
LL |     let ref_ascribe = &raw const type_ascribe!(2, i32);
   |                                  ^^^^^^^^^^^^^^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:27:36
   |
LL |     let mut_ref_ascribe = &raw mut type_ascribe!(3, i32);
   |                                    ^^^^^^^^^^^^^^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:29:40
   |
LL |     let ascribe_field_ref = &raw const type_ascribe!(PAIR.0, i32);
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value

error[E0745]: cannot take address of a temporary
  --> $DIR/raw-ref-temp.rs:30:38
   |
LL |     let ascribe_index_ref = &raw mut type_ascribe!(ARRAY[0], i32);
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value

error: aborting due to 16 previous errors

For more information about this error, try `rustc --explain E0745`.