]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoUpdate compiler-rt
angelsl [Fri, 23 Oct 2015 17:27:23 +0000 (01:27 +0800)]
Update compiler-rt

8 years agoAuto merge of #29313 - arielb1:projection-overflow, r=eddyb
bors [Wed, 28 Oct 2015 03:07:28 +0000 (03:07 +0000)]
Auto merge of #29313 - arielb1:projection-overflow, r=eddyb

This turns the crashes into overflow errors.

r? @eddyb

8 years agoAuto merge of #29311 - steveklabnik:doc_iterator_trait, r=alexcrichton
bors [Wed, 28 Oct 2015 01:17:12 +0000 (01:17 +0000)]
Auto merge of #29311 - steveklabnik:doc_iterator_trait, r=alexcrichton

This cleans up descriptions, adds more examples, and increases
consistency between similar methods.

8 years agoAuto merge of #29072 - nagisa:place-arrow, r=pnkfelix
bors [Tue, 27 Oct 2015 22:56:39 +0000 (22:56 +0000)]
Auto merge of #29072 - nagisa:place-arrow, r=pnkfelix

This commit generalises parsing of associative operators from left-associative
only (with some ugly hacks to support right-associative assignment) to properly
left/right-associative operators.

Parsing is still is not general enough to handle non-associative,
non-highest-precedence prefix or non-highest-precedence
postfix operators (e.g. `..` range syntax) and should be made to be.

Lastly, this commit adds support for parsing right-associative `<-` (left arrow)
operator with precedence higher than assignment as the operator for placement-in
feature.

---

This PR still needs various non-parser changes (e.g. src/grammar and tests) and I’m still working on these; the meat of the PR can already be reviewed, though, I think.

