summaryrefslogtreecommitdiffstats
path: root/src/test/ui/raw-ref-op/raw-ref-temp.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/raw-ref-op/raw-ref-temp.stderr')
-rw-r--r--src/test/ui/raw-ref-op/raw-ref-temp.stderr99
1 files changed, 99 insertions, 0 deletions
diff --git a/src/test/ui/raw-ref-op/raw-ref-temp.stderr b/src/test/ui/raw-ref-op/raw-ref-temp.stderr
new file mode 100644
index 000000000..80dea76d5
--- /dev/null
+++ b/src/test/ui/raw-ref-op/raw-ref-temp.stderr
@@ -0,0 +1,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 (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 (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 (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 (ARRAY[0]: i32);
+ | ^^^^^^^^^^^^^^^ temporary value
+
+error: aborting due to 16 previous errors
+
+For more information about this error, try `rustc --explain E0745`.