]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #32811 - alexcrichton:check-lints, r=nrc
bors [Tue, 12 Apr 2016 14:14:55 +0000 (07:14 -0700)]
Auto merge of #32811 - alexcrichton:check-lints, r=nrc

rustdoc: Fix testing no_run code blocks

This was a regression introduced by #31250 where the compiler deferred returning
the results of compilation a little too late (after the `Stop` check was looked
at). This commit alters the stop point to first try to return an erroneous
`result` and only if it was successful return the sentinel `Err(0)`.

Closes #31576

8 years agoAuto merge of #32804 - alexcrichton:stabilize-1.9, r=brson
bors [Tue, 12 Apr 2016 11:17:36 +0000 (04:17 -0700)]
Auto merge of #32804 - alexcrichton:stabilize-1.9, r=brson

std: Stabilize APIs for the 1.9 release

This commit applies all stabilizations, renamings, and deprecations that the
library team has decided on for the upcoming 1.9 release. All tracking issues
have gone through a cycle-long "final comment period" and the specific APIs
stabilized/deprecated are:

Stable

* `std::panic`
* `std::panic::catch_unwind` (renamed from `recover`)
* `std::panic::resume_unwind` (renamed from `propagate`)
* `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`)
* `std::panic::UnwindSafe` (renamed from `RecoverSafe`)
* `str::is_char_boundary`
* `<*const T>::as_ref`
* `<*mut T>::as_ref`
* `<*mut T>::as_mut`
* `AsciiExt::make_ascii_uppercase`
* `AsciiExt::make_ascii_lowercase`
* `char::decode_utf16`
* `char::DecodeUtf16`
* `char::DecodeUtf16Error`
* `char::DecodeUtf16Error::unpaired_surrogate`
* `BTreeSet::take`
* `BTreeSet::replace`
* `BTreeSet::get`
* `HashSet::take`
* `HashSet::replace`
* `HashSet::get`
* `OsString::with_capacity`
* `OsString::clear`
* `OsString::capacity`
* `OsString::reserve`
* `OsString::reserve_exact`
* `OsStr::is_empty`
* `OsStr::len`
* `std::os::unix::thread`
* `RawPthread`
* `JoinHandleExt`
* `JoinHandleExt::as_pthread_t`
* `JoinHandleExt::into_pthread_t`
* `HashSet::hasher`
* `HashMap::hasher`
* `CommandExt::exec`
* `File::try_clone`
* `SocketAddr::set_ip`
* `SocketAddr::set_port`
* `SocketAddrV4::set_ip`
* `SocketAddrV4::set_port`
* `SocketAddrV6::set_ip`
* `SocketAddrV6::set_port`
* `SocketAddrV6::set_flowinfo`
* `SocketAddrV6::set_scope_id`
* `<[T]>::copy_from_slice`
* `ptr::read_volatile`
* `ptr::write_volatile`
* The `#[deprecated]` attribute
* `OpenOptions::create_new`

Deprecated

* `std::raw::Slice` - use raw parts of `slice` module instead
* `std::raw::Repr` - use raw parts of `slice` module instead
* `str::char_range_at` - use slicing plus `chars()` plus `len_utf8`
* `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8`
* `str::char_at` - use slicing plus `chars()`
* `str::char_at_reverse` - use slicing plus `chars().rev()`
* `str::slice_shift_char` - use `chars()` plus `Chars::as_str`
* `CommandExt::session_leader` - use `before_exec` instead.

Closes #27719
cc #27751 (deprecating the `Slice` bits)
Closes #27754
Closes #27780
Closes #27809
Closes #27811
Closes #27830
Closes #28050
Closes #29453
Closes #29791
Closes #29935
Closes #30014
Closes #30752
Closes #31262
cc #31398 (still need to deal with `before_exec`)
Closes #31405
Closes #31572
Closes #31755
Closes #31756

8 years agoAuto merge of #32711 - marcusklaas:try-shorthand-span-fix, r=nagisa
bors [Tue, 12 Apr 2016 05:14:04 +0000 (22:14 -0700)]
Auto merge of #32711 - marcusklaas:try-shorthand-span-fix, r=nagisa

Fix the span for try shorthand expressions

My five character contribution to the rust parser! Fixes https://github.com/rust-lang/rust/issues/32709.

8 years agoAuto merge of #32882 - steveklabnik:rollup, r=steveklabnik
bors [Mon, 11 Apr 2016 20:20:56 +0000 (13:20 -0700)]
Auto merge of #32882 - steveklabnik:rollup, r=steveklabnik

Rollup of 9 pull requests

- Successful merges: #32768, #32802, #32815, #32823, #32849, #32854, #32862, #32870, #32873
- Failed merges:

8 years agoFix the span for try shorthand expressions
Marcus Klaas [Sun, 3 Apr 2016 20:30:21 +0000 (22:30 +0200)]
Fix the span for try shorthand expressions

8 years agorustdoc: Fix testing no_run code blocks
Alex Crichton [Thu, 7 Apr 2016 23:47:12 +0000 (16:47 -0700)]
rustdoc: Fix testing no_run code blocks

This was a regression introduced by #31250 where the compiler deferred returning
the results of compilation a little too late (after the `Stop` check was looked
at). This commit alters the stop point to first try to return an erroneous
`result` and only if it was successful return the sentinel `Err(0)`.

Closes #31576

8 years agostd: Stabilize APIs for the 1.9 release
Alex Crichton [Thu, 7 Apr 2016 17:42:53 +0000 (10:42 -0700)]
std: Stabilize APIs for the 1.9 release

