Skip to content

Calling unwrap() on JoinGuard::join() failed #20233

@zonyitoo

Description

@zonyitoo

Here is the test case

use std::thread::Thread;
fn main() {
    Thread::spawn(move || {
        println!("Hello");
    }).join().unwrap();
}

and rustc said

t.rs:7:15: 7:23 error: type `core::result::Result<(), Box<core::any::Any + Send>>` does not implement any method in scope named `unwrap`
t.rs:7     }).join().unwrap();
                     ^~~~~~~~
error: aborting due to previous error

rustc rustc 0.13.0-nightly (7e11b2271 2014-12-24 20:47:12 +0000)

Result does not have the unwrap() method anymore?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions