Commit Graph

604 Commits

Author SHA1 Message Date
Daniel Hofstetter
c586bf21aa Rename modules.rs to main.rs in guide 2014-08-04 16:23:46 +02:00
Daniel Hofstetter
7ba9c44b94 Remove "bin" section from Cargo.toml 2014-08-03 14:19:05 +02:00
bors
ed264286dd auto merge of #16198 : cakebaker/rust/remove_unused_tuple_struct, r=steveklabnik 2014-08-03 08:11:10 +00:00
bors
12306da80c auto merge of #16189 : steveklabnik/rust/gh15494, r=alexcrichton
Fixes #15494.
2014-08-03 01:21:08 +00:00
bors
4d4eb10230 auto merge of #16186 : steveklabnik/rust/guide_cargo_new, r=alexcrichton
Two commits here: one to add `cargo new` to the guide, and a second to mention the lockfile that Cargo now generates.
2014-08-02 23:36:09 +00:00
bors
432042ac14 auto merge of #16183 : brson/rust/doctitles, r=alexcrichton 2014-08-02 17:21:09 +00:00
Daniel Hofstetter
867d8e6356 Remove unused tuple struct 2014-08-02 17:28:42 +02:00
bors
5bad333fec auto merge of #16175 : EduardoBautista/rust/fix-guessing-game-appearing-early, r=steveklabnik
Solves: https://github.com/rust-lang/rust/issues/16162
2014-08-02 12:06:09 +00:00
bors
1b44c5b0eb auto merge of #16165 : tinaun/rust/newcss, r=alexcrichton
remove unneeded `pre.rust a' selector

move transform into `.test-arrow`

fixes #16138
2014-08-02 10:21:11 +00:00
bors
71a42807ad auto merge of #16160 : EduardoBautista/rust/use-bang-at-end-of-hello-world, r=alexcrichton
Further into the guide "Hello, world!" is used instead of "Hello, world".
2014-08-02 05:06:11 +00:00
Steve Klabnik
cf279105d5 Fix manual regarding attribute placement.
Fixes #15494.
2014-08-01 23:12:14 -04:00
Steve Klabnik
2b9c5d2f74 Add note about Cargo.lock 2014-08-01 22:58:16 -04:00
Steve Klabnik
1a80dcbd56 Use cargo new.
Now that this feature exists, we should use it.

Fixes #16078
2014-08-01 22:58:01 -04:00
bors
06727d4720 auto merge of #16128 : steveklabnik/rust/speed_faq, r=brson
Fixes #11174.

I'm open to revising this text, but I figured it gets across the basics.
2014-08-02 02:16:02 +00:00
Brian Anderson
fe13a9fb59 doc: Make sure all doc titles say 'Rust'. #12466 2014-08-01 17:32:24 -07:00
bors
d7cfc34a22 auto merge of #16119 : steveklabnik/rust/guide_pointers, r=brson
This is the next section of the guide, and it's on pointers. It's not done yet, as I need to write the section on ownership and borrowing, but I figured I'd share the rest now, to get feedback on the rest of it while I take some time to get that right.
2014-08-02 00:31:03 +00:00
bors
55b24051be auto merge of #15992 : steveklabnik/rust/guide_testing, r=brson
The start of a testing guide. This PR relies on the crates and modules one because I shuffled some stuff around, so sorry about that.

I got stuck with how to import this name with cargo. @wycats and @alexcrichton , any ideas?
2014-08-01 20:21:01 +00:00
Eduardo Bautista
69267b1e1d Move caret under the 'x' variabe 2014-08-01 14:34:18 -05:00
Eduardo Bautista
ea92a5e90a Use hello_world instead of the guessing_game 2014-08-01 14:30:52 -05:00
Patrick Walton
5b85c8cbe7 librustc: Forbid pattern bindings after @s, for memory safety.
This is an alternative to upgrading the way rvalues are handled in the
borrow check. Making rvalues handled more like lvalues in the borrow
check caused numerous problems related to double mutable borrows and
rvalue scopes. Rather than come up with more borrow check rules to try
to solve these problems, I decided to just forbid pattern bindings after
`@`. This affected fewer than 10 lines of code in the compiler and
libraries.

This breaks code like:

    match x {
        y @ z => { ... }
    }

    match a {
        b @ Some(c) => { ... }
    }

Change this code to use nested `match` or `let` expressions. For
example:

    match x {
        y => {
            let z = y;
            ...
        }
    }

    match a {
        Some(c) => {
            let b = Some(c);
            ...
        }
    }

Closes #14587.

[breaking-change]
2014-08-01 08:45:22 -07:00
tinaun
42b2dc06b6 Fix API docs css reversing elements that it shouldn't
remove unneeded `pre.rust a' selector

move transform into `.test-arrow`

fixes #16138
2014-08-01 04:01:29 -04:00
Eduardo Bautista
c0048dec4a Be more consistent with "Hello, world!" 2014-07-31 23:02:22 -05:00
bors
b495933a7f auto merge of #16141 : alexcrichton/rust/rollup, r=alexcrichton 2014-08-01 01:56:32 +00:00
Steve Klabnik
fd08d5fb2e Add note about production deployments.
Fixes #11511.
2014-07-31 11:50:24 -07:00
Steve Klabnik
daaa20e565 Remove incorrect example
This now works because of elision.

