Skip to content

Add missing "imports" to the 0.7 tutorial #7662

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
igalic opened this issue Jul 9, 2013 · 3 comments
Closed

Add missing "imports" to the 0.7 tutorial #7662

igalic opened this issue Jul 9, 2013 · 3 comments

Comments

@igalic
Copy link

igalic commented Jul 9, 2013

0.7 does a way with exporting the standard modules from prelude, however its tutorial doesn't add any imports. 206ab89 fixes that and should be "backported".

@huonw
Copy link
Member

huonw commented Jul 9, 2013

I believe that 206ab89 is in 0.7, since Github says that it is, and the docs seem to have those changes (no io:: on the println in the code snippet there). Also, note that that commit is actually the commit that removes the re-exports.

Closing; feel free to reopen & clarify if I misunderstand something.

@huonw huonw closed this as completed Jul 9, 2013
@igalic
Copy link
Author

igalic commented Jul 10, 2013

You're right. My bad. The annotations that say use std::float are in 0.7, just as they are in master:

~~~
# use std::float;
fn … {
  let pi = float::consts::pi;
}
~~~

However, they -- or any annotations starting with # are not displayed on the pages. Is that a feature?

@huonw
Copy link
Member

huonw commented Jul 10, 2013

It's a bug, I opened #7689. (Some common modules like float used to be in the prelude, and so were imported by default, I guess the documentation wasn't updated in the most user-friendly way.)

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

2 participants