Skip to content

Dining Philosophers example does not compile in Win64 1.0.0 beta build #25649

Closed
@ElderThorin

Description

@ElderThorin

I installed Rust from the Windows 64 bit beta build available from here:
http://doc.rust-lang.org/book/installing-rust.html

The version rustc reports is: rustc 1.0.0-beta (9854143 2015-04-02) (built 2015-04-02)
I installed it on a Win 7 machine.

Attempting to compile the last couple versions of the dining philosophers code from the following example results in a compile error.

Location:
http://doc.rust-lang.org/stable/book/dining-philosophers.html

Error:

src\main.rs:61:18: 61:26 error: type `core::result::Result<(), Box<core::any::Any + Send>>` does not implement any method in scope named `unwrap`
src\main.rs:61         h.join().unwrap();

Code excerpt:

  for h in handles {
      h.join().unwrap();
  }

The compile error can easily be worked around in this example by adding .ok() prior to the .unwrap() call, so for some result the core::result::Result<...> unwrap method is missing, not visible, or something like that (I only just started looking at rest yesterday morning.)

Note that this code works fine in the 'Rust Playground' web application.

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