diff options
| author | Stjepan Glavina <stjepang@gmail.com> | 2017-03-30 16:08:13 +0200 |
|---|---|---|
| committer | Stjepan Glavina <stjepang@gmail.com> | 2017-03-30 16:10:55 +0200 |
| commit | 3fa28cc11eb5559b169f0d2fc7523f933e188e13 (patch) | |
| tree | 439044e655481cd82953e026f61ba8d8cf007b19 /src/libcore/sync | |
| parent | c6df67afca788453a3c494899fbf5295992bcfba (diff) | |
| download | rust-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.rs | 4 |
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 /// /// ``` |
