Skip to content

Conversation

@dtolnay
Copy link
Owner

@dtolnay dtolnay commented Sep 18, 2025

Closes #1645.

    In file included from /usr/include/c++/13/vector:65,
                     from target/debug/build/cxx-test-suite-fd93725a6af072af/out/cxxbridge/include/rust/cxx.h:16,
                     from target/debug/build/cxx-test-suite-fd93725a6af072af/out/cxxbridge/crate/tests/ffi/tests.h:2,
                     from target/debug/build/cxx-test-suite-fd93725a6af072af/out/cxxbridge/sources/tests/ffi/lib.rs.cc:1:
    /usr/include/c++/13/bits/stl_uninitialized.h: In instantiation of 'constexpr bool std::__check_constructible() [with _ValueType = tests::Unmovable; _Tp = tests::Unmovable&&]':
    /usr/include/c++/13/bits/stl_uninitialized.h:182:4:   required from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = move_iterator<tests::Unmovable*>; _ForwardIterator = tests::Unmovable*]'
    /usr/include/c++/13/bits/stl_uninitialized.h:373:37:   required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = move_iterator<tests::Unmovable*>; _ForwardIterator = tests::Unmovable*; _Tp = tests::Unmovable]'
    /usr/include/c++/13/bits/stl_vector.h:1622:35:   required from 'std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = std::move_iterator<tests::Unmovable*>; _Tp = tests::Unmovable; _Alloc = std::allocator<tests::Unmovable>; pointer = tests::Unmovable*; size_type = long unsigned int]'
    /usr/include/c++/13/bits/vector.tcc:86:36:   required from 'void std::vector<_Tp, _Alloc>::reserve(size_type) [with _Tp = tests::Unmovable; _Alloc = std::allocator<tests::Unmovable>; size_type = long unsigned int]'
    target/debug/build/cxx-test-suite-fd93725a6af072af/out/cxxbridge/sources/tests/ffi/lib.rs.cc:2829:13:   required from here
    /usr/include/c++/13/bits/stl_uninitialized.h:90:56: error: static assertion failed: result type must be constructible from input type
       90 |       static_assert(is_constructible<_ValueType, _Tp>::value,
          |                                                        ^~~~~
    /usr/include/c++/13/bits/stl_uninitialized.h:90:56: note: 'std::integral_constant<bool, false>::value' evaluates to false
@dtolnay dtolnay merged commit a1a9c9a into master Sep 18, 2025
47 checks passed
@dtolnay dtolnay deleted the vectorreserve branch September 18, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use C++ type with no move constructor since 1.0.168

2 participants