This commit applies all stabilizations, renamings, and deprecations that the
library team has decided on for the upcoming 1.9 release. All tracking issues
have gone through a cycle-long "final comment period" and the specific APIs
stabilized/deprecated are:

Stable

* `std::panic`
* `std::panic::catch_unwind` (renamed from `recover`)
* `std::panic::resume_unwind` (renamed from `propagate`)
* `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`)
* `std::panic::UnwindSafe` (renamed from `RecoverSafe`)
* `str::is_char_boundary`
* `<*const T>::as_ref`
* `<*mut T>::as_ref`
* `<*mut T>::as_mut`
* `AsciiExt::make_ascii_uppercase`
* `AsciiExt::make_ascii_lowercase`
* `char::decode_utf16`
* `char::DecodeUtf16`
* `char::DecodeUtf16Error`
* `char::DecodeUtf16Error::unpaired_surrogate`
* `BTreeSet::take`
* `BTreeSet::replace`
* `BTreeSet::get`
* `HashSet::take`
* `HashSet::replace`
* `HashSet::get`
* `OsString::with_capacity`
* `OsString::clear`
* `OsString::capacity`
* `OsString::reserve`
* `OsString::reserve_exact`
* `OsStr::is_empty`
* `OsStr::len`
* `std::os::unix::thread`
* `RawPthread`
* `JoinHandleExt`
* `JoinHandleExt::as_pthread_t`
* `JoinHandleExt::into_pthread_t`
* `HashSet::hasher`
* `HashMap::hasher`
* `CommandExt::exec`
* `File::try_clone`
* `SocketAddr::set_ip`
* `SocketAddr::set_port`
* `SocketAddrV4::set_ip`
* `SocketAddrV4::set_port`
* `SocketAddrV6::set_ip`
* `SocketAddrV6::set_port`
* `SocketAddrV6::set_flowinfo`
* `SocketAddrV6::set_scope_id`
* `<[T]>::copy_from_slice`
* `ptr::read_volatile`
* `ptr::write_volatile`
* The `#[deprecated]` attribute
* `OpenOptions::create_new`

Deprecated

* `std::raw::Slice` - use raw parts of `slice` module instead
* `std::raw::Repr` - use raw parts of `slice` module instead
* `str::char_range_at` - use slicing plus `chars()` plus `len_utf8`
* `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8`
* `str::char_at` - use slicing plus `chars()`
* `str::char_at_reverse` - use slicing plus `chars().rev()`
* `str::slice_shift_char` - use `chars()` plus `Chars::as_str`
* `CommandExt::session_leader` - use `before_exec` instead.

Closes #27719
cc #27751 (deprecating the `Slice` bits)
Closes #27754
Closes #27780
Closes #27809
Closes #27811
Closes #27830
Closes #28050
Closes #29453
Closes #29791
Closes #29935
Closes #30014
Closes #30752
Closes #31262
cc #31398 (still need to deal with `before_exec`)
Closes #31405
Closes #31572
Closes #31755
Closes #31756

8 years agoRollup merge of #32873 - jethrogb:patch-2, r=steveklabnik
Steve Klabnik [Mon, 11 Apr 2016 14:31:28 +0000 (10:31 -0400)]
Rollup merge of #32873 - jethrogb:patch-2, r=steveklabnik

Match signed/unsigned integer type docs

* Copy documentation from signed implementation to unsigned implementation, where necessary.

A few functions had elaborate docs in the signed version but not in the unsigned version. This probably happenned because the signed version is at the top and the author didn't realize they had to update the documentation in both locations.

* Use signed integers in signed documentation, where possible.

r? @steveklabnik

8 years agoRollup merge of #32870 - jethrogb:patch-1, r=GuillaumeGomez
Steve Klabnik [Mon, 11 Apr 2016 14:31:28 +0000 (10:31 -0400)]
Rollup merge of #32870 - jethrogb:patch-1, r=GuillaumeGomez

Fix Windows UNC paths in std::path docs

8 years agoRollup merge of #32862 - raphlinus:master, r=bluss
Steve Klabnik [Mon, 11 Apr 2016 14:31:28 +0000 (10:31 -0400)]
Rollup merge of #32862 - raphlinus:master, r=bluss

Bit-magic for faster is_char_boundary

The asm generated for b < 128 || b >= 192 is not ideal, as it computes
both sub-inequalities. This patch replaces it with bit magic.

Fixes #32471

8 years agoRollup merge of #32854 - GuillaumeGomez:result_doc, r=steveklabnik
Steve Klabnik [Mon, 11 Apr 2016 14:31:28 +0000 (10:31 -0400)]
Rollup merge of #32854 - GuillaumeGomez:result_doc, r=steveklabnik

Add some missing commas and missing titles/formatting

Fixes #29373.

r? @steveklabnik

8 years agoRollup merge of #32849 - jseyfried:import_resolution_diagnostics, r=eddyb
Steve Klabnik [Mon, 11 Apr 2016 14:31:28 +0000 (10:31 -0400)]
Rollup merge of #32849 - jseyfried:import_resolution_diagnostics, r=eddyb

resolve: import resolution diagnostics

