diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-04-03 22:55:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-03 22:55:02 +0200 |
| commit | 9b22fdc121abfd860e2b7c753aa254f2bf29a1a8 (patch) | |
| tree | 31dbf4ff88f7c4d9a709ee1643761f9294c1ee88 /src/libcore/ptr/const_ptr.rs | |
| parent | f6fe99c798cb65280a9a56f442b371adcb7b8aa2 (diff) | |
| parent | c8312659403397c9fe4fcb2fd006268a7031d7a8 (diff) | |
| download | rust-9b22fdc121abfd860e2b7c753aa254f2bf29a1a8.tar.gz rust-9b22fdc121abfd860e2b7c753aa254f2bf29a1a8.zip | |
Rollup merge of #69860 - faern:use-assoc-int-consts, r=dtolnay
Use associated numeric consts in documentation Now when the associated constants on int/float types are stabilized and the recommended way of accessing said constants (#68952). We can start using it in this repository, and recommend it via documentation example code. This PR is the reincarnation of #67913 minus the actual adding + stabilization of said constants. (EDIT: Now it's only changing the documentation. So users will see the new consts, but we don't yet update the internal code) Because of how fast bit rot happens to PRs that touch this many files, it does not try to replace 100% of the old usage of the constants in the entire repo, but a good chunk of them.
Diffstat (limited to 'src/libcore/ptr/const_ptr.rs')
| -rw-r--r-- | src/libcore/ptr/const_ptr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr/const_ptr.rs b/src/libcore/ptr/const_ptr.rs index a540016854d..52e224d2a02 100644 --- a/src/libcore/ptr/const_ptr.rs +++ b/src/libcore/ptr/const_ptr.rs @@ -659,8 +659,8 @@ impl<T: ?Sized> *const T { /// `align`. /// /// If it is not possible to align the pointer, the implementation returns - /// `usize::max_value()`. It is permissible for the implementation to *always* - /// return `usize::max_value()`. Only your algorithm's performance can depend + /// `usize::MAX`. It is permissible for the implementation to *always* + /// return `usize::MAX`. Only your algorithm's performance can depend /// on getting a usable offset here, not its correctness. /// /// The offset is expressed in number of `T` elements, and not bytes. The value returned can be |
