Commit Graph

494 Commits

Author SHA1 Message Date
bors
db29e1b960 auto merge of #15247 : smenardpw/rust/patch-1, r=alexcrichton
./hello_world is not recognized on Windows.
We can type either hello_world or hello_world.exe to run the executable. I chose "hello_world.exe", which seems more conventional on Windows.
2014-06-30 23:06:35 +00:00
bors
566b57f3de auto merge of #15259 : steveklabnik/rust/patch-3, r=alexcrichton
It wasn't clear if we needed to install Hello World or Cargo.
2014-06-30 12:16:30 +00:00
bors
2735c7bb10 auto merge of #15237 : zzmp/rust/feat/markdown-in-crate-documentation, r=huonw
This makes the `in-header`, `markdown-before-content`, and `markdown-after-content` options available to `rustdoc` when generating documentation for any crate.

Before, these options were only available when creating documentation *from* markdown. Now, they are available when generating documentation from source.

This also updates the `rustdoc -h` output to reflect these changes. It does not update the `man rustdoc` page, nor does it update the documentation in [the `rustdoc` manual](http://doc.rust-lang.org/rustdoc.html).
2014-06-30 07:31:29 +00:00
zzmp
63afc08262 Allow external html in rustdoc for crates.
Updated documentation to reflect md->html.
Modularized external file loading.
2014-06-30 00:03:34 -07:00
smenardpw
f6f1cf13d0 Little typo fix
- ./hello_world which is not recognized on Windows fixed.
- .exe extension added.
- Little rewriting.
2014-06-30 07:43:15 +02:00
Steve Klabnik
572234ceac it -> Cargo
It wasn't clear if we needed to install Hello World or Cargo.
2014-06-29 21:51:41 -04:00
Patrick Walton
a5bb0a3a45 librustc: Remove the fallback to int for integers and f64 for
floating point numbers for real.

This will break code that looks like:

    let mut x = 0;
    while ... {
        x += 1;
    }
    println!("{}", x);

Change that code to:

    let mut x = 0i;
    while ... {
        x += 1;
    }
    println!("{}", x);

Closes #15201.

[breaking-change]
2014-06-29 11:47:58 -07:00
bors
fe8bc17801 auto merge of #15208 : alexcrichton/rust/snapshots, r=pcwalton
This change registers new snapshots, allowing `*T` to be removed from the language. This is a large breaking change, and it is recommended that if compiler errors are seen that any FFI calls are audited to determine whether they should be actually taking `*mut T`.
2014-06-28 20:11:34 +00:00
Alex Crichton
0dfc90ab15 Rename all raw pointers as necessary 2014-06-28 11:53:58 -07:00
bors
0ddf6f4b7c auto merge of #15233 : jbclements/rust/match-var-hygiene-etc, r=cmr
This PR includes two big things and a bunch of little ones.

1) It enables hygiene for variables bound by 'match' expressions.
2) It fixes a bug discovered indirectly (#15221), wherein fold traversal failed to visit nonterminal nodes.
3) It fixes a small bug in the macro tutorial.

It also adds tests for the first two, and makes a bunch of small comment improvements and cleanup.
2014-06-28 05:21:34 +00:00
John Clements
2f73b7874e looks like a cut-n-paste error in unused code 2014-06-27 22:11:11 -07:00
bors
b66c59ee5a auto merge of #15211 : steveklabnik/rust/guide_skeleton, r=huonw
This diff will look better once bors takes care of https://github.com/rust-lang/rust/pull/15183

@brson and I talked about it, and, if I commit this skeleton, I can submit PRs for each portion, without doing this silly "builds on previous PRs" stuff, and it shouldn't cause conflicts.

