about summary refs log tree commit diff
path: root/src/libstd/thread
AgeCommit message (Collapse)AuthorLines
2015-03-24rollup merge of #23638: pnkfelix/fsk-reject-specialized-dropsAlex Crichton-1/+1
Reject specialized Drop impls. See Issue #8142 for discussion. This makes it illegal for a Drop impl to be more specialized than the original item. So for example, all of the following are now rejected (when they would have been blindly accepted before): ```rust struct S<A> { ... }; impl Drop for S<i8> { ... } // error: specialized to concrete type struct T<'a> { ... }; impl Drop for T<'static> { ... } // error: specialized to concrete region struct U<A> { ... }; impl<A:Clone> Drop for U<A> { ... } // error: added extra type requirement struct V<'a,'b>; impl<'a,'b:a> Drop for V<'a,'b> { ... } // error: added extra region requirement ``` Due to examples like the above, this is a [breaking-change]. (The fix is to either remove the specialization from the `Drop` impl, or to transcribe the requirements into the struct/enum definition; examples of both are shown in the PR's fixed to `libstd`.) ---- This is likely to be the last thing blocking the removal of the `#[unsafe_destructor]` attribute. Fix #8142 Fix #23584
2015-03-25Bug fixesNick Cameron-0/+1
2015-03-24Added `T:Send` bound to `JoinGuard<T>` to avoid specialized `Drop` impl.Felix S. Klock II-1/+1
2015-03-23Test fixes and rebase conflicts, round 2Alex Crichton-3/+3
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-0/+3
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/librustc_back/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/libtest/lib.rs src/test/run-make/rustdoc-default-impl/foo.rs src/test/run-pass/env-home-dir.rs
2015-03-23rollup merge of #23601: nikomatsakis/by-value-indexAlex Crichton-1/+1
This is a [breaking-change]. When indexing a generic map (hashmap, etc) using the `[]` operator, it is now necessary to borrow explicitly, so change `map[key]` to `map[&key]` (consistent with the `get` routine). However, indexing of string-valued maps with constant strings can now be written `map["abc"]`. r? @japaric cc @aturon @Gankro
2015-03-23rollup merge of #23579: Ms2ger/thread_local-unsafeAlex Crichton-5/+3
Conflicts: src/libstd/thread/local.rs
2015-03-23Implement RFC 909: move thread_local into threadAaron Turon-0/+2078
This commit implements [RFC 909](https://github.com/rust-lang/rfcs/pull/909): The `std::thread_local` module is now deprecated, and its contents are available directly in `std::thread` as `LocalKey`, `LocalKeyState`, and `ScopedKey`. The macros remain exactly as they were, which means little if any code should break. Nevertheless, this is technically a: [breaking-change] Closes #23547