about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-10-03 22:07:37 +0000
committerbors <bors@rust-lang.org>2015-10-03 22:07:37 +0000
commit130851e03046db41d555a401a08c87f187fd911a (patch)
treeab75c12944a019af64249e5efcd5ef287081048e /src/libstd
parent6d11a81c71c0d51980df5bd2d8c56cd295e3f2df (diff)
parent2f23e171cb51b0f8b3658d0149217bde8e730059 (diff)
downloadrust-130851e03046db41d555a401a08c87f187fd911a.tar.gz
rust-130851e03046db41d555a401a08c87f187fd911a.zip
Auto merge of #28669 - arielb1:well-formed-methods, r=nikomatsakis
By RFC1214:
>    Before calling a fn, we check that its argument and return types are WF.
    
The previous code only checked the trait-ref, which was not enough
in several cases.
    
As this is a soundness fix, it is a [breaking-change]. Some new annotations are needed, which I think are because of #18653 and the imperfection of `projection_must_outlive` (that can probably be worked around by moving the wf obligation later).
    
Fixes #28609

r? @nikomatsakis 
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/thread/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 43c23ec8a47..134b1ce16e2 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -266,7 +266,8 @@ impl Builder {
         let my_thread = Thread::new(name);
         let their_thread = my_thread.clone();
 
-        let my_packet = Arc::new(UnsafeCell::new(None));
+        let my_packet : Arc<UnsafeCell<Option<Result<T>>>>
+            = Arc::new(UnsafeCell::new(None));
         let their_packet = my_packet.clone();
 
         let main = move || {