Commit Graph

1382 Commits

Author SHA1 Message Date
bors
dfb61166f5 auto merge of #11877 : Armavica/rust/doc-pm-vector, r=alexcrichton
This feature already was in the tutorial, but I believe that the tutorial should be a strict subset of the manual.

I also added an example.
2014-01-29 11:36:41 -08:00
bors
e1580f6d09 auto merge of #11868 : bytbox/rust/remove-do, r=alexcrichton
Fixes #10815.
2014-01-29 08:21:38 -08:00
Scott Lawrence
221670b5bc Removing usage of the do keyword from documentation 2014-01-29 09:15:42 -05:00
Virgile Andreani
d62097d88c Document vector destructuring with wildcard '..' 2014-01-29 10:28:50 +01:00
David Manescu
93398d16ec extra: move glob to libglob
In line with the dissolution of libextra - moves glob to its own library libglob.
Changes based on PR #11787. Updates .gitignore to ignore doc/glob.
2014-01-29 17:23:28 +11:00
David Manescu
4d0d3da9e4 extra: move arena to libarena
In line with the dissolution of libextra - #8784 - moves arena to its own library libarena.
Changes based on PR #11787. Updates .gitignore to ignore doc/arena.
2014-01-29 13:54:38 +11:00
William Ting
9f60e7c306 Update extract-tests.py to use same test directives as rustdoc.
Closes #11362.
2014-01-28 14:52:36 -06:00
xales
f5723791e9 Minor fix to docs. 2014-01-27 01:18:17 -05:00
bors
74fedf325a auto merge of #11787 : alexcrichton/rust/refactor, r=brson
It was decided a long, long time ago that libextra should not exist, but rather its modules should be split out into smaller independent libraries maintained outside of the compiler itself. The theory was to use `rustpkg` to manage dependencies in order to move everything out of the compiler, but maintain an ease of usability.

Sadly, the work on `rustpkg` isn't making progress as quickly as expected, but the need for dissolving libextra is becoming more and more pressing. Because of this, we've thought that a good interim solution would be to simply package more libraries with the rust distribution itself. Instead of dissolving libextra into libraries outside of the mozilla/rust repo, we can dissolve libraries into the mozilla/rust repo for now.

Work on this has been excruciatingly painful in the past because the makefiles are completely opaque to all but a few. Adding a new library involved adding about 100 lines spread out across 8 files (incredibly error prone). The first commit of this pull request targets this pain point. It does not rewrite the build system, but rather refactors large portions of it. Afterwards, adding a new library is as simple as modifying 2 lines (easy, right?). The build system automatically keeps track of dependencies between crates (rust *and* native), promotes binaries between stages, tracks dependencies of installed tools, etc, etc.

With this newfound buildsystem power, I chose the `extra::flate` module as the first candidate for removal from libextra. While a small module, this module is relative complex in that is has a C dependency and the compiler requires it (messing with the dependency graph a bit). Albeit I modified more than 2 lines of makefiles to accomodate libflate (the native dependency required 2 extra lines of modifications), but the removal process was easy to do and straightforward.

---

Testing-wise, I've cross-compiled, run tests, built some docs, installed, uninstalled, etc. I'm still working out a few kinks, and I'm sure that there's gonna be built system issues after this, but it should be working well for basic use!

cc #8784
2014-01-26 16:46:34 -08:00
Alex Crichton
cdfdc1eb6b Move extra::flate to libflate
This is hopefully the beginning of the long-awaited dissolution of libextra.
Using the newly created build infrastructure for building libraries, I decided
to move the first module out of libextra.

While not being a particularly meaty module in and of itself, the flate module
is required by rustc and additionally has a native C dependency. I was able to
very easily split out the C dependency from rustrt, update librustc, and
magically everything gets installed to the right locations and built
automatically.

This is meant to be a proof-of-concept commit to how easy it is to remove
modules from libextra now. I didn't put any effort into modernizing the
interface of libflate or updating it other than to remove the one glob import it
had.
2014-01-26 15:42:15 -08:00
bors
d3f70f5a7d auto merge of #11817 : salemtalha/rust/master, r=brson
Fixes Issue #11815
2014-01-26 15:26:30 -08:00
Salem Talha
cc61fc0994 Removed all instances of XXX in preparation for relaxing of FIXME rule 2014-01-26 14:42:53 -05:00
Alex Crichton
4d6836f418 Fix privacy fallout from previous change 2014-01-26 11:03:13 -08:00
comex
75af1e504a Grammatical fixes. 2014-01-25 15:35:28 -05:00
xales
5d2ef31af9 Fix spacing in example comment. 2014-01-25 11:16:55 -05:00
Derek Chiang
e8baed0b2d Fix some docs about rt 2014-01-25 02:16:17 -05:00
bors
72e888960f auto merge of #11764 : Armavica/rust/doc_patmatch, r=pcwalton
I also removed the obsolete '*' wildcard from the manual.
2014-01-24 17:51:31 -08:00
bors
1ea0947c5d auto merge of #11753 : misfo/rust/patch-1, r=pcwalton 2014-01-24 07:26:31 -08:00
Virgile Andreani
7b1d124f6e Add '@' subpattern binding and examples to manual and tutorial 2014-01-24 03:58:02 +01:00
Virgile Andreani
2c5b04cef1 Replace '*' by '..' in the doc of pattern matching 2014-01-24 03:58:02 +01:00
Sean Chalmers
292ed3e55c Update flip() to be rev().
Consensus leaned in favour of using rev instead of flip.
2014-01-23 22:18:18 +01:00
Sean Chalmers
55d6e0e1b7 Rename Invert to Flip - Issue 10632
Renamed the invert() function in iter.rs to flip().

