Commit graph

1059 commits

Author SHA1 Message Date
gifnksm
8e1440c7d4 tutorial: Add Japanese translation 2013-08-13 00:26:49 +09:00
gifnksm
e4cfb1d0f5 doc: Generate .po files for Japanse translations 2013-08-12 22:39:31 +09:00
gifnksm
2bc8a9be77 doc: Update .pot files 2013-08-12 22:39:31 +09:00
Erick Tryzelaar
f007a46d37 Merge branch 'master' of https://github.com/MAnyKey/rust into rollup 2013-08-10 13:03:34 -07:00
Erick Tryzelaar
5e1ca23a65 Merge branch 'vec-exh' of https://github.com/stepancheg/rust into rollup 2013-08-10 13:00:20 -07:00
bors
6f6dce7bbc auto merge of #8176 : catamorphism/rust/rustpkg-extern-mod, r=catamorphism
r? @graydon Also, notably, make rustpkgtest depend on the rustpkg executable (otherwise, tests that shell out to rustpgk might run when rustpkg doesn't exist).
2013-08-09 16:17:10 -07:00
Tim Chevalier
96fd606ddd std/rustc/rustpkg/syntax: Support the extern mod = ... form
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-09 14:11:50 -07:00
Maxim Kolganov
b4fe856645 typo in tutorial 2013-08-09 01:43:44 +04:00
bors
8f65dbfcfa auto merge of #8385 : cmr/rust/big-rollup, r=alexcrichton
This is a fairly large rollup, but I've tested everything locally, and none of
it should be platform-specific.

r=alexcrichton (bdfdbdd)
r=brson (d803c18)
r=alexcrichton (a5041d0)
r=bstrie (317412a)
r=alexcrichton (135c85e)
r=thestinger (8805baa)
r=pcwalton (0661178)
r=cmr (9397fe0)
r=cmr (caa4135)
r=cmr (6a21d93)
r=cmr (4dc3379)
r=cmr (0aa5154)
r=cmr (18be261)
r=thestinger (f10be03)
2013-08-08 14:32:02 -07:00
Corey Richardson
878e74e1ce Fix more priv fallout 2013-08-08 17:02:03 -04:00
Alex Crichton
1b103912ea Add some documentation about globals in ffi docs 2013-08-07 22:41:14 -04:00
Brian Anderson
ce95b01014 Disable linked failure tests
The implementation currently contains a race that leads to segfaults.
2013-08-07 16:32:20 -07:00
Brian Anderson
b735e6b104 doc: Fix deadlocks in tutorial due to yield bustage 2013-08-07 16:32:20 -07:00
Stepan Koltsov
828bfb2c61 Fix incorrect non-exhaustive matching for fixed length vecs
Code like this is fixed now:

```
fn foo(p: [u8, ..4]) {
    match p {
        [a, b, c, d] => {}
    };
}
```

Invalid constructors are not reported as errors yet:

```
fn foo(p: [u8, ..4]) {
    match p {
        [_, _, _] => {} // this should be error
        [_, _, _, _, _, .._] => {} // and this
        _ => {}
    }
}
```

Issue #8311 is partially fixed by this commit. Fixed-length arrays in
let statement are not yet allowed:

```
let [a, b, c] = [1, 2, 3]; // still fails
```
2013-08-07 22:07:24 +04:00
Daniel Micay
8f9bbc476d remove extra::iter
This module provided adaptors for the old internal iterator protocol,
but they proved to be quite unreadable and are not generic enough to
handle borrowed pointers well.

Since Rust no longer defines an internal iteration protocol, I don't
think there's going to be any reuse via these adaptors.
2013-08-06 23:41:20 -04:00
Daniel Micay
1008945528 remove obsolete foreach keyword
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Daniel Micay
87cf2864b1 rm obsolete documentation on for
it is documented in the container/iterator tutorial, not the basic
tutorial
2013-08-03 03:00:42 -04:00
Daniel Micay
b41d04763e make for parse as foreach does
Closes #6997
2013-08-03 03:00:42 -04:00
Patrick Walton
887c656970 librustc: Introduce a new visitor type based on traits and port syntax to it.
This is preparation for removing `@fn`.

This does *not* use default methods yet, because I don't know
whether they work. If they do, a forthcoming PR will use them.

This also changes the precedence of `as`.
2013-08-02 21:57:58 -07:00
Daniel Micay
234acad404 replace range with an external iterator 2013-08-02 00:51:14 -04:00
blake2-ppc
78cde5b9fb std: Change Times trait to use do instead of for
Change the former repetition::

    for 5.times { }

to::

    do 5.times { }

.times() cannot be broken with `break` or `return` anymore; for those
cases, use a numerical range loop instead.
2013-08-01 16:54:22 +02:00
Daniel Micay
1fc4db2d08 migrate many for loops to foreach 2013-08-01 05:34:55 -04:00
bors
2830d7d013 auto merge of #8032 : catamorphism/rust/rustpkg-tags, r=graydon
r? @graydon    Package IDs can now be of the form a/b/c#FOO, where (if a/b/c is
    a git repository) FOO is any tag in the repository. Non-numeric
    tags only match against package IDs with the same tag, and aren't
    compared linearly like numeric versions.
    
 While I was at it, refactored the code that calls `git clone`,  and segregated build output properly for different packages.
