Skip to content

Commit

Permalink
Merge pull request #1390 from google/nightly-feature
Browse files Browse the repository at this point in the history
Convert to arbitrary_self_types_pointers.
  • Loading branch information
adetaylor authored Sep 8, 2024
2 parents 6a54d7c + ee3b356 commit 657540f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 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
4 changes: 2 additions & 2 deletions 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 All @@ -39,7 +39,7 @@ fn run_cpprefs_test(
None,
"unsafe_references_wrapped",
Some(quote! {
#![feature(arbitrary_self_types)]
#![feature(arbitrary_self_types_pointers)]
}),
)
.unwrap()
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 657540f

Please sign in to comment.