Commit Graph

2943 Commits

Author SHA1 Message Date
David Tolnay
35f4b680f2
Update ui test suite to nightly-2022-09-27 2022-09-26 22:00:21 -07:00
David Tolnay
f014282770
Exclude buck-out from being watched by watchman 2022-09-21 09:01:49 -07:00
David Tolnay
8931be52a0
Raise minimum tested toolchain to rust 1.56.1
Required by the transitive dev-dependency on once_cell.

    error: failed to parse manifest at github.com-1ecc6299db9ec823/once_cell-1.15.0/Cargo.toml

    Caused by:
      feature `edition2021` is required

      The package requires the Cargo feature called `edition2021`, but that feature is not stabilized in this version of Cargo (1.55.0 (32da73ab1 2021-08-23)).
      Consider trying a newer version of Cargo (this may require the nightly release).
      See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2021 for more information about the status of this feature.
2022-09-20 22:38:04 -07:00
David Tolnay
4e96c36aac
Release 1.0.76 2022-09-19 10:36:53 -07:00
David Tolnay
6e25fbc313
Lockfile update 2022-09-19 10:35:59 -07:00
David Tolnay
f2aecb0ae5
Merge pull request #1099 from dtolnay/vecarray
Allow Rust vector of array of trivially relocatable type
2022-09-19 10:33:54 -07:00
David Tolnay
072fd4f0a3
Allow Rust vector of array of trivially relocatable type 2022-09-19 10:25:31 -07:00
David Tolnay
83075824a4
Remove default package.readme metadata from Cargo.toml
Since cargo 1.46.0, README.md is recognized by default.
2022-09-14 09:15:58 -07:00
David Tolnay
b6e97c824d
Update ui test suite to nightly-2022-09-07 2022-09-06 23:58:47 -07:00
David Tolnay
ed1852df1f
Merge pull request #1093 from dtolnay/jsonexample
Fix missing <string> include in std::string example
2022-09-02 21:13:22 -07:00
David Tolnay
96606d570e
Fix missing <string> include in std::string example
The previous code works in _some_ STL implementations, namely if
_either_ of the following is true:

    1. At least one of the other four STL headers included by json.h
       transitively includes <string>, as opposed to just <stringfwd.h>; or

    2. The way std::variant is implemented does not require knowing the
       inner types' type traits when just naming the std::variant
       without yet instantiating any of its member function templates.

On other STL implementations in which neither of the above is true, this
example failed to build with an error such as:

    In file included from target/debug/build/example-d2d484e0c793273c/out/cxxbridge/sources/example/src/main.rs.cc:1:
    In file included from target/debug/build/example-d2d484e0c793273c/out/cxxbridge/crate/example/include/json.h:2:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/map:60:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_tree.h:63:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_algobase.h:64:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_pair.h:59:
    In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/move.h:57:
    /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/type_traits:1339:23: error: implicit instantiation of undefined template 'std::basic_string<char>'
                        __bool_constant<__has_trivial_destructor(_Tp)>>
                                        ^
    /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/type_traits:3214:5: note: in instantiation of template class 'std::is_trivially_destructible<std::basic_string<char>>' requested here
        is_trivially_destructible<_Tp>::value;
        ^
    /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/variant:299:5: note: in instantiation of variable template specialization 'std::is_trivially_destructible_v<std::basic_string<char>>' requested here
              (is_trivially_destructible_v<_Types> && ...);
               ^
    /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/variant:308:4: note: in instantiation of static data member 'std::__detail::__variant::_Traits<std::monostate, double, std::basic_string<char>, std::vector<json>, std::map<std::basic_string<char>, json>>::_S_trivial_dtor' requested here
              _S_trivial_dtor && _S_trivial_move_ctor
              ^
    /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/variant:689:45: note: in instantiation of static data member 'std::__detail::__variant::_Traits<std::monostate, double, std::basic_string<char>, std::vector<json>, std::map<std::basic_string<char>, json>>::_S_trivial_move_assign' requested here
          _Move_assign_base<_Traits<_Types...>::_S_trivial_move_assign, _Types...>;
                                                ^
    /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/variant:692:28: note: in instantiation of template type alias '_Move_assign_alias' requested here
        struct _Variant_base : _Move_assign_alias<_Types...>
                               ^
    /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/variant:1318:15: note: in instantiation of template class 'std::__detail::__variant::_Variant_base<std::monostate, double, std::basic_string<char>, std::vector<json>, std::map<std::basic_string<char>, json>>' requested here
        : private __detail::__variant::_Variant_base<_Types...>,
                  ^
    target/debug/build/example-d2d484e0c793273c/out/cxxbridge/crate/example/include/json.h:33:63: note: in instantiation of template class 'std::variant<std::monostate, double, std::basic_string<char>, std::vector<json>, std::map<std::basic_string<char>, json>>' requested here
      std::variant<std::monostate, number, string, array, object> value;
                                                                  ^
    /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stringfwd.h:74:11: note: template is declared here
        class basic_string;
              ^