2013-07-29 11:04:25 -07:00
bors
fddb35e988 auto merge of #7984 : gifnksm/rust/tutorial-links, r=bstrie 2013-07-29 09:16:22 -07:00
Steven Stewart-Gallus
d0b7515aed Change concurrency primitives to standard naming conventions
To be more specific:

`UPPERCASETYPE` was changed to `UppercaseType`
`type_new` was changed to `Type::new`
`type_function(value)` was changed to `value.method()`
2013-07-27 22:06:29 -07:00
Tim Chevalier
7079ec6e2e docs: Talk about tags that aren't versions in the "Package identifiers" section 2013-07-26 20:06:41 -07:00
Alex Crichton
b782d42cba Deny all warnings by default in doc tests
Allow some common ones that are good for examples, however.
2013-07-26 18:04:20 -07:00
Daniel Micay
ba41755069 improve container/iterator tutorial 2013-07-24 18:44:16 -04:00
Daniel Micay
af5a17b7d0 document random-access iterators 2013-07-24 09:45:20 -04:00
Daniel Micay
8c02272512 expand on double-ended iterators in the tutorial 2013-07-24 09:45:20 -04:00
gifnksm
e68697b55e tutorial: Remove the sentence about mutable fields. 2013-07-23 12:18:54 +09:00
gifnksm
9aab7e59d7 tutorial: Fix obsolete names 2013-07-23 11:05:49 +09:00
gifnksm
8fb77c7099 tutorial: Repair broken links 2013-07-23 11:01:21 +09:00
zslayton
49014c8268 Exposed previously hidden 'use' statements in the tutorial's sample code. 2013-07-21 23:40:52 -04:00
maikklein
b082302727 updated manual 2013-07-19 20:43:04 -04:00
bors
78f8b407e3 auto merge of #7846 : alexcrichton/rust/static-mut-dox, r=pnkfelix
It's probably a good idea to at least *mention* them somewhere.
2013-07-18 13:49:36 -07:00
bors
874eb1939b auto merge of #7845 : gifnksm/rust/tutorial-remove-dup, r=cmr
`pandoc` issues warnings.

