Commit Graph

29045 Commits

Author SHA1 Message Date
Alex Crichton
a016aa2405 rustc: Turn a Box ICE into an error
Closes #14092
2014-05-21 09:16:11 -07:00
Alex Crichton
4aac621b5a test: Add test for fixed issue #12796
Doesn't close #12796 because the error message is awful.
2014-05-20 21:47:12 -07:00
Alex Crichton
827999cd1f test: Add a test for fixed issue #12567
Closes #12567
2014-05-20 21:44:22 -07:00
Alex Crichton
0089215472 rustc: Avoid an unwrap() in check_match
Closes #12369
2014-05-20 21:42:30 -07:00
Alex Crichton
40d3241a4a rustc: Avoid out of bounds in check_match
Closes #12116
2014-05-20 21:34:10 -07:00
Alex Crichton
1b2dd90f1b test: Add a test for fixed issue #11844
Closes #11844
2014-05-20 21:25:49 -07:00
Alex Crichton
f0a1df692e test: Add test for fixed issue #11736
Closes #11736
2014-05-20 21:24:01 -07:00
Alex Crichton
d3a0471490 test: Add a test for fixed issue #10763
Closes #10763
2014-05-20 21:14:20 -07:00
Alex Crichton
8505b14b00 rustc: Fix a dynamic borrow error in resolve
Closes #8208
Closes #10980
2014-05-20 21:13:50 -07:00
Alex Crichton
aef1a9c57b rustc: Prevant an out of bounds access in typeck
Closes #7092
2014-05-20 20:39:15 -07:00
Alex Crichton
fd88e2b729 syntax: Parse global paths in patterns
Closes #6449
2014-05-20 20:28:00 -07:00
bors
e546452727 auto merge of #14305 : tbu-/rust/pr_doc_bytes, r=huonw
Only an example was needed, as the ability to write uints into the string is
already mentioned.

Fix #7102.
2014-05-20 17:36:18 -07:00
bors
6ecf7d97d0 auto merge of #13975 : nikomatsakis/rust/issue-13794-fn-subtyping-and-static, r=pnkfelix
Tweak region inference to ignore constraints like `'a <= 'static`, since they
have no value. This also ensures that we can handle some obscure cases of fn
subtyping with bound regions that we didn't used to handle correctly.

Fixes #13974.
2014-05-20 15:41:20 -07:00
Tobias Bucher
84f43c6acd Add non-utf8 byte to the bytes!() example
Only an example was needed, as the ability to write uints into the string is
already mentioned.

Fix #7102.
2014-05-20 22:53:30 +02:00
bors
4dff9cbf58 auto merge of #14304 : brson/rust/moredocs, r=kballard
Includes module docs for `cell`.
2014-05-20 13:21:18 -07:00
bors
f9bd6b4e39 auto merge of #14283 : Ryman/rust/commented_compile_fail_error, r=kballard
Edit: This now only covers refactoring to regex.
2014-05-20 11:46:24 -07:00
Brian Anderson
c9ab33a8fd Address review comments 2014-05-20 11:39:40 -07:00
Brian Anderson
26e4680ae5 core: Convert TODOs to FIXMEs 2014-05-20 10:40:14 -07:00
Brian Anderson
1b8deb293e std: Alphabetize crate reexports for rustdoc 2014-05-20 10:38:22 -07:00
Brian Anderson
cea4c27806 core: Spruce up the crate description 2014-05-20 10:38:22 -07:00
Brian Anderson
220313e5e6 core: More concise description for mod ops 2014-05-20 10:38:21 -07:00
Brian Anderson
900b33a4e3 std: Fix broken link 2014-05-20 10:38:21 -07:00
Brian Anderson
8f2a2e2dd8 core: Improve docs for cell 2014-05-20 10:38:21 -07:00
Kevin Butler
66d8c3cb2b compiletest: Refactor compile-fail to regex. 2014-05-20 18:15:34 +01:00
bors
84320a4f4b auto merge of #14277 : pczarn/rust/manual-grammar, r=alexcrichton
The grammar for use declarations was outdated. Corrected some other mistakes.
2014-05-20 10:11:20 -07:00
Piotr Czarnecki
6674913c02 Correct EBNF grammar in the manual
The grammar for use declarations was outdated.
2014-05-20 15:50:03 +02:00
bors
629195582b auto merge of #14296 : kballard/rust/diagnostic_color_newline, r=alexcrichton
When printing colored diagnostics, we need to reset the terminal before
emitting the newline, not after. Otherwise it gets line-buffered and the
color won't reset until the next line is printed or the compiler exits.

