617 Commits

Author SHA1 Message Date
David Tolnay
f5ac0d9ffa
Fix permission denied failure in bazel CI job
This job started failing in GitHub Actions with this error:

    ## $ bazel run demo-rs --verbose_failures --noshow_progress
    Downloading https://releases.bazel.build/3.1.0/release/bazel-3.1.0-linux-x86_64...
    could not run Bazel: could not start Bazel: fork/exec /home/runner/work/cxx/cxx/tools/bazel: permission denied
    ##[error]Process completed with exit code 1.
2020-05-11 13:19:14 -07:00
David Tolnay
dbe7cb0721
Merge pull request #197 from dtolnay/find
Find cxx::bridge mod nested inside another mod
2020-05-11 01:20:00 -07:00
David Tolnay
2498af39f2
Find cxx::bridge mod nested inside another mod 2020-05-11 01:13:33 -07:00
David Tolnay
b4dba23910
Bring gen module doc up to date 2020-05-11 00:55:40 -07:00
David Tolnay
2967b66788
Move finding of bridge mod to its own module 2020-05-11 00:53:06 -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
9f7c55acde
Rename discriminant Bounds to Limits
This is aligned with "limits" as used in std::numeric_limits in C++.
2020-05-11 00:19:02 -07:00
David Tolnay
8155e58ba1
Treat unexpected tokens in repr attribute as unexpected repr 2020-05-11 00:15:12 -07:00
David Tolnay
a954fcadde
Merge pull request #196 from dtolnay/enum
Choose enum discriminant type based on repr attributes, suffixes, values
2020-05-11 00:14:44 -07:00
David Tolnay
17451dea34
Restore rust 1.42 compatibility 2020-05-10 23:49:12 -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
David Tolnay
94cce00fdd
Detect mismatched suffix on discriminant values 2020-05-10 23:19:39 -07:00
David Tolnay
5966f7b3f6
Detect out of bounds when inserting discriminant 2020-05-10 22:59:56 -07:00
David Tolnay
ddf69e291b
Parse repr attribute on enums 2020-05-10 22:57:33 -07:00
David Tolnay
0435a81842
Recover from some enum parsing errors 2020-05-10 22:57:33 -07:00
David Tolnay
e2e303f7f2
Infer enum repr based on discriminant range 2020-05-10 22:57:32 -07:00
David Tolnay
f1715fa994
Add const bound data for various discriminant reprs 2020-05-10 22:57:32 -07:00
David Tolnay
9bcb4c6d0b
Extract integer suffix of discriminants as the repr 2020-05-10 22:57:32 -07:00
David Tolnay
2b8bf6d262
Preserve the original discriminant Expr 2020-05-10 22:57:32 -07:00
David Tolnay
69c7960cb2
Parse negative discriminants 2020-05-10 22:57:32 -07:00
David Tolnay
17e137fbb3
Factor out a discriminant processing library 2020-05-10 22:57:32 -07:00
David Tolnay
699351bc78
Display for Atom 2020-05-10 22:57:08 -07:00
David Tolnay
a4596c4455
Expose Atom str for use in error messages 2020-05-10 22:55:45 -07:00
David Tolnay
64703b4207
Give Derive enum and impls their own module 2020-05-10 22:12:33 -07:00
David Tolnay
c0fad20670
Add crates.io categories and keywords 2020-05-10 20:16:28 -07:00
David Tolnay
3e62888960
Keep items that have attr parse errors 2020-05-10 15:36:01 -07:00
David Tolnay
b129ea7163
Organize how the caller determines which attrs to parse
In preparation for parsing even more attributes, such as `repr`.
2020-05-10 14:48:30 -07:00
David Tolnay
e86b9cf225
Update derive parsing to produce structured representation 2020-05-10 14:26:04 -07:00
David Tolnay
6cadf70b58
Merge pull request #194 from philipcraig/std_c++11_not_required_on_msvc
avoid MSVC warning via flag_if_supported
2020-05-09 12:06:54 -07:00
Philip Craig
7e14e2e6cb
avoid MSVC warning via flag_if_supported 2020-05-09 12:00:49 -07:00
David Tolnay
32439dae38
Apply PR 193 to rustdoc as well 2020-05-09 09:59:40 -07:00
David Tolnay
55f4949549
Merge pull request #193 from philipcraig/fix_readme
fix path to c++ generator example
2020-05-09 09:56:08 -07:00
Philip Craig
064668a00f fix path to c++ generator example 2020-05-09 08:24:12 +01:00
David Tolnay
e2f70fea3e
Release 0.3.2 0.3.2 2020-05-08 15:57:14 -07:00
David Tolnay
887c8a2eb1
Merge pull request #192 from cchalmers/cpp-true
Add cpp flag to cc
2020-05-08 15:55:10 -07:00
David Tolnay
110df7dc21
Defer to link-cplusplus crate for linking a standard library 2020-05-08 13:09:56 -07:00
David Tolnay
96c351b5a8
Format with rustfmt 2020-04-14 2020-05-08 13:06:18 -07:00
Christopher Chalmers
d24563dd24 Add cpp flag to cc
This means that clang++ will be called instead of clang.
2020-05-08 20:39:10 +01:00
David Tolnay
878ab12a15
Release 0.3.1 0.3.1 2020-05-08 10:05:03 -07:00
David Tolnay
2429c6b0f6
Merge pull request #190 from dtolnay/id
Enable sharing a consistent Rust type across multiple FFI blocks
2020-05-08 02:36:06 -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
2b821e60e0
Don't do trait impls for non-local types 2020-05-07 23:18:09 -07:00
David Tolnay
e5a015a2b4
Allow type alias as a method receiver 2020-05-07 21:54:31 -07:00