2022-09-02 21:04:02 -07:00
David Tolnay
851716f7e9
GitHub Workflows security hardening 2022-09-02 15:09:28 -07:00
David Tolnay
0293ff50cf
Release 1.0.75 2022-09-02 14:33:59 -07:00
David Tolnay
bd8907bf42
Lockfile update 2022-09-02 14:28:56 -07:00
David Tolnay
ce7c5c467b
Make SharedPtr Unpin like UniquePtr 2022-09-02 14:27:26 -07:00
David Tolnay
a14eb80ced
Move Unpin impl near Drop impl
These traits are closely related. The meaning of Pin<P> when P isn't
Unpin is that in between when P ends up in the pin and when P's Drop
impl begins running, it must not be moved. Moving before the pin, or
moving from within drop once the Drop impl is in progress, are fine.
2022-09-02 14:23:29 -07:00
David Tolnay
9a84aa559f
Touch up UniquePtr Unpin explanation 2022-09-02 14:22:08 -07:00
David Tolnay
c59c685f61
Merge pull request #1091 from LeonMatthesKDAB/unpin-uniqueptr
Add Unpin impl for UniquePtr.
2022-09-02 14:20:29 -07:00
Leon Matthes
f4ae0f1dfd Add Unpin impl for UniquePtr.
Similar to a std::boxed::Box, a UniquePtr itself can be Unpin, even if
its target is not Unpin.
As UniquePtr is not a self-referential type, this is safe to do.

