Skip to content

Commit

Permalink
Fix build with very_unstable feature
Browse files Browse the repository at this point in the history
(untested)
  • Loading branch information
phil-opp committed Mar 22, 2024
1 parent ef6eb83 commit 6a05a2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#![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

0 comments on commit 6a05a2e

Please sign in to comment.