extern crate zmq;

fn main() {
    let mut context = zmq::Context::new();
    let _poll_item = {
        let socket = context.socket(zmq::PAIR).unwrap();
        socket.as_poll_item(0)
    }; //~ ERROR `socket` does not live long enough
}

extern crate zmq;

fn main() {
    let mut context = zmq::Context::new();
    let _poll_item = {
        let socket = context.socket(zmq::PAIR).unwrap();
        socket.as_poll_item(0) //~ ERROR `socket` does not live long enough
    };
}

--- 
+++ 
@@ -4,6 +4,6 @@
     let mut context = zmq::Context::new();
     let _poll_item = {
         let socket = context.socket(zmq::PAIR).unwrap();
-        socket.as_poll_item(0) //~ ERROR `socket` does not live long enough
-    };
+        socket.as_poll_item(0)
+    }; //~ ERROR `socket` does not live long enough
 }
Fix compiletest failure on nightly
