Skip to content

Commit 6aa9501

Browse files
committed
Touch up tests of std::span -> rust::Slice deduction
1 parent 5702ef8 commit 6aa9501

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/ffi/tests.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -943,19 +943,19 @@ extern "C" const char *cxx_run_test() noexcept {
943943
}
944944
#ifdef __cpp_lib_span
945945
{
946-
// std::array<T> -> Slice<T>
946+
// std::span<T> -> Slice<T>
947947
std::array<int, 3> cpp_array{1, 2, 3};
948948
std::span<int> cpp_span(cpp_array);
949-
auto auto_slice_of_cpp_array = rust::Slice(cpp_span);
949+
auto auto_slice_of_cpp_span = rust::Slice(cpp_span);
950950
static_assert(
951-
std::is_same_v<decltype(auto_slice_of_cpp_array), rust::Slice<int>>);
951+
std::is_same_v<decltype(auto_slice_of_cpp_span), rust::Slice<int>>);
952952
}
953953
{
954-
// const std::array<T> -> Slice<const T>
954+
// std::span<const T> -> Slice<const T>
955955
const std::array<int, 3> cpp_array{1, 2, 3};
956956
std::span<const int> cpp_span(cpp_array);
957-
auto auto_slice_of_cpp_array = rust::Slice(cpp_span);
958-
static_assert(std::is_same_v<decltype(auto_slice_of_cpp_array),
957+
auto auto_slice_of_cpp_span = rust::Slice(cpp_span);
958+
static_assert(std::is_same_v<decltype(auto_slice_of_cpp_span),
959959
rust::Slice<const int>>);
960960
}
961961
#endif // __cpp_lib_span

0 commit comments

Comments
 (0)