Skip to content

Commit

Permalink
Merge pull request #45 from rust-osdev/fix-very-unstable
Browse files Browse the repository at this point in the history
Fix build with `very_unstable` feature
  • Loading branch information
phil-opp authored Mar 22, 2024
2 parents d2d2239 + 8dfacab commit 595ccf3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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 @@ -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 595ccf3

Please sign in to comment.