This improves the diagnostics for failing import resolutions (fixes #32833).
r? @eddyb

8 years agoRollup merge of #32823 - pravic:target-json, r=alexcrichton
Steve Klabnik [Mon, 11 Apr 2016 14:31:27 +0000 (10:31 -0400)]
Rollup merge of #32823 - pravic:target-json, r=alexcrichton

Read "is-like-msvc" target option from JSON

This is in reference to #32818.

8 years agoRollup merge of #32815 - allonsy:master, r=GuillaumeGomez
Steve Klabnik [Mon, 11 Apr 2016 14:31:27 +0000 (10:31 -0400)]
Rollup merge of #32815 - allonsy:master, r=GuillaumeGomez

Adds data race in docs

Thanks for all your hard work!
This is in reference to #32733
I know there has been a discussion about this on PR #32538 so you are welcome to keep the code as is or merge my documentation in.
Let me know what you think and/or if you want me to modify anything!

8 years agoRollup merge of #32802 - nikomatsakis:issue-32505, r=eddyb
Steve Klabnik [Mon, 11 Apr 2016 14:31:27 +0000 (10:31 -0400)]
Rollup merge of #32802 - nikomatsakis:issue-32505, r=eddyb

add regression test for #32505

Fixes #32505

r? @eddyb

8 years agoRollup merge of #32768 - GuillaumeGomez:slice_doc, r=steveklabnik
Steve Klabnik [Mon, 11 Apr 2016 14:31:27 +0000 (10:31 -0400)]
Rollup merge of #32768 - GuillaumeGomez:slice_doc, r=steveklabnik

Add doc examples for Iter and IterMut

Fixes #29374.

r? @steveklabnik

8 years agoAuto merge of #32850 - jseyfried:add_tests, r=alexcrichton
bors [Mon, 11 Apr 2016 13:11:31 +0000 (06:11 -0700)]
Auto merge of #32850 - jseyfried:add_tests, r=alexcrichton

resolve: Add regression tests for fixed issues

This adds regression tests for fixed issues in resolve (closes #22146, closes #24883, closes #26930).
r? @eddyb

8 years agoAuto merge of #32880 - Manishearth:fix, r=GuillaumeGomez
bors [Mon, 11 Apr 2016 10:09:41 +0000 (03:09 -0700)]
Auto merge of #32880 - Manishearth:fix, r=GuillaumeGomez

Review fixes for #32878

This contains review fixes for the PR.

8 years agoTibet does not have a space program. Peru does.
Manish Goregaokar [Mon, 11 Apr 2016 10:00:22 +0000 (15:30 +0530)]
Tibet does not have a space program. Peru does.

8 years agoReview fixes for #32878 (which was accidentally merged)
Manish Goregaokar [Mon, 11 Apr 2016 09:53:35 +0000 (15:23 +0530)]
Review fixes for #32878 (which was accidentally merged)

8 years agoAdd E0520 error code explanation
Guillaume Gomez [Mon, 11 Apr 2016 09:31:51 +0000 (11:31 +0200)]
Add E0520 error code explanation

8 years agoMatch signed/unsigned integer type docs
jethrogb [Mon, 11 Apr 2016 05:28:24 +0000 (22:28 -0700)]
Match signed/unsigned integer type docs

* Copy documentation from signed implementation to unsigned implementation, where necessary.
* Use signed integers in signed documentation, where possible.

8 years agoAuto merge of #32806 - brson:fix-features, r=alexcrichton
bors [Mon, 11 Apr 2016 02:37:40 +0000 (19:37 -0700)]
Auto merge of #32806 - brson:fix-features, r=alexcrichton

Set the version number for stabilization of braced_empty_structs

and augmented_assignment to 1.8.0.

Per the comments, the numbers in this table reflect the "current
status".

cc @rust-lang/libs @rust-lang/lang

Discovered this while hunting for 1.8 features. I'm afraid there may be more of these that are incorrect and we may have created a mess.

8 years agoAuto merge of #32816 - eddyb:variadic-fn-item, r=Aatch
bors [Sun, 10 Apr 2016 23:36:28 +0000 (16:36 -0700)]
Auto merge of #32816 - eddyb:variadic-fn-item, r=Aatch

Blacklist fn item types from being used with variadic functions.

Fixes #32201 by adding fn types to the variadic blacklist which currently includes `bool`, `i8`, `u8`, `i16`, `u16` and `f32`.

8 years agoFix Windows UNC paths in std::path docs
jethrogb [Sun, 10 Apr 2016 21:51:23 +0000 (14:51 -0700)]
Fix Windows UNC paths in std::path docs

8 years agoBit-magic for faster is_char_boundary
Raph Levien [Sun, 10 Apr 2016 00:11:20 +0000 (17:11 -0700)]
Bit-magic for faster is_char_boundary

The asm generated for b < 128 || b >= 192 is not ideal, as it computes
both sub-inequalities. This patch replaces it with bit magic.

Fixes #32471

8 years agoAuto merge of #32786 - brson:cargotest, r=alexcrichton
bors [Sat, 9 Apr 2016 11:44:43 +0000 (04:44 -0700)]
Auto merge of #32786 - brson:cargotest, r=alexcrichton

Fix cargotest

Tested in dev.

8 years agoAuto merge of #32781 - michaelwoerister:dont-use-svh-in-debuginfo, r=alexcrichton
bors [Sat, 9 Apr 2016 07:31:49 +0000 (00:31 -0700)]
Auto merge of #32781 - michaelwoerister:dont-use-svh-in-debuginfo, r=alexcrichton

Use crate name/disambiguator instead of SVH for debuginfo typeid.

8 years agoAuto merge of #32773 - mitaa:rdoc-ttfn-json, r=alexcrichton
bors [Sat, 9 Apr 2016 03:24:34 +0000 (20:24 -0700)]
Auto merge of #32773 - mitaa:rdoc-ttfn-json, r=alexcrichton

rustdoc: Remove the json-{input, output} format

(for reference #32698)

fixes #25108

r? @alexcrichton

8 years agoAdd regression test for #26930
Jeffrey Seyfried [Sat, 9 Apr 2016 02:38:50 +0000 (02:38 +0000)]
Add regression test for #26930

8 years agoAdd regression test for #24883
Jeffrey Seyfried [Sat, 9 Apr 2016 02:34:52 +0000 (02:34 +0000)]
Add regression test for #24883

8 years agoAdd regression test for #22146
Jeffrey Seyfried [Sat, 9 Apr 2016 02:31:03 +0000 (02:31 +0000)]
Add regression test for #22146

8 years agoAdd regression test
Jeffrey Seyfried [Sat, 9 Apr 2016 01:27:46 +0000 (01:27 +0000)]
Add regression test

8 years agoUpdate tests
Jeffrey Seyfried [Sat, 9 Apr 2016 01:27:36 +0000 (01:27 +0000)]
Update tests

8 years agoImprove import resolution diagnostics
Jeffrey Seyfried [Sat, 9 Apr 2016 01:06:57 +0000 (01:06 +0000)]
Improve import resolution diagnostics

8 years agoAdd some missing commas and missing titles/formatting
Guillaume Gomez [Sat, 9 Apr 2016 00:00:12 +0000 (02:00 +0200)]
Add some missing commas and missing titles/formatting

8 years agoAuto merge of #32751 - alexcrichton:dist-docs, r=brson
bors [Fri, 8 Apr 2016 22:36:34 +0000 (15:36 -0700)]
Auto merge of #32751 - alexcrichton:dist-docs, r=brson

rustbuild: Support cross rust-docs packages

Right now if you configure multiple hosts rustbuild will only build
documentation for the build triple, but we've got all the support necessary to
build documentation for different architectures as well. This commit
reinterprets the `target` field of doc `Step` instances to be the target of the
documentation rather than the target of the rustdoc/tool being run.

This should enable `make dist` to start producing a bunch of `rust-docs`
packages for all the cross architectures that rustbuild is producing now.

8 years agoAuto merge of #32810 - brson:relnotes, r=brson
bors [Fri, 8 Apr 2016 19:22:11 +0000 (12:22 -0700)]
Auto merge of #32810 - brson:relnotes, r=brson

Release notes for 1.8

cc @steveklabnik to me the highlights are compound assignment overloading, 32-bit MSVC builds being ready for use, and the cargo improvements.

[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md).

8 years agoRelease notes for 1.8
Brian Anderson [Thu, 7 Apr 2016 23:16:35 +0000 (23:16 +0000)]
Release notes for 1.8

8 years agoAdd data race to concurrency docs
Alec S [Fri, 8 Apr 2016 04:50:37 +0000 (23:50 -0500)]
Add data race to concurrency docs

8 years agoAuto merge of #32738 - Aatch:mir-operand-fn-ret, r=arielb1
bors [Fri, 8 Apr 2016 13:44:22 +0000 (06:44 -0700)]
Auto merge of #32738 - Aatch:mir-operand-fn-ret, r=arielb1

Handle operand temps for function calls

Previously, all non-void function returns required an on-stack location for the value to be stored to. This code improves translation of function calls so this is no longer necessary.

8 years agoAuto merge of #32695 - sfackler:default-buf-size, r=alexcrichton
bors [Fri, 8 Apr 2016 10:20:11 +0000 (03:20 -0700)]
Auto merge of #32695 - sfackler:default-buf-size, r=alexcrichton

Drop the default buffer size to 8K

The 64k capacity was picked by me a couple of years ago in the initial
implementation of buffered IO adaptors:
https://github.com/rust-lang/rust/pull/9091/files#diff-b131eeef531ad098b32f49695a031008R62.
64K was picked for symmetry with libuv, which we no longer use.

64K is *way* larger than the default size of any other language that I
can find. C, C++, and Java default to 8K, and Go defaults to 4K. There
have been a variety of issues filed relating to this such as #31885.

Closes #31885

8 years agoRead "is-like-msvc" target option from JSON
pravic [Fri, 8 Apr 2016 08:24:19 +0000 (11:24 +0300)]
Read "is-like-msvc" target option from JSON

cc #32818

8 years agoBlacklist fn item types from being used with variadic functions.
Eduard Burtescu [Fri, 8 Apr 2016 05:13:29 +0000 (08:13 +0300)]
Blacklist fn item types from being used with variadic functions.

8 years agoFix some type-related bugs
James Miller [Fri, 8 Apr 2016 03:37:56 +0000 (15:37 +1200)]
Fix some type-related bugs

Some types weren't being properly monomorphised, and didn't have their
regions properly erased. This is now fixed.

Also fixes an issue where a temp was initialized in two separate
branches, but wasn't given an alloca.

8 years agoAdd doc example for Iter and IterMut
Guillaume Gomez [Thu, 7 Apr 2016 23:56:45 +0000 (01:56 +0200)]
Add doc example for Iter and IterMut

8 years agoFix cargotest
Brian Anderson [Wed, 6 Apr 2016 18:03:42 +0000 (18:03 +0000)]
Fix cargotest

8 years agoAuto merge of #32800 - Manishearth:rollup, r=Manishearth
bors [Thu, 7 Apr 2016 22:40:47 +0000 (15:40 -0700)]
Auto merge of #32800 - Manishearth:rollup, r=Manishearth

Rollup of 7 pull requests

- Successful merges: #32687, #32729, #32731, #32732, #32734, #32737, #32741
- Failed merges:

8 years agoSet the version number for stabilization of braced_empty_structs
Brian Anderson [Thu, 7 Apr 2016 22:21:46 +0000 (22:21 +0000)]
Set the version number for stabilization of braced_empty_structs
and augmented_assignment to 1.8.0.

Per the comments, the numbers in this table reflect the "current
status".

8 years agoadd regression test for #32505
Niko Matsakis [Thu, 7 Apr 2016 19:12:13 +0000 (15:12 -0400)]
add regression test for #32505

8 years agoRollup merge of #32741 - tbu-:pr_remove_fixme_12808, r=bluss
Manish Goregaokar [Thu, 7 Apr 2016 17:56:19 +0000 (23:26 +0530)]
Rollup merge of #32741 - tbu-:pr_remove_fixme_12808, r=bluss

Remove strange names created by lack of privacy-conscious name lookup

The fixed issue that allowed this was #12808.

8 years agoRollup merge of #32737 - timonvo:arm-ehabi-backtraces, r=alexcrichton
Manish Goregaokar [Thu, 7 Apr 2016 17:56:18 +0000 (23:26 +0530)]
Rollup merge of #32737 - timonvo:arm-ehabi-backtraces, r=alexcrichton

Fix backtraces on ARM EHABI.

Before this patch, our `rust_eh_personality_catch` routine would cut
backtracing short at the `__rust_try` function, due to it not handling
the `_US_FORCE_UNWIND` bit properly, which is passed by libunwind
implementations on ARM EHABI.

Examples of where the `_US_FORCE_UNWIND` bit is passed to the PR:
- GCC's libunwind: https://github.com/gcc-mirror/gcc/blob/f1717362de1e56fe1ffab540289d7d0c6ed48b20/libgcc/unwind-arm-common.inc#L590
- LLVM's libunwind: https://github.com/llvm-mirror/libunwind/blob/61278584b5c84c422ff5da10f46c3235c54636c9/src/UnwindLevel1-gcc-ext.c#L153

8 years agoRollup merge of #32734 - tromey:dwarf-5-DW_LANG_Rust, r=michaelwoerister
Manish Goregaokar [Thu, 7 Apr 2016 17:56:18 +0000 (23:26 +0530)]
Rollup merge of #32734 - tromey:dwarf-5-DW_LANG_Rust, r=michaelwoerister

Use DWARF 5 value for DW_LANG_Rust

DWARF 5 has assigned a value for `DW_LANG_Rust`.  See [the relevant DWARF issue](http://www.dwarfstd.org/ShowIssue.php?issue=140129.1).  Although DWARF 5 is not yet released, it seems ok to use this value as both GCC and LLVM are already using other `DW_LANG_` constants assigned in this way.

8 years agoRollup merge of #32732 - dotdash:ext_arg, r=eddyb
Manish Goregaokar [Thu, 7 Apr 2016 17:56:18 +0000 (23:26 +0530)]
Rollup merge of #32732 - dotdash:ext_arg, r=eddyb

Handle integer-extending for C ABI

We need to supply sext/zext attributes to LLVM to ensure that arguments
are extended to the appropriate width in the correct way.

Most platforms extend integers less than 32 bits, though not all.

8 years agoRollup merge of #32731 - alexcrichton:known-bootstrap-key, r=brson
Manish Goregaokar [Thu, 7 Apr 2016 17:56:18 +0000 (23:26 +0530)]
Rollup merge of #32731 - alexcrichton:known-bootstrap-key, r=brson

mk: Hardcode the bootstrap key for each release

Starting with the 1.10.0 release we would like to bootstrap all compilers from
the previous stable release. For example the 1.10.0 compiler should bootstrap
from the literal 1.9.0 release artifacts. To do this, however, we need a way to
enable unstable features temporarily in a stable compiler (as the released
compiler is stable), but it turns out we already have a way to do that!

At compile time the configure script selects a `CFG_BOOTSTRAP_KEY` variable
value and then exports it into the makefiles. If the `RUSTC_BOOTSTRAP_KEY`
environment variable is set to this value, then the compiler is allowed to
"cheat" and use unstable features.

This method of choosing the bootstrap key, however, is problematic for the
intention of bootstrapping from the previous release. Each time a 1.9.0 compiler
is created, a new bootstrap key will be selected. That means that the 1.10.0
compiler will only compile from *our* literal release artifacts. Instead
distributions would like to bootstrap from their own compilers, so instead we
simply hardcode the bootstrap key for each release.

This patch uses the same `CFG_FILENAME_EXTRA` value (a hash of the release
string) as the bootstrap key. Consequently all 1.9.0 compilers, no matter where
they are compiled, will have the same bootstrap key. Additionally we won't need
to keep updating this as it'll be based on the release number anyway.

Once the 1.9.0 beta has been created, we can update the 1.10.0 nightly sources
(the `master` branch at that time) to bootstrap from that release using this
hard-coded bootstrap key. We will likely just hardcode into the makefiles what
the previous bootstrap key was and we'll change that whenever the stage0
compiler is updated.

8 years agoRollup merge of #32729 - pierzchalski:build_helper_suffix, r=alexcrichton
Manish Goregaokar [Thu, 7 Apr 2016 17:56:17 +0000 (23:26 +0530)]
Rollup merge of #32729 - pierzchalski:build_helper_suffix, r=alexcrichton

Change build helper to modify suffix

The current implementation of [gcc](https://crates.io/crates/gcc) defaults to using the ```CC``` environment variable to determine the compiler. The current global-find-replace in ```build_helper``` causes issues for projects using tools like ```ccache``` if they try to integrate libstd into their build system.

Almost all cross-compiler toolchains have the tool name as a suffix of the filename, so changing this to suffix-replacement instead of global-replacement should be fine.

8 years agoRollup merge of #32687 - mneumann:dragonfly_fix_libstd, r=alexcrichton
Manish Goregaokar [Thu, 7 Apr 2016 17:56:17 +0000 (23:26 +0530)]
Rollup merge of #32687 - mneumann:dragonfly_fix_libstd, r=alexcrichton

Fix libstd on DragonFly

Following changes:

* birthtime does not exist on DragonFly
* errno: __dfly_error is no more. Use #[thread_local] static errno.
* clock_gettime expects a c_ulong

These changes are required to build DragonFly snapshots again.

8 years agoAuto merge of #32016 - nikomatsakis:incr-comp-save, r=mw
bors [Thu, 7 Apr 2016 17:55:37 +0000 (10:55 -0700)]
Auto merge of #32016 - nikomatsakis:incr-comp-save, r=mw

Save/load incremental compilation dep graph

Contains the code to serialize/deserialize the dep graph to disk between executions. We also hash the item contents and compare to the new hashes. Also includes a unit test harness. There are definitely some known limitations, such as https://github.com/rust-lang/rust/issues/32014 and https://github.com/rust-lang/rust/issues/32015, but I am leaving those for follow-up work.

Note that this PR builds on https://github.com/rust-lang/rust/pull/32007, so the overlapping commits can be excluded from review.

r? @michaelwoerister

8 years agoargh, overlooked two extern crates
Niko Matsakis [Thu, 7 Apr 2016 17:09:00 +0000 (13:09 -0400)]
argh, overlooked two extern crates

8 years agoAuto merge of #32794 - Manishearth:rollup, r=Manishearth
bors [Thu, 7 Apr 2016 14:54:39 +0000 (07:54 -0700)]
Auto merge of #32794 - Manishearth:rollup, r=Manishearth

Rollup of 7 pull requests

- Successful merges: #32674, #32699, #32711, #32745, #32748, #32757, #32789
- Failed merges:

8 years agoRollup merge of #32789 - jseyfried:fix_duplicate_resolve_errors, r=eddyb
Manish Goregaokar [Thu, 7 Apr 2016 11:47:10 +0000 (17:17 +0530)]
Rollup merge of #32789 - jseyfried:fix_duplicate_resolve_errors, r=eddyb

resolve: Avoid emitting redundant path resolution errors

This PR avoids emitting redundant path resolution errors in `resolve` (fixes #32760).

r? @eddyb

8 years agoRollup merge of #32757 - taralx:patch-1, r=brson
Manish Goregaokar [Thu, 7 Apr 2016 11:47:10 +0000 (17:17 +0530)]
Rollup merge of #32757 - taralx:patch-1, r=brson

Fix typos in atomic compare_exchange.

Failure ordering can't be Release, not (not) Acquire. Seems like a typo copy-pasted all over.

8 years agoRollup merge of #32748 - aturon:simplified-spec, r=nikomatsakis
Manish Goregaokar [Thu, 7 Apr 2016 11:47:10 +0000 (17:17 +0530)]
Rollup merge of #32748 - aturon:simplified-spec, r=nikomatsakis

Reinstate fast_reject for overlap checking

The initial implementation of specialization did not use the
`fast_reject` mechanism when checking for overlap, which caused a
serious performance regression in some cases.

This commit modifies the specialization graph to use simplified types
for fast rejection when possible, and along the way refactors the logic
for building the specialization graph.

Closes #32499

r? @nikomatsakis

8 years agoRollup merge of #32745 - Amanieu:arc_fix, r=alexcrichton
Manish Goregaokar [Thu, 7 Apr 2016 11:47:10 +0000 (17:17 +0530)]
Rollup merge of #32745 - Amanieu:arc_fix, r=alexcrichton

Fix infinite loop in Arc::downgrade

8 years agoRollup merge of #32699 - bluss:slice-memcmp, r=alexcrichton
Manish Goregaokar [Thu, 7 Apr 2016 11:47:09 +0000 (17:17 +0530)]
Rollup merge of #32699 - bluss:slice-memcmp, r=alexcrichton

Specialize equality for [T] and comparison for [u8] to use memcmp when possible

Specialize equality for [T] and comparison for [u8] to use memcmp when possible

Where T is a type that can be compared for equality bytewise, we can use
memcmp. We can also use memcmp for PartialOrd, Ord for [u8].

Use specialization to call memcmp in PartialEq for slices for certain element types. This PR does not change the user visible API since the implementation uses an intermediate trait. See commit messages for more information.

The memcmp signature was changed from `*const i8` to `*const u8` which is in line with how the memcmp function is defined in C (taking const void * arguments, interpreting the values as unsigned bytes for purposes of the comparison).

8 years agoRollup merge of #32674 - jseyfried:1422_groundwork, r=nikomatsakis
Manish Goregaokar [Thu, 7 Apr 2016 11:47:09 +0000 (17:17 +0530)]
Rollup merge of #32674 - jseyfried:1422_groundwork, r=nikomatsakis

Lay groundwork for RFC 1422  and improve `PrivateItemsInPublicInterfacesVisitor`

This PR lays groundwork for RFC 1422 (cc #32409) and improves `PrivateItemsInPublicInterfacesVisitor`. More specifically, it
 - Refactors away `hir::Visibility::inherit_from`, the semantics of which are obsolete.
 - Makes `hir::Visibility` non-`Copy` so that we will be able to add new variants to represent `pub(restricted)` (for example, `Visibility::Restricted(Path)`).
 - Adds a new `Copy` type `ty::Visibility` that represents a visibility value, i.e. a characterization of where an item is accessible. This is able to represent `pub(restricted)` visibilities.
 - Improves `PrivateItemsInPublicInterfacesVisitor` so that it checks for items in an interface that are less visible than the interface. This fixes #30079 but doesn't change any other behavior.

r? @nikomatsakis

8 years agoAuto merge of #32583 - arielb1:need-a-bound, r=nikomatsakis
bors [Thu, 7 Apr 2016 10:07:24 +0000 (03:07 -0700)]
Auto merge of #32583 - arielb1:need-a-bound, r=nikomatsakis

Suggest adding a where-clause when that can help

Suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it.

r? @nikomatsakis

8 years agoFix libstd on DragonFly
Michael Neumann [Sat, 2 Apr 2016 17:06:16 +0000 (19:06 +0200)]
Fix libstd on DragonFly

Following changes:

* birthtime does not exist on DragonFly
* errno: __dfly_error is no more. Use #[thread_local] static errno.
* clock_gettime expects a c_ulong (use a type alias)

These changes are required to build DragonFly snapshots again.

8 years agotest the substs ppaux code both with and without -Z verbose
Ariel Ben-Yehuda [Wed, 6 Apr 2016 19:00:00 +0000 (22:00 +0300)]
test the substs ppaux code both with and without -Z verbose

8 years agoAuto merge of #32649 - Amanieu:intrinsic_monomorphization_assert, r=eddyb
bors [Thu, 7 Apr 2016 07:08:14 +0000 (00:08 -0700)]
Auto merge of #32649 - Amanieu:intrinsic_monomorphization_assert, r=eddyb

Fix LLVM assert when handling bad intrinsic monomorphizations

Passing an invalid type to certain intrinsics would trigger an LLVM assert even though the invalid type was caught by the compiler.

r? @eddyb

8 years agoFix tidy errors
Jeffrey Seyfried [Thu, 7 Apr 2016 04:13:34 +0000 (04:13 +0000)]
Fix tidy errors

8 years agoFix fallout in tests
Jeffrey Seyfried [Thu, 7 Apr 2016 03:48:52 +0000 (03:48 +0000)]
Fix fallout in tests

8 years agoAdd test for #30079
Jeffrey Seyfried [Sat, 2 Apr 2016 02:22:41 +0000 (02:22 +0000)]
Add test for #30079

8 years agoImprove `PrivateItemsInPublicInterfacesVisitor`
Jeffrey Seyfried [Fri, 1 Apr 2016 20:16:31 +0000 (20:16 +0000)]
Improve `PrivateItemsInPublicInterfacesVisitor`

8 years agoUse the node id from the `Restricted` variant when checking accessibility
Jeffrey Seyfried [Thu, 31 Mar 2016 07:03:00 +0000 (07:03 +0000)]
Use the node id from the `Restricted` variant when checking accessibility
in `typeck` and in `privacy::PrivacyVisitor`.

8 years agoMake `hir::Visibility` non-copyable and add `ty::Visibility`
Jeffrey Seyfried [Fri, 25 Mar 2016 06:08:11 +0000 (06:08 +0000)]
Make `hir::Visibility` non-copyable and add `ty::Visibility`

8 years agoRefactor away `hir::Visibility::inherit_from`
Jeffrey Seyfried [Sat, 26 Mar 2016 00:35:59 +0000 (00:35 +0000)]
Refactor away `hir::Visibility::inherit_from`

8 years agoRemove rustdocs json format
mitaa [Wed, 6 Apr 2016 18:08:28 +0000 (20:08 +0200)]
Remove rustdocs json format

8 years agoImprove path resolution diagnostics
Jeffrey Seyfried [Thu, 7 Apr 2016 00:42:29 +0000 (00:42 +0000)]
Improve path resolution diagnostics

8 years agoremove incorrect dependency on librustc_front
Niko Matsakis [Thu, 7 Apr 2016 00:20:38 +0000 (20:20 -0400)]
remove incorrect dependency on librustc_front

8 years agoAuto merge of #32230 - GuillaumeGomez:extend_css, r=alexcrichton
bors [Thu, 7 Apr 2016 00:11:44 +0000 (17:11 -0700)]
Auto merge of #32230 - GuillaumeGomez:extend_css, r=alexcrichton

Add --extend-css option to rustdoc

Fixes #32223

r? @brson

8 years agoUse crate name/disambiguator instead of SVH for debuginfo typeid.
Michael Woerister [Wed, 6 Apr 2016 22:36:29 +0000 (18:36 -0400)]
Use crate name/disambiguator instead of SVH for debuginfo typeid.

8 years agoAuto merge of #32778 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 6 Apr 2016 20:44:51 +0000 (13:44 -0700)]
Auto merge of #32778 - steveklabnik:rollup, r=steveklabnik

Rollup of 12 pull requests

- Successful merges: #31762, #32538, #32634, #32668, #32679, #32691, #32724, #32727, #32744, #32761, #32766, #32774
- Failed merges:

8 years agoFix test cases to reflect that #32014...went away
Niko Matsakis [Wed, 6 Apr 2016 20:38:29 +0000 (16:38 -0400)]
Fix test cases to reflect that #32014...went away

Not sure what was the bug. Fixes #32014.

8 years agoRollup merge of #32774 - tbu-:pr_doc_tuple_copy, r=brson
Steve Klabnik [Wed, 6 Apr 2016 19:12:09 +0000 (12:12 -0700)]
Rollup merge of #32774 - tbu-:pr_doc_tuple_copy, r=brson

Add `Copy` to the traits that are automatically implemented for tuples

8 years agoRollup merge of #32766 - nikomatsakis:constant-pattern-warning-cycle, r=eddyb
Steve Klabnik [Wed, 6 Apr 2016 19:12:09 +0000 (12:12 -0700)]
Rollup merge of #32766 - nikomatsakis:constant-pattern-warning-cycle, r=eddyb

change constant patterns to have a warning cycle

This was the original intention :(

r? @eddyb

8 years agoRollup merge of #32761 - tshepang:assert, r=steveklabnik
Steve Klabnik [Wed, 6 Apr 2016 19:12:09 +0000 (12:12 -0700)]
Rollup merge of #32761 - tshepang:assert, r=steveklabnik

avoid "==" in assert! when one of the values is a bool

Is suspect this is something of an idiom

8 years agoRollup merge of #32744 - GuillaumeGomez:patch-3, r=steveklabnik
Steve Klabnik [Wed, 6 Apr 2016 19:12:09 +0000 (12:12 -0700)]
Rollup merge of #32744 - GuillaumeGomez:patch-3, r=steveklabnik

Add example doc for ToOwned trait

Fixes #29342.

r? @steveklabnik

8 years agoRollup merge of #32727 - matklad:fix-comment, r=alexcrichton
Steve Klabnik [Wed, 6 Apr 2016 19:12:08 +0000 (12:12 -0700)]
Rollup merge of #32727 - matklad:fix-comment, r=alexcrichton

minor: update old comments

No more lifetimes in function types after https://github.com/rust-lang/rust/commit/f945190e6352a1bc965a117569532643319b400f

8 years agoRollup merge of #32724 - sanxiyn:outdated-comment, r=dotdash
Steve Klabnik [Wed, 6 Apr 2016 19:12:08 +0000 (12:12 -0700)]
Rollup merge of #32724 - sanxiyn:outdated-comment, r=dotdash

Remove outdated comment

The corresponding code was removed in #31824. Also remove code duplication and rename the function.

8 years agoRollup merge of #32691 - frewsxcv:patch-28, r=alexcrichton
Steve Klabnik [Wed, 6 Apr 2016 19:12:08 +0000 (12:12 -0700)]
Rollup merge of #32691 - frewsxcv:patch-28, r=alexcrichton

Indicate `None` is code-like in doc comment.

8 years agoRollup merge of #32679 - tclfs:patch-1, r=steveklabnik
Steve Klabnik [Wed, 6 Apr 2016 19:12:08 +0000 (12:12 -0700)]
Rollup merge of #32679 - tclfs:patch-1, r=steveklabnik

Remove error description of `move`

(1) `x` can be used in main() after the call to spawn(). Because the variables follow normal move semantics, though the keyword `move` is used, and i32 implements `Copy`.
(2) I remove this sentence because the previous sentence gives the referrence to `move closures`, and more description of `move` may be redundant.

8 years agoRollup merge of #32668 - frewsxcv:hashmap-address-fixme, r=alexcrichton
Steve Klabnik [Wed, 6 Apr 2016 19:12:08 +0000 (12:12 -0700)]
Rollup merge of #32668 - frewsxcv:hashmap-address-fixme, r=alexcrichton

Address FIXMEs related to short lifetimes in `HashMap`.

None

8 years agoRollup merge of #32634 - varunvats:docs-fix, r=steveklabnik
Steve Klabnik [Wed, 6 Apr 2016 19:12:07 +0000 (12:12 -0700)]
Rollup merge of #32634 - varunvats:docs-fix, r=steveklabnik

Minor doc fixes in "Crates and Modules" and "Lifetimes" chapters

These commits fix a couple of (minor) issues in the _Crates and Modules_ and the _Lifetimes_ chapters of the book.

r? @steveklabnik

8 years agoRollup merge of #32538 - Manishearth:no-data-race, r=steveklabnik
Steve Klabnik [Wed, 6 Apr 2016 19:12:07 +0000 (12:12 -0700)]
Rollup merge of #32538 - Manishearth:no-data-race, r=steveklabnik

Mention that it's not actually a data race

The example can't cause a data race since different indices are accesed.

(perhaps we should use an example where i iterates twice?)

r? @steveklabnik

8 years agoRollup merge of #31762 - tshepang:in-which-case, r=steveklabnik
Steve Klabnik [Wed, 6 Apr 2016 19:12:07 +0000 (12:12 -0700)]
Rollup merge of #31762 - tshepang:in-which-case, r=steveklabnik

doc: there is no case that is shown, so something was likely missing …

…from the change

8 years agoAdd `Copy` to the traits that are automatically implemented for tuples
Tobias Bucher [Wed, 6 Apr 2016 18:10:33 +0000 (20:10 +0200)]
Add `Copy` to the traits that are automatically implemented for tuples

8 years agorebase over the hir rename
Niko Matsakis [Wed, 6 Apr 2016 18:04:50 +0000 (14:04 -0400)]
rebase over the hir rename

8 years agoFix LLVM assert when handling bad intrinsic monomorphizations
Amanieu d'Antras [Thu, 31 Mar 2016 14:53:12 +0000 (15:53 +0100)]
Fix LLVM assert when handling bad intrinsic monomorphizations

8 years agoremove svh module
Niko Matsakis [Wed, 6 Apr 2016 17:38:18 +0000 (13:38 -0400)]
remove svh module