See:
- https://doc.rust-lang.org/std/pin/index.html#unpin
- https://doc.rust-lang.org/std/boxed/struct.Box.html#impl-Unpin
2022-09-02 10:13:21 +02:00
David Tolnay
b66e95a0c8
Merge pull request #1090 from geekbrother/geekbrother-add-repo
[docs] Add `geekbrother/cxx-corrosion-cmake` repo to the CMake docs.
2022-09-01 19:18:54 -07:00
Max Kalashnikoff
42da9b299d
Add geekbrother/cxx-corrosion-cmake repo to the CMake docs.
Update the CMake docs repositories list with the `geekbrother/cxx-corrosion-cmake` repository.
2022-09-01 17:39:26 +02:00
David Tolnay
a1e1983740
Add build-dependencies keyword for cxx-build
Notably the cc crate uses this keyword.
2022-08-30 22:53:44 -07:00
David Tolnay
77c2133048
Add 'c++' keywords 2022-08-30 22:53:09 -07:00
David Tolnay
02e9a4795d
Release 1.0.74 2022-08-30 15:53:14 -07:00
David Tolnay
15f8e6719a
Lockfile update 2022-08-30 15:49:03 -07:00
David Tolnay
f1c65108ce
Merge pull request #1087 from dtolnay/windows
Fix cxx-build on Windows when `target` dir is populated from a cache with dangling symlinks
2022-08-30 15:41:41 -07:00
David Tolnay
6d78b8ed2e
Fix Windows "access is denied" removing a dangling symlink 2022-08-30 15:32:27 -07:00
David Tolnay
c4ee13ebc3
Fix Windows "filename, directory name, or volume label syntax is incorrect" 2022-08-30 14:21:44 -07:00
David Tolnay
bc6c82da7a
Touch up PR 1086 2022-08-29 13:47:31 -07:00
David Tolnay
eefe8eaf2b
Merge pull request #1086 from paandahl/add-cmake-example
Added another CMake example application
2022-08-29 13:46:32 -07:00
Preben Aandahl
546241a3b7 Added a CMake example application 2022-08-28 13:58:15 +02:00
David Tolnay
c620b89223
Update ui test suite to nightly-2022-08-23 2022-08-22 23:04:16 -07:00
David Tolnay
cd233d20d1
Revert "Avoid cargo 1.45–1.50 in GitHub Actions"
This reverts commit ac9b4c4cb3.
2022-08-20 21:08:12 -07:00
David Tolnay
6a22b1899c
Update ui test suite to nightly-2022-08-16 2022-08-15 22:14:47 -07:00
David Tolnay
ac9b4c4cb3
Avoid cargo 1.45–1.50 in GitHub Actions
These versions are incompatible with packages published by a recent Cargo
2022-08-08 23:11:17 -07:00
David Tolnay
a6608495d1
Release 1.0.73 2022-08-01 17:10:57 -07:00
David Tolnay
0641ed2b77
Lockfile update 2022-08-01 17:05:31 -07:00
David Tolnay
cf54e49278
Update bazel and buck srcs globs to refer only to .rs files 2022-08-01 16:57:09 -07:00
David Tolnay
db68a70fb1
Add categories to crates.io metadata 2022-08-01 00:06:45 -07:00
David Tolnay
e90c016afc
Add authors to Cargo.toml 2022-07-31 19:25:46 -07:00
David Tolnay
5561bda12c
Sort package entries in Cargo.toml 2022-07-31 19:19:02 -07:00
David Tolnay
5567fdf2cf
Ignore assertions_on_result_states clippy lint
error: called `assert!` with `Result::is_err`
       --> tests/test.rs:258:5
        |
    258 |     assert!(unique_ptr.pin_mut().get_fail().is_err());
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `unique_ptr.pin_mut().get_fail().unwrap_err()`
        |
        = note: `-D clippy::assertions-on-result-states` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
2022-07-29 22:12:07 -07:00
David Tolnay
85f0b88f87
Update ui test suite to nightly-2022-07-26 2022-07-25 21:11:12 -07:00
David Tolnay
9e0d3680be
Release 1.0.72 2022-07-16 20:12:42 -07:00
David Tolnay
27fa3b3118
Lockfile update 2022-07-16 20:11:28 -07:00
David Tolnay
5399116128
Raise minimum tested toolchain to rust 1.57
Required by the transitive dependency on os_str_bytes:

    error: package `os_str_bytes v6.2.0` cannot be built because it
    requires rustc 1.57.0 or newer, while the currently active rustc
    version is 1.56.1
2022-07-16 20:08:36 -07:00
David Tolnay
02d2600ebc
Resolve unused_must_use warning inside generated code
warning: unused return value of `Box::<T>::from_raw` that must be used
       --> tests/ffi/lib.rs:337:22
        |
    337 |     impl Box<Shared> {}
        |                      ^^
        |
        = note: `#[warn(unused_must_use)]` on by default
        = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`

    warning: unused return value of `Box::<T>::from_raw` that must be used
      --> tests/ffi/lib.rs:72:27
       |
    72 |         second: Box<Second>,
       |                           ^
       |
       = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`

    warning: unused return value of `Box::<T>::from_raw` that must be used
      --> tests/ffi/lib.rs:99:35
       |
    99 |         fn c_return_box() -> Box<R>;
       |                                   ^
       |
       = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
2022-07-16 20:03:45 -07:00
David Tolnay
1862c5dad5
Update ui test suite to nightly-2022-07-07 2022-07-06 21:06:56 -07:00
David Tolnay
2e1527c834
Release 1.0.71 2022-07-06 07:19:36 -07:00
David Tolnay
08eef74de3
Lockfile update 2022-07-06 07:19:10 -07:00