Commit Graph

719 Commits

Author SHA1 Message Date
David Tolnay
00a83852cd
Data structure for parsed contents of bridge module 2020-08-29 15:11:37 -07:00
David Tolnay
633f5669fa
Parse unsafety on module 2020-08-29 14:47:45 -07:00
David Tolnay
3c64a4e144
Parse full file using the new Module parser 2020-08-29 14:36:42 -07:00
David Tolnay
17c3230d08
Skip past shebang in source file 2020-08-29 12:21:16 -07:00
David Tolnay
fcd8f463a0
Data structure for source file 2020-08-29 12:13:52 -07:00
David Tolnay
05ef6ffa28
Data structure to represent possibly unsafe module 2020-08-29 11:55:04 -07:00
David Tolnay
5e668bce9b
Format ui test files using rustfmt 2020-08-29 11:36:22 -07:00
David Tolnay
020c923e6b
Less brittle matching of cxx::bridge path 2020-08-29 11:34:00 -07:00
David Tolnay
dab7e80a81
Preserve utf-8 invariant on generated code
We only write to the output buffer using the `write!` macros, which go
through std::fmt and are guaranteed that the data written is utf-8.
2020-08-28 18:54:53 -07:00
David Tolnay
0f312e7a7b
Merge pull request #268 from dtolnay/flags
Specify consistent c++ standard between cxx and cxx-test-suite
2020-08-28 17:40:58 -07:00
David Tolnay
de1cb777b2
Specify consistent c++ standard between cxx and cxx-test-suite 2020-08-28 17:36:33 -07:00
David Tolnay
907debe8b4
Release 0.3.6 2020-08-28 16:56:19 -07:00
David Tolnay
ee07f011a2
Merge pull request #267 from dtolnay/vec
Implement CxxVector<CxxString>
2020-08-28 00:48:02 -07:00
David Tolnay
47e239df11
Implement CxxVector<CxxString> 2020-08-28 00:43:10 -07:00
David Tolnay
13e4d3988c
Merge pull request #266 from dtolnay/vec
Implement Vec<String>
2020-08-28 00:33:13 -07:00
David Tolnay
33f56ad8d5
Implement Vec<String> 2020-08-28 00:25:41 -07:00
David Tolnay
b69cb0a7d9
Merge pull request #265 from dtolnay/alias
Add cxx::String and cxx::Vector aliases
2020-08-27 23:57:10 -07:00
David Tolnay
f2eb3e7057
Add cxx::String and cxx::Vector aliases 2020-08-27 23:51:23 -07:00
David Tolnay
3cb7542aec
Fix link where intra-rustdoc link is not kicking in
From looking at the docs.rs pages for 0.3.1 through 0.3.4, it looks like
this link used to render correctly, but doesn't anymore starting with
0.3.5... Unclear whether caused by a rustdoc change or a cxx change.
2020-08-27 23:41:13 -07:00
David Tolnay
a25ea9cc04
Write guards in a way that rustfmt formats tighter vertically 2020-08-27 22:59:38 -07:00
David Tolnay
57003b0e78
Inline writing include guard 2020-08-27 22:57:13 -07:00
David Tolnay
f7a592bfcf
Release 0.3.5 2020-08-27 01:14:08 -07:00
David Tolnay
adf67ae1e5
Merge pull request #263 from dtolnay/mut
Handle &mut reference in more places
2020-08-27 01:09:17 -07:00
David Tolnay
18d93b6d58
Add &mut tests 2020-08-27 01:00:18 -07:00
David Tolnay
f1c7f3219b
Handle &mut reference in more places 2020-08-27 00:58:15 -07:00
David Tolnay
a7ba6a629c
Format with rustfmt 1.4.20 2020-08-27 00:15:55 -07:00
David Tolnay
b10c4bc33a
Format with clang-format 10 2020-08-26 22:13:31 -07:00
David Tolnay
8e1e6ac25c
Extend exception message from Vec<T>::at 2020-08-26 22:13:31 -07:00
David Tolnay
61adf428be
Add test for Vec<T>::at exception message 2020-08-26 22:13:31 -07:00
David Tolnay
001e6f0c7c
Merge pull request #262 from dtolnay/throw
Unify the way that String construction and Vec indexing throw
2020-08-26 22:13:22 -07:00
David Tolnay
78c1e6b761
Resolve 'Failed to specialize function template' MSVC error
Before:

    src/cxx.cc(295): error C2893: Failed to specialize function template 'void rust::cxxbridge03::panic(const char *)'
    D:\a\cxx\cxx\src\../include/cxx.h(287): note: see declaration of 'rust::cxxbridge03::panic'
    src/cxx.cc(295): note: With the following template arguments:
    src/cxx.cc(295): note: 'Exception=std::out_of_range'
2020-08-26 22:05:49 -07:00
David Tolnay
521d99d093
Unify the way that String construction and Vec indexing throw 2020-08-26 21:50:11 -07:00
David Tolnay
fb8ddd8eb3
Merge pull request #257 from rinon/rust_vec_accessors
Add rust::Vec accessors
2020-08-26 21:49:23 -07:00
David Tolnay
041c9040ba
Lockfile update 2020-08-25 22:16:15 -07:00
David Tolnay
c8361027d9
Remove dependency of ui test on whether rust-src is installed 2020-08-25 22:03:00 -07:00
David Tolnay
691dc171b5
Update ui tests with rust-src component installed 2020-08-25 19:56:12 -07:00
David Tolnay
a08b19f5b1
Add include required for back_inserter
See failure in https://github.com/dtolnay/cxx/issues/260.
2020-08-25 19:21:16 -07:00
David Tolnay
85487b00f8
Add Option<T> to todo list 2020-08-22 06:13:27 -07:00
David Tolnay
0e79bc8fde
Update bazel build to rust 1.45 2020-08-22 05:57:03 -07:00
Stephen Crane
9e48d5b5c6 Add rust::Vec accessors
Adds operator[], at(), front(), and back() to rust::Vec.
2020-08-21 12:17:02 -07:00
David Tolnay
291a8b87a1
Update to trybuild 1.0.32 2020-08-09 16:46:45 -07:00
David Tolnay
8cfdd7ddd6
Merge pull request #247 from adetaylor/include-guards
Writing include guards around each type.
2020-07-31 19:05:48 -07:00
David Tolnay
df4ca02003
Access namespace via OutFile 2020-07-31 18:33:44 -07:00
David Tolnay
3be1a7fc53
Merge pull request #245 from dtolnay/clap
Switch cli arg parsing from structopt to clap
2020-07-31 18:29:15 -07:00
Adrian Taylor
a1f890b468 Writing include guards around each type.
This avoids problems with duplicate definitions when the
generated .cc ends up including the generated .h via intermediate
includes.
2020-07-31 15:35:34 -07:00
David Tolnay
54702b9839
Use 'write!(out.front, ...)' to write to the front matter 2020-07-31 11:50:09 -07:00
David Tolnay
a05bb4ecd4
Merge pull request #246 from dtolnay/pragma
#pragma once needs to be above includes
2020-07-31 11:16:02 -07:00
David Tolnay
f4632ded18
#pragma once needs to be above includes 2020-07-31 10:46:55 -07:00
David Tolnay
b316d0bb1c
Remove structopt from third-party 2020-07-30 22:42:34 -07:00
David Tolnay
39fa366897
Switch cli arg parsing from structopt to clap 2020-07-30 22:41:52 -07:00