100 lines
3.2 KiB
Plaintext
100 lines
3.2 KiB
Plaintext
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:9:31
|
||
|
|
|
||
|
LL | let ref_expr = &raw const 2;
|
||
|
| ^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:10:33
|
||
|
|
|
||
|
LL | let mut_ref_expr = &raw mut 3;
|
||
|
| ^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:11:32
|
||
|
|
|
||
|
LL | let ref_const = &raw const 4;
|
||
|
| ^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:12:34
|
||
|
|
|
||
|
LL | let mut_ref_const = &raw mut 5;
|
||
|
| ^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:14: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:15: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:16:32
|
||
|
|
|
||
|
LL | let field_ref = &raw const PAIR.0;
|
||
|
| ^^^^^^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:17: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:19: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:20: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:21:32
|
||
|
|
|
||
|
LL | let index_ref = &raw const ARRAY[0];
|
||
|
| ^^^^^^^^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:22: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:24:34
|
||
|
|
|
||
|
LL | let ref_ascribe = &raw const (2: i32);
|
||
|
| ^^^^^^^^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:25:36
|
||
|
|
|
||
|
LL | let mut_ref_ascribe = &raw mut (3: i32);
|
||
|
| ^^^^^^^^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:27:40
|
||
|
|
|
||
|
LL | let ascribe_field_ref = &raw const (PAIR.0: i32);
|
||
|
| ^^^^^^^^^^^^^ temporary value
|
||
|
|
||
|
error[E0745]: cannot take address of a temporary
|
||
|
--> $DIR/raw-ref-temp.rs:28:38
|
||
|
|
|
||
|
LL | let ascribe_index_ref = &raw mut (ARRAY[0]: i32);
|
||
|
| ^^^^^^^^^^^^^^^ temporary value
|
||
|
|
||
|
error: aborting due to 16 previous errors
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0745`.
|