diff options
| author | Brian Anderson <banderson@mozilla.com> | 2016-09-22 01:30:30 +0000 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2016-10-02 14:52:15 -0700 |
| commit | 29e0235415a42299e4a7467c5edb09a159ec680e (patch) | |
| tree | a23455cc0251918edc2fe61d76da9da9ac5a7a07 /src/libstd/sync/mpsc | |
| parent | 0fb8379ed86f15943e87721f73165138598d19cc (diff) | |
| download | rust-29e0235415a42299e4a7467c5edb09a159ec680e.tar.gz rust-29e0235415a42299e4a7467c5edb09a159ec680e.zip | |
Add a platform-abstraction tidy script
This is intended to maintain existing standards of code organization in hopes that the standard library will continue to be refactored to isolate platform-specific bits, making porting easier; where "standard library" roughly means "all the dependencies of the std and test crates". This generally means placing restrictions on where `cfg(unix)`, `cfg(windows)`, `cfg(target_os)` and `cfg(target_env)` may appear, the basic objective being to isolate platform-specific code to the platform-specific `std::sys` modules, and to the allocation, unwinding, and libc crates. Following are the basic rules, though there are currently exceptions: - core may not have platform-specific code - liballoc_system may have platform-specific code - liballoc_jemalloc may have platform-specific code - libpanic_abort may have platform-specific code - libpanic_unwind may have platform-specific code - other crates in the std facade may not - std may have platform-specific code in the following places - sys/unix/ - sys/windows/ - os/ There are plenty of exceptions today though, noted in the whitelist.
Diffstat (limited to 'src/libstd/sync/mpsc')
| -rw-r--r-- | src/libstd/sync/mpsc/select.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs index 91896e1ab85..e056a350815 100644 --- a/src/libstd/sync/mpsc/select.rs +++ b/src/libstd/sync/mpsc/select.rs @@ -366,8 +366,8 @@ impl<'rx, T:Send+'rx> fmt::Debug for Handle<'rx, T> { } } -#[cfg(all(test, not(target_os = "emscripten")))] #[allow(unused_imports)] +#[cfg(all(test, not(target_os = "emscripten")))] mod tests { use thread; use sync::mpsc::*; |
