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