diff --git a/Cargo.toml b/Cargo.toml index b256777cc..6ef637988 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,9 @@ exclude = [ ".github", "book", "tools" ] # where we are depending on such features. resolver = "2" +[features] +arbitrary_self_types = [] + [dependencies] autocxx-macro = { path="macro", version="0.26.0" } cxx = "1.0.78" # ... also needed because expansion of type_id refers to ::cxx diff --git a/build.rs b/build.rs index b2de2dc86..637daf464 100644 --- a/build.rs +++ b/build.rs @@ -9,6 +9,7 @@ // It would be nice to use the rustversion crate here instead, // but that doesn't work with inner attributes. fn main() { + println!("cargo::rustc-check-cfg=cfg(nightly)"); if let Some(ver) = rustc_version() { if ver.contains("nightly") { println!("cargo:rustc-cfg=nightly") diff --git a/integration-tests/build.rs b/integration-tests/build.rs new file mode 100644 index 000000000..e912ac14f --- /dev/null +++ b/integration-tests/build.rs @@ -0,0 +1,12 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + println!("cargo::rustc-check-cfg=cfg(skip_windows_gnu_failing_tests)"); + println!("cargo::rustc-check-cfg=cfg(skip_windows_msvc_failing_tests)"); +} diff --git a/src/reference_wrapper.rs b/src/reference_wrapper.rs index 041bd7277..529f070be 100644 --- a/src/reference_wrapper.rs +++ b/src/reference_wrapper.rs @@ -412,7 +412,7 @@ impl CppPin { // to // Box> // is safe. - let contents = unsafe { std::mem::transmute(item) }; + let contents = unsafe { std::mem::transmute::, Box>>(item) }; Self(contents) }