cxx-test-suite-2b81d5f39edd0bcf/out/cxxbridge/include/rust/cxx.h:559:11: error: invalid static_cast from type ‘char*’ to type ‘const unsigned char*’
559 | return *static_cast<T *>(pos);
| ^~~~~~~~~~~~~~~~~~~~~
Doing a reinterpret_cast<> instead matches what is done a few lines
above by Slice<T>::operator[].
warning: methods called `as_*` usually take self by reference or self by mutable reference; consider choosing a less ambiguous name
--> src/cxx_vector.rs:130:25
|
130 | pub fn as_mut_slice(self: Pin<&mut Self>) -> &mut [T]
| ^^^^
|
= note: `#[warn(clippy::wrong_self_convention)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
Previously:
error[E0034]: multiple applicable items in scope
--> src/main.rs:39:20
|
39 | let _ = vector.get_mut(0);
| ^^^^^^^ multiple `get_mut` found
|
= note: candidate #1 is defined in an impl for the type `Pin<&'a mut T>`
= note: candidate #2 is defined in an impl for the type `CxxVector<T>`
This results in slightly less noise when code generation produces an
error during a Cargo build.
Before:
process didn't exit successfully: `/git/example-cxx/target/debug/build/example-f20ef12178a95a23/build-script-build` (exit code: 1)
--- stdout
cargo:CXXBRIDGE_PREFIX=example
cargo:CXXBRIDGE_DIR0=/git/example-cxx/target/debug/build/example-188c8410ffc8bb7d/out/cxxbridge/include
cargo:CXXBRIDGE_DIR1=/git/example-cxx/target/debug/build/example-188c8410ffc8bb7d/out/cxxbridge/crate
--- stderr
error[cxxbridge]: extern type with lifetimes is not supported yet
┌─ src/main.rs:9:21
│
9 │ type Object<'a>;
│ ^^ extern type with lifetimes is not supported yet
After:
process didn't exit successfully: `/git/example-cxx/target/debug/build/example-f20ef12178a95a23/build-script-build` (exit code: 1)
--- stderr
error[cxxbridge]: extern type with lifetimes is not supported yet
┌─ src/main.rs:9:21
│
9 │ type Object<'a>;
│ ^^ extern type with lifetimes is not supported yet