Fixes #16117
2014-07-31 11:50:24 -07:00
Steve Klabnik
a74197e3f1 Guide: pointers
Not the pointer guide, but the guide section on pointers.

Adding a section about patterns for after this, as well.
2014-07-31 14:39:16 -04:00
bors
9826e801be auto merge of #16073 : mneumann/rust/dragonfly2, r=alexcrichton
Not included are two required patches:

* LLVM: segmented stack support for DragonFly [1]

* jemalloc: simple configure patches

[1]: http://reviews.llvm.org/D4705
2014-07-31 14:41:34 +00:00
Steve Klabnik
20658f7ec5 Fix heading levels in pointer guide 2014-07-31 07:30:52 -07:00
Steve Klabnik
ea1b637654 fix formatting in pointer guide table 2014-07-31 07:30:48 -07:00
DJUrsus
571f6cf29a fix variable name in tutorial 2014-07-31 07:30:14 -07:00
Steve Klabnik
d4c3500ec6 Add comment about speed in FAQ.
Fixes #11174.
2014-07-30 19:14:06 -04:00
Steve Klabnik
6121d82d47 Guide: testing 2014-07-30 09:36:32 -04:00
bors
1b0dc6a3fc auto merge of #16092 : alexcrichton/rust/rollup, r=alexcrichton 2014-07-30 05:06:41 +00:00
Alexis Beingessner
56f957f463 adding discuss.rust-lang to community 2014-07-29 15:44:08 -07:00
Corey Richardson
2a3c0d91cf manual: update list of feature gates, add phase attribute 2014-07-29 15:43:57 -07:00
Hugo Jobling
26ca10d2d7 Update disclaimer to improve clarity and intent 2014-07-29 15:43:02 -07:00
Steve Klabnik
456c4494b8 New Guide: crates and modules 2014-07-29 12:50:25 -04:00
Michael Neumann
2e2f53fad2 Port Rust to DragonFlyBSD
Not included are two required patches:

* LLVM: segmented stack support for DragonFly [1]

* jemalloc: simple configure patches

[1]: http://reviews.llvm.org/D4705
2014-07-29 16:44:39 +02:00
Ruud van Asseldonk
d7993153a4 docs: Fix typo in container guide. 2014-07-27 10:14:44 +02:00
Michael Matuzak
ca18c12243 fix small typo in guide-lifetimes 2014-07-25 21:13:39 -07:00
bors
cf1381c1d0 auto merge of #15789 : steveklabnik/rust/guide_pointers, r=cmr
This is super, super WIP, but I'm going to go get lunch for a while, and figured I'd toss my work up here in case anyone wants to see my work as I do it.

This contains a new introductory section explaining the basics of pointers, and some pitfalls that Rust attempts to solve. I'd be interested in hearing how my explanation is, as well as if this belongs here. Pointers are such a crucial concept, I don't mind having a beginners' section on them in the main docs, even though our main audience is supposed to understand them already. Reasonable people may disagree, however.
2014-07-26 00:46:16 +00:00
bors
4e388859a2 auto merge of #15959 : omasanori/rust/cleanup-ja, r=alexcrichton
The translation is based on an early version of tutorial.md, thus most
of entries have been marked as fuzzy and actually they are incorrect.
Now tutorial.md is planed to be replaced with guide.md, so I'd suggest
removing translation files for a while.

/cc @gifnksm
2014-07-25 06:01:13 +00:00
OGINO Masanori
1e2456b988 Remove obsolete Japanese translation for a while.
The translation is based on an early version of tutorial.md, thus most
of entries have been marked as fuzzy and actually they are incorrect.
Now tutorial.md is planed to be replaced with guide.md, so I'd suggest
removing translation files for a while.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-07-25 06:51:32 +09:00
Patrick Walton
bb165eb5c2 libsyntax: Remove ~self and mut ~self from the language.
This eliminates the last vestige of the `~` syntax.

Instead of `~self`, write `self: Box<TypeOfSelf>`; instead of `mut
~self`, write `mut self: Box<TypeOfSelf>`, replacing `TypeOfSelf` with
the self-type parameter as specified in the implementation.

Closes #13885.

[breaking-change]
2014-07-24 07:26:03 -07:00
bors
02464196ea auto merge of #15909 : colemickens/rust/patch-3, r=alexcrichton
Tested this on the playground, the range specifies range(0u, 3), so it should be okay to remove this cast.
2014-07-24 07:51:18 +00:00
bors
83a8a56473 auto merge of #15899 : aochagavia/rust/guide, r=kballard
The removed code caused confusion because it is not clear that the type of `y` is actually `()`
2014-07-23 06:31:11 +00:00
Cole Mickens
6bb22a9d6d Remove unnecessary cast from intro 2014-07-22 23:10:18 -07:00
Adolfo Ochagavía
2d1b87ce33 Remove misleading code example from The Guide
The removed code caused confusion because it is not clear that the type of `y` is actually `()`
2014-07-22 20:58:25 +02:00
Steve Klabnik
1e9f86b1dc Guide: fix headings 2014-07-21 19:39:16 -04:00
Steve Klabnik
377b2508f2 Guide Redux: Pointers 2014-07-21 19:34:55 -04:00