Please review carefully. I made sure that quirks I have discovered so far are preserved (see e.g. https://github.com/rust-lang/rust/issues/29071) and am looking for more corner cases as I continue to work on tests et al, but there may be something I haven’t noticed or accounted for.

EDIT: I’m also not sure I managed to preserve all the semantics with the range operator inside non-trivial expressions since these are a mess at the moment. Crater runs would be nice.

8 years agoAdjust src/grammar for the introduced <- op
Simonas Kazlauskas [Tue, 27 Oct 2015 20:05:23 +0000 (22:05 +0200)]
Adjust src/grammar for the introduced <- op

8 years agoAuto merge of #28833 - jryans:borrowck-linear-errors, r=pnkfelix
bors [Tue, 27 Oct 2015 21:04:59 +0000 (21:04 +0000)]
Auto merge of #28833 - jryans:borrowck-linear-errors, r=pnkfelix

Change error reporting of conflicting loans to stop earlier after printing
an error for a given borrow, instead of proceeding to error on possibly every
issued loan.  This keeps us down to O(n) errors (for n problem lines), instead
of O(n^2) errors in some cases.

Fixes #27485.

8 years agoAdd tests for newly introduced syntax
Simonas Kazlauskas [Fri, 16 Oct 2015 21:06:25 +0000 (00:06 +0300)]
Add tests for newly introduced syntax

Also add some (regression) tests for discovered parser oddities

8 years agoUpdate unused_parens lint for placement-in arrow
Simonas Kazlauskas [Fri, 16 Oct 2015 20:24:10 +0000 (23:24 +0300)]
Update unused_parens lint for placement-in arrow

8 years agoFix restrictions when parsing rhs of equalities
Simonas Kazlauskas [Fri, 16 Oct 2015 19:42:06 +0000 (22:42 +0300)]
Fix restrictions when parsing rhs of equalities

8 years agoFix prefix range expressions being not parsed
Simonas Kazlauskas [Thu, 15 Oct 2015 18:37:21 +0000 (21:37 +0300)]
Fix prefix range expressions being not parsed

8 years agoAdd a test for #29071
Simonas Kazlauskas [Thu, 15 Oct 2015 15:09:10 +0000 (18:09 +0300)]
Add a test for #29071

Fixes #29071

8 years agoGeneralise associative operator parsing
Simonas Kazlauskas [Thu, 15 Oct 2015 12:51:30 +0000 (15:51 +0300)]
Generalise associative operator parsing

This commit generalises parsing of associative operators from left-associative
only (with some ugly hacks to support right-associative assignment) to properly
left/right-associative operators.

Parsing still is not general enough to handle non-associative,
non-highest-precedence prefix or non-highest-precedence postfix operators (e.g.
`..` range syntax), though. That should be fixed in the future.

Lastly, this commit adds support for parsing right-associative `<-` (left arrow)
operator with precedence higher than assignment as the operator for placement-in
feature.

8 years agoAuto merge of #26421 - nham:fix_21546, r=pnkfelix
bors [Tue, 27 Oct 2015 19:15:29 +0000 (19:15 +0000)]
Auto merge of #26421 - nham:fix_21546, r=pnkfelix

Fixes #21546.

8 years agoAuto merge of #26848 - oli-obk:const_fn_const_eval, r=pnkfelix
bors [Tue, 27 Oct 2015 17:11:13 +0000 (17:11 +0000)]
Auto merge of #26848 - oli-obk:const_fn_const_eval, r=pnkfelix

this has the funky side-effect of also allowing constant evaluation of function calls to functions that are not `const fn` as long as `check_const` didn't mark that function `NOT_CONST`

It's still not possible to call a normal function from a `const fn`, but let statements' initialization value can get const evaluated (this caused the fallout in the overflowing tests)

we can now do this:

```rust
const fn add(x: usize, y: usize) -> usize { x + y }
const ARR: [i32; add(1, 2)] = [5, 6, 7];
```

also added a test for destructuring in const fn args
```rust
const fn i((a, b): (u32, u32)) -> u32 { a + b } //~ ERROR: E0022
```

This is a **[breaking change]**, since it turns some runtime panics into compile-time errors. This statement is true for ANY improvement to the const evaluator.

8 years agoAdds tons of documentation for Iterator
Steve Klabnik [Mon, 26 Oct 2015 20:34:47 +0000 (16:34 -0400)]
Adds tons of documentation for Iterator

This adds lots of examples, clarifies text, and just generally improves
the documentation for Iterator.

8 years agoAuto merge of #29327 - sanxiyn:argument, r=nrc
bors [Tue, 27 Oct 2015 14:25:57 +0000 (14:25 +0000)]
Auto merge of #29327 - sanxiyn:argument, r=nrc

Fix #24114.

8 years agoadd a recursion limit for type representation
Ariel Ben-Yehuda [Sun, 25 Oct 2015 21:02:15 +0000 (23:02 +0200)]
add a recursion limit for type representation

I could have added a check for explicit recursion, as irregular types
tend to cause selection errors, but I am not sufficiently sure that
cannot be bypassed.

Fixes #22919
Fixes #25639
Fixes #26548

8 years agoproject: add a recursion limit to "tail-recursive" projections
Ariel Ben-Yehuda [Sat, 24 Oct 2015 15:37:28 +0000 (18:37 +0300)]
project: add a recursion limit to "tail-recursive" projections

Fixes #21946
Fixes #23992
Fixes #25945

8 years agoAuto merge of #29326 - Charlotteis:patch-1, r=steveklabnik
bors [Tue, 27 Oct 2015 10:15:00 +0000 (10:15 +0000)]
Auto merge of #29326 - Charlotteis:patch-1, r=steveklabnik

The beginning of the work that needs to be done as part of #28835.

:sunny:

8 years agothe const evaluator might run before check_const
Oliver Schneider [Tue, 27 Oct 2015 08:39:07 +0000 (09:39 +0100)]
the const evaluator might run before check_const

So we cannot assume that the function call was marked NOT_CONST by check_const.

8 years agoAuto merge of #29317 - matklad:clarify-reference, r=steveklabnik
bors [Tue, 27 Oct 2015 08:27:53 +0000 (08:27 +0000)]
Auto merge of #29317 - matklad:clarify-reference, r=steveklabnik

Rust reference is a bit confusing here, because it does not explicitly mention trait objects.

See an example of confusion here https://users.rust-lang.org/t/confusion-about-impls-without-for/3379/2 :)

r? @steveklabnik

8 years agoAuto merge of #29309 - rjbs:doc-comment-sections, r=alexcrichton
bors [Tue, 27 Oct 2015 06:40:12 +0000 (06:40 +0000)]
Auto merge of #29309 - rjbs:doc-comment-sections, r=alexcrichton

As displayed before this commit, I found the book confusing in its
explanation of `#`-led comments in `rust` blocks.  Possibly the
biggest confusion was because the many-dashes construct does not
become an HR element in the Markdown translator used, so things were
not being properly set off.

This change should more clearly show the as-rendered content as
rendered, and the as-coded content as code.

8 years agoAuto merge of #29298 - tbu-:pr_doc_env_panic, r=alexcrichton
bors [Tue, 27 Oct 2015 04:45:39 +0000 (04:45 +0000)]
Auto merge of #29298 - tbu-:pr_doc_env_panic, r=alexcrichton

8 years agoAuto merge of #29386 - jonas-schievink:codegen-worker-id, r=alexcrichton
bors [Tue, 27 Oct 2015 02:56:57 +0000 (02:56 +0000)]
Auto merge of #29386 - jonas-schievink:codegen-worker-id, r=alexcrichton

This makes it easier to tell which thread does how much work. Output now looks like this:
```
time: 0.000; rss: 55MB llvm function passes [0]
time: 0.000; rss: 55MB llvm function passes [2]
time: 0.000; rss: 55MB llvm function passes [1]
time: 0.000; rss: 55MB llvm module passes [0]
time: 0.000; rss: 55MB llvm module passes [1]
time: 0.000; rss: 55MB llvm module passes [2]
time: 0.000; rss: 55MB llvm function passes [3]
time: 0.000; rss: 55MB llvm module passes [3]
time: 0.000; rss: 55MB codegen passes [1]
time: 0.000; rss: 55MB codegen passes [2]
time: 0.000; rss: 55MB codegen passes [0]
time: 0.000; rss: 56MB codegen passes [1]
time: 0.001; rss: 56MB codegen passes [3]
```

8 years agoAuto merge of #29325 - alexcrichton:revert-trait-accessibility, r=nrc
bors [Tue, 27 Oct 2015 01:04:14 +0000 (01:04 +0000)]
Auto merge of #29325 - alexcrichton:revert-trait-accessibility, r=nrc

These commits revert https://github.com/rust-lang/rust/pull/28504 and add a regression test pointed out by @petrochenkov, it's not immediately clear with the regression that the accessibility check should be removed, so for now preserve the behavior on stable by default.

r? @nrc

8 years agoAuto merge of #29295 - little-dude:rustfmt_librustc_unicode, r=nrc
bors [Mon, 26 Oct 2015 23:14:50 +0000 (23:14 +0000)]
Auto merge of #29295 - little-dude:rustfmt_librustc_unicode, r=nrc

I didn't see anything particularly weird here. The last commit has the only changes I'm not 100% sure about.

I ignored tables.rs since it's genrated, but I updated the python script that generates it.

?r @nrc

8 years agoAuto merge of #29274 - thepowersgang:issues-29107-const-unsafe-fn-order, r=nikomatsakis
bors [Mon, 26 Oct 2015 21:23:32 +0000 (21:23 +0000)]
Auto merge of #29274 - thepowersgang:issues-29107-const-unsafe-fn-order, r=nikomatsakis

This PR switches the implemented ordering from `unsafe const fn` (as was in the original RFC) to `const unsafe fn` (which is what the lang team decided on)

8 years agoPrint the codegen worker # when using time-passes
Jonas Schievink [Mon, 26 Oct 2015 20:03:03 +0000 (21:03 +0100)]
Print the codegen worker # when using time-passes

8 years agoAuto merge of #29384 - nikomatsakis:mir-not-stable-beta, r=alexcrichton
bors [Mon, 26 Oct 2015 19:34:14 +0000 (19:34 +0000)]
Auto merge of #29384 - nikomatsakis:mir-not-stable-beta, r=alexcrichton

8 years agoDisable MIR on beta/stable until we've resolved #29227 is resolved.
Niko Matsakis [Mon, 26 Oct 2015 19:05:35 +0000 (15:05 -0400)]
Disable MIR on beta/stable until we've resolved #29227 is resolved.

8 years agoAuto merge of #29287 - Ryman:fn_nopat, r=alexcrichton
bors [Mon, 26 Oct 2015 17:44:37 +0000 (17:44 +0000)]
Auto merge of #29287 - Ryman:fn_nopat, r=alexcrichton

Previously, if you copied a signature from a trait definition such as:

```rust
fn foo<'a>(&'a Bar) -> bool {}
```

and moved it into an `impl`, there would be an error message:

"unexpected token `'a`"

Adding to the error message that a pattern is expected should help
users to find the actual problem with using a lifetime here.

8 years agotest: Add regression test for "source trait is private"
Alex Crichton [Mon, 26 Oct 2015 16:17:09 +0000 (09:17 -0700)]
test: Add regression test for "source trait is private"

8 years agorustfmt librustc_unicode
Corentin Henry [Sun, 25 Oct 2015 10:19:14 +0000 (11:19 +0100)]
rustfmt librustc_unicode

8 years agoRemove NodeArg
Seo Sanghyeon [Mon, 26 Oct 2015 16:32:04 +0000 (01:32 +0900)]
Remove NodeArg

8 years agoRemove use of 'just' in trpl/installing-rust.md
Charlotte Spencer [Mon, 26 Oct 2015 16:29:54 +0000 (16:29 +0000)]
Remove use of 'just' in trpl/installing-rust.md

The beginning of the work that needs to be done as part of #28835.

8 years agoRevert "Remove unnecessary trait accessibility check."
Alex Crichton [Mon, 26 Oct 2015 16:16:05 +0000 (09:16 -0700)]
Revert "Remove unnecessary trait accessibility check."

This reverts commit f4f95eb3a9f2c3c38679db84aabbb7cdb46d2641.

8 years agoRevert "Add UFCS privacy test."
Alex Crichton [Mon, 26 Oct 2015 16:16:01 +0000 (09:16 -0700)]
Revert "Add UFCS privacy test."

This reverts commit b3e1aca40f889a565bfa2607b82b80fe7cbcefea.

8 years agoAuto merge of #29310 - mdinger:book_playpen, r=steveklabnik
bors [Mon, 26 Oct 2015 15:50:45 +0000 (15:50 +0000)]
Auto merge of #29310 - mdinger:book_playpen, r=steveklabnik

Makes rustbook code playpen links follow the style set in https://github.com/rust-lang/rust/pull/28963. This is basically cut and paste from the other one. The link looks better and still works so I assume it's good.

![rustbook](https://cloud.githubusercontent.com/assets/4156987/10717631/7a74f8ae-7b34-11e5-8870-35b5fc2526a4.png)

Fixes https://github.com/rust-lang/rust/issues/29308

r? @steveklabnik

8 years agoDistinguish argument from local variable
Seo Sanghyeon [Mon, 26 Oct 2015 15:46:11 +0000 (00:46 +0900)]
Distinguish argument from local variable

8 years agoAuto merge of #29280 - Ryman:bad_docattr, r=Manishearth
bors [Mon, 26 Oct 2015 13:58:50 +0000 (13:58 +0000)]
Auto merge of #29280 - Ryman:bad_docattr, r=Manishearth

As is, this attr would lead to the "///" prefix being in the output text.

8 years agoAuto merge of #29247 - dcarral:missing_word_trpl, r=steveklabnik
bors [Mon, 26 Oct 2015 12:08:51 +0000 (12:08 +0000)]
Auto merge of #29247 - dcarral:missing_word_trpl, r=steveklabnik

I somehow missed a word behind the numbers while going through this section, don't know what the best approach would be though since "**available** addresses" sounds good to me, too".

8 years agoAuto merge of #29312 - apasel422:issue-21410, r=alexcrichton
bors [Mon, 26 Oct 2015 10:16:52 +0000 (10:16 +0000)]
Auto merge of #29312 - apasel422:issue-21410, r=alexcrichton

Closes #21410.
Closes #24972.

8 years agoreference: clarify impl
Aleksey Kladov [Mon, 26 Oct 2015 09:31:17 +0000 (12:31 +0300)]
reference: clarify impl

Another kind of nominal types in Rust are trait objects, so the following is valid

```rust
trait A {

}

impl A {

}
```

8 years agoAuto merge of #29303 - petrochenkov:unistrimp, r=eddyb
bors [Mon, 26 Oct 2015 08:27:59 +0000 (08:27 +0000)]
Auto merge of #29303 - petrochenkov:unistrimp, r=eddyb

And use `VariantData` instead of `P<VariantData>` in `Item_` and `Variant_`

Improvements suggested by @eddyb in https://github.com/rust-lang/rust/pull/28816#discussion_r42483587 and https://github.com/rust-lang/rust/pull/28816#discussion_r42483648

plugin-[breaking-change]

r? @eddyb

8 years agoAuto merge of #29301 - reddraggone9:patch-1, r=alexcrichton
bors [Mon, 26 Oct 2015 06:37:12 +0000 (06:37 +0000)]
Auto merge of #29301 - reddraggone9:patch-1, r=alexcrichton

Added a single character to fix a typo in a doc comment.

8 years agoAuto merge of #29306 - alexcrichton:yet-another-windows-dist-fix, r=vadimcn
bors [Mon, 26 Oct 2015 04:48:00 +0000 (04:48 +0000)]
Auto merge of #29306 - alexcrichton:yet-another-windows-dist-fix, r=vadimcn

We don't need the support libgcc SEH library, but we do need the C++ standard
library for running the compiler itself.

cc #29208
Closes #29294

8 years agoAuto merge of #29299 - tbu-:pr_btreemap_example_dup, r=alexcrichton
bors [Mon, 26 Oct 2015 02:56:27 +0000 (02:56 +0000)]
Auto merge of #29299 - tbu-:pr_btreemap_example_dup, r=alexcrichton

8 years agoAdd tests for #21410 and #24972
Andrew Paseltiner [Sun, 25 Oct 2015 21:47:22 +0000 (17:47 -0400)]
Add tests for #21410 and #24972

Closes #21410.
Closes #24972.

8 years agoAuto merge of #29296 - zazdxscf:compiletest_noargs_show_help, r=alexcrichton
bors [Mon, 26 Oct 2015 00:19:51 +0000 (00:19 +0000)]
Auto merge of #29296 - zazdxscf:compiletest_noargs_show_help, r=alexcrichton

instead of this panic:
```
thread '<main>' panicked at 'index out of bounds: the len is 1 but the
index is 1', src/libcollections/vec.rs:1110
```

It still panics, just like `-h` does, so it should be okay in this
regard.

8 years agoAuto merge of #29284 - apasel422:tests, r=alexcrichton
bors [Sun, 25 Oct 2015 20:31:48 +0000 (20:31 +0000)]
Auto merge of #29284 - apasel422:tests, r=alexcrichton

Closes #22781.
Closes #23891.
Closes #24956.
Closes #25145.
Closes #25693.
Closes #26095.
Closes #26459.
Closes #27320.
Closes #27895.

8 years agoUpdate the playpen link for code in the rust book to agree with rustdoc's new style
mdinger [Sun, 25 Oct 2015 20:18:09 +0000 (16:18 -0400)]
Update the playpen link for code in the rust book to agree with rustdoc's new style

8 years agoreformat the docs for hidden code in rust sections
Ricardo Signes [Sun, 25 Oct 2015 19:58:50 +0000 (15:58 -0400)]
reformat the docs for hidden code in rust sections

As displayed before this commit, I found the book confusing in its
explanation of `#`-led comments in `rust` blocks.  Possibly the
biggest confusion was because the many-dashes construct does not
become an HR element in the Markdown translator used, so things were
not being properly set off.

This change should more clearly show the as-rendered content as
rendered, and the as-coded content as code.

8 years agoSay that `std::env::{set_var, unset_var}` *may* panic
Tobias Bucher [Sun, 25 Oct 2015 20:03:42 +0000 (20:03 +0000)]
Say that `std::env::{set_var, unset_var}` *may* panic

Previously the documentation suggested that the documentation about the
panics are guarantees.

8 years agoAuto merge of #29266 - apasel422:wf, r=alexcrichton
bors [Sun, 25 Oct 2015 18:34:29 +0000 (18:34 +0000)]
Auto merge of #29266 - apasel422:wf, r=alexcrichton

Using these traits in an object context previously resulted in an RFC 1214 warning.

8 years agomk: Package libstdc++-6.dll on x86_64 MinGW
Alex Crichton [Sun, 25 Oct 2015 17:28:47 +0000 (10:28 -0700)]
mk: Package libstdc++-6.dll on x86_64 MinGW

We don't need the support libgcc SEH library, but we do need the C++ standard
library for running the compiler itself.

cc #29208

8 years agoAuto merge of #29254 - alexcrichton:stabilize-1.5, r=brson
bors [Sun, 25 Oct 2015 16:38:38 +0000 (16:38 +0000)]
Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brson

This commit stabilizes and deprecates library APIs whose FCP has closed in the
last cycle, specifically:

Stabilized APIs:

* `fs::canonicalize`
* `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists,
   is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait.
* `Formatter::fill`
* `Formatter::width`
* `Formatter::precision`
* `Formatter::sign_plus`
* `Formatter::sign_minus`
* `Formatter::alternate`
* `Formatter::sign_aware_zero_pad`
* `string::ParseError`
* `Utf8Error::valid_up_to`
* `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}`
* `<[T]>::split_{first,last}{,_mut}`
* `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated
  but will be once 1.5 is released.
* `str::{R,}MatchIndices`
* `str::{r,}match_indices`
* `char::from_u32_unchecked`
* `VecDeque::insert`
* `VecDeque::shrink_to_fit`
* `VecDeque::as_slices`
* `VecDeque::as_mut_slices`
* `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`)
* `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`)
* `Vec::resize`
* `str::slice_mut_unchecked`
* `FileTypeExt`
* `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}`
* `BinaryHeap::from` - `from_vec` deprecated in favor of this
* `BinaryHeap::into_vec` - plus a `Into` impl
* `BinaryHeap::into_sorted_vec`

