David Tolnay
379d342779
Type alias type info
2020-05-07 19:46:02 -07:00
David Tolnay
3118fa6606
Type alias ident checking
2020-05-07 19:46:02 -07:00
David Tolnay
e2f9ec4c89
Type alias parsing
2020-05-07 19:46:02 -07:00
David Tolnay
e47119ca2f
Pull in syn 1.0.19
...
Includes https://github.com/dtolnay/syn/pull/790 which we need for
extern type aliases.
2020-05-07 19:46:02 -07:00
David Tolnay
9938381aa7
Introduce type aliases in syntax tree
2020-05-07 19:46:02 -07:00
David Tolnay
d09e012608
Add a type-level encoding of qualified paths
2020-05-07 19:46:01 -07:00
David Tolnay
db08d4affe
Pull in quote 1.0.4
...
Includes https://github.com/dtolnay/quote/pull/151 which will be used in
the implementation of type_id.
2020-05-07 19:46:01 -07:00
David Tolnay
6e80833572
Support code generation for multiple cxx::bridge files in one Build
2020-05-07 19:44:11 -07:00
David Tolnay
295ef6b38a
Adjust foreign item parsing to prepare for type aliases
...
This will be required for parse_extern_type to return a different kind
of Api for the case of type aliases.
2020-05-07 16:10:30 -07:00
David Tolnay
29061ea1d8
Update build status badge to GitHub Actions
2020-05-05 13:56:54 -07:00
David Tolnay
9531334f5a
Move github funding.yml out of repo root
2020-05-05 12:54:15 -07:00
David Tolnay
dfbce4bbc5
Remove unreachable return case from cxx function shim
...
This is unreachable because returning a CxxVector by value is not
allowed.
error[cxxbridge]: returning C++ vector by value is not supported
┌─ lib.rs:30:29
│
30 │ fn not_allowed() -> CxxVector<u8>;
│ ^^^^^^^^^^^^^ returning C++ vector by value is not supported
│
2020-05-05 10:52:12 -07:00
David Tolnay
4301f3ca51
Simplify discriminant overflow check
2020-05-05 10:29:52 -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
David Tolnay
884d91f0bc
Resolve absurd_extreme_comparisons lint
2020-05-05 10:17:23 -07:00
David Tolnay
db450b0a9d
Suppress some lints in cxx-build
2020-05-05 10:16:57 -07:00
David Tolnay
c79ba750b0
Suppress len_without_is_empty lint
2020-05-05 10:13:00 -07:00
David Tolnay
39ee0ed36b
Resolve assign_op_pattern lint
2020-05-05 10:12:29 -07:00
David Tolnay
7ae018fb5a
Resolve redundant_field_names lint
2020-05-05 10:11:30 -07:00
David Tolnay
acc64cb201
Merge pull request #189 from jgalenson/enums
...
Compute enum discriminant during parsing
2020-05-05 10:09:16 -07:00
Joel Galenson
8ef1bc809c
Fix rustc 1.42.0.
2020-05-05 08:45:49 -07:00
Joel Galenson
8854773c56
Compute enum discriminant during parsing
...
This allows us to reuse the computation in multiple places later.
2020-05-05 08:32:32 -07:00
David Tolnay
de471c9a22
Merge pull request #187 from jgalenson/enums
...
Support enums defined in C++ code.
2020-05-04 20:49:52 -07:00
Joel Galenson
9fe5ea3ad7
Add missing message.
2020-05-04 20:25:15 -07:00
Joel Galenson
0f654ffeb0
Fix previous commit.
2020-05-04 20:04:21 -07:00
Joel Galenson
905eb2e1f5
Support enums defined in C++ code.
...
This allows listing an enum in an extern "C" block as well as in the
shared block. In this case, we do not emit the C++ declaration of the
enum but instead emit static assertions that it has the values that we
expect.
2020-05-04 15:02:17 -07:00
David Tolnay
24d22b471a
Remove Travis configuration
2020-05-04 02:31:53 -07:00
David Tolnay
29bc177103
Merge pull request #186 from dtolnay/batch
...
Batch parse errors
2020-05-04 01:40:45 -07:00
David Tolnay
4c14162d34
Update multi parse errors ui test
2020-05-04 01:30:09 -07:00
David Tolnay
5275978d13
Batch errors from the parser
2020-05-04 01:29:17 -07:00
David Tolnay
cbf3f03ff2
Demarcate the infallible majority of expand.rs
2020-05-04 01:29:17 -07:00
David Tolnay
0dd85ff5f7
Move error collection one level out of type checker
2020-05-04 01:29:17 -07:00
David Tolnay
df344a82d9
Extract error collection to be not specific to check.rs
2020-05-04 01:29:16 -07:00
David Tolnay
15a6c76352
Add test of invocation with multiple parse errors
2020-05-04 01:29:01 -07:00
David Tolnay
2ec14632c0
Be consistent about certain variable names always meaning a reference
2020-05-04 00:53:12 -07:00
David Tolnay
7bc2edd734
Include conflicting name in duplicate name error message
2020-05-04 00:41:53 -07:00
David Tolnay
83496ebf33
Move error reporting span computation to tokens.rs
2020-05-04 00:36:53 -07:00
David Tolnay
d932041745
Catch function name collisions
2020-05-04 00:31:56 -07:00
David Tolnay
ab91445c1d
Check type name duplication more compactly
2020-05-04 00:31:28 -07:00
David Tolnay
96a826b8f0
Check function signature restrictions in a more appropriate place
2020-05-04 00:17:12 -07:00
David Tolnay
2c61f66ecd
Merge pull request #185 from dtolnay/actions
...
Enable GitHub Actions
2020-05-02 21:34:42 -07:00
David Tolnay
193ce8171a
Enable GitHub Actions
2020-05-02 21:20:14 -07:00
David Tolnay
0d366c754b
Remove CI badge from Cargo.toml
...
Support for badges has been deprecated by crates.io.
2020-05-01 20:51:38 -07:00
David Tolnay
b3f66461cd
Update past yanked version of proc-macro2
...
1.0.11 was yanked.
2020-05-01 17:29:12 -07:00
David Tolnay
7bdd9b51db
Merge pull request #184 from dtolnay/fallback
...
Support building C++ code generator with panic=abort
2020-05-01 16:16:23 -07:00
David Tolnay
761a5fc7fd
Support building C++ code generator with panic=abort
2020-05-01 16:02:02 -07:00
David Tolnay
18cd757213
Merge pull request #182 from jgalenson/enums
...
Expose the enum value to Rust as a field
2020-05-01 14:26:15 -07:00
Joel Galenson
db1ec31283
Expose the enum value to Rust as a field
2020-05-01 14:00:48 -07:00
David Tolnay
e720e852c1
Merge pull request #181 from dtolnay/sort
...
Sort errors reported by line number
2020-05-01 10:35:45 -07:00
David Tolnay
1ba09e1422
Sort errors reported by line number
2020-05-01 10:14:41 -07:00