This lays out what I think the guide should cover, and in what order.  I haven't picked a cohesive project yet that shows all this off, but I think this progression of concepts is appropriate.
2014-06-27 11:26:25 +00:00
bors
17021944be auto merge of #15166 : zookoatleastauthoritycom/rust/13570-add-see-below-to-a-reference-to-a-new-concept-2, r=huonw
This is the same patch as submitted to https://github.com/rust-lang/rust/issues/13570 and https://github.com/rust-lang/rust/pull/14124, but with @pnkfelix's comment (https://github.com/rust-lang/rust/pull/14124#issuecomment-42797536) addressed, and with reflow as a separate commit. I'm submitting it in case @steveklabnik hasn't yet merged a rewrite of the tutorial (https://github.com/rust-lang/rust/issues/13570#issuecomment-46864789), in which case this patch might as well be merged into the old tutorial.
2014-06-27 09:41:27 +00:00
Steve Klabnik
afdb19b3b5 Skeleton outline of the guide. 2014-06-27 05:28:44 -04:00
Steve Klabnik
6bfbc35491 Add one more ignore.
Thanks @huonw
2014-06-26 21:57:46 -04:00
Steve Klabnik
aee263c6b0 Fix windows run instructions
Thank you, @stormbrew!
2014-06-26 20:49:27 -04:00
Steve Klabnik
e4b87077fb C macros, not C++ templates.
@cmr rightfully points out that C macros are worse, and share the
same name.
2014-06-26 16:58:20 -04:00
Steve Klabnik
15bcb2f9c6 Fix missing word and some grammar
Thanks @chris-morgan and @P1start! ❤️
2014-06-26 15:46:36 -04:00
Steve Klabnik
546b202e0e Note that macros != templates
Good call, @chris-morgan and @cmr!
2014-06-26 15:44:29 -04:00
Steve Klabnik
8cd906811a Clarify which curly is being referred to
Thanks @chris-morgan
2014-06-26 15:41:46 -04:00
Steve Klabnik
efc2d4a476 TIL PATHEXT
Thanks @chris-morgan ❤️
2014-06-26 15:40:52 -04:00
Steve Klabnik
c73f17486a Move note about $ up
Thanks @chris-morgan ❤️
2014-06-26 15:39:30 -04:00
Steve Klabnik
af4a6c30aa Fixing link to subreddit.
Thanks @chris-morgan ❤️
2014-06-26 15:37:57 -04:00
Steve Klabnik
49a9959d8c StackOverflow -> Stack Overflow
Thanks @chris-morgan
2014-06-26 15:36:57 -04:00
Steve Klabnik
08f533481d Fix IRC linkage.
Death to `here`!

Thanks @chris-morgan ❤️
2014-06-26 15:35:56 -04:00
Steve Klabnik
00ae648496 staticly -> statically
What's funny about this one is that spellcheck caught it, but for
some reason didn't give me the right suggestion, so I assumed that it
wasn't in my dictionary. Oh well.

Thanks @P1start! ❤️
2014-06-26 15:34:15 -04:00
Steve Klabnik
8fd69c4009 all/some
How could I forsake `rustdoc`? 😅

Thanks @huonw.
2014-06-26 15:32:35 -04:00
Steve Klabnik
98fd2abe0a tha -> than
Thanks @huonw ❤️
2014-06-26 15:31:41 -04:00
Steve Klabnik
fb594484e6 Fix capitalization of Issue.
@chris-morgan and @huonw pointed out that even though the feature
is a proper noun, we're using it in a more generic sense here.
2014-06-26 15:30:44 -04:00
Steve Klabnik
39549bebf0 Add a note that this requires git. 2014-06-26 15:30:06 -04:00
Steve Klabnik
a548e8185a Guide: Hello, cargo 2014-06-26 15:23:05 -04:00
bors
b20f968ed2 auto merge of #15197 : omasanori/rust/doc-fix, r=alexcrichton 2014-06-26 17:16:26 +00:00
OGINO Masanori
c3c195bd48 Fix a typo and a small syntactic error.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-06-26 21:43:47 +09:00
bors
389fae2ca8 auto merge of #15181 : steveklabnik/rust/hello_world, r=brson
This is built on top of https://github.com/rust-lang/rust/pull/15162 . cccae83d92 is the only new commit, you may want to look at that rather than the whole diff.