Deprecated APIs

* `slice::ref_slice`
* `slice::mut_ref_slice`
* `iter::{range_inclusive, RangeInclusive}`
* `std::dynamic_lib`

Closes #27706
Closes #27725
cc #27726 (align not stabilized yet)
Closes #27734
Closes #27737
Closes #27742
Closes #27743
Closes #27772
Closes #27774
Closes #27777
Closes #27781
cc #27788 (a few remaining methods though)
Closes #27790
Closes #27793
Closes #27796
Closes #27810
cc #28147 (not all parts stabilized)

8 years agostd: Stabilize library APIs for 1.5
Alex Crichton [Thu, 22 Oct 2015 23:28:45 +0000 (16:28 -0700)]
std: Stabilize library APIs for 1.5

This commit stabilizes and deprecates library APIs whose FCP has closed in the
last cycle, specifically:

Stabilized APIs:

* `fs::canonicalize`
* `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists,
   is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait.
* `Formatter::fill`
* `Formatter::width`
* `Formatter::precision`
* `Formatter::sign_plus`
* `Formatter::sign_minus`
* `Formatter::alternate`
* `Formatter::sign_aware_zero_pad`
* `string::ParseError`
* `Utf8Error::valid_up_to`
* `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}`
* `<[T]>::split_{first,last}{,_mut}`
* `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated
  but will be once 1.5 is released.
