David Tolnay
717c7e6aa8
Factor out genrules to rust_cxx_bridge.bzl
2020-09-24 10:08:10 -04:00
David Tolnay
dc57990e22
Use more systematic naming for generated code targets
2020-09-24 10:00:50 -04:00
David Tolnay
0cd342913a
Make buck/bazel generated filepaths match source path with extension
2020-09-24 09:40:27 -04:00
David Tolnay
55151b4575
Match bazel's semantics for genrule cmd
2020-09-24 09:40:27 -04:00
David Tolnay
e02c8b3b98
Load cc_library from @rules_cc
...
Buildifier warns about this now.
Function "cc_library" is not global anymore and needs to be loaded
from "@rules_cc//cc:defs.bzl".buildifier(native-cc)
2020-09-24 08:58:09 -04:00
David Tolnay
e4d30f2257
Set test size of //tests:test Bazel test
...
Without this:
INFO: Analyzed 33 targets (1 packages loaded, 12 targets configured).
INFO: Found 32 targets and 1 test target...
INFO: Elapsed time: 0.905s, Critical Path: 0.66s
INFO: 3 processes: 3 linux-sandbox.
INFO: Build completed successfully, 3 total actions
//tests:test PASSED in 0.1s
WARNING: //tests:test: Test execution time (0.1s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
2020-09-24 08:57:22 -04:00
David Tolnay
22602b43a8
Fix return Result<Box<T>> from Rust to C++
2020-09-21 18:22:37 -04:00
David Tolnay
d7fef0a162
Update ui tests to nightly-2020-09-05
2020-09-04 23:28:56 -07:00
David Tolnay
25db1555f5
Update import path scheme for tests
2020-09-01 22:41:15 -07:00
David Tolnay
7273963a61
Sort buck genrule args the way buildifier wants
...
https://github.com/bazelbuild/buildtools/tree/master/buildifier
2020-09-01 20:48:11 -07:00
David Tolnay
5e668bce9b
Format ui test files using rustfmt
2020-08-29 11:36:22 -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
47e239df11
Implement CxxVector<CxxString>
2020-08-28 00:43:10 -07:00
David Tolnay
33f56ad8d5
Implement Vec<String>
2020-08-28 00:25:41 -07:00
David Tolnay
18d93b6d58
Add &mut tests
2020-08-27 01:00:18 -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
fb8ddd8eb3
Merge pull request #257 from rinon/rust_vec_accessors
...
Add rust::Vec accessors
2020-08-26 21:49:23 -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
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
6911d6d604
Update ui tests to nightly-2020-07-15
2020-07-21 18:05:48 -07:00
David Tolnay
0067236217
Update ui tests to nightly-2020-07-07
2020-07-21 18:02:36 -07:00
David Tolnay
b3d5e600a7
Update ui tests to nightly-2020-06-27
2020-07-21 17:58:14 -07:00
David Tolnay
0c8c0f26fa
Unbreak ui test on c_take_callback warning
2020-07-21 17:57:46 -07:00
David Tolnay
bbd2620921
Update ui tests to nightly-2020-06-14
2020-06-13 19:17:21 -07:00
David Tolnay
ae7143655d
Test c method calls without needing PartialEq on Exception
2020-05-22 11:12:35 -07:00
myronahn
e3b78ea409
Fix issue with indirect return for C++ member function w/no args
2020-05-22 11:08:13 -07:00
Myron Ahn
d963bf97b7
Fix for when std::os::raw::c_char is u8 (armv7)
2020-05-17 12:32:42 +07:00
David Tolnay
cf96664b29
Test include parsing
2020-05-11 20:07:34 -07:00
David Tolnay
65bc8e6af8
Detect earlier untyped discriminants out of bounds of later suffix
2020-05-11 00:30:24 -07:00
David Tolnay
f6a89f2813
Respect inferred enum repr in C++ code generator
2020-05-10 23:45:51 -07:00
David Tolnay
c605e6fa61
Respect inferred enum repr in Rust code generator
2020-05-10 23:37:12 -07:00
David Tolnay
560661abe5
Test unsatisfiable discriminant range
2020-05-10 23:32:31 -07:00
David Tolnay
b24f52e289
Test inconsistent suffix on enum discriminants
2020-05-10 23:29:12 -07:00
David Tolnay
f85431239d
Test discriminant outside of the repr's bounds
2020-05-10 23:28:04 -07:00
David Tolnay
f2d584101d
Expand maximum recognized discriminant to 64 bits
2020-05-10 23:23:37 -07:00
Philip Craig
7e14e2e6cb
avoid MSVC warning via flag_if_supported
2020-05-09 12:00:49 -07:00
David Tolnay
ae4dedab55
Update build files of test suite
2020-05-08 02:23:10 -07:00
David Tolnay
094db3ecea
Document ExternType trait
2020-05-08 02:06:30 -07:00
David Tolnay
a62cca2268
Add a use of type alias to test suite
2020-05-07 23:20:06 -07:00
David Tolnay
83fe0f06d5
Preserve a better span for type id mismatch errors
2020-05-07 20:14:49 -07:00
David Tolnay
c6ba2d27f4
Condense type ids rendered by rustc
2020-05-07 19:46:02 -07:00
David Tolnay
9f07303af1
Add ui test of type_id mismatch
2020-05-07 19:46:02 -07:00
David Tolnay
e2f9ec4c89
Type alias parsing
2020-05-07 19:46:02 -07:00
David Tolnay
a3f6407efa
Expand discriminant overflow error message
...
Renders as:
error[cxxbridge]: discriminant overflow on value after 4294967295
┌─ src/main.rs:11:9
│
11 │ B,
│ ^ discriminant overflow
│
= note: explicitly set `= 0` if that is desired outcome
This more closely matches rustc's error message, which is:
error[E0370]: enum discriminant overflowed
--> src/lib.rs:4:5
|
4 | B,
| ^ overflowed on value after 255
|
= note: explicitly set `B = 0` if that is desired outcome
2020-05-05 10:28:00 -07:00