aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/reference1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/rust/compile/reference1.rs')
-rw-r--r--gcc/testsuite/rust/compile/reference1.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/reference1.rs b/gcc/testsuite/rust/compile/reference1.rs
new file mode 100644
index 0000000..ff79153
--- /dev/null
+++ b/gcc/testsuite/rust/compile/reference1.rs
@@ -0,0 +1,6 @@
+fn main() {
+ let a = &123;
+ let b: &mut i32 = a;
+ // { dg-error "mismatched mutability" "" { target *-*-* } .-1 }
+ // { dg-error "expected .&mut i32. got .& i32." "" { target *-*-* } .-2 }
+}