about summary refs log tree commit diff
path: root/doc/rust.md
AgeCommit message (Collapse)AuthorLines
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-1/+1
2013-11-26Updating docs with updated closure syntax, `&fn` -> `||`Vijay Korapaty-8/+8
2013-11-24auto merge of #10603 : alexcrichton/rust/no-linked-failure, r=brsonbors-2/+2
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-24Remove linked failure from the runtimeAlex Crichton-2/+2
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-21auto merge of #10587 : thestinger/rust/stack, r=pcwaltonbors-7/+5
2013-11-21remove segmented stacks from the manualDaniel Micay-7/+5
2013-11-20update manual to reflect &'lifetime syntaxIsaac Dupree-1/+1
2013-11-17auto merge of #10443 : alexcrichton/rust/meaninless-pub-priv, r=cmrbors-0/+1
Closes #10111
2013-11-17Forbid privacy in inner functionsAlex Crichton-0/+1
Closes #10111
2013-11-16Fix the `num_lit` grammar in the reference manual.Chris Morgan-1/+3
- Cause `0` to be considered a valid integer literal (it is). - Add octal literals (missed from #10243). I have *not* modified doc/po/rust.md.pot or doc/po/ja/rust.md.po at all; they already seem to be out of date so it's easier to ignore them for myself. I can update them if desired, of course.
2013-11-07auto merge of #10243 : mattcarberry/rust/master, r=brsonbors-1/+4
Associated with Issue #6563. Useful for Apollo Guidance Computer simulation, Unix file system permissions, and maybe one or two other things.
2013-11-04docs: Replace std::iterator with std::iter.Huon Wilson-5/+4
2013-11-02Added octal literal support.Matt Carberry-1/+4
2013-10-31Implement a concat!() format extensionAlex Crichton-0/+1
This extension can be used to concatenate string literals at compile time. C has this useful ability when placing string literals lexically next to one another, but this needs to be handled at the syntax extension level to recursively expand macros. The major use case for this is something like: macro_rules! mylog( ($fmt:expr $($arg:tt)*) => { error2!(concat!(file!(), ":", line!(), " - ", $fmt) $($arg)*); }) Where the mylog macro will automatically prepend the filename/line number to the beginning of every log message.
2013-10-22Update the manual.Luqman Aden-4/+11
2013-10-22Minor grammatical fixes and removed section on 'rust' toolMichael Letterle-1/+1
2013-10-22Remove old logging from the tutorialAlex Crichton-14/+14
2013-10-21doc: tidy and cleanup CSS deps, add tutorial PDF generationAdrien Tétar-203/+156
2013-10-18auto merge of #9851 : alexcrichton/rust/include_bin, r=huonwbors-2/+5
Previously an ExprLit was created *per byte* causing a huge increase in memory bloat. This adds a new `lit_binary` to contain a literal of binary data, which is currently only used by the include_bin! syntax extension. This massively speeds up compilation times of the shootout-k-nucleotide-pipes test before: time: 469s memory: 6GB assertion failure in LLVM (section too large) after: time: 2.50s memory: 124MB Closes #2598
2013-10-18Optimize include_bin! for large inputsAlex Crichton-2/+5
Previously an ExprLit was created *per byte* causing a huge increase in memory bloat. This adds a new `lit_binary` to contain a literal of binary data, which is currently only used by the include_bin! syntax extension. This massively speeds up compilation times of the shootout-k-nucleotide-pipes test before: time: 469s memory: 6GB assertion failure in LLVM (section too large) after: time: 2.50s memory: 124MB Closes #2598
2013-10-17std: Move size/align functions to std::mem. #2240Brian Anderson-1/+1
2013-10-17Removed the -Z once_fns compiler flag and added the new feature directive of ↵Chris Sainty-0/+4
the same name to replace it. Changed the frame_address intrinsic to no longer be a once fn. This removes the dependency on once_fns from std.
2013-10-07auto merge of #9674 : ben0x539/rust/raw-str, r=alexcrichtonbors-4/+32
This branch parses raw string literals as in #9411.
2013-10-07Fix merge fallout of privacy changesAlex Crichton-0/+4
2013-10-08document raw string literals in tutorial.md and rust.mdBenjamin Herr-4/+32
2013-10-07Document visibility in the manual/tutorialAlex Crichton-0/+161
This removes the warning "Note" about visibility not being fully defined, as it should now be considered fully defined with further bugs being considered just bugs in the implementation.
2013-10-05Implement feature-gating for the compilerAlex Crichton-0/+52
A few features are now hidden behind various #[feature(...)] directives. These include struct-like enum variants, glob imports, and macro_rules! invocations. Closes #9304 Closes #9305 Closes #9306 Closes #9331
2013-10-02syntax: Add #[deriving(FromPrimitive)] syntax extensionErick Tryzelaar-0/+1
Right now this only works for c-style enums.
2013-10-01remove the `float` typeDaniel Micay-49/+34
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30tutorial: Remove usage of fmt!Alex Crichton-22/+24
2013-09-20Invert --cfg debug to --cfg ndebugAlex Crichton-2/+2
Many people will be very confused that their debug! statements aren't working when they first use rust only to learn that they should have been building with `--cfg debug` the entire time. This inverts the meaning of the flag to instead of enabling debug statements, now it disables debug statements. This way the default behavior is a bit more reasonable, and requires less end-user configuration. Furthermore, this turns on debug by default when building the rustc compiler.
2013-09-17Added support for a `\0` escape sequence.Daniel Rosenwasser-1/+1
This commit adds support for `\0` escapes in character and string literals. Since `\0` is equivalent to `\x00`, this is a direct translation to the latter escape sequence. Future builds will be able to compile using `\0` directly. Also updated the grammar specification and added a test for NUL characters.
2013-09-17document what unsafety meansDaniel Micay-11/+63
Closes #9144
2013-09-12Document the Zero traitErick Tryzelaar-1/+2
2013-09-11auto merge of #9039 : singingboyo/rust/update-for-expr-docs, r=thestingerbors-17/+4
The old documentation for for loops/expressions has been quite wrong since the change to iterators. This updates the docs to make them relevant to how for loops work now, if not very in-depth. There may be a need for updates giving more depth on how they work, such as detailing what method calls they make, but I don't know enough about the implementation to include that.
2013-09-07Update for_expr docs.Brandon Sanderson-17/+4
2013-09-06Fix #6031. Allow symbolic log levels, not just numbers.novalis-3/+5
2013-09-04Implement support for indicating the stability of items.Huon Wilson-1/+57
There are 6 new compiler recognised attributes: deprecated, experimental, unstable, stable, frozen, locked (these levels are taken directly from Node's "stability index"[1]). These indicate the stability of the item to which they are attached; e.g. `#[deprecated] fn foo() { .. }` says that `foo` is deprecated. This comes with 3 lints for the first 3 levels (with matching names) that will detect the use of items marked with them (the `unstable` lint includes items with no stability attribute). The attributes can be given a short text note that will be displayed by the lint. An example: #[warn(unstable)]; // `allow` by default #[deprecated="use `bar`"] fn foo() { } #[stable] fn bar() { } fn baz() { } fn main() { foo(); // "warning: use of deprecated item: use `bar`" bar(); // all fine baz(); // "warning: use of unmarked item" } The lints currently only check the "edges" of the AST: i.e. functions, methods[2], structs and enum variants. Any stability attributes on modules, enums, traits and impls are not checked. [1]: http://nodejs.org/api/documentation.html [2]: the method check is currently incorrect and doesn't work.
2013-08-30doc/rust.md: Missing in keyword on keyword list.Carlos-1/+1
2013-08-27librustc: Fix merge falloutPatrick Walton-1/+1
2013-08-22Clarify use_decl module resolution docs.Brandon Sanderson-0/+32
2013-08-21Change type of extern fns from `*u8` to `extern "ABI" fn`Niko Matsakis-11/+21
cc #3678
2013-08-21auto merge of #8585 : jankobler/rust/extract-grammar-01, r=catamorphismbors-2/+2
This fixes some errors which extract_grammar.py reports, when called with python2.7 src/etc/extract_grammar.py <doc/rust.md
2013-08-20rm obsolete integer to_str{,_radix} free functionsDaniel Micay-4/+3
2013-08-18insert spaceJan Kobler-2/+2
in the rust grammar to avoid error messages like this: Exception: non-alpha apparent keyword: pub" when using extract_grammar.py: python2.7 src/etc/extract_grammar.py <doc/rust.md Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2013-08-16doc: correct spelling in documentation.Huon Wilson-3/+3
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-8/+22
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
2013-08-03remove obsolete `foreach` keywordDaniel Micay-4/+4
this has been replaced by `for`
2013-08-02replace `range` with an external iteratorDaniel Micay-2/+1
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-3/+3