Commit Graph

35084 Commits

Author SHA1 Message Date
Jorge Aparicio
09f7713dd4 libserialize: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
e6bd217ce8 librustdoc: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
8bb5ef9df5 librustc_trans: remove unnecessary as_slice calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
7d8eabb226 librustc_back: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
00f3c3f7a7 librustc: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
ae555a99a6 libregex_macros: remove unnecessary as_slice calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
89e6a81ef9 libregex: remove unnecessary as_slice calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
0ea31348d9 liblog: remove unnecessary as_slice calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
c0ef959b31 libgraphviz: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
6efc87945b libgetops: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
a7960136ac libfmt_macros: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
0f54f32a9c libflate: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
5257a5b284 libcoretest: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
0ac3b166df liballoc: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
f2af07e6d5 libcollections: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
jbranchaud
2171c95553 Add missing semicolon to hello world program in intro. 2014-12-06 17:36:32 -06:00
Steven Fackler
3246d4f369 Change from message to expected 2014-12-06 15:16:38 -08:00
Steven Fackler
616af6eb83 Allow message specification for should_fail
The test harness will make sure that the panic message contains the
specified string. This is useful to help make `#[should_fail]` tests a
bit less brittle by decreasing the chance that the test isn't
"accidentally" passing due to a panic occurring earlier than expected.
The behavior is in some ways similar to JUnit's `expected` feature:
`@Test(expected=NullPointerException.class)`.

Without the message assertion, this test would pass even though it's not
actually reaching the intended part of the code:
```rust
 #[test]
 #[should_fail(message = "out of bounds")]
fn test_oob_array_access() {
    let idx: uint = from_str("13o").unwrap(); // oops, this will panic
    [1i32, 2, 3][idx];
}
```
2014-12-06 15:13:48 -08:00
bors
a31ad6bfcd auto merge of #19579 : alexcrichton/rust/snapshots, r=nikomatsakis 2014-12-06 23:12:17 +00:00
NODA, Kai
87424c6a32 Fix false positive alerts from a run-pass test on Command.
Reported as a part of rust-lang/rust#19120

The logic of rust-lang/rust@74fb798a20 was
flawed because when a CI tool run the test parallely with other tasks,
they all belong to a single session family and the test may pick up
irrelevant zombie processes before they are reaped by the CI tool
depending on timing.

Also, panic! inside a loop over all children makes the logic simpler.

By not destructing the return values of Command::spawn() until
find_zombies() finishes, I believe we can conduct a slightly stricter
test.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-12-07 07:07:26 +08:00
Vadim Chugunov
de8f48b10a - Support gcc-less installation on Windows. To do so in unattended mode run:<intaller>.exe /TYPE=compact /SILENT.
- Do not require admin privileges to install.
2014-12-06 12:48:32 -08:00
bors
de83d7dd19 auto merge of #19431 : erickt/rust/buf-writer-error, r=alexcrichton
Previously, `BufWriter::write` would just return an `std::io::OtherIoError` if someone attempted to write past the end of the wrapped buffer. This pull request changes the error to support partial writes and return a `std::io::ShortWrite`, or an `io::io::EndOfFile` if it's been fully exhausted.

 I've also optimized away a bounds check inside `BufWriter::write`, which should help shave off some nanoseconds in an inner loops.
2014-12-06 20:12:13 +00:00
bors
358db12a89 auto merge of #19590 : sfackler/rust/fix-android, r=sfackler
Seems to be blocking forever
2014-12-06 17:42:16 +00:00
Steven Fackler
2e2aca9eb8 Ignore wait-forked-but-failed-child
Test will be fixed in #19588
2014-12-06 08:13:57 -08:00
Corey Richardson
6e18b5af93 rustc: check supertraits for object safety
Closes #18959

Technically, this causes code that once compiled to no longer compile, but
that code probably never ran.

[breaking-change]
2014-12-05 22:27:21 -08:00
jbranchaud
9cb26e2db0 Add a doctest for BTreeMap's iter method. 2014-12-05 23:50:13 -06:00
Steven Fackler
8a288d3aff Ignore issue #16671 test on android
Seems to be blocking forever
2014-12-05 20:22:35 -08:00
Huon Wilson
b800ce1608 Implement lifetime elision for Foo(...) -> ... type sugar.
This means that `Fn(&A) -> (&B, &C)` is equivalent to `for<'a> Fn(&'a A)
-> (&'a B, &'a C)` similar to the lifetime elision of lower-case `fn` in
types and declarations.

Closes #18992.
2014-12-05 19:04:13 -08:00
Huon Wilson
e8524198e3 Feature-gate explicit unboxed closure method calls & manual impls,
detect UFCS drop and allow UFCS methods to have explicit type parameters.

Work towards #18875.

Since code could previously call the methods & implement the traits
manually, this is a

[breaking-change]

