655 Commits

Author SHA1 Message Date
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
63c55b6cc3
Merge pull request #212 from CAD97/patch-1
Small typo fix
2020-05-24 09:02:14 -07:00
Christopher Durham
b8d211d359
Small typo fix
s/when manipulation a/when manipulating a/
2020-05-24 11:56:32 -04:00
David Tolnay
caef2b9589
Remove dependency on proc-macro2/proc-macro feature 2020-05-23 14:58:20 -07:00
David Tolnay
57d3c68a23
Release 0.3.4 0.3.4 2020-05-22 11:13:47 -07:00
David Tolnay
2de2e17bc9
Lockfile update 2020-05-22 11:12:35 -07:00
David Tolnay
ae7143655d
Test c method calls without needing PartialEq on Exception 2020-05-22 11:12:35 -07:00
David Tolnay
eedf737d91
Revert exception change from PR 210 2020-05-22 11:08:50 -07:00
myronahn
e3b78ea409
Fix issue with indirect return for C++ member function w/no args 2020-05-22 11:08:13 -07:00
David Tolnay
ef8fd19a3b
Account for character based offsets in proc-macro2 2020-05-22 01:27:30 -07:00
David Tolnay
ecafa897c1
Merge pull request #209 from myronahn/master
Fix for when std::os::raw::c_char is u8 (armv7)
2020-05-17 00:35:49 -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
dd3af090b7
Try out new style of readme badges 2020-05-12 22:19:46 -07:00
David Tolnay
9846d08d40
Merge pull request #206 from dtolnay/include
Move all function implementations to the bottom of cxx.h
2020-05-12 20:59:17 -07:00
David Tolnay
2a2b9ad1f5
Move implementation details to the bottom of cxx.h 2020-05-12 20:43:20 -07:00
David Tolnay
e54f338188
Support multiple cxx.h header sections for the same guard 2020-05-12 20:43:20 -07:00
David Tolnay
1385ca42b2
Add missing noexcept on Vec<T>::const_iterator methods 2020-05-12 20:15:20 -07:00
David Tolnay
8c54eeca6c
Add missing noexcept on a Slice constructor 2020-05-12 20:08:20 -07:00
David Tolnay
32ee9d3676
rust::Vec has a bitcopy constructor too 2020-05-12 20:01:15 -07:00
David Tolnay
6aa34e4240
Release 0.3.3 0.3.3 2020-05-11 20:56:51 -07:00
David Tolnay
cf22385662
Document c++ standard support 2020-05-11 20:50:59 -07:00
David Tolnay
0e078f74be
Add release notes link to crate-level rustdoc 2020-05-11 20:50:03 -07:00
David Tolnay
2b93b55560
Merge pull request #203 from dtolnay/unique
Switch demo code to using std::make_unique
2020-05-11 20:48:12 -07:00
David Tolnay
4ab952da41
Merge pull request #202 from dtolnay/stdflag
Add cargo cfgs for opt in to newer standards
2020-05-11 20:43:35 -07:00
David Tolnay
c13ad23d9c
Switch demo code to using std::make_unique 2020-05-11 20:38:19 -07:00
David Tolnay
9808ef177c
Add cargo cfgs for opt in to newer standards
Currently unused, but will be needed when integrating std::optional or
std::string_view support.

    [dependencies]
    cxx = { version = "0.3", features = ["c++17"] }
2020-05-11 20:30:44 -07:00
David Tolnay
14db1e2049
Merge pull request #201 from dtolnay/include
Parse include!(<path/to/bracketed>)
2020-05-11 20:14:45 -07:00
David Tolnay
cf96664b29
Test include parsing 2020-05-11 20:07:34 -07:00
David Tolnay
91e87fa51e
Parse include!(<path/to/bracketed>)
For example:

    #[cxx::bridge]
    mod ffi {
        extern "C" {
            include!("path/to/quoted");
            include!(<path/to/bracketed>);

            ...
        }
    }

Emitted as:

    #include "path/to/quoted"
    #include <path/to/bracketed>
2020-05-11 20:07:34 -07:00
David Tolnay
8918451412
Pull in syn 1.0.20 for Macro::parse_body fix
https://github.com/dtolnay/syn/pull/791

This will give better error message in the upcoming implementation of
include!(<bracketed/path/to>).
2020-05-11 20:05:56 -07:00
David Tolnay
bbcf2154e6
Accept bracketed in addition to quoted extra includes
Invoked as:

    cxxbridge path/to/file.rs -i '<path/to/bracketed>' -i path/to/quoted

Emits:

    #include <path/to/bracketed>
    #include "path/to/quoted"
2020-05-11 19:04:25 -07:00
David Tolnay
7fbfc95720
Merge pull request #198 from dtolnay/icons
Add crosslink icons to top of rustdoc
2020-05-11 13:35:11 -07:00
David Tolnay
e3daefbf63
Add crosslink icons to top of rustdoc 2020-05-11 13:27:04 -07:00
David Tolnay
43f3aee48d
Merge pull request #200 from dtolnay/bazel
Fix permission denied failure in bazel CI job
2020-05-11 13:26:45 -07:00
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