Skip to content

Commit

Permalink
Convert to arbitrary_self_types_pointers.
Browse files Browse the repository at this point in the history
arbitrary_self_types has been split into arbitrary_self_types and
arbitrary_self_types_pointers. We need the latter.
  • Loading branch information
adetaylor committed Sep 8, 2024
1 parent 6a54d7c commit ac8a3eb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exclude = [ ".github", "book", "tools" ]
resolver = "2"

[features]
arbitrary_self_types = []
arbitrary_self_types_pointers = []

[dependencies]
autocxx-macro = { path="macro", version="0.27.0" }
Expand Down
2 changes: 1 addition & 1 deletion examples/reference-wrappers/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

// Necessary to be able to call methods on reference wrappers.
// For that reason, this example only builds on nightly Rust.
#![feature(arbitrary_self_types)]
#![feature(arbitrary_self_types_pointers)]

use autocxx::prelude::*;
use std::pin::Pin;
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/tests/cpprefs_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn run_cpprefs_test(
generate_pods: &[&str],
) {
if !arbitrary_self_types_supported() {
// "unsafe_references_wrapped" requires arbitrary_self_types, which requires nightly.
// "unsafe_references_wrapped" requires arbitrary_self_types_pointers, which requires nightly.
return;
}
do_run_test(
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ macro_rules! concrete {
/// them to be wrapped in a `CppRef` type: see [`CppRef`].
/// This only works on nightly Rust because it
/// depends upon an unstable feature
/// (`arbitrary_self_types`). However, it should
/// (`arbitrary_self_types_pointers`). However, it should
/// eliminate all undefined behavior related to Rust's
/// stricter aliasing rules than C++.
#[macro_export]
Expand Down
4 changes: 2 additions & 2 deletions src/reference_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use cxx::{memory::UniquePtrTarget, UniquePtr};
/// As noted, one of the main reasons for this type is to call methods.
/// Unfortunately, that depends on unstable Rust features. If you can't
/// call methods on one of these references, check you're using nightly
/// and add `#![feature(arbitrary_self_types)]` to your crate.
/// and add `#![feature(arbitrary_self_types_pointers)]` to your crate.
///
/// # Lifetimes and cloneability
///
Expand Down Expand Up @@ -566,7 +566,7 @@ impl<T: ?Sized> AsCppMutRef<T> for PhantomReferentMut<T> {
}
}

#[cfg(all(feature = "arbitrary_self_types", test))]
#[cfg(all(feature = "arbitrary_self_types_pointers", test))]
mod tests {
use super::*;

Expand Down

0 comments on commit ac8a3eb

Please sign in to comment.