Normally this isn't a problem, but when running rustc in parallel with
other processes (e.g. `make -j4`) this can cause the color to leak
to other lines.
2014-05-19 23:41:20 -07:00
bors
ec8ec54192 auto merge of #14289 : TyOverby/rust/master, r=alexcrichton
Closes #14278.

Previously the type signatures of the ordering functions in `core::iter::order` took two iterators, but only if they were the same type of iterator.  This commit loosens that restriction and allows different kinds of iterators (but with the same type of elements) to be compared.
2014-05-19 22:01:21 -07:00
bors
ffe2686063 auto merge of #14265 : Ryman/rust/issue-14254, r=alexcrichton
This is hard coding `Box` into this, as it doesn't seem to parse as `TyUniq` like `~` did. This may not be correct for all usages of the box keyword. 

Closes #14254.
2014-05-19 19:11:24 -07:00
Kevin Ballard
b991bbe2d0 Reset the terminal color before the newline for diagnostics
When printing colored diagnostics, we need to reset the terminal before
emitting the newline, not after. Otherwise it gets line-buffered and the
color won't reset until the next line is printed or the compiler exits.

Normally this isn't a problem, but when running rustc in parallel with
other processes (e.g. `make -j4`) this can cause the color to leak
to other lines.
2014-05-19 18:45:36 -07:00
TyOverby
3001450f95 core::iter::order functions now take two types of iterators.
Previously the type signatures of the ordering functions in
`core::iter::order` took two iterators, but only if they were
the same type of iterator.  This commit loosens that restriction
and allows different kinds of iterators (but with the same type
of elements) to be compared.
2014-05-19 17:37:39 -07:00
Kevin Butler
f9695a6256 rustc: Better resolve errors for &T, &mut T, remove failure condition. 2014-05-20 01:08:05 +01:00
bors
e9018f9c75 auto merge of #14295 : aturon/rust/hide-init_to_vec, r=alexcrichton
The `init_to_vec` function in `collections::bitv` was exposed as an
inherent method, but appears to just be a helper function for the
`to_vec` method. This patch inlines the definition, removing
`init_to_vec` from the public API.

[breaking-change]
2014-05-19 17:06:36 -07:00
bors
1ba7bd10c9 auto merge of #14286 : cmr/rust/shard-benches, r=alexcrichton
This has no tests because it's near impossible to test -- since TestFn uses
`proc`s, they can not be cloned or tested for equality. The only way to really
test this is making sure that for a given number of shards `a`, sharding from
1 to `a` yields the complete set of tests. But `filter_tests` takes its vector
by value and `proc`s cannot be compared.

[breaking-change]

Closes #10898
2014-05-19 15:31:34 -07:00
Corey Richardson
2eeb4992df test: index shards at 1, not 0
This has no tests because it's near impossible to test -- since TestFn uses
`proc`s, they can not be cloned or tested for equality. The only way to really
test this is making sure that for a given number of shards `a`, sharding from
1 to `a` yields the complete set of tests. But `filter_tests` takes its vector
by value and `proc`s cannot be compared.

[breaking-change]

Closes #10898
2014-05-19 14:27:29 -07:00
Aaron Turon
a211907f88 libcollections: remove init_to_vec
The `init_to_vec` function in `collections::bitv` was exposed as an
inherent method, but appears to just be a helper function for the
`to_vec` method. This patch inlines the definition, removing
`init_to_vec` from the public API.