* `str::{R,}MatchIndices`
* `str::{r,}match_indices`
* `char::from_u32_unchecked`
* `VecDeque::insert`
* `VecDeque::shrink_to_fit`
* `VecDeque::as_slices`
* `VecDeque::as_mut_slices`
* `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`)
* `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`)
* `Vec::resize`
* `str::slice_mut_unchecked`
* `FileTypeExt`
* `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}`
* `BinaryHeap::from` - `from_vec` deprecated in favor of this
* `BinaryHeap::into_vec` - plus a `Into` impl
* `BinaryHeap::into_sorted_vec`

Deprecated APIs

* `slice::ref_slice`
* `slice::mut_ref_slice`
* `iter::{range_inclusive, RangeInclusive}`
* `std::dynamic_lib`

Closes #27706
Closes #27725
cc #27726 (align not stabilized yet)
Closes #27734
Closes #27737
Closes #27742
Closes #27743
Closes #27772
Closes #27774
Closes #27777
Closes #27781
cc #27788 (a few remaining methods though)
Closes #27790
Closes #27793
Closes #27796
Closes #27810
cc #28147 (not all parts stabilized)

8 years agosyntax/rustc_front: Simplify VariantData::fields
Vadim Petrochenkov [Sun, 25 Oct 2015 15:33:51 +0000 (18:33 +0300)]
syntax/rustc_front: Simplify VariantData::fields

And use VariantData instead of P<VariantData> in Item_ and Variant_

8 years agoAuto merge of #29281 - skeleten:issue-28189, r=steveklabnik
bors [Sun, 25 Oct 2015 14:41:06 +0000 (14:41 +0000)]
Auto merge of #29281 - skeleten:issue-28189, r=steveklabnik

Closes #28189

8 years agoFix doc comment typo
Lee Jenkins [Sun, 25 Oct 2015 14:17:27 +0000 (09:17 -0500)]
Fix doc comment typo

Added a single character to fix a typo in a doc comment.

8 years agoAuto merge of #29279 - Ryman:strtests, r=alexcrichton
bors [Sun, 25 Oct 2015 12:44:33 +0000 (12:44 +0000)]
Auto merge of #29279 - Ryman:strtests, r=alexcrichton

8 years agoDocument possible panics for `std::env::{set_var, unset_var}`
Tobias Bucher [Sun, 25 Oct 2015 12:04:29 +0000 (12:04 +0000)]
Document possible panics for `std::env::{set_var, unset_var}`

8 years agoRemove key duplication from `BTreeMap` example in `collections`
Tobias Bucher [Sun, 25 Oct 2015 12:03:21 +0000 (12:03 +0000)]
Remove key duplication from `BTreeMap` example in `collections`

8 years agoAdd tests
Andrew Paseltiner [Sat, 24 Oct 2015 21:29:13 +0000 (17:29 -0400)]
Add tests

Closes #22781.
Closes #23891.
Closes #24956.
Closes #25145.
Closes #25693.
Closes #26095.
Closes #26459.
Closes #27320.
Closes #27895.

8 years agocompiletest: show usage/help when passed no args
Emanuel Czirai [Sun, 25 Oct 2015 10:48:56 +0000 (11:48 +0100)]
compiletest: show usage/help when passed no args

instead of this panic:
```
thread '<main>' panicked at 'index out of bounds: the len is 1 but the
index is 1', src/libcollections/vec.rs:1110
```

It still panics, just like `-h` does, so it should be okay in this
regard.

8 years agoAuto merge of #29273 - Manishearth:regression, r=alexcrichton
bors [Sun, 25 Oct 2015 10:45:27 +0000 (10:45 +0000)]
Auto merge of #29273 - Manishearth:regression, r=alexcrichton

None

8 years agoAuto merge of #29272 - sanxiyn:llvm-update, r=alexcrichton
bors [Sun, 25 Oct 2015 08:47:46 +0000 (08:47 +0000)]
Auto merge of #29272 - sanxiyn:llvm-update, r=alexcrichton

cc @zazdxscf

8 years agoAuto merge of #29261 - apasel422:issue-22403, r=alexcrichton
bors [Sun, 25 Oct 2015 06:48:21 +0000 (06:48 +0000)]
Auto merge of #29261 - apasel422:issue-22403, r=alexcrichton

Closes #22403.

r? @pnkfelix

