Commit Graph

28330 Commits

Author SHA1 Message Date
Adolfo Ochagavía
ac170b100e Fixed typo in std::vec 2014-04-28 15:39:11 +02:00
bors
7a19a82d11 auto merge of #13811 : alexcrichton/rust/closed-issues, r=sfackler
Closes #5518
Closes #7320
Closes #8391
Closes #8827
Closes #8983
Closes #10683
Closes #10802
Closes #11515
2014-04-27 23:06:41 -07:00
Alex Crichton
35f295d2a9 test: Add tests for closed issues
Closes #5518
Closes #7320
Closes #8391
Closes #8827
Closes #8983
Closes #10683
Closes #10802
Closes #11515
2014-04-27 20:35:51 -07:00
bors
4e55bc7ac3 auto merge of #13795 : klutzy/rust/win-make-check, r=alexcrichton
Fixes #12303.

Also contains a partial fix for `make check` failure.
2014-04-27 20:31:37 -07:00
klutzy
405861ed0a test: Fix run-make on windows 2014-04-28 11:45:30 +09:00
bors
ff25d62165 auto merge of #13809 : prattmic/rust/tutorial_debug, r=alexcrichton
As of cc6ec8df, the Owned closures example uses println! instead of
debug!, making a note about seeing debug seem out-of-place in this
section.

Since debug! is not used elsewhere in the tutorial, remove the note
entirely.
2014-04-27 19:06:38 -07:00
bors
c2b6ab94e2 auto merge of #13801 : ryantm/rust/master, r=alexcrichton
The previous error message using assert_eq! was quite cryptic. This should be more clear. I also added a test for the underflow case.
2014-04-27 17:26:37 -07:00
bors
8b24964012 auto merge of #13799 : m-r-r/rust/patch-std-io-standard_error, r=alexcrichton
Hello,

