-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
"Hello World" example in tutorial doesn't compile #3304
Comments
I think you are working with an older version of rust (perhaps 0.3.1?), but using the tutorial that targets the most recent version of Rust. The syntax for strings changed in the meantime: in 0.3.1, no |
Closing. |
Ah, thanks @nikomatsakis. I wonder, then, if it may be useful to definitively mention the version of Rust that should be used in the tutorial? Right now it seems to indicate that version 0.3.x should be used, since the Installation Section uses |
I agree with @toolness - I had a similar issue when starting as it wasn't clear that the tutorial was using the latest from the repo, as opposed to the last packaged release. |
What would be a good way to indicate that the tutorial refers to an in-development version? We can bump the version to next (0.4), and possibly tag it with something like '0.4-dev'. I'm not sure how feasible it is to change the installation text based on whether the tutorial is for an in-development or released version. Possibly in the introductory text too we can explicitly say the version number. |
It seems like bumping the version number so that it reflects the next version and not the last one would be helpful. |
OK. I'll bump the version number today. |
Awesome, thanks @brson! Another slightly more future-proof alternative is to just have a disclaimer at the beginning of the docs that says it's for the tip of the dev branch, so that readers know to use that when in doubt. Presumably the installation docs would Anyhow, just another idea though. Thanks for bumping the version number! |
OK, the version is bumped on incoming. The new docs won't show up until incoming gets promoted to master. Could be a few days. This is all I plan on doing on this matter for now, so if anybody strongly wants some of these other good ideas implemented I suggest opening new issues. |
add direct test of pthread_cond Fixes rust-lang/miri#2271
The rust type inference for closures doesn't work in the particular use case we are using it for ensures clauses. By creating a helper function, we change the path the rust type inference takes and lets the type of the closure be identified properly. This means type annotations are no longer required within ensures clauses. Resolves rust-lang#3304 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
It seems the Hello World example in the tutorial doesn't compile.
Pasting the following code into a file called
hello.rs
:and then running
rustc hello.rs
returns the following:I don't know rust, so I'm not sure what's wrong here or whether the fault is on my end. Any help is appreciated!
The text was updated successfully, but these errors were encountered: