diff --git a/sus/ptr/nonnull.h b/sus/ptr/nonnull.h index 7b5c5c9c2..0e22424fb 100644 --- a/sus/ptr/nonnull.h +++ b/sus/ptr/nonnull.h @@ -30,11 +30,15 @@ namespace sus::ptr { /// A pointer wrapper which holds a never-null pointer. /// -/// A NonNull can not be implicitly created from an array, as that would throw +/// A `NonNull` can not be implicitly created from an array, as that would throw /// away the length information. Explicitly cast to a pointer to use NonNull /// with an array. /// -/// The NonNull type is trivially copyable and moveable. +/// The `NonNull` type is trivially copyable and moveable. +/// +/// `NonNull` satisifes the [`NeverValueField`]($sus::mem::NeverValueField), so +/// [`Option>`]($sus::option::Option) has the same size as `NonNull`, +/// similar to [`Option`]($sus::option::Option). /// /// TODO: Make a NonNullArray type? https://godbolt.org/z/3vW3xsz5h template @@ -89,13 +93,6 @@ class [[sus_trivial_abi]] NonNull { template static constexpr inline NonNull from(U (&t)[N]) = delete; - /// `NonNull` is `Copy`, so this is the copy constructor. - /// #[doc.overloads=ctor.copy] - NonNull(const NonNull&) = default; - /// `NonNull` is `Copy`, so this is the copy assignment operator. - /// #[doc.overloads=assign.copy] - NonNull& operator=(const NonNull&) = default; - /// Gives access to the object pointed to by NonNull. /// /// Mutable access is only given is NonNull is not const and the pointer diff --git a/tools/run_subdoc.sh b/tools/run_subdoc.sh index 30e754512..8dc1226b8 100755 --- a/tools/run_subdoc.sh +++ b/tools/run_subdoc.sh @@ -11,4 +11,4 @@ out/subdoc/subdoc -p out --out docs \ --project-logo logo.png \ --project-name Subspace \ --ignore-bad-code-links \ - i8_unittest + i8_unittest $*