1784 Commits

Author SHA1 Message Date
David Tolnay
af7471e6d3
Merge pull request #507 from dtolnay/is_complete
Improve error message on unique_ptr of incomplete forward declared type
2020-11-25 08:43:46 -08:00
David Tolnay
534627667d
Improve error message on unique_ptr of incomplete forward declared type 2020-11-25 08:29:01 -08:00
David Tolnay
ee9b9eebad
Remove unneeded copy_assignable_if template parameter name 2020-11-25 08:28:50 -08:00
David Tolnay
5fcfcb48ad
Merge pull request #506 from dtolnay/typenames
Better represent legal UniquePtr referent types
2020-11-25 07:46:47 -08:00
David Tolnay
1bdb471399
Better represent legal UniquePtr referent types 2020-11-25 07:39:58 -08:00
David Tolnay
15609ab97b
Enable UniquePtr::new for enums 2020-11-25 07:14:12 -08:00
David Tolnay
4f52dabfa3
Merge pull request #504 from dtolnay/parsens
Remove redundant namespaces passed around by parser
2020-11-24 22:05:45 -08:00
David Tolnay
313cc0ac61
Remove redundant namespaces passed around by parser 2020-11-24 21:47:01 -08:00
David Tolnay
909b8fc7c2
Merge pull request #503 from dtolnay/array
Implement Rust [T; N] <-> std::array<T, N>
2020-11-24 21:44:01 -08:00
David Tolnay
1092640045
Add array support to readme and website 2020-11-24 21:35:43 -08:00
David Tolnay
c465829454
Fix array element supported condition
This disallows previously wrongly allowed array element types in PR 459
(such as [CxxString; N]) and allows previously disallowed but
unproblematic array element types (such as [&str; N]).
2020-11-24 21:24:32 -08:00
David Tolnay
9075bafa1d
Add array len parse ui tests 2020-11-24 21:17:07 -08:00
David Tolnay
d9f9784c93
Reduce nesting of array parse 2020-11-24 21:17:07 -08:00
David Tolnay
5cb90652a3
Improve array parse error messages 2020-11-24 21:17:06 -08:00
David Tolnay
2d0df23b44
Reorder array parsing near slice 2020-11-24 21:17:06 -08:00
David Tolnay
c351dc40cd
Preserve lit token of array length 2020-11-24 21:17:06 -08:00
David Tolnay
f22fb65fcf
Add ui test of improper suffix on array len 2020-11-24 21:17:06 -08:00
David Tolnay
e8b1bb4d12
Touch up pr 459 2020-11-24 21:17:06 -08:00
David Tolnay
2cabd0a8a3
Set needs_indirect_abi for Array
Otherwise:

    warning: `extern` fn uses type `[u8; 3]`, which is not FFI-safe
     --> src/main.rs:8:21
      |
    8 |         fn arr() -> [u8; 3];
      |                     ^^^^^^^ not FFI-safe
      |
      = note: `#[warn(improper_ctypes_definitions)]` on by default
      = help: consider passing a pointer to the array
      = note: passing raw arrays by value is not FFI-safe
2020-11-24 21:16:26 -08:00
David Tolnay
8f8d78dded
Implement is_unsized for Array based on element sizedness 2020-11-24 21:16:25 -08:00
David Tolnay
93f1c36647
Remove redundant array type recursive check calls 2020-11-24 21:16:25 -08:00
David Tolnay
7750b8165a
Merge master into pr/459 2020-11-24 20:25:43 -08:00
Xiangpeng Hao
7876235c3f add initial array support 2020-11-24 20:23:29 -08:00
David Tolnay
f5ead103f3
Resolve clippy unnecessary_wraps lints 2020-11-24 17:08:05 -08:00
David Tolnay
0c6417f21d
Release 1.0.3 1.0.3 2020-11-24 14:15:48 -08:00
David Tolnay
702434cb76
Lockfile update 2020-11-24 14:15:18 -08:00
David Tolnay
3a6044bbfc
Merge pull request #502 from dtolnay/mut
Support &mut [u8]
2020-11-24 14:09:43 -08:00
David Tolnay
5945e56497
Add &mut [u8] to readme and website 2020-11-24 14:03:18 -08:00
David Tolnay
c5629f021e
Support &mut [u8] 2020-11-24 13:45:27 -08:00
David Tolnay
cd271f2dc8
Add some more slice test functions 2020-11-24 12:38:18 -08:00
David Tolnay
94469c2077
Move aux types lower in test suite 2020-11-24 12:38:15 -08:00
David Tolnay
4092191f73
Add static assertions on nature of Slice special member functions 2020-11-23 20:44:48 -08:00
David Tolnay
c26de54e05
Format with clang-format 10 2020-11-23 18:18:19 -08:00
David Tolnay
2714d2c98f
Resolve modernize-use-override
https://github.com/dtolnay/cxx/issues/500
2020-11-23 18:17:45 -08:00
David Tolnay
79076c7b71
Resolve modernize-use-equals-default
https://github.com/dtolnay/cxx/issues/500
2020-11-23 18:17:01 -08:00
David Tolnay
1567186114
Resolve some instances of cppcoreguidelines-pro-type-member-init
https://github.com/dtolnay/cxx/issues/500
2020-11-23 18:14:34 -08:00
David Tolnay
06677b3e00
Resolve cppcoreguidelines-avoid-magic-numbers
https://github.com/dtolnay/cxx/issues/500
2020-11-23 18:07:52 -08:00
David Tolnay
16bcd38cb9
Link to clang-tidy lint tracking issue 2020-11-23 18:01:39 -08:00
David Tolnay
74c8ae4280
Merge pull request #501 from dtolnay/tidy
Run clang-tidy in CI
2020-11-23 17:57:12 -08:00
David Tolnay
b5b260c2a7
Make clang-tidy fail CI on positive finding 2020-11-23 17:40:45 -08:00
David Tolnay
1c70aca761
Suppress all currently triggered clang-tidy checks 2020-11-23 17:40:44 -08:00
David Tolnay
83bb58ce27
Split clang-tidy config to one check/group per line 2020-11-23 17:40:44 -08:00
David Tolnay
99b1a5cef5
Fix yaml indentation in clang-tidy workflow job 2020-11-23 17:40:43 -08:00
David Tolnay
141052b0e8
Switch apt to apt-get in clang-tidy installation
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
2020-11-23 17:40:43 -08:00
David Tolnay
6f2a126c86
Move header filter to clang-tidy config file 2020-11-23 17:40:42 -08:00
David Tolnay
094adfafb0
Move clang-tidy std flag to compilation database file
https://clang.llvm.org/docs/JSONCompilationDatabase.html#alternatives
2020-11-23 17:40:41 -08:00
David Tolnay
2580f7aa10
Remove unneeded flags from clang-tidy command in CI 2020-11-23 17:40:39 -08:00
David Tolnay
7e8907a845
Merge pull request #499 from dtolnay/stable
Update CI to use stable 1.48.0 compiler
2020-11-23 17:23:48 -08:00
David Tolnay
7b22c9f4f3
Update CI to use stable 1.48.0 compiler 2020-11-23 17:17:07 -08:00
David Tolnay
87cf418307
Switch apt to apt-get in CI
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
2020-11-23 17:12:52 -08:00