Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ElderThorin opened this issue May 20, 2015 · 3 comments
Closed

Comments

@ElderThorin
Copy link

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.

@Stebalien
Copy link
Contributor

See: #25493

@ElderThorin
Copy link
Author

Thank you, uninstalling the beta version and installing the non-beta 1.0.0 version built 2015-05-14 resolves this problem. I assume this will be marked closed though with the closing of #25493

@steveklabnik
Copy link
Member

Yup! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants