summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.rust/simple.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.rust/simple.exp')
-rw-r--r--gdb/testsuite/gdb.rust/simple.exp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 08ebed3f103..a615b92ec47 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -68,6 +68,9 @@ gdb_test "print simple::Unit{23}" "'}', '\.\.', or identifier expected"
gdb_test "print f" " = \"hi bob\""
gdb_test "print fslice" " = \"bob\""
gdb_test "print &f\[3..\]" " = \"bob\""
+gdb_test "whatis f" "type = &str"
+gdb_test "print *(&f as *mut &str)" " = \"hi bob\"" \
+ "print via cast to &str"
gdb_test "print g" " = \\(\\*mut \\\[u8; 6\\\]\\) $hex b\"hi bob\""
gdb_test "ptype g" " = \\*mut \\\[u8; 6\\\]"