about summary refs log tree commit diff
path: root/src/libstd/sync/mpsc/select.rs
AgeCommit message (Collapse)AuthorLines
2019-05-17Remove the unstable and deprecated mpsc_selectJosh Stone-352/+0
This removes macro `select!` and `std::sync::mpsc::{Handle, Select}`, which were all unstable and have been deprecated since 1.32.
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-2/+2
2019-02-28libstd => 2018Taiki Endo-5/+3
2019-02-20Rollup merge of #58553 - scottmcm:more-ihle, r=Centrilkennytm-2/+2
Use more impl header lifetime elision Inspired by seeing explicit lifetimes on these two: - https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator - https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not And a follow-up to https://github.com/rust-lang/rust/pull/54687, that started using IHLE in libcore. Most of the changes in here fall into two big categories: - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm). I also removed two lifetimes that turned out to be completely unused; see https://github.com/rust-lang/rust/issues/41960#issuecomment-464557423
2019-02-17Use more impl header lifetime elisionScott McMurray-2/+2
There are two big categories of changes in here - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-4/+4
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-11Fiddle through the module visibilities for testsOliver Scherer-1/+1
2019-02-11Move out tests of a deprecated module to work around `#[test]` bugsOliver Scherer-414/+0
https://github.com/rust-lang/rust/issues/47238
2019-02-10libs: doc commentsAlexander Regueiro-2/+2
2019-02-10tests: doc commentsAlexander Regueiro-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-08Deprecate channel selectionStjepan Glavina-4/+3
2018-07-10Deny bare trait objects in `src/libstd`.ljedrz-1/+1
2018-04-28stabilize `#[must_use]` for functions and must-use operatorsZack M. Davis-0/+2
This is in the matter of RFC 1940 and tracking issue #43302.
2017-10-09Refactor to use `debug_struct` in several Debug implsMalo Jaffré-16/+2
Fixes #44771.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2016-10-04Rollup merge of #36902 - ollie27:stab_impls, r=alexcrichtonManish Goregaokar-2/+0
std: Correct stability attributes for some implementations These are displayed by rustdoc so should be correct.
2016-10-02Add a platform-abstraction tidy scriptBrian Anderson-1/+1
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.
2016-10-01std: Correct stability attributes for some implementationsOliver Middleton-2/+0
These are displayed by rustdoc so should be correct.
2016-09-30Ignore entire test modules on emscripten instead of individual testsBrian Anderson-12/+1
2016-09-30Ignore lots and lots of std tests on emscriptenBrian Anderson-0/+11
2016-09-18Add missing Eq implementationsGuillaume Gomez-1/+1
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-2/+0
2016-01-26Fix warnings during testsAlex Crichton-1/+1
The deny(warnings) attribute is now enabled for tests so we need to weed out these warnings as well.
2016-01-14std::sync::mpsc: Add fmt::Debug stubsOlaf Buddenhagen-0/+30
Minimal fix for https://github.com/rust-lang/rust/issues/30563 This covers all the public structs I think; except for Iter and IntoIter, which I don't know if or how they should be handled.
2015-08-15std: Add issues to all unstable featuresAlex Crichton-1/+2
2015-08-11Register new snapshotsAlex Crichton-3/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-09Replace many uses of `mem::transmute` with more specific functionsTobias Bucher-3/+2
The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`.
2015-08-03syntax: Implement #![no_core]Alex Crichton-1/+2
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-07-27Show appropriate feature flags in docsSteve Klabnik-2/+4
2015-06-17std: Split the `std_misc` featureAlex Crichton-3/+3
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-1/+1
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-05-05std: update select internals to not use mutable transmutingSean McArthur-11/+19
2015-04-28Register new snapshotsTamir Duberstein-2/+0
2015-04-24Change name of unit test sub-module to "tests".Johannes Oertel-1/+1
Changes the style guidelines regarding unit tests to recommend using a sub-module named "tests" instead of "test" for unit tests as "test" might clash with imports of libtest.
2015-04-13pluralize doc comment verbs and add missing periodsAndrew Paseltiner-2/+2
2015-03-24Added `T:Send` bound to `sync::mpsc::Receiver` and `sync::mpsc::Sender`.Felix S. Klock II-1/+1
This was necessary to avoid specialized `Drop` impls for the two structs.
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+2
2015-03-11Example -> ExamplesSteve Klabnik-1/+1
This brings comments in line with https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#using-markdown
2015-03-02Use `const`s instead of `static`s where appropriateFlorian Zeitz-1/+1
This changes the type of some public constants/statics in libunicode. Notably some `&'static &'static [(char, char)]` have changed to `&'static [(char, char)]`. The regexp crate seems to be the sole user of these, yet this is technically a [breaking-change]
2015-02-24Fix integers in tests (fixup #22700)Manish Goregaokar-1/+1
2015-02-23int audit - std::syncNick Cameron-30/+30
2015-02-21Remove `'static` bound from sync::mpsc, Mutex and RwLock.Huon Wilson-3/+3
Adds some basic tests to check that the types still catch the most glaring errors that could occur. cc #22444.
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-8/+8
2015-02-17rollup merge of #22319: huonw/send-is-not-staticAlex Crichton-3/+3
Conflicts: src/libstd/sync/task_pool.rs src/libstd/thread.rs src/libtest/lib.rs src/test/bench/shootout-reverse-complement.rs src/test/bench/shootout-spectralnorm.rs
2015-02-17Fallout from stabilizationAaron Turon-21/+21
2015-02-18Update the libraries to reflect Send loosing the 'static bound.Huon Wilson-3/+3
In most places this preserves the current API by adding an explicit `'static` bound. Notably absent are some impls like `unsafe impl<T: Send> Send for Foo<T>` and the `std::thread` module. It is likely that it will be possible to remove these after auditing the code to ensure restricted lifetimes are safe. More progress on #22251.
2015-02-13Improve documentation for `Select::new()`.Steve Klabnik-4/+11
Remove incorrect claim, add example, reformat and re-word. Fixes #22266
2015-02-11rustc: Fix a number of stability lint holesAlex Crichton-3/+3
There are a number of holes that the stability lint did not previously cover, including: * Types * Bounds on type parameters on functions and impls * Where clauses * Imports * Patterns (structs and enums) These holes have all been fixed by overriding the `visit_path` function on the AST visitor instead of a few specialized cases. This change also necessitated a few stability changes: * The `collections::fmt` module is now stable (it was already supposed to be). * The `thread_local::imp::Key` type is now stable (it was already supposed to be). * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable. These are required via the `panic!` macro. * The `std::old_io::stdio::{println, println_args}` functions are now stable. These are required by the `print!` and `println!` macros. * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to make bounds with these traits stable. Note that manual implementations of these traits are still gated by default, this stability only allows bounds such as `F: FnOnce()`. Additionally, the compiler now has special logic to ignore its own generated `__test` module for the `--test` harness in terms of stability. Closes #8962 Closes #16360 Closes #20327 [breaking-change]
2015-01-30Remove all `i` suffixesTobias Bucher-4/+4