summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2015-01-08Fix dead links in the guide and reorganizeAlex Crichton-655/+90
2015-01-08"The Rust Programming Language"Steve Klabnik-5871/+4792
This pulls all of our long-form documentation into a single document, nicknamed "the book" and formally titled "The Rust Programming Language." A few things motivated this change: * People knew of The Guide, but not the individual Guides. This merges them together, helping discoverability. * You can get all of Rust's longform documentation in one place, which is nice. * We now have rustbook in-tree, which can generate this kind of documentation. While its style is basic, the general idea is much better: a table of contents on the left-hand side. * Rather than a almost 10,000-line guide.md, there are now smaller files per section.
2015-01-07Test fixes and rebase conflictsAlex Crichton-74/+99
2015-01-07rollup merge of #20709: thiagopnts/ownership-guide-typoAlex Crichton-1/+1
I was reading the ownership guide and found this small typo :bowtie:
2015-01-07rollup merge of #20695: frewsxcv/patch-2Alex Crichton-1/+1
This should be rollup
2015-01-07rollup merge of #20693: EchoAce/intro-oboeAlex Crichton-2/+2
Issue #20686, proposed by nstoddard.
2015-01-07fix typo in the ownership guideThiago Pontes-1/+1
2015-01-07Merge pull request #20674 from jbcrail/fix-misspelled-commentsbors-1/+1
Fix misspelled comments. Reviewed-by: steveklabnik
2015-01-07Merge pull request #20672 from vrana/patch-3bors-1/+1
Fix a typo in guide Reviewed-by: steveklabnik
2015-01-07Merge pull request #20670 from vrana/patch-2bors-1/+1
Fix type annotation in guide Reviewed-by: steveklabnik
2015-01-07Merge pull request #20669 from vrana/patch-1bors-1/+1
Use a better word in the guide Reviewed-by: steveklabnik
2015-01-07Bump copyright year in doc footerCorey Farwell-1/+1
2015-01-07oboe removedFakeKane-2/+2
2015-01-07auto merge of #20620 : brson/rust/relnotes, r=huonwbors-1/+1
A whole lot happened this cycle. I tried to highlight the best stuff. Please review and note important stuff I'm missing or foolish mistakes.
2015-01-06More test fixesAlex Crichton-6/+6
2015-01-06Fix misspelled comments.Joseph Crail-1/+1
I cleaned up comments prior to the 1.0 alpha release.
2015-01-06Fix a typo in guideJakub Vrána-1/+1
2015-01-06Bump some version numbersBrian Anderson-1/+1
2015-01-06rollup merge of #20563: cmr/macro-input-future-proofingAlex Crichton-18/+18
2015-01-06rollup merge of #20615: aturon/stab-2-threadAlex Crichton-5/+4
This commit takes a first pass at stabilizing `std::thread`: * It removes the `detach` method in favor of two constructors -- `spawn` for detached threads, `scoped` for "scoped" (i.e., must-join) threads. This addresses some of the surprise/frustrating debug sessions with the previous API, in which `spawn` produced a guard that on destruction joined the thread (unless `detach` was called). The reason to have the division in part is that `Send` will soon not imply `'static`, which means that `scoped` thread creation can take a closure over *shared stack data* of the parent thread. On the other hand, this means that the parent must not pop the relevant stack frames while the child thread is running. The `JoinGuard` is used to prevent this from happening by joining on drop (if you have not already explicitly `join`ed.) The APIs around `scoped` are future-proofed for the `Send` changes by taking an additional lifetime parameter. With the current definition of `Send`, this is forced to be `'static`, but when `Send` changes these APIs will gain their full flexibility immediately. Threads that are `spawn`ed, on the other hand, are detached from the start and do not yield an RAII guard. The hope is that, by making `scoped` an explicit opt-in with a very suggestive name, it will be drastically less likely to be caught by a surprising deadlock due to an implicit join at the end of a scope. * The module itself is marked stable. * Existing methods other than `spawn` and `scoped` are marked stable. The migration path is: ```rust Thread::spawn(f).detached() ``` becomes ```rust Thread::spawn(f) ``` while ```rust let res = Thread::spawn(f); res.join() ``` becomes ```rust let res = Thread::scoped(f); res.join() ``` [breaking-change]
2015-01-06rollup merge of #19430: pczarn/interp_tt-cleanupAlex Crichton-4/+3
Conflicts: src/libsyntax/parse/parser.rs
2015-01-06Fix type annotation in guideJakub Vrána-1/+1
2015-01-07Cleanup and followup to PR #17830: parsing changesPiotr Czarnecki-4/+3
Prevents breaking down `$name` tokens into separate `$` and `name`. Reports unknown macro variables. Fixes #18775 Fixes #18839 Fixes #15640
2015-01-06Use a better word in the guideJakub Vrána-1/+1
2015-01-06Fallout from stabilizationAaron Turon-5/+4
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-2/+2
[breaking-change]
2015-01-06Fix falloutCorey Richardson-18/+18
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-99/+146
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05rollup merge of #20554: huonw/mut-patternAlex Crichton-2/+3
Conflicts: src/librustc_typeck/check/_match.rs
2015-01-05rollup merge of #20507: alexcrichton/issue-20444Alex Crichton-23/+27
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-05rollup merge of #20478: SeanTAllen/masterAlex Crichton-2/+2
Number of rustc calls would depending on various circumstances. Two is misleading.
2015-01-05rollup merge of #20092: barosl/rustdoc-line-number-clickableAlex Crichton-1/+1
While talking on IRC, someone wanted to post a link to the Rust source code, but while the lines of the rendered source code do have anchors (`<span id="[line number]">`), there is no convenient way to make links as they are not clickable. This PR makes them clickable. Also, a minor fix of the FAQ is included.
2015-01-05rollup merge of #19998: th0114nd/unicode-bottomAlex Crichton-2/+4
In the HTML version of the documentation, it isn't rendered so might as well use the unicode representation.
2015-01-05rollup merge of #19888: steveklabnik/gh19861Alex Crichton-2/+11
Fixes #19861 /cc @huonw
2015-01-05rollup merge of #19736: steveklabnik/gh19662Alex Crichton-2/+77
Fixes #19662.
2015-01-05rollup merge of #19235: bjz/referenceAlex Crichton-67/+22
cc. @steveklabnik
2015-01-05Update docsKeegan McAllister-93/+140
2015-01-05Reserve the keyword 'macro'Keegan McAllister-6/+6
2015-01-05unignore and fix doctests in guide and referenceJorge Aparicio-40/+42
2015-01-05ignore boxed closure doctests in the guide/referenceJorge Aparicio-16/+16
2015-01-05Add lifetime elision information to the ownership guide.Steve Klabnik-2/+77
Fixes #19662.
2015-01-05std: Redesign c_str and c_vecAlex Crichton-23/+27
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-05Change `&` pat to only work with &T, and `&mut` with &mut T.Huon Wilson-2/+3
This implements RFC 179 by making the pattern `&<pat>` require matching against a variable of type `&T`, and introducing the pattern `&mut <pat>` which only works with variables of type `&mut T`. The pattern `&mut x` currently parses as `&(mut x)` i.e. a pattern match through a `&T` or a `&mut T` that binds the variable `x` to have type `T` and to be mutable. This should be rewritten as follows, for example, for &mut x in slice.iter() { becomes for &x in slice.iter() { let mut x = x; Due to this, this is a [breaking-change] Closes #20496.
2015-01-04Merge pull request #20520 from nhowell/patch-1bors-3/+3
doc: Add missing `$`s in the Installing Rust guide Reviewed-by: steveklabnik, steveklabnik
2015-01-04Merge pull request #20505 from estsauver/doc_20504bors-1/+1
Update guide index to point to the task page Reviewed-by: alexcrichton
2015-01-04Merge pull request #20495 from brson/cargobors-4/+5
Update guide for Cargo installation Reviewed-by: steveklabnik
2015-01-04Merge pull request #20487 from trapp/doc-namespace-typobors-1/+1
Fix typo in documentation. Reviewed-by: alexcrichton
2015-01-04Merge pull request #20428 from tbu-/pr_guide_int_to_i32_2nd_takebors-272/+270
Make all integers in the guide `i32`, implicitely Reviewed-by: steveklabnik
2015-01-04Merge pull request #19963 from tshepang/patch-3bors-1/+1
doc: mailing list is deprecated Reviewed-by: brson
2015-01-04doc: Add missing `$`s in the Installing Rust guideNick Howell-3/+3