Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with very_unstable feature #45

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unreleased

- Add implementations for `fmt::Pointer`, `PartialEq`, `Eq`, `PartialOrd`, `Ord` and `Hash`.
- Update `very_unstable` feature to latest nightly

# 0.5.1 – 2023-06-24

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@
//! [in the `unsafe-code-guidelines` repository](https://github.com/rust-lang/unsafe-code-guidelines/issues/411).

#![no_std]
#![cfg_attr(feature = "unstable", feature(core_intrinsics))]

Check warning on line 35 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (very_unstable)

the feature `core_intrinsics` is internal to the compiler or standard library

Check warning on line 35 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (very_unstable)

the feature `core_intrinsics` is internal to the compiler or standard library

Check warning on line 35 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (unstable)

the feature `core_intrinsics` is internal to the compiler or standard library

Check warning on line 35 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (unstable)

the feature `core_intrinsics` is internal to the compiler or standard library

Check warning on line 35 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (very_unstable)

the feature `core_intrinsics` is internal to the compiler or standard library

Check warning on line 35 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (very_unstable)

the feature `core_intrinsics` is internal to the compiler or standard library

Check warning on line 35 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (unstable)

the feature `core_intrinsics` is internal to the compiler or standard library

Check warning on line 35 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (unstable)

the feature `core_intrinsics` is internal to the compiler or standard library
#![cfg_attr(feature = "unstable", feature(slice_range))]
#![cfg_attr(feature = "unstable", feature(slice_ptr_get))]
#![cfg_attr(feature = "very_unstable", feature(const_trait_impl))]
#![cfg_attr(feature = "very_unstable", feature(unboxed_closures))]
#![cfg_attr(feature = "very_unstable", feature(fn_traits))]
#![cfg_attr(feature = "very_unstable", feature(effects))]
#![warn(missing_docs)]
#![deny(unsafe_op_in_unsafe_fn)]

Expand Down
4 changes: 2 additions & 2 deletions src/volatile_ptr/very_unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ where
/// The safety requirements of [`Self::map`] apply to this method too.
pub const unsafe fn map_const<F, U>(self, f: F) -> VolatilePtr<'a, U, A>
where
F: ~const FnOnce(NonNull<T>) -> NonNull<U>,
F: FnOnce(NonNull<T>) -> NonNull<U>,
U: ?Sized,
{
unsafe { VolatilePtr::new_generic(f(self.pointer)) }
Expand All @@ -36,7 +36,7 @@ impl<'a, T, A> VolatilePtr<'a, [T], A> {
struct Mapper {
index: usize,
}
impl<T> const FnOnce<(NonNull<[T]>,)> for Mapper {
impl<T> FnOnce<(NonNull<[T]>,)> for Mapper {
type Output = NonNull<T>;

extern "rust-call" fn call_once(self, (slice,): (NonNull<[T]>,)) -> Self::Output {
Expand Down
Loading