Also renamed the Invert<T> type to Flip<T>.

Some related code comments changed. Documentation that I could find has
been updated, and all the instances I could locate where the
function/type were called have been updated as well.
2014-01-23 21:50:18 +01:00
Trent Ogren
e1e7ddc494 Fix typo in tutorial 2014-01-23 10:43:48 -06:00
Daniel Micay
802d41fe23 libc: switch free to the proper signature
This does not attempt to fully propagate the mutability everywhere, but
gives new code a hint to avoid the same issues.
2014-01-22 23:13:53 -05:00
Ben Striegel
fce792249e Typo in module tutorial 2014-01-22 16:03:00 -05:00
bors
e65a8b88ca auto merge of #11674 : indirect/rust/doc_file, r=alexcrichton
Found out about `file!` today from o11c in IRC.
2014-01-20 21:26:22 -08:00
bors
62f8661084 auto merge of #11486 : Matthias247/rust/doc, r=cmr
I wrote a chapter for the FFI tutorial that describes how to perform callbacks from C code to Rust and gives some hints about what to consider and synchronization.

I just needed that for my own wrapper and thought it would be helpful for others.
2014-01-20 18:31:38 -08:00
Matthias Einwag
112d01a951 Disabled the tests for the new code blocks 2014-01-20 21:44:41 +01:00
bors
290c29c24c auto merge of #11654 : korenchkin/rust/doc_guide-testing_format, r=cmr 2014-01-19 23:51:33 -08:00
Andre Arko
ec2b8c59a7 document file! 2014-01-19 15:15:57 -08:00
bors
1a9641bf8e auto merge of #11567 : divtxt/rust/master, r=cmr
I found the boxes diagram in the tutorial misleading about how the enum worked.

The current diagram makes it seem that there is a separate Cons struct when there is only one type of struct for the  List type, and Nil is drawn almost as if it's not consuming memory.

I'm aware of the optimization that happens for this enum which takes advantage of the fact that pointer cannot be null but this is an implementation detail and not the only one that applies here.  I can add a note below the diagram mentioning this if you like.
2014-01-18 20:31:47 -08:00
korenchkin
e0ea31f56c Consistent formatting for args and attrs 2014-01-18 21:45:05 +01:00
bors
f3f2e697d8 auto merge of #11619 : adridu59/rust/patch-md, r=cmr
Noticeably necroes #10892.
Also closes #11559.

r? @alexcrichton
2014-01-18 09:01:46 -08:00
Adrien Tétar
14f605df21 doc: fix dangling links in rust.md
Fixes #11559 (not that the manual couldn't use a review).
2014-01-18 13:30:32 +01:00
bors
fb40bdbb62 auto merge of #11614 : remen/rust/patch-1, r=alexcrichton
#[cfg(test)] was being interpreted as starting a header
2014-01-18 03:41:42 -08:00
bors
c58d2bacb7 auto merge of #11503 : FlaPer87/rust/master, r=huonw
The patch adds the missing pow method for all the implementations of the
Integer trait. This is a small addition that will most likely be
improved by the work happening in #10387.

Fixes #11499
2014-01-17 20:36:47 -08:00
bors
9bf85a250c auto merge of #11598 : alexcrichton/rust/io-export, r=brson
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered
  private modules
* Remove with_mem_writer
* Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)

cc #11119
2014-01-17 12:02:07 -08:00
Adrien Tétar
2c19f51d52 doc: fix rust.md fallout 2014-01-17 19:59:37 +01:00
Edward Z. Yang
e33b1dabd3 Elaborate manual on matching (dereference patterns, lvalue/rvalue matching)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2014-01-17 19:44:51 +01:00
Petter Remen
c6ad2de6f1 Fixup in guide-testing.md
Added back-quotes around #[cfg(test)] which was otherwise
being interpreted as starting a header
2014-01-17 19:04:55 +01:00
Alex Crichton
295b46fc08 Tweak the interface of std::io
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered
  private modules
* Remove with_mem_writer
* Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
2014-01-17 10:00:47 -08:00
Flavio Percoco
ed7e576d9c Add a generic power function
The patch adds a `pow` function for types implementing `One`, `Mul` and
`Clone` trait.

The patch also renames f32 and f64 pow into powf in order to still have
a way to easily have float powers. It uses llvms intrinsics.

The pow implementation for all num types uses the exponentiation by
square.

Fixes bug #11499
2014-01-17 15:41:26 +01:00
bors
58a15f3d5a auto merge of #11584 : alexcrichton/rust/issue-3862, r=brson
Turns out there is no documentation of a block expression in the rust manual currently! I deleted the "record expressions" section to make room for a "block expressions" section.

Closes #3862
2014-01-16 19:21:45 -08:00
Alex Crichton
421d24582d Document blocks and use statements a little more
Closes #3862
2014-01-16 09:48:59 -08:00
Div Shekhar
8f93d39c75 doc: add note below diagram about memory layout. 2014-01-15 22:02:48 -08:00
Div Shekhar
065f936bf1 doc: Boxes diagram shows enum value inside box. 2014-01-15 21:46:02 -08:00
a_m0d
c6268384a6 Update docs index to use lists
Also include a missing link to the rustdoc manual
2014-01-15 20:54:34 -05:00
a_m0d
8e5f068d69 Fix formatting in rust-guide document. 2014-01-15 07:20:04 -05:00
OGINO Masanori
006d169a2f Note that translation workflow is WIP now.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-01-14 21:30:15 +09:00
OGINO Masanori
1ba61b915b Add notes for translators.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-01-14 21:28:34 +09:00