Skip to content

Add a remark about the implicit implementation of Send and make a test for it #28314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ impl Default for AtomicBool {
}
}

// Send is implicitly implemented for AtomicBool.
unsafe impl Sync for AtomicBool {}

/// A signed integer type which can be safely shared between threads.
Expand All @@ -106,6 +107,7 @@ impl Default for AtomicIsize {
}
}

// Send is implicitly implemented for AtomicIsize.
unsafe impl Sync for AtomicIsize {}

/// An unsigned integer type which can be safely shared between threads.
Expand All @@ -120,6 +122,7 @@ impl Default for AtomicUsize {
}
}

// Send is implicitly implemented for AtomicUsize.
unsafe impl Sync for AtomicUsize {}

/// A raw pointer type which can be safely shared between threads.
Expand Down