Closes #19586. Closes #19375.
2014-12-05 17:54:45 -08:00
mdinger
796e4b8a88 Typo 2014-12-05 20:14:28 -05:00
Matt Windsor
363ed2f7ad Correct minor typos on the ownership guide.
liftimes -> lifetimes
2014-12-06 00:30:03 +00:00
Chase Southwood
da50db0ca2 Implement BitOps for TreeSet 2014-12-05 18:03:45 -06:00
Luqman Aden
8ebc1c9fd8 librustc: Fix debuginfo for captured variables in non-FnOnce unboxed closures. 2014-12-05 18:56:40 -05:00
Aidan Cully
c394a6c238 prefer "FIXME" to "TODO". 2014-12-05 18:39:58 -05:00
Alex Crichton
9b443289cf Register new snapshots 2014-12-05 15:39:26 -08:00
Corey Farwell
4ef16741e3 Utilize fewer reexports
In regards to:

https://github.com/rust-lang/rust/issues/19253#issuecomment-64836729

This commit:

* Changes the #deriving code so that it generates code that utilizes fewer
  reexports (in particur Option::* and Result::*), which is necessary to
  remove those reexports in the future
* Changes other areas of the codebase so that fewer reexports are utilized
2014-12-05 18:13:04 -05:00
jbranchaud
451cc7e5c0 Add doctests for union, diff, sym_diff, and intersection.
Add a rustdoc test for union to exhibit how it is used.

There is already a test for union in the test namespace, but this commit
adds a doctest that will appear in the rustdocs.

Add a doctest for the difference function.

Add a doctest for the symmetric_difference function.

Add a doctest for the intersection function.

Update the union et al. doctests based on @Gankro's comments.

Make the union et al. doctests a bit more readable.
2014-12-05 17:00:24 -06:00
Aidan Cully
7bf7bd6a75 work around portability issue on FreeBSD, in which the key returned from
pthread_key_create can be 0.
2014-12-05 17:20:44 -05:00
Nafis
e1b77b0709 fix 404 2014-12-06 08:17:49 +10:00
jbranchaud
d6b6df0dfa Add doctests for keys() and values() of the BTreeMap collection.
Update keys() and values() for BTreeMap based on @Gankro's comments.

Assign keys and values to variables before doing assertion.
2014-12-05 15:40:46 -06:00
bors
6f4c11be3b auto merge of #19508 : cmr/rust/rollup-2014_12_03, r=cmr 2014-12-05 20:23:10 +00:00
Erick Tryzelaar
e20ea0b67d collections: dramatically speed up Vec::reserve with magic
Somehow llvm is able to optimize this version of Vec::reserve
into dramatically faster than the old version. In micro-benchmarks
this was 2-10 times faster. It also shaved 14 minutes off of
rust's compile times.

Closes #19281.
2014-12-05 11:29:41 -08:00
Corey Richardson
33f34bdb4e Merge remote-tracking branch 'csouth3/trieset-bitops' into rollup-2014_12_03
Conflicts:
	src/libcollections/trie/set.rs
2014-12-05 11:19:50 -08:00
Luqman Aden
2dccb5a77f librustc: Don't reuse same alloca for match on struct/tuple field which we reassign to in match body. 2014-12-05 14:16:20 -05:00
Andrew Paseltiner
600faba5bc libcore: Fix Sized bounds on overloaded function traits.
- Remove the `for Sized?` bound on `core::ops::FnOnce`, as it takes
  `self` by value and can never be implemented by an unsized type.
- Add a missing `Sized?` bound to the blanket `core::ops::FnMut` impl,
  as both `Fn` and `FnMut` are `for Sized?`.
2014-12-05 14:04:57 -05:00
Chase Southwood
309ab34b7a Implement BitOps for TrieSet 2014-12-05 12:58:45 -06:00
Corey Richardson
090110779f rollup merge of #19553: sfackler/issue-19543
Closes #19543
2014-12-05 10:08:33 -08:00
Corey Richardson
a90e0d70cc rollup merge of #19534: scialex/liballoc-cfg
Adds the ability to use a custom allocator heap by passing either --cfg
external_crate and --extern external=<allocator_crate_name> or --cfg
external_funcs and defining the allocator functions prefixed by 'rust_'
somewhere.

This is useful for many applications including OS/embedded development,
and allocator development and testing.
2014-12-05 10:08:28 -08:00
Corey Richardson
b8eaf7bc8a rollup merge of #19530: aochagavia/remove-test
Fixes https://github.com/rust-lang/rust/issues/19510
2014-12-05 10:08:26 -08:00
Corey Richardson
d602c058ae rollup merge of #19528: aliblong/add_vecmap_capacity
Part of #18424

Adds `capacity()` function to VecMap, as per the collections reform.

(Salvaged from #19516, #19523, while we await an RFC regarding `reserve`/`reserve_index` for `VecMap`)
2014-12-05 10:08:24 -08:00