Commit Graph

47915 Commits

Author SHA1 Message Date
bors
05eb81ae11 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
2015-10-26 23:14:50 +00:00
bors
04475b92f9 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)
2015-10-26 21:23:32 +00:00
Jonas Schievink
153c533b27 Print the codegen worker # when using time-passes 2015-10-26 21:03:03 +01:00
bors
2c42c98815 Auto merge of #29384 - nikomatsakis:mir-not-stable-beta, r=alexcrichton 2015-10-26 19:34:14 +00:00
Niko Matsakis
2d5b8b0f2d Disable MIR on beta/stable until we've resolved #29227 is resolved. 2015-10-26 15:05:35 -04:00
Alex Crichton
4b43e07af9 std: Slightly more robust env var handling
As discovered in #29298, `env::set_var("", "")` will panic, but it turns out
that it *also* deadlocks on Unix systems. This happens because if a panic
happens while holding the environment lock, we then go try to read
RUST_BACKTRACE, grabbing the environment lock, causing a deadlock.

Specifically, the changes made here are:

* The environment lock is pushed into `std::sys` instead of `std::env`. This
  also only puts it in the Unix implementation, not Windows where the functions
  are already threadsafe.
* The `std::sys` implementation now returns `io::Result` so panics are
  explicitly at the `std::env` level. The panic messages have also been improved
  in these situations.
2015-10-26 10:49:20 -07:00
bors
278cc2f157 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.
2015-10-26 17:44:37 +00:00
Alex Crichton
31fa9167c0 test: Add regression test for "source trait is private" 2015-10-26 10:38:26 -07:00
Corentin Henry
1bb7205082 rustfmt librustc_unicode 2015-10-26 17:57:53 +01:00
Seo Sanghyeon
4e2189fe45 Remove NodeArg 2015-10-27 01:32:04 +09:00
Charlotte Spencer
7447457ef8 Remove use of 'just' in trpl/installing-rust.md
The beginning of the work that needs to be done as part of #28835.
2015-10-26 16:29:54 +00:00
Alex Crichton
cb0ce69026 Revert "Remove unnecessary trait accessibility check."
This reverts commit f4f95eb3a9.
2015-10-26 09:16:05 -07:00
Alex Crichton
0cfdb33720 Revert "Add UFCS privacy test."
This reverts commit b3e1aca40f.
2015-10-26 09:16:01 -07:00
bors
c5d650cf74 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
2015-10-26 15:50:45 +00:00
Seo Sanghyeon
d7944cee12 Distinguish argument from local variable 2015-10-27 00:46:11 +09:00
bors
0b9edc77c5 Auto merge of #29280 - Ryman:bad_docattr, r=Manishearth
As is, this attr would lead to the "///" prefix being in the output text.
2015-10-26 13:58:50 +00:00
bors
7de9c4eea8 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".
2015-10-26 12:08:51 +00:00
bors
bf7eec04d8 Auto merge of #29312 - apasel422:issue-21410, r=alexcrichton
Closes #21410.
Closes #24972.
2015-10-26 10:16:52 +00:00
Aleksey Kladov
32e4ba8f50 reference: clarify impl
Another kind of nominal types in Rust are trait objects, so the following is valid

```rust
trait A {

}

impl A {

}
```
2015-10-26 12:31:17 +03:00
bors
c44316d4a1 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
2015-10-26 08:27:59 +00:00
bors
72ed590f8b Auto merge of #29301 - reddraggone9:patch-1, r=alexcrichton
Added a single character to fix a typo in a doc comment.
2015-10-26 06:37:12 +00:00
bors
039b2ca74f 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
2015-10-26 04:48:00 +00:00
bors
908979d53d Auto merge of #29299 - tbu-:pr_btreemap_example_dup, r=alexcrichton 2015-10-26 02:56:27 +00:00
Andrew Paseltiner
fbc53e5a63 Add tests for #21410 and #24972
Closes #21410.
Closes #24972.
2015-10-25 20:32:10 -04:00
bors
c3db627cbf 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.
2015-10-26 00:19:51 +00:00
bors
f7bde94ea8 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.
2015-10-25 20:31:48 +00:00
mdinger
a3478e0d16 Update the playpen link for code in the rust book to agree with rustdoc's new style 2015-10-25 16:18:55 -04:00
Ricardo Signes
50611331b4 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.
2015-10-25 16:05:58 -04:00
Tobias Bucher
fe2a47b88a Say that std::env::{set_var, unset_var} *may* panic
Previously the documentation suggested that the documentation about the
panics are guarantees.
2015-10-25 20:03:42 +00:00
bors
2a418216fe Auto merge of #29266 - apasel422:wf, r=alexcrichton
Using these traits in an object context previously resulted in an RFC 1214 warning.
2015-10-25 18:34:29 +00:00
Alex Crichton
d51b432fd7 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
2015-10-25 10:32:11 -07:00
bors
e02ada6d38 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)
2015-10-25 16:38:38 +00:00
Alex Crichton
ff49733274 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)
2015-10-25 09:36:32 -07:00
Vadim Petrochenkov
e8ddbba2ed syntax/rustc_front: Simplify VariantData::fields
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-25 18:33:51 +03:00
bors
079f3848c3 Auto merge of #29281 - skeleten:issue-28189, r=steveklabnik
Closes #28189
2015-10-25 14:41:06 +00:00
Lee Jenkins
0044a68249 Fix doc comment typo
Added a single character to fix a typo in a doc comment.
2015-10-25 09:17:27 -05:00
bors
5acda1d3b2 Auto merge of #29279 - Ryman:strtests, r=alexcrichton 2015-10-25 12:44:33 +00:00
Tobias Bucher
5794950c2d Document possible panics for std::env::{set_var, unset_var} 2015-10-25 12:04:29 +00:00
Tobias Bucher
4b45f39f92 Remove key duplication from BTreeMap example in collections 2015-10-25 12:03:21 +00:00
Andrew Paseltiner
671602c8c9 Add tests
Closes #22781.
Closes #23891.
Closes #24956.
Closes #25145.
Closes #25693.
Closes #26095.
Closes #26459.
Closes #27320.
Closes #27895.
2015-10-25 07:37:21 -04:00
Emanuel Czirai
351efd55e9 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.
2015-10-25 11:53:47 +01:00
bors
f68cd9aef1 Auto merge of #29273 - Manishearth:regression, r=alexcrichton
None
2015-10-25 10:45:27 +00:00
bors
92dd81ab51 Auto merge of #29272 - sanxiyn:llvm-update, r=alexcrichton
cc @zazdxscf
2015-10-25 08:47:46 +00:00
bors
49b232edaf Auto merge of #29261 - apasel422:issue-22403, r=alexcrichton
Closes #22403.

r? @pnkfelix
2015-10-25 06:48:21 +00:00
John Hodge
f9b8c49cdb Switch to 'const unsafe fn' ordering (rust-lang/rust#29107) 2015-10-25 12:03:07 +08:00
Vadim Petrochenkov
43b4373a23 Tweak stability to not require annotations on impl items and unnamed fields 2015-10-25 05:30:26 +03:00
bors
1d792a64b6 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.
2015-10-25 02:12:00 +00:00
Vadim Petrochenkov
599df16551 rustc_privacy: Expand public node set, build exported node set more correctly 2015-10-25 04:42:31 +03:00
Kevin Butler
1a235274a1 libsyntax: Consolidate branch to benefit from exhaustive checking instead of unwrapping 2015-10-25 01:34:45 +01:00
Kevin Butler
998914f5da libsyntax: remove panics from Parser::parse_pat_nopanic 2015-10-25 01:33:22 +01:00