8 years agoSwitch to 'const unsafe fn' ordering (rust-lang/rust#29107)
John Hodge [Sat, 24 Oct 2015 08:52:07 +0000 (16:52 +0800)]
Switch to 'const unsafe fn' ordering (rust-lang/rust#29107)

8 years agoAuto merge of #29256 - alexcrichton:less-flaky, r=brson
bors [Sun, 25 Oct 2015 02:12:00 +0000 (02:12 +0000)]
Auto merge of #29256 - alexcrichton:less-flaky, r=brson

The new bots we have may conflict with one another on base ports, causing tests
to fail. For example the linux-musl-64-opt and linux-64-opt bots are using the
same base port right now, causing some spurious failures every now and then.

8 years agolibsyntax: Consolidate branch to benefit from exhaustive checking instead of unwrapping
Kevin Butler [Sun, 25 Oct 2015 00:07:12 +0000 (01:07 +0100)]
libsyntax: Consolidate branch to benefit from exhaustive checking instead of unwrapping

8 years agolibsyntax: remove panics from Parser::parse_pat_nopanic
Kevin Butler [Sun, 25 Oct 2015 00:02:08 +0000 (01:02 +0100)]
libsyntax: remove panics from Parser::parse_pat_nopanic

8 years agolibsyntax: better error for lifetimes in patterns
Kevin Butler [Sat, 24 Oct 2015 23:57:42 +0000 (00:57 +0100)]
libsyntax: better error for lifetimes in patterns

Previously, if you copied a signature from a trait definition such as:

```
fn foo<'a>(&'a Bar) -> bool {}
```

and moved it into an `impl`, there would be an error message:

"unexpected token `'a`"

Adding to the error message that a pattern is expected should help
users to find the actual problem with using a lifetime here.

8 years agoAuto merge of #29229 - SingingTree:reflect_28260_in_readme, r=alexcrichton
bors [Sat, 24 Oct 2015 23:19:14 +0000 (23:19 +0000)]
Auto merge of #29229 - SingingTree:reflect_28260_in_readme, r=alexcrichton

This PR adds a note to the end of the Windows build instructions to reflect the issues detailed in #28260, as well as a work around using older versions of gcc. I've avoided going into detail as I did not wish to bloat the README, and so that the changes are easy to yank once the issue is resolved.

8 years agoAuto merge of #29151 - wthrowe:linker-output-ICE, r=alexcrichton
bors [Sat, 24 Oct 2015 21:24:49 +0000 (21:24 +0000)]
Auto merge of #29151 - wthrowe:linker-output-ICE, r=alexcrichton

I suspect this won't work on Windows, but let's be optimistic and try it before disabling.

8 years agoadding test for #28189
skeleten [Sat, 24 Oct 2015 19:16:38 +0000 (21:16 +0200)]
adding test for #28189

8 years agoFix docattr to match surrounding text
Kevin Butler [Sat, 24 Oct 2015 19:00:58 +0000 (20:00 +0100)]
Fix docattr to match surrounding text

As is, this attr would lead to the "///" prefix being in the output text

8 years agoAdd assertions to test_total_ord for str
Kevin Butler [Thu, 22 Oct 2015 02:19:14 +0000 (03:19 +0100)]
Add assertions to test_total_ord for str

8 years agoRemove unnecessary String allocations from str tests
Kevin Butler [Thu, 22 Oct 2015 02:14:11 +0000 (03:14 +0100)]
Remove unnecessary String allocations from str tests

8 years agoAuto merge of #29215 - fhahn:issue-28157-bad-semicolon, r=alexcrichton
bors [Sat, 24 Oct 2015 18:37:09 +0000 (18:37 +0000)]
Auto merge of #29215 - fhahn:issue-28157-bad-semicolon, r=alexcrichton

PR for #28157. At the moment, `rustc` emits a warning when a bare semicolon is encountered (could also be a fail, but I think this is a backwards incompatible change).

Also I am not sure where the best place for a test for that warning would be. Seems run-pass tests do not check warnings.

8 years agoAdd regression test for #26886
Manish Goregaokar [Sat, 24 Oct 2015 10:16:13 +0000 (15:46 +0530)]
Add regression test for #26886

(fixes #26886)

8 years agoAuto merge of #29259 - arielb1:supertrait-self-2, r=eddyb
bors [Sat, 24 Oct 2015 12:21:12 +0000 (12:21 +0000)]
Auto merge of #29259 - arielb1:supertrait-self-2, r=eddyb

…being it

This is a [breaking-change]:lang, but the broken code does not make
much sense.

Fixes #26056

r? @eddyb

8 years agorustllvm: Update to LLVM trunk
Seo Sanghyeon [Sat, 24 Oct 2015 09:42:23 +0000 (18:42 +0900)]
rustllvm: Update to LLVM trunk

8 years agoAuto merge of #29260 - GuillaumeGomez:E0211_improvement, r=Manishearth
bors [Sat, 24 Oct 2015 09:15:14 +0000 (09:15 +0000)]
Auto merge of #29260 - GuillaumeGomez:E0211_improvement, r=Manishearth

r? @Manishearth

cc #29248

8 years agoAuto merge of #29252 - steveklabnik:safety, r=alexcrichton
bors [Sat, 24 Oct 2015 06:26:50 +0000 (06:26 +0000)]
Auto merge of #29252 - steveklabnik:safety, r=alexcrichton

Follow https://doc.rust-lang.org/book/documentation.html#special-sections

8 years agoMake `{Default, From, FromIterator, One, Zero}` well-formed
Andrew Paseltiner [Sat, 24 Oct 2015 01:51:38 +0000 (21:51 -0400)]
Make `{Default, From, FromIterator, One, Zero}` well-formed

Using these traits in an object context previously resulted in an RFC
1214 warning.

8 years agoAuto merge of #29245 - james-darkfox:master, r=alexcrichton
bors [Sat, 24 Oct 2015 01:19:26 +0000 (01:19 +0000)]
Auto merge of #29245 - james-darkfox:master, r=alexcrichton

8 years agoAdd test for #22403
Andrew Paseltiner [Sat, 24 Oct 2015 00:15:33 +0000 (20:15 -0400)]
Add test for #22403

Closes #22403.

8 years agoReference #28260 in the README
Bryce Van Dyk [Sat, 24 Oct 2015 00:13:01 +0000 (13:13 +1300)]
Reference #28260 in the README

8 years agoAuto merge of #29255 - alexcrichton:really-fix, r=brson
bors [Fri, 23 Oct 2015 23:28:53 +0000 (23:28 +0000)]
Auto merge of #29255 - alexcrichton:really-fix, r=brson

The macro in question doesn't actually have a $(2) argument so $(1) should
really be used as it's the target in question.

8 years agoImprove E0211 error diagnostic
Guillaume Gomez [Fri, 23 Oct 2015 21:55:56 +0000 (23:55 +0200)]
Improve E0211 error diagnostic

8 years agoAllow bare semicolon in grammar doc, closes #28157
Florian Hahn [Fri, 23 Oct 2015 22:45:18 +0000 (00:45 +0200)]
Allow bare semicolon in grammar doc, closes #28157

8 years agoRemove bare semicolons
Florian Hahn [Wed, 21 Oct 2015 16:20:46 +0000 (18:20 +0200)]
Remove bare semicolons

8 years agoAuto merge of #29065 - steveklabnik:doc_iter_traits, r=alexcrichton
bors [Fri, 23 Oct 2015 21:35:59 +0000 (21:35 +0000)]
Auto merge of #29065 - steveklabnik:doc_iter_traits, r=alexcrichton

This adds a bunch of documentation for most of the traits in std::iter

8 years agoobject_safety: check whether a supertrait contains Self even without being it
Ariel Ben-Yehuda [Fri, 23 Oct 2015 21:01:11 +0000 (00:01 +0300)]
object_safety: check whether a supertrait contains Self even without being it

This is a [breaking-change]:lang, but the broken code does not make
much sense.

Fixes #26056

8 years agoAdd a regression test for #29122 (fixed in #29134)
William Throwe [Sun, 18 Oct 2015 19:24:08 +0000 (15:24 -0400)]
Add a regression test for #29122 (fixed in #29134)

8 years agoDocument a bunch of std::iter traits
Steve Klabnik [Tue, 13 Oct 2015 23:08:26 +0000 (19:08 -0400)]
Document a bunch of std::iter traits

This adds a bunch of documentation for most of the traits in std::iter

8 years agoAuto merge of #29241 - nikomatsakis:issue-28871, r=arielb1
bors [Fri, 23 Oct 2015 19:46:57 +0000 (19:46 +0000)]
Auto merge of #29241 - nikomatsakis:issue-28871, r=arielb1

Give preference to projections from where-clauses over those from trait definitions. This makes #28871 work again, though I think there's more to fix in this general area.

r? @arielb1
cc @brson (fixes regression)

8 years agoImplements Default for mutable slices. Fixes: #29244
James McGlashan [Fri, 23 Oct 2015 03:39:50 +0000 (14:39 +1100)]
Implements Default for mutable slices. Fixes: #29244

8 years agostd: Add more entries to stdtest base_port
Alex Crichton [Fri, 23 Oct 2015 17:50:53 +0000 (10:50 -0700)]
std: Add more entries to stdtest base_port

The new bots we have may conflict with one another on base ports, causing tests
to fail. For example the linux-musl-64-opt and linux-64-opt bots are using the
same base port right now, causing some spurious failures every now and then.