about summary refs log tree commit diff
path: root/src/libcore/sync
diff options
context:
space:
mode:
authorStjepan Glavina <stjepang@gmail.com>2017-03-30 16:08:13 +0200
committerStjepan Glavina <stjepang@gmail.com>2017-03-30 16:10:55 +0200
commit3fa28cc11eb5559b169f0d2fc7523f933e188e13 (patch)
tree439044e655481cd82953e026f61ba8d8cf007b19 /src/libcore/sync
parentc6df67afca788453a3c494899fbf5295992bcfba (diff)
downloadrust-3fa28cc11eb5559b169f0d2fc7523f933e188e13.tar.gz
rust-3fa28cc11eb5559b169f0d2fc7523f933e188e13.zip
Add a note about overflow for fetch_add/fetch_sub
Diffstat (limited to 'src/libcore/sync')
-rw-r--r--src/libcore/sync/atomic.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
index 743e3c41170..cde98a67036 100644
--- a/src/libcore/sync/atomic.rs
+++ b/src/libcore/sync/atomic.rs
@@ -1171,6 +1171,8 @@ macro_rules! atomic_int {
 
             /// Add to the current value, returning the previous value.
             ///
+            /// This operation wraps around on overflow.
+            ///
             /// # Examples
             ///
             /// ```
@@ -1188,6 +1190,8 @@ macro_rules! atomic_int {
 
             /// Subtract from the current value, returning the previous value.
             ///
+            /// This operation wraps around on overflow.
+            ///
             /// # Examples
             ///
             /// ```