rust/tests/ui/raw-ref-op/raw-ref-temp.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

108 lines
3.8 KiB
Plaintext
Raw Normal View History

2019-11-23 14:22:30 +00:00
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:11:31
2019-11-23 14:22:30 +00:00
|
LL | let ref_expr = &raw const 2;
| ^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:12:33
2019-11-23 14:22:30 +00:00
|
LL | let mut_ref_expr = &raw mut 3;
| ^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:13:32
2019-11-23 14:22:30 +00:00
|
2019-09-18 20:31:25 +00:00
LL | let ref_const = &raw const FOUR;
| ^^^^ temporary value
2019-11-23 14:22:30 +00:00
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:14:34
2019-11-23 14:22:30 +00:00
|
2019-09-18 20:31:25 +00:00
LL | let mut_ref_const = &raw mut FOUR;
| ^^^^ temporary value
2019-11-23 14:22:30 +00:00
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:16:37
2019-11-23 14:22:30 +00:00
|
LL | let field_ref_expr = &raw const (1, 2).0;
| ^^^^^^^^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:17:39
2019-11-23 14:22:30 +00:00
|
LL | let mut_field_ref_expr = &raw mut (1, 2).0;
| ^^^^^^^^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:18:32
2019-11-23 14:22:30 +00:00
|
LL | let field_ref = &raw const PAIR.0;
| ^^^^^^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:19:34
2019-11-23 14:22:30 +00:00
|
LL | let mut_field_ref = &raw mut PAIR.0;
| ^^^^^^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:21:37
2019-11-23 14:22:30 +00:00
|
LL | let index_ref_expr = &raw const [1, 2][0];
| ^^^^^^^^^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:22:39
2019-11-23 14:22:30 +00:00
|
LL | let mut_index_ref_expr = &raw mut [1, 2][0];
| ^^^^^^^^^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:23:32
2019-11-23 14:22:30 +00:00
|
LL | let index_ref = &raw const ARRAY[0];
| ^^^^^^^^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:24:34
2019-11-23 14:22:30 +00:00
|
LL | let mut_index_ref = &raw mut ARRAY[1];
| ^^^^^^^^ temporary value
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:26:34
2019-11-23 14:22:30 +00:00
|
LL | let ref_ascribe = &raw const type_ascribe!(2, i32);
| ^^^^^^^^^^^^^^^^^^^^^ temporary value
2024-03-21 02:13:15 +00:00
|
= note: this error originates in the macro `type_ascribe` (in Nightly builds, run with -Z macro-backtrace for more info)
2019-11-23 14:22:30 +00:00
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:27:36
2019-11-23 14:22:30 +00:00
|
LL | let mut_ref_ascribe = &raw mut type_ascribe!(3, i32);
| ^^^^^^^^^^^^^^^^^^^^^ temporary value
2024-03-21 02:13:15 +00:00
|
= note: this error originates in the macro `type_ascribe` (in Nightly builds, run with -Z macro-backtrace for more info)
2019-11-23 14:22:30 +00:00
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:29:40
2019-11-23 14:22:30 +00:00
|
LL | let ascribe_field_ref = &raw const type_ascribe!(PAIR.0, i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value
2024-03-21 02:13:15 +00:00
|
= note: this error originates in the macro `type_ascribe` (in Nightly builds, run with -Z macro-backtrace for more info)
2019-11-23 14:22:30 +00:00
error[E0745]: cannot take address of a temporary
2019-09-18 20:31:25 +00:00
--> $DIR/raw-ref-temp.rs:30:38
2019-11-23 14:22:30 +00:00
|
LL | let ascribe_index_ref = &raw mut type_ascribe!(ARRAY[0], i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value
2024-03-21 02:13:15 +00:00
|
= note: this error originates in the macro `type_ascribe` (in Nightly builds, run with -Z macro-backtrace for more info)
2019-11-23 14:22:30 +00:00
error: aborting due to 16 previous errors
For more information about this error, try `rustc --explain E0745`.