With the latest version of Rust, calling to the function [`std::io::standard_error()`](http://static.rust-lang.org/doc/master/std/io/fn.standard_error.html) succeeds only if the value of the argument is `EndOfFile`, `IoUnavailable` or `InvalidInput`. If the function is called with another value as argument, it fails without message.

Here is a piece of code that reproduces the problem:

```rust
use std::io::{standard_error,EndOfFile,FileNotFound,PermissionDenied};

fn main() {
     println!("Error 1: {}", standard_error(EndOfFile)); // does not fail
     println!("Error 2: {}", standard_error(FileNotFound)); // fails
     println!("Error 3: {}", standard_error(PermissionDenied)); //fails
}
```
This was because the `IoErrorKind` passed as argument wasn't matched against all the possible values.

I added the missing branches in the `match` statement inside the function, and i removed the call to the `fail!()` macro. I rebuilt the crate with the latest `rustc` version and it seems to works.
2014-04-27 16:01:39 -07:00
Michael Pratt
bc330063d8 doc: Remove out-of-place debug! note
As of cc6ec8df, the Owned closures example uses println! instead of
debug!, making a note about seeing debug seem out-of-place in this
section.

Since debug! is not used elsewhere in the tutorial, remove the note
entirely.
2014-04-27 18:27:40 -04:00
bors
479b8a812c auto merge of #13792 : jacob-hegna/rust/master, r=alexcrichton
Just modified the documentation for parse_bytes to make it more clear how the bytes were parsed (big endian) and to show an example of what it returned.  I also added documentation for the to_str_bytes which previously had no documentation (besides one stackoverflow post).
2014-04-27 14:36:41 -07:00
Jacob Hegna
b8f5090a9a Rewrote documentation for parse_bytes and to_str_bytes in {int, uint}_macros.rs 2014-04-27 15:49:47 -05:00
bors
02ba8e2754 auto merge of #13798 : aochagavia/rust/pr, r=alexcrichton 2014-04-27 13:11:43 -07:00
bors
1be19f9cc8 auto merge of #13796 : ema-fox/rust/patch-1, r=kballard 2014-04-27 11:46:46 -07:00
Ryan Mulligan
550c87e17d add BigUint subtraction underflow error message 2014-04-27 10:37:02 -07:00
Adolfo Ochagavía
af064c7bb0 Fixed typo in std::iter 2014-04-27 16:50:55 +02:00
m-r-r
a7b8a13e14 Added missing values in std::io::standard_error() 2014-04-27 14:45:28 +02:00
Emanuel Rylke
107da87996 Fix link to hashmap.rs and json.rs in sample code FAQ 2014-04-27 14:17:06 +02:00
bors
b2a8fae84c auto merge of #13783 : wackywendell/rust/permfix, r=kballard
I filed bugs #13734 and #13759 recently, and then realized I could probably fix them myself. This does exactly that, with a couple additional modifications and additions to the test-suite to pick up on that.

I've never done this before, so please feel free to tell me all the things I'm doing wrong or could be doing better.
2014-04-26 23:41:31 -07:00
klutzy
1efb668aaa test: Rename a test to bypass UAC on windows 2014-04-27 15:13:37 +09:00
Wendell Smith
b7d0feb90c Fixing permutation of small lists, such that [], [x] -> [[]], [[x]], and updating size_hints.
Fixes #13734 and #13759.
2014-04-26 22:27:36 -04:00
bors
3ffe56ce38 auto merge of #13777 : lifthrasiir/rust/no-multi-viewitemuse, r=alexcrichton
It reflected the obsolete syntax `use a, b, c;` and did not make past the parser (though it was a non-fatal error so we can continue). This legacy affected many portions of rustc and rustdoc as well, so this PR cleans them up altogether.

As a side effect of cleanup, we now have `SCHEMA_VERSION` in `rustdoc::clean` (instead of the crate root), so it has a better chance to be updated when `rustdoc::clean` gets updated.
2014-04-26 17:01:28 -07:00
bors
ade02bb534 auto merge of #13769 : alexcrichton/rust/restrict-some-scopes, r=huonw
This addresses the ICE from #13763, but it does not allow the test to compile,
due to #13768. An alternate test was checked in in the meantime.

Closes #13763
2014-04-26 06:46:24 -07:00
Kang Seonghoon
bec77eb9c5 rustdoc: Moved SCHEMA_VERSION to clean.
it should be changed when the module gets updated, so it helps to
have the `SCHEMA_VERSION` with the definitions themselves.
2014-04-26 22:45:50 +09:00
Kang Seonghoon
b03547bac1 syntax: ViewItemUse no longer contains multiple view paths.
it reflected the obsolete syntax `use a, b, c;` and did not make
past the parser (though it was a non-fatal error so we can continue).
this legacy affected many portions of rustc and rustdoc as well,
so this commit cleans them up altogether.
2014-04-26 22:33:45 +09:00
bors
a692e9b123 auto merge of #13766 : BurntSushi/rust/regex-dynamic-tests, r=alexcrichton
Before, tests for dynamic regexes ran during stage1 and tests for
native regexes ran during stage2. But the buildbots don't test stage1,
so now both dynamic and native tests are run during stage2.

Closes #13740.
2014-04-26 01:16:23 -07:00
bors
a5d203579b auto merge of #13758 : sodaplayer/rust/patch-1, r=alexcrichton
Rustdoc doesn't seem like it's converting the old format to a table as we can see here:
http://static.rust-lang.org/doc/master/complement-cheatsheet.html#ffi-(foreign-function-interface)
This new format should fix that and it's also rendered by Github's markdown preview.
2014-04-25 23:31:25 -07:00
bors
cf3f9cf3f9 auto merge of #13750 : aturon/rust/issue-12583, r=alexcrichton
Clarifies the interaction of `is_dir`, `is_file` and `exists` with
symbolic links.  Adds a convenience `lstat` function alongside of
`stat`.  Removes references to conditions.

Closes issue #12583.
2014-04-25 21:51:27 -07:00
bors
35f3f7a74b auto merge of #13748 : hjr3/rust/guide-container-update, r=alexcrichton 2014-04-25 20:06:32 -07:00
bors
395d8857d6 auto merge of #13744 : adrientetar/rust/derp, r=brson
- Serve webfonts locally
- Style changes around `blockquote` and `code`
- Minor adjustments from previous changes

Bringing back updated examples: [modified tutorial](http://adrientetar.legtux.org/cached/rust-docs/tutorial.htm) and [modified manual](http://adrientetar.legtux.org/cached/rust-docs/manual.htm).
And for rustdoc, [modified `enum.FileType`](http://adrientetar.legtux.org/cached/rust-docs/enum.FileType.htm), [modified `std`](http://adrientetar.legtux.org/cached/rust-docs/std.htm) and [modified `std::io`](http://adrientetar.legtux.org/cached/rust-docs/io.htm).
2014-04-25 18:26:33 -07:00
Aaron Turon
3200ce5a2e clarify docs for std:io::fs::Path::{is_dir,is_file,exists}; add lstat
Clarifies the interaction of `is_dir`, `is_file` and `exists` with
symbolic links.  Adds a convenience `lstat` function alongside of
`stat`.  Removes references to conditions.

Closes issue #12583.
2014-04-25 15:02:09 -07:00
Alex Crichton
87bac6db13 rustc: Restrict the scope of a borrow on def_map
This addresses the ICE from #13763, but it does not allow the test to compile,
due to #13768. An alternate test was checked in in the meantime.

Closes #13763
2014-04-25 14:45:12 -07:00
Andrew Gallant
34c88ef4d6 Tests for dynamic regexes will now run during 'check-stage2'.
Before, tests for dynamic regexes ran during stage1 and tests for
native regexes ran during stage2. But the buildbots don't test stage1,
so now both dynamic and native tests are run during stage2.

Closes #13740.
2014-04-25 17:28:05 -04:00
John Fresco
e7ca1d1c67 Update FFI signature table to use pipe format
Rustdoc doesn't seem like it's converting the old format to a table as we can see here:
http://static.rust-lang.org/doc/master/complement-cheatsheet.html#ffi-(foreign-function-interface)
This new format should fix that and it's also rendered by Github's markdown preview.
2014-04-25 13:07:30 -06:00
bors
6c3bdbe2e4 auto merge of #13735 : aturon/rust/float-consts-take-2, r=brson
Follow-up on issue #13297 and PR #13710.  Instead of following the (confusing) C/C++ approach
of using `MIN_VALUE` for the smallest *positive* number, we introduce `MIN_POS_VALUE` (and
in the Float trait, `min_pos_value`) to represent this number.

This patch also removes a few remaining redundantly-defined constants that were missed last
time around.
2014-04-25 12:01:27 -07:00
bors
0be4c3372a auto merge of #13741 : klutzy/rust/test-reachable, r=alexcrichton
It didn't work because it tried to call itself but symbols are not
exported as default in executables.

Note that `fun5` is not internal anymore since it is in library.

Second commit removes/updates some old tests.
2014-04-25 10:51:24 -07:00
bors
a28a701d64 auto merge of #13747 : michaelfairley/rust/patch-1, r=alexcrichton 2014-04-25 09:21:20 -07:00
Herman J. Radtke III
87f2e21e18 doc: Update modules for containers 2014-04-25 08:17:18 -07:00
Michael Fairley
3124057101 Fix variable name in prose to match code it's describing 2014-04-25 10:15:47 -05:00
klutzy
550f975f6d test: Remove/update some old ignored tests 2014-04-25 19:45:53 +09:00
Adrien Tétar
b3577a10f3 rustdoc: bring it inline 2014-04-25 18:04:59 +09:00
klutzy
0f52122fa2 test: Enable extern-fn-reachable test
It didn't work because it tried to call itself but symbols are not
exported as default in executables.

Note that `fun5` is not internal anymore since it is in library.
2014-04-25 17:07:56 +09:00
Adrien Tétar
c9d995d384 doc,rustdoc: store webfonts locally
- Avoids cross-domain requests restrictions
- Better availability of content
- No HTML queries needed for an offline build
2014-04-25 17:05:56 +09:00
Adrien Tétar
14654835fc doc: slight design refresh 2014-04-25 16:59:04 +09:00
Adrien Tétar
22160014a4 rustdoc: fixes 2014-04-25 16:56:39 +09:00
bors
eea4909a87 auto merge of #13700 : BurntSushi/rust/regexp, r=alexcrichton
Implements [RFC 7](https://github.com/rust-lang/rfcs/blob/master/active/0007-regexps.md) and will hopefully resolve #3591. The crate is marked as experimental. It includes a syntax extension for compiling regexps to native Rust code.

Embeds and passes the `basic`, `nullsubexpr` and `repetition` tests from [Glenn Fowler's (slightly modified by Russ Cox for leftmost-first semantics) testregex test suite](http://www2.research.att.com/~astopen/testregex/testregex.html). I've also hand written a plethora of other tests that exercise Unicode support, the parser, public API, etc. Also includes a `regex-dna` benchmark for the shootout.

I know the addition looks huge at first, but consider these things:

1. More than half the number of lines is dedicated to Unicode character classes.
2. Of the ~4,500 lines remaining, 1,225 of them are comments.
3. Another ~800 are tests.
4. That leaves 2500 lines for the meat. The parser is ~850 of them. The public API, compiler, dynamic VM and code generator (for `regexp!`) make up the rest.
2014-04-24 23:41:15 -07:00
Andrew Gallant
7269bc77e1 Ignore regex tests (regular, cfail and benchmark) on Windows (for now). 2014-04-25 01:37:27 -04:00
bors
2bb2341a4a auto merge of #13697 : pongad/rust/consts, r=alexcrichton
I decided to put architecture constants in another mod. They are not used, so a part of me is thinking of just getting rid of them altogether. The rest should be similar to what @brson wants.
Fixes #13536
2014-04-24 22:31:16 -07:00
Michael Darakananda
7c5d48a09e Cleaned up os::consts. The module only exposes constants for the target OS and arch.
Constants for other OS's and arch's must be defined manually.
[breaking-change]
2014-04-25 00:38:05 -04:00
Andrew Gallant
09a8b38550 mk: Copy fewer libraries into the host artifacts 2014-04-25 00:31:29 -04:00
Andrew Gallant
b8b7484703 Add a regex crate to the Rust distribution.
Also adds a regex_macros crate, which provides natively compiled
regular expressions with a syntax extension.

Closes #3591.

RFC: 0007-regexps
2014-04-25 00:27:24 -04:00