Writing our first Rust program together. This is the most crucial step, so I go to a fairly deep level of detail. Future sections will move more quickly.
2014-06-26 07:11:23 +00:00
bors
99519cc8e6 auto merge of #15162 : steveklabnik/rust/install_instructions, r=brson
This has my voice *very strongly*. I'm not sure if it's too much. I'd find it okay if I had to tone it back, and I don't want it to be _too strong_, but clinical docs are boring.
2014-06-26 04:21:27 +00:00
Steve Klabnik
a8ddab4f25 Add extra ignore directives. 2014-06-25 16:12:40 -04:00
Steve Klabnik
cccae83d92 Guide: Hello, world!
Let's write our first Rust program!
2014-06-25 14:26:14 -04:00
bors
7be7a8fb3a auto merge of #15121 : steveklabnik/rust/matching_docs, r=alexcrichton
Fixes #11113.
2014-06-25 15:21:26 +00:00
Steve Klabnik
1d574c1731 thanks @sfackler 2014-06-25 11:01:17 -04:00
Steve Klabnik
845ee09dfe fix feedback from @huonw 2014-06-25 11:00:34 -04:00
Steve Klabnik
338a84d45f Guide: install instructions 2014-06-25 11:00:33 -04:00
Steve Klabnik
53627dd1f2 Make an example more clear with sample code.
Fixes #11113.
2014-06-25 10:38:03 -04:00
bors
9e103acaba auto merge of #15165 : zookoatleastauthoritycom/rust/14148-Optimize-out-exhortations-about-being-careful-2, r=huonw
Yes, it is important to be careful, but repeated emphasis about it is probably
not helpful — it starts to sound like you came for a tutorial but found a
finger-wagging lecture.

Even after I removed a few of these comments, there are still several left in
the text. That's probably fine! A couple of mentions of how this is dangerous
and you ought to be careful may be a good reminder to the reader.

After making the edits, I reflowed the paragraphs that I had touched, using
emacs's "M-x fill-paragraph", with fill-column equal to 70.
2014-06-25 06:21:20 +00:00
Zooko Wilcox-O'Hearn
668bad6d4c reflow with emacs fill-paragraph (fill-column 71) 2014-06-25 01:35:50 +00:00
Zooko Wilcox-O'Hearn
d6ea8627ba add "(see below)" to a reference to a new concept
This is because I observed someone reading the tutorial who thought they'd
missed something when they got to the mention of variable bindings.

This patch doesn't reflow the paragraphs so that you can see the semantic
change that I made, and a subsequent patch will reflow this paragraph.

Fixes https://github.com/rust-lang/rust/issues/13570.
2014-06-25 01:34:24 +00:00
Zooko Wilcox-O'Hearn
e3050ffa52 Optimize out exhortations about being careful.
Yes, it is important to be careful, but repeated emphasis about it is probably
not helpful — it starts to sound like you came for a tutorial but found a
finger-wagging lecture.

Even after I removed a few of these comments, there are still several left in
the text. That's probably fine! A couple of mentions of how this is dangerous
and you ought to be careful may be a good reminder to the reader.

After making the edits, I reflowed the paragraphs that I had touched, using
emacs's "M-x fill-paragraph", with fill-column equal to 70.
2014-06-25 01:25:10 +00:00
Michael Zhou
58078005cf Fix grammar in tutorial
"as this document" should be "than this document"
2014-06-24 17:23:12 -07:00
Steve Klabnik
3ed78f5b6b Add the Guide, add warning to tutorial.
In line with what @brson, @cmr, @nikomatsakis and I discussed this morning, my
redux of the tutorial will be implemented as the Guide. This way, I can work in
small iterations, rather than dropping a huge PR, which is hard to review.  In
addition, the community can observe my work as I'm doing it.

This adds a note in line with [this comment][reddit] that clarifies the state
of the tutorial, and the community's involvement with it.

[reddit]: http://www.reddit.com/r/rust/comments/28bew8/rusts_documentation_is_about_to_drastically/ci9c98k
2014-06-24 17:22:50 -07:00
Steve Klabnik
85effb9f3e Improve ambiguous pronoun.
Fixes #14806
2014-06-24 17:22:45 -07:00
Steve Klabnik
e16a87513a Remove the cheat sheet.
Rust by Example is far better.

Fixes #14380.
2014-06-24 17:22:39 -07:00