Commit Graph

1350 Commits

Author SHA1 Message Date
bors
290c29c24c auto merge of #11654 : korenchkin/rust/doc_guide-testing_format, r=cmr 2014-01-19 23:51:33 -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
OGINO Masanori
729715779a Update .po and strip down untranslated entries.
This work is done by execute these commands manually:

$ po4a --copyright-holder="The Rust Project Developers" \
    --package-name="Rust" \
    --package-version="0.10-pre" \
    -M UTF-8 -L UTF-8 \
    doc/po4a.conf
$ for f in doc/po/**/*.po; do
>   msgattrib --translated $f -o $f.strip
>   if [ -e $f.strip ]; then
>       mv $f.strip $f
>   else
>       rm $f
>   fi
> done

It should be managed by the build system automatically to use in our
translation workflow, but I've not yet done that.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-01-14 21:19:16 +09:00
bors
77eeddaa48 auto merge of #11501 : alexcrichton/rust/dox, r=brson
The official documentation sorely needs an explanation of the rust runtime and what it is exactly, and I want this guide to provide that information.

I'm unsure of whether I've been too light on some topics while too heavy on others. I also feel like a few things are still missing. As always, feedback is appreciated, especially about things you'd like to see written about!
2014-01-13 23:26:36 -08:00
Alex Crichton
289ba105ae dox: Write a guide to the rust runtime 2014-01-13 23:22:07 -08:00
Patrick Walton
119c6141f5 librustc: Remove @ pointer patterns from the language 2014-01-13 14:45:21 -08:00
bors
74258eaefa auto merge of #11491 : wting/rust/wting_7959_document_inline_attributes, r=alexcrichton
Closes #7959.
2014-01-11 23:16:27 -08:00
William Ting
826f24bdf1 Add inline attributes documentation.
Closes #7959.
2014-01-11 22:53:45 -06:00
Kevin Ballard
d76ce5f31e Add librustuv to doc/index.md 2014-01-11 19:16:25 -08:00
Kevin Ballard
de6f213927 Restore missing line breaks in doc/index.html
a30d61b05a removed all of the trailing whitespace in doc/index.md.
Unfortunately, that trailing whitespace was actually markdown syntax for
line breaks.
2014-01-11 19:15:05 -08:00
Kevin Ballard
110e5dd1ac doc: build the docs for librustpkg 2014-01-11 19:13:59 -08:00
Adrien Tétar
a30d61b05a Various READMEs and docs cleanup
Noticeably closes #11428.
2014-01-11 19:41:31 +01:00
Brendan Zabarauskas
4fc0452ace Remove re-exports of std::io::stdio::{print, println} in the prelude.
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-11 10:46:00 +11:00
kud1ing
aca705cae9 "As long an iterator" => "As long as an iterator" 2014-01-10 15:05:54 +01:00
OGINO Masanori
20ec0be779 Remove *.pot files and ignore them now.
The .pot files can be generated automatically and the files contain
timestamps in their content. They can cause huge conflicts and take huge
space even if you are not a translator.

This commit is a part of improvement discussed on
https://github.com/mozilla/rust/pull/11383 .

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-01-10 07:21:32 +09:00
OGINO Masanori
d4051b6145 Update doc/po4a.conf for recent changes.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-01-10 07:21:32 +09:00
Brendan Zabarauskas
ceea85a148 Remove ApproxEq and assert_approx_eq!
This trait seems to stray too far from the mandate of a standard library as implementations may vary between use cases.
2014-01-09 15:41:46 +11:00
Huon Wilson
9dc44c7d86 Fix cheatsheet examples on 32-bit platforms.
0xDEADBEEF doesn't fit in an int = i32 (on 32-bit computers).
2014-01-09 02:16:36 +11:00
Brian Anderson
fee8c1d2c7 doc: Typos 2014-01-07 21:31:37 -08:00
Clinton Ryan
1fd4c3bb40 Fixed code snippets 2014-01-07 21:30:17 -08:00
Huon Wilson
7cfce50b24 Address some minor points in the pointer guide
cc #11364.
2014-01-07 21:24:48 -08:00
Brian Anderson
2d8dd6afd4 doc: Add rustc and syntax to the index 2014-01-07 21:23:26 -08:00
Brian Anderson
da43832034 doc: Add libgreen and libnative to the index 2014-01-07 20:49:13 -08:00
Brian Anderson
d323632669 'borrowed pointer' -> 'reference' 2014-01-07 18:49:13 -08:00
Brian Anderson
b65b4d6384 doc: Fix URL of libextra docs 2014-01-07 17:29:57 -08:00
Brian Anderson
6b7ffa4a8b doc: Title reference manual consistently 2014-01-07 17:28:15 -08:00
Brian Anderson
1ea02170bd doc: Highlight the testing guide correctly 2014-01-07 17:01:07 -08:00
Brian Anderson
77ec04487b mk: Start testing the cheatsheet 2014-01-07 17:01:07 -08:00
Brian Anderson
c2ef4e5372 doc: Title guides consistently 2014-01-07 17:01:06 -08:00
Brian Anderson
3100bb424c doc: Fix table format in cheatsheet 2014-01-07 17:01:06 -08:00
Brian Anderson
a61d7d6dbe doc: Syntax highlight the cheatsheet 2014-01-07 17:01:06 -08:00