diff options
author | Manish Goregaokar <manish@mozilla.com> | 2016-07-06 10:55:10 +0530 |
---|---|---|
committer | Manish Goregaokar <manish@mozilla.com> | 2016-07-06 10:56:21 +0530 |
commit | 42d940118a6372d6e85f71a54fed75fdf5c606bd (patch) | |
tree | c20163aacfb47e8e467b3db13f0a889a65b53406 /gdb/testsuite/gdb.rust/simple.rs | |
parent | 6949d8a719659ee6003aff0c90d03ae81489cab3 (diff) | |
download | gdb-42d940118a6372d6e85f71a54fed75fdf5c606bd.zip gdb-42d940118a6372d6e85f71a54fed75fdf5c606bd.tar.gz gdb-42d940118a6372d6e85f71a54fed75fdf5c606bd.tar.bz2 |
Allow subscripting raw pointers
This will be useful for dealing with vectors; regardless of our final solution
for the Index trait.
2016-07-06 Manish Goregaokar <manish@mozilla.com>
gdb/ChangeLog:
* rust-lang.c (rust_subscript): Allow subscripting pointers
gdb/testsuite/ChangeLog:
* simple.rs: Add test for raw pointer subscripting
* simple.exp: Add test expectations
Diffstat (limited to 'gdb/testsuite/gdb.rust/simple.rs')
-rw-r--r-- | gdb/testsuite/gdb.rust/simple.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.rust/simple.rs b/gdb/testsuite/gdb.rust/simple.rs index 3d28e27..4980826 100644 --- a/gdb/testsuite/gdb.rust/simple.rs +++ b/gdb/testsuite/gdb.rust/simple.rs @@ -87,6 +87,7 @@ fn main () { let v = Something::Three; let w = [1,2,3,4]; + let w_ptr = &w[0]; let x = (23, 25.5); let y = HiBob {field1: 7, field2: 8}; let z = ByeBob(7, 8); |