Skip to content

Commit

Permalink
Improve documentation of Volatile::new
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-opp committed Jul 31, 2020
1 parent 28dc857 commit 6b9eaff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ impl<R> Volatile<R> {
///
/// While it is possible to construct `Volatile` instances from arbitrary values (including
/// non-reference values), most of the methods are only available when the wrapped type is
/// a reference. There are also special methods for some valus, for example slicing methods
/// if the wrapped value is a slice.
/// a reference. The only reason that we don't forbid non-reference types in the constructor
/// functions is that the Rust compiler does not support trait bounds on generic `const`
/// functions yet. When this becomes possible, we will release a new version of this library
/// with removed support for non-references. For these reasons it is not recommended to use
/// the `Volatile` type only with references.
///
/// ## Example
///
Expand Down

0 comments on commit 6b9eaff

Please sign in to comment.