Skip to content

Commit 8682a86

Browse files
committed
Improve documentation of Volatile::new
1 parent 93e7150 commit 8682a86

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ impl<R> Volatile<R> {
5353
///
5454
/// While it is possible to construct `Volatile` instances from arbitrary values (including
5555
/// non-reference values), most of the methods are only available when the wrapped type is
56-
/// a reference. There are also special methods for some valus, for example slicing methods
57-
/// if the wrapped value is a slice.
56+
/// a reference. The only reason that we don't forbid non-reference types in the constructor
57+
/// functions is that the Rust compiler does not support trait bounds on generic `const`
58+
/// functions yet. When this becomes possible, we will release a new version of this library
59+
/// with removed support for non-references. For these reasons it is not recommended to use
60+
/// the `Volatile` type only with references.
5861
///
5962
/// ## Example
6063
///

0 commit comments

Comments
 (0)