diff options
| author | bors <bors@rust-lang.org> | 2013-07-17 00:52:48 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-17 00:52:48 -0700 |
| commit | a93244dbf6a5872a536e8b2727a5ebb94475ebed (patch) | |
| tree | 2901d2a3f54d9817403eac04a756d3aa2d601bd8 /src/test/codegen/stack-alloc-string-slice.cc | |
| parent | af54f633fd72dda691e70aef9aeadd36f0fab8b9 (diff) | |
| parent | 40f74341f3ba2cee2afedb31014ee14432d700cd (diff) | |
| download | rust-a93244dbf6a5872a536e8b2727a5ebb94475ebed.tar.gz rust-a93244dbf6a5872a536e8b2727a5ebb94475ebed.zip | |
auto merge of #7839 : graydon/rust/new-codegen-tests, r=pcwalton
Add some codegen tests. Nothing too surprising.
Diffstat (limited to 'src/test/codegen/stack-alloc-string-slice.cc')
| -rw-r--r-- | src/test/codegen/stack-alloc-string-slice.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/codegen/stack-alloc-string-slice.cc b/src/test/codegen/stack-alloc-string-slice.cc new file mode 100644 index 00000000000..01eae9b16bb --- /dev/null +++ b/src/test/codegen/stack-alloc-string-slice.cc @@ -0,0 +1,12 @@ +#include <stddef.h> + +struct slice { + char const *p; + size_t len; +}; + +extern "C" +void test() { + struct slice s = { .p = "hello", + .len = 5 }; +} |