[breaking-change]
2014-05-19 13:50:03 -07:00
bors
1c4a9b98b9 auto merge of #14294 : kballard/rust/result_unwrap_or_else, r=alexcrichton
Result.unwrap_or_handle() is the equivalent of Option.unwrap_or_else().
In the interests of naming consistency, call it the same thing.

[breaking-change]
2014-05-19 13:36:22 -07:00
Kevin Ballard
24468278fd Rename Result.unwrap_or_handle() to .unwrap_or_else()
Result.unwrap_or_handle() is the equivalent of Option.unwrap_or_else().
In the interests of naming consistency, call it the same thing.

[breaking-change]
2014-05-19 13:11:49 -07:00
bors
44fcf46b00 auto merge of #14292 : limeburst/rust/master, r=alexcrichton 2014-05-19 11:56:32 -07:00
bors
e8c579e01d auto merge of #14291 : Sawyer47/rust/doc-fixes, r=alexcrichton 2014-05-19 10:16:31 -07:00
Jihyeok Seo
564b925036 Fix typo in libcore 2014-05-20 00:51:16 +09:00
bors
42be687fa1 auto merge of #14279 : aochagavia/rust/pr2, r=huonw
The breaking changes are:

* Changed `DList::insert_ordered` to use `TotalOrd`, not `Ord`
* Changed `PriorityQueue` to use `TotalOrd`, not `Ord`
* Deprecated `PriorityQueue::maybe_top()` (renamed to replace `PriorityQueue::top()`)
* Deprecated `PriorityQueue::maybe_pop()` (renamed to replace `PriorityQueue::pop()`)
* Deprecated `PriorityQueue::to_vec()` (renamed to `PriorityQueue::into_vec()`)
* Deprecated `PriorityQueue::to_sorted_vec()` (renamed to `PriorityQueue::into_sorted_vec()`)
* Changed `PriorityQueue::replace(...)` to return an `Option<T>` instead of failing when the queue is empty.


[breaking-change]
2014-05-19 07:51:31 -07:00
Piotr Jawniak
cea63ecfb1 Minor doc fixes in various places 2014-05-19 15:41:06 +02:00
bors
ed156772bd auto merge of #14251 : alexcrichton/rust/hierarchy, r=huonw
This is an implementation of RFC 16. A module can now only be loaded if the
module declaring `mod name;` "owns" the current directory. A module is
considered as owning its directory if it meets one of the following criteria:

* It is the top-level crate file
* It is a `mod.rs` file
* It was loaded via `#[path]`
* It was loaded via `include!`
* The module was declared via an inline `mod foo { ... }` statement

For example, this directory structure is now invalid

    // lib.rs
    mod foo;

    // foo.rs
    mod bar;

    // bar.rs;
    fn bar() {}

With this change `foo.rs` must be renamed to `foo/mod.rs`, and `bar.rs` must be
renamed to `foo/bar.rs`. This makes it clear that `bar` is a submodule of `foo`,
and can only be accessed through `foo`.

RFC: 0016-module-file-system-hierarchy
Closes #14180

[breaking-change]
2014-05-19 06:11:33 -07:00
bors
5d2edddc30 auto merge of #14288 : zwarich/rust/euv-underscore, r=alexcrichton 2014-05-18 23:01:27 -07:00
Cameron Zwarich
33335cbd03 Remove leading underscores in function signatures in a trait definition. 2014-05-18 22:53:01 -07:00
bors
4b81b6d5f4 auto merge of #14276 : aochagavia/rust/pr, r=alexcrichton 2014-05-18 19:51:26 -07:00
bors
50b26df59e auto merge of #14122 : dagitses/rust/master, r=alexcrichton
This is my first patch and hopefully nothing controversial: just a straightforward forwarding of TreeMap::move_iter() as TreeSet::move_iter().
2014-05-18 18:11:27 -07:00
Adolfo Ochagavía
3a1b7d47f3 Fix insert_ordered in DList 2014-05-18 16:34:01 -07:00
Adolfo Ochagavía
75d3690df9 Fix dead code warnings 2014-05-18 16:33:30 -07:00