```
pandoc: Duplicate link reference `[macros]' "source" (line 2151, column 1)
pandoc: Duplicate link reference `[tasks]' "source" (line 2150, column 1)
pandoc: Duplicate link reference `[wiki-start]' "source" (line 92, column 1)
```

This PR also removes unused link references.
2013-07-18 12:04:39 -07:00
Patrick Walton
2dbb3c3887 test: Fix tests. 2013-07-17 14:57:54 -07:00
Alex Crichton
8885b740f6 Add documentation about mutable statics to rust.md 2013-07-17 08:57:08 -07:00
gifnksm
827a6d26e6 tutorial: remove unused link references. 2013-07-17 15:38:26 +09:00
gifnksm
5d4b990fc6 tutorial: remove duplicate link references.
`pandoc` issues warnings.

```
pandoc: Duplicate link reference `[macros]' "source" (line 2151, column 1)
pandoc: Duplicate link reference `[tasks]' "source" (line 2150, column 1)
pandoc: Duplicate link reference `[wiki-start]' "source" (line 92, column 1)
```
2013-07-17 13:29:10 +09:00
OGINO Masanori
ad3a69739f Add project information to l10n templates. 2013-07-17 07:48:30 +09:00
Felix S. Klock II
8515abe0d9 Add doc and examples for attributes allow/warn/deny/forbid.
Fix #7821.
2013-07-16 18:20:49 +02:00
Daniel Micay
2b96408600 extend the iterator tutorial
documents conversion, size hints and double-ended iterators and adds
more of the traits to the prelude
2013-07-12 01:53:50 -04:00
bors
e388a80c23 auto merge of #7117 : jensnockert/rust/freestanding, r=cmr
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16,
u32, u64, float, int, and uint are replaced with generic functions in
num instead.

This means that instead of having to know everywhere what the type is, like

~~~
f64::sin(x)
~~~

You can simply write code that uses the type-generic versions in num instead, this works for all types that implement the corresponding trait in num.

~~~
num::sin(x)
~~~

Note 1: If you were previously using any of those functions, just replace them
with the corresponding function with the same name in num.

Note 2: If you were using a function that corresponds to an operator, use the
operator instead.

Note 3: This is just https://github.com/mozilla/rust/pull/7090 reopened against master.
2013-07-09 13:34:50 -07:00
Jens Nockert
20a2fbd055 I forgot the changes to the docs as well
Apparently yesterday wasn't my day, and I forgot to add the changes to
all the tests apparently, and in the end forgot the docs extra much.
Please documentation, forgive me, I really do love you, I hope you
forgive me.

Next time we'll meet tutorial, I promise to bring cookies and tea. I
really want to be best-friends-forever with you, <3.

XOXO
2013-07-09 18:24:30 +02:00
bors
62bb843e32 auto merge of #7641 : lucab/rust/lucab/po4a, r=catamorphism
As per https://mail.mozilla.org/pipermail/rust-dev/2013-July/004685.html 

This is the initial machinery to setup the l10n infrastructure for markdown documentation.
A new "docs-l10n" target will take care of generating, updating and then building .pot and .po files, and later on the final .md.

This commit includes the .pot for all current .md docs; they can be feed directly to Mozilla Verbatim if wanted.
Please note that po4a only provides the orig.md -> .pot -> l10n.po -> l10n.md flow. The l10n.md -> l10n.html generation is not currently built in the makefile, as no language has been enabled.
2013-07-09 03:25:29 -07:00
Luca Bruno
7a4210a174 Generate initial translatable templates for documentation
These files are automatically genereated by `make docs-l10n` (via po4a),
which will also take of updating them if the original .md changes.

Signed-off-by: Luca Bruno <lucab@debian.org>
2013-07-07 21:17:35 +02:00
Luca Bruno
3177e63dee Use po4a to provide translatable documentation
This commit add a new "docs-l10n" make target which uses po4a to:
* create .pot (PO templates) from markdown doc
* update templates and po for enabled languages
* generate translated markdown for completed (> 80%) translations

Currently, no language has been activated.

Signed-off-by: Luca Bruno <lucab@debian.org>
2013-07-07 21:12:00 +02:00
bors
63f7857697 auto merge of #7582 : mitsuhiko/rust/doc-fixes, r=huonw
Drop is no longer a keyword, removed it from the intro docs.
2013-07-07 01:44:02 -07:00