about summary refs log tree commit diff
path: root/src/doc/rust.md
AgeCommit message (Collapse)AuthorLines
2017-03-29Avoid linking to a moved page in rust.htmlMalo Jaffré-1/+1
2014-09-22manual -> reference & formattingSteve Klabnik-4416/+1
'reference' sounds better than 'manual' to me here, and rust.html is certainly wrong. I also wrapped everything to 80 cols.
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-2/+3
2014-09-17librustc: Implement associated types behind a feature gate.Patrick Walton-0/+2
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-15Fix two typosMartin Olsson-1/+1
2014-09-12auto merge of #16657 : steveklabnik/rust/goodbye_tutorial, r=brsonbors-4/+4
The Guide isn't 100% perfect, but it's basically complete. It's certainly better than the tutorial is. Time to start pointing more people its way. I also just made it consistent to call all things 'guides' rather than tutorials. Fixes #9874. This is the big one. And two bugs that just go away. Fixes #14503. Fixes #15009.
2014-09-11Replace the Tutorial with the Guide.Steve Klabnik-4/+4
The Guide isn't 100% perfect, but it's basically complete. It's certainly better than the tutorial is. Time to start pointing more people its way. I also just made it consistent to call all things 'guides' rather than tutorials. Fixes #9874. This is the big one. And two bugs that just go away. Fixes #14503. Fixes #15009.
2014-09-11auto merge of #17154 : steveklabnik/rust/array_clarification, r=huonwbors-20/+21
fixes #17148
2014-09-10Fix vector terminology in the manual.Steve Klabnik-20/+21
fixes #17148
2014-09-10Implement tuple and tuple struct indexingP1start-0/+2
This allows code to access the fields of tuples and tuple structs: let x = (1i, 2i); assert_eq!(x.1, 2); struct Point(int, int); let origin = Point(0, 0); assert_eq!(origin.0, 0); assert_eq!(origin.1, 0);
2014-09-09rollup merge of #17054 : pcwalton/subslice-syntaxAlex Crichton-1/+1
2014-09-09rollup merge of #17052 : pcwalton/feature-gate-subslicesAlex Crichton-5/+7
2014-09-09auto merge of #16825 : steveklabnik/rust/fix_manual_array_terms, r=brsonbors-23/+25
fixes #16015
2014-09-08librustc: Change the syntax of subslice matching to use postfix `..`Patrick Walton-1/+1
instead of prefix `..`. This breaks code that looked like: match foo { [ first, ..middle, last ] => { ... } } Change this code to: match foo { [ first, middle.., last ] => { ... } } RFC #55. Closes #16967. [breaking-change]
2014-09-08librustc: Feature gate subslice matching in non-tail positions.Patrick Walton-5/+7
This breaks code that uses the `..xs` form anywhere but at the end of a slice. For example: match foo { [ 1, ..xs, 2 ] [ ..xs, 1, 2 ] } Add the `#![feature(advanced_slice_patterns)]` gate to reenable the syntax. RFC #54. Closes #16951. [breaking-change]
2014-09-07Fix vector/array/slice terminology in manual.Steve Klabnik-23/+25
Fixes #16015.
2014-09-05Update language item from 'share' to 'sync' #16988Felix Raimundo-2/+2
2014-09-02auto merge of #16925 : jbcrail/rust/doc-spelling-errors, r=alexcrichtonbors-5/+5
I fixed spelling mistakes in the documentation.
2014-09-01doc: Fix spelling errors.Joseph Crail-5/+5
2014-09-01Fix pointer types in the manual.Steve Klabnik-20/+8
2014-08-30rollup merge of #16780 : mdinger/marker_typesAlex Crichton-4/+4
2014-08-27Fix sorting order. Change `sync` to `share`mdinger-4/+4
2014-08-23extern crate foobar as foo;wickerwaka-7/+4
Implements remaining part of RFC #47. Addresses issue #16461. Removed link_attrs from rust.md, they don't appear to be supported by the parser. Changed all the tests to use the new extern crate syntax Change pretty printer to use 'as' syntax
2014-08-20manual: fix linkCorey Richardson-1/+1
2014-08-20docs: don't claim struct layout is specified, but mention reprCorey Richardson-6/+20
2014-08-19auto merge of #16583 : steveklabnik/rust/gh16569, r=pcwaltonbors-0/+4
Fixes #16569
2014-08-18Manual: add information about //!Steve Klabnik-0/+4
Fixes #16569
2014-08-18libsyntax: Remove the `use foo = bar` syntax from the language in favorPatrick Walton-1/+1
of `use bar as foo`. Change all uses of `use foo = bar` to `use bar as foo`. Implements RFC #47. Closes #16461. [breaking-change]
2014-08-16Add `use a::b::{c, mod};` to the manualJakub Wieczorek-1/+12
2014-08-15auto merge of #16500 : jackheizer/rust/export-name, r=alexcrichtonbors-0/+2
2014-08-14libsyntax: Accept `use foo as bar;` in lieu of `use bar as foo;`Patrick Walton-2/+2
The old syntax will be removed after a snapshot. RFC #47. Issue #16461.
2014-08-14Add export_name to the attribute whitelist and a description in the rust manualJack Heizer-0/+2
2014-08-14auto merge of #16444 : steveklabnik/rust/fix_boxes_in_manual, r=brsonbors-1/+1
Fixes #16439
2014-08-14auto merge of #16440 : bheesham/rust/master, r=brsonbors-8/+8
* `rust.md`: changes for consistency * `guide-ffi.md`: wrapped inline code NOTE: This is a duplicate of #16375. I completely messed up that fork, so I made a new fork.
2014-08-14auto merge of #16428 : mdinger/rust/sort_attributes, r=cmrbors-112/+144
Targetting at fixing most of #16414. Sorts these alphabetically: * [Crate-only attributes](http://doc.rust-lang.org/rust.html#crate-only-attributes) * [Function-only attributes](http://doc.rust-lang.org/rust.html#function-only-attributes) * [Miscellaneous attributes](http://doc.rust-lang.org/rust.html#miscellaneous-attributes) * [Lint check attributes](http://doc.rust-lang.org/rust.html#lint-check-attributes) * [Built-in Traits](http://doc.rust-lang.org/rust.html#built-in-traits) * [Types](http://doc.rust-lang.org/rust.html#types) * [Deriving](http://doc.rust-lang.org/rust.html#deriving) * [Compiler Features](http://doc.rust-lang.org/rust.html#compiler-features) Doesn't modify these: * [Operators](http://doc.rust-lang.org/rust.html#operators): An alternative sorting is unclear. * [Marker types](http://doc.rust-lang.org/rust.html#marker-types): Could be sorted but uncertain how. See below. * [Stability](http://doc.rust-lang.org/rust.html#stability): Already sorted by stability --- [Marker types](http://doc.rust-lang.org/rust.html#marker-types) has an extra newline above `fail_` which may throw off formatting (see #16412) or it may be for some other reason. If the newline is just a typo, I can just remove it and format this alphabetically like so: ```rust // Sorted alphabetically a_bread b_bread c_bread fail_ fail_bounds_check a_type b_type c_type ``` Marker types is listed as likely to become out of date so I don't know if this is worth doing anyway. [EDIT] modified `Marker types` now and tried to update the language items list.
2014-08-13Sort `Marker types` and add missing language itemsmdinger-22/+54
2014-08-12~ -> Box in the manualSteve Klabnik-1/+1
Fixes #16439
2014-08-12Minor changes to `rust.md`, and `guide-ffi.md`.Bheesham Persaud-8/+8
* `rust.md`: whanges for consistency * `guide-ffi.md`: wrapped inline code
2014-08-11Sort most attributes alphabeticallymdinger-90/+90
2014-08-09rust.md: Explicitly point out how special `'static` is.Felix S. Klock II-1/+7
Drive-by: fix description of `&content` to point out that `&'f type` is (as of today) only for type expressions.
2014-08-07Rename `Share` to `Sync`Alex Crichton-3/+3
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-08-03Remove the "NFKC clause" in the reference manual.OGINO Masanori-2/+1
The reference manual said that code is interpreted as UTF-8 text and a implementation will normalize it to NFKC. However, rustc doesn't do any normalization now. We may want to do any normalization for symbols, but normalizing whole text seems harmful because doing so loses some sort of information even if we choose a non-K variant of normalization. I'd suggest removing "normalized to Unicode normalization form NFKC" phrase for the present so that the manual represents the current state properly. When we address the problem (with a RFC?), then the manual should be updated. Closes #12388. Reference: https://github.com/rust-lang/rust/issues/2253 Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-08-01Fix manual regarding attribute placement.Steve Klabnik-5/+5
Fixes #15494.
2014-08-01librustc: Forbid pattern bindings after `@`s, for memory safety.Patrick Walton-1/+6
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-07-31auto merge of #16073 : mneumann/rust/dragonfly2, r=alexcrichtonbors-1/+1
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-29manual: update list of feature gates, add phase attributeCorey Richardson-5/+71
2014-07-29Port Rust to DragonFlyBSDMichael Neumann-1/+1
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-24libsyntax: Remove `~self` and `mut ~self` from the language.Patrick Walton-2/+2
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-17librustc: Remove cross-borrowing of `Box<T>` to `&T` from the language,Patrick Walton-1/+1
except where trait objects are involved. Part of issue #15349, though I'm leaving it open for trait objects. Cross borrowing for trait objects remains because it is needed until we have DST. This will break code like: fn foo(x: &int) { ... } let a = box 3i; foo(a); Change this code to: fn foo(x: &int) { ... } let a = box 3i; foo(&*a); [breaking-change]
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-3/+3
[breaking-change]