David Tolnay
2d99b00fcc
Inline some niche RustName methods
2020-12-21 14:34:35 -08:00
David Tolnay
fa5a4a6b5b
Add debug assertions to some Vec indexing
2020-12-21 14:08:08 -08:00
David Tolnay
d4fff5d951
Mark Vec front/back noexcept
2020-12-21 14:04:11 -08:00
David Tolnay
5965894ca8
Remove includes duplicated between cxx.h and cxx.cc
2020-12-21 13:58:45 -08:00
David Tolnay
c5ef010349
Release 1.0.20
1.0.20
2020-12-21 13:34:59 -08:00
David Tolnay
233c88bc8f
Lockfile update
2020-12-21 13:32:28 -08:00
David Tolnay
133a9b978b
Recognize extern function return value as trivial reason
2020-12-21 13:30:47 -08:00
David Tolnay
8a01b9d1a1
Merge pull request #587 from dtolnay/trivial
...
Join trivial reasons in one message
2020-12-21 13:22:48 -08:00
David Tolnay
5b1d863c1e
Join trivial reasons in one message
2020-12-21 13:13:35 -08:00
David Tolnay
ee0ccbe4cd
Focus pin mut opaque message on Pin suggestion
...
In common usage the Pin<&mut T> is going to be the right fix most of the
time. In all of these cases the user is *also* going to receive a
suggestion to implement ExternType. That suggestion will appear pointing
to the opaque extern `type` item.
2020-12-21 13:05:55 -08:00
David Tolnay
0286de8011
Clean up type name in IsRelocatable static assertion message
2020-12-20 22:00:20 -08:00
David Tolnay
0634b1f28c
Extract trivial extern type alias detection to module
2020-12-20 21:12:11 -08:00
David Tolnay
ee20544e01
Merge trivial detection loops over function apis
2020-12-20 20:41:32 -08:00
David Tolnay
93fcfa401f
Rearrange trivial reason detection
2020-12-20 20:38:20 -08:00
David Tolnay
d0a6c0b575
Condense name of unpinned mutable arg trivial reason
2020-12-20 20:37:56 -08:00
David Tolnay
b725d5a933
Touch up PR 550
2020-12-20 20:29:47 -08:00
David Tolnay
12b4a16198
Merge pull request #550 from adetaylor/no-pin-trivial-2
...
Allow un-pinned Trivial extern types to be passed by reference as arguments
2020-12-20 20:25:09 -08:00
David Tolnay
06183a751f
Merge pull request 586 from dtolnay/c_str
...
Add c_str() member function for rust::String
2020-12-20 00:27:45 -08:00
David Tolnay
8bc83389f1
Add String c_str test
2020-12-18 12:54:47 -08:00
David Tolnay
cca2e616e0
Add c_str() member function for rust::String
2020-12-18 12:49:56 -08:00
David Tolnay
3077818a1f
Release 1.0.19
1.0.19
2020-12-18 11:27:27 -08:00
David Tolnay
917bb6f96e
Lockfile update
2020-12-18 11:27:14 -08:00
David Tolnay
40319b4ab3
Merge pull request #585 from dtolnay/mut
...
Consider mut receiver for allowing mut C++ return type
2020-12-18 11:16:11 -08:00
David Tolnay
a020d10143
Consider mut receiver for allowing mut C++ return type
2020-12-18 11:04:18 -08:00
David Tolnay
515ba1b420
Test some C++ member functions returning references
2020-12-18 11:04:18 -08:00
David Tolnay
b03d41d5d4
Remove unneeded Unpin import
...
Unpin is always available via the std prelude.
2020-12-16 10:18:29 -08:00
David Tolnay
83cbe894dc
Remove shared_ptr from pending bindings table since it is done
2020-12-14 01:50:25 -08:00
David Tolnay
8d6f7710f1
Reflect generalized Slice support in table on website
2020-12-14 01:44:49 -08:00
David Tolnay
d167e20c71
Merge pull request #582 from dtolnay/fused
...
Mark CxxVector iterator as FusedIterator
2020-12-13 16:38:46 -08:00
David Tolnay
526faa2214
Mark CxxVector iterator as FusedIterator
...
The contract is that once it's returned None, it is guaranteed to
continue returning None as many time as called again.
2020-12-13 16:21:02 -08:00
David Tolnay
4429a9e50c
Merge pull request #581 from dtolnay/exactsize
...
Make CxxVector's iterator an ExactSizeIterator
2020-12-13 16:20:52 -08:00
David Tolnay
0f3d3b542e
Set iterator size hint for OrderedSet iteration
2020-12-13 16:08:19 -08:00
David Tolnay
724ac7581e
Make CxxVector's iterator an ExactSizeIterator
2020-12-13 16:08:19 -08:00
David Tolnay
ab3238ca8d
Release 1.0.18
1.0.18
2020-12-13 16:02:02 -08:00
David Tolnay
9b7f3dfe11
Merge pull request #580 from dtolnay/vector
...
Expose public vector module
2020-12-12 23:51:46 -08:00
David Tolnay
b5d039c448
Expose public vector module
2020-12-12 23:29:53 -08:00
David Tolnay
d854ea03fd
Merge pull request #579 from dtolnay/module
...
Shorten name of string and vector modules
2020-12-12 23:24:33 -08:00
David Tolnay
bac25829d1
Shorten name of string and vector modules
2020-12-12 23:14:01 -08:00
David Tolnay
be3cbf7694
Use integer standard library types from std namespace
...
The implementation is not required to define these types in the global
namespace.
2020-12-12 22:16:01 -08:00
David Tolnay
08679aeae2
Include cstddef for std::ptrdiff_t in iterator difference_type
2020-12-12 22:10:01 -08:00
David Tolnay
74dd66f781
Import sys/types.h for ssize_t
...
Previously the header file generated for the following bridge did not
compile.
#[cxx::bridge]
mod ffi {
struct S {
x: isize,
}
}
example-ecfac19134395bcc/out/cxxbridge/sources/example/src/main.rs.cc:15:15: error: ‘ssize_t’ does not name a type
15 | using isize = ssize_t;
| ^~~~~~~
example-ecfac19134395bcc/out/cxxbridge/sources/example/src/main.rs.cc:26:11: error: ‘isize’ in namespace ‘rust’ does not name a type
26 | ::rust::isize x;
| ^~~~~
2020-12-12 22:03:58 -08:00
David Tolnay
1e784a3487
Add aliases for the Rust numeric primitives
2020-12-12 21:34:52 -08:00
David Tolnay
8192e1b848
Merge pull request #576 from dtolnay/size_t
...
Document and static assert assumptions on size_t layout
2020-12-12 21:31:13 -08:00
David Tolnay
03c43f56f0
Document and static assert assumptions on size_t size
2020-12-12 21:11:16 -08:00
David Tolnay
2e637d96d1
Format with clang-format 10
2020-12-12 21:08:01 -08:00
David Tolnay
5f702bbc84
Express Slice documentation using concepts requires clause
2020-12-12 17:15:44 -08:00
David Tolnay
439ed0b91a
Remove unneeded self check in Box<T>::operator=
...
As long as T's operator= correctly handles self assignment, this logic
is correct without the additional check.
2020-12-12 17:01:06 -08:00
David Tolnay
448624173c
Merge pull request #574 from dtolnay/box
...
Free Box allocation on T constructor exception
2020-12-12 16:52:20 -08:00
David Tolnay
f448e20075
Hide raw alloc/dealloc functions
2020-12-12 16:42:45 -08:00
David Tolnay
e7d662d51d
Free Box allocation on T constructor exception
2020-12-12 16:38:22 -08:00