summaryrefslogtreecommitdiff
path: root/tests/headers/convert-cpp-comment-to-rust.hpp
diff options
context:
space:
mode:
authorDylan McKay <me@dylanmckay.io>2017-07-06 12:23:56 +1200
committerDylan McKay <me@dylanmckay.io>2017-07-08 11:38:23 +1200
commit239a0154cdab5fa0052f2ce98129e2c169dc1cc4 (patch)
treeb52435287980d77af247fc49b0a3f34dd5bb72ed /tests/headers/convert-cpp-comment-to-rust.hpp
parent3bb248ba247c2b8b3433c03102276b925b5025d0 (diff)
Intelligently convert C/C++ comments to Rust
With this change, we can correctly parse C++ block comments. ``` /** * Does a thing * * More documentation. This test does something * useful. */ ``` into ``` /// Does a thing /// /// More documentation. This test does something /// useful. ``` Fixes servo/rust-bindgen#426.
Diffstat (limited to 'tests/headers/convert-cpp-comment-to-rust.hpp')
-rw-r--r--tests/headers/convert-cpp-comment-to-rust.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/headers/convert-cpp-comment-to-rust.hpp b/tests/headers/convert-cpp-comment-to-rust.hpp
new file mode 100644
index 00000000..649c2365
--- /dev/null
+++ b/tests/headers/convert-cpp-comment-to-rust.hpp
@@ -0,0 +1,14 @@
+
+typedef unsigned mbedtls_mpi_uint;
+
+/**
+ * \brief MPI structure
+ */
+typedef struct
+{
+ int s; /*!< integer sign */
+ unsigned long n; /*!< total # of limbs */
+ mbedtls_mpi_uint *p; /*!< pointer to limbs */
+}
+mbedtls_mpi;
+