]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoFix reading/writing 4 GiB or larger files on Windows 64-bit
Oliver Middleton [Tue, 23 Feb 2016 00:04:24 +0000 (00:04 +0000)]
Fix reading/writing 4 GiB or larger files on Windows 64-bit

`ReadFile` and `WriteFile` take a DWORD (u32) for the length argument
which was erroneously cast from a usize causing truncation. This meant
methods like `write_all` and `read_exact` would unexpectedly fail if
given a buffer 4 GiB or larger.

We can instead just ask for `u32::MAX` bytes if the given buffer is too
big.

8 years agoAuto merge of #31704 - tbu-:pr_vec_into_iter_clone, r=aturon
bors [Mon, 22 Feb 2016 21:16:36 +0000 (21:16 +0000)]
Auto merge of #31704 - tbu-:pr_vec_into_iter_clone, r=aturon

8 years agoAuto merge of #30969 - Amanieu:extended_atomic_cmpxchg, r=alexcrichton
bors [Mon, 22 Feb 2016 19:10:13 +0000 (19:10 +0000)]
Auto merge of #30969 - Amanieu:extended_atomic_cmpxchg, r=alexcrichton

This is an implementation of rust-lang/rfcs#1443.

8 years agoAdd a test to make sure trans doesn't choke on any of the intrinsics
Amanieu d'Antras [Mon, 22 Feb 2016 18:39:13 +0000 (18:39 +0000)]
Add a test to make sure trans doesn't choke on any of the intrinsics

8 years agoAuto merge of #31819 - miqid:doc, r=steveklabnik
bors [Mon, 22 Feb 2016 16:00:56 +0000 (16:00 +0000)]
Auto merge of #31819 - miqid:doc, r=steveklabnik

Hello.

I came across some minor spelling mistakes while going through the documentation for the `Iterator` trait. Also includes a suggested styling fix.

r? @steveklabnik

8 years agoCorrect Iterator trait documentation
Michael Huynh [Mon, 22 Feb 2016 14:02:40 +0000 (22:02 +0800)]
Correct Iterator trait documentation

Fixes several minor spelling errors and includes a suggested style fix.

8 years agoAuto merge of #31813 - nbaksalyar:solaris-fix, r=sanxiyn
bors [Mon, 22 Feb 2016 07:08:25 +0000 (07:08 +0000)]
Auto merge of #31813 - nbaksalyar:solaris-fix, r=sanxiyn

A quick fix for several issues that break a Solaris/Illumos build.
Also, adds a CPU target specification (as seen in a patch for OpenBSD #31727).

8 years agoAuto merge of #31811 - alexcrichton:clean-deps, r=sanxiyn
bors [Mon, 22 Feb 2016 05:20:39 +0000 (05:20 +0000)]
Auto merge of #31811 - alexcrichton:clean-deps, r=sanxiyn

The standard library doesn't depend on rustc_bitflags, so move it to explicit
dependencies on all other crates. Additionally, the arena/fmt_macros deps could
be dropped from libsyntax.

8 years agoAuto merge of #31805 - cuviper:android-lfs, r=alexcrichton
bors [Mon, 22 Feb 2016 03:08:39 +0000 (03:08 +0000)]
Auto merge of #31805 - cuviper:android-lfs, r=alexcrichton

Android should use 64-bit LFS symbols for `lseek` and `ftruncate`, lest
those offset parameters suffer a lossy cast down to a 32-bit `off_t`.

Unlike GNU/Linux, Android's `stat`, `dirent`, and related functions are
always 64-bit LFS compatible, and `open` already implies `O_LARGEFILE`,
so all those don't need to follow Linux.  It might be nice to unify them
anyway, but those other LFS symbols aren't present in API 18 bionic.

r? @alexcrichton

8 years agoAuto merge of #31806 - gokhanettin:to_lowercase-doc, r=japaric
bors [Mon, 22 Feb 2016 01:07:07 +0000 (01:07 +0000)]
Auto merge of #31806 - gokhanettin:to_lowercase-doc, r=japaric

`to_lowercase` example mistakenly calls `to_uppercase` function. This fixes the example.

8 years agoAuto merge of #31810 - gandro:netbsd-fix-stat, r=alexcrichton
bors [Sun, 21 Feb 2016 23:08:24 +0000 (23:08 +0000)]
Auto merge of #31810 - gandro:netbsd-fix-stat, r=alexcrichton

Some struct members have a slighty different name on NetBSD. This has been fixed in the libc crate, but not in libstd, breaking the NetBSD build. Related C struct definition: http://nxr.netbsd.org/xref/src/sys/sys/stat.h?r=1.68#59

This also removes the broken `st_spare()` from MetadataExt, since it is private field reserved for future use.

@dhuseby In case this conflicts with any of your pending patches, feel free to intervene - I'm happy to withdraw this PR.

r? @alexcrichton

8 years agoFix broken Solaris build
Nikita Baksalyar [Sun, 21 Feb 2016 22:57:24 +0000 (01:57 +0300)]
Fix broken Solaris build

8 years agoAuto merge of #31792 - Zoxc:sysroot, r=alexcrichton
bors [Sun, 21 Feb 2016 19:24:02 +0000 (19:24 +0000)]
Auto merge of #31792 - Zoxc:sysroot, r=alexcrichton

With these changes you can build a freestanding sysroot without using floating points using a Cargo.toml and copying the `deps` folder cargo outputs.
```
[package]
name = "sysroot"
version = "0.1.0"

[lib]
path = "lib.rs"
crate-type = ["rlib"]

[dependencies.core]
path = "../vendor/rust/src/src/libcore"
features = ["disable_float"]

[dependencies]
collections = { path = "../vendor/rust/src/src/libcollections" }
```

8 years agorustbuild: Sync some Cargo.toml/lib.rs dependencies
Alex Crichton [Sun, 21 Feb 2016 17:49:13 +0000 (09:49 -0800)]
rustbuild: Sync some Cargo.toml/lib.rs dependencies

The standard library doesn't depend on rustc_bitflags, so move it to explicit
dependencies on all other crates. Additionally, the arena/fmt_macros deps could
be dropped from libsyntax.

8 years agoFix `struct stat` usage on NetBSD
Sebastian Wicki [Sun, 21 Feb 2016 15:31:56 +0000 (16:31 +0100)]
Fix `struct stat` usage on NetBSD

Some struct members have a slighty different name on NetBSD. This has been
fixed in the libc crate, but not in libstd.

This also removes `st_spare` from MetadataExt, since it is private field
reserved for future use.

8 years agoFix liballoc dependencies
John Kåre Alsaker [Sat, 20 Feb 2016 16:57:14 +0000 (17:57 +0100)]
Fix liballoc dependencies

8 years agoAuto merge of #31802 - alexcrichton:fix-dist-rustbuild, r=japaric
bors [Sun, 21 Feb 2016 13:17:37 +0000 (13:17 +0000)]
Auto merge of #31802 - alexcrichton:fix-dist-rustbuild, r=japaric

Forgot to add a few directories to `make dist` so `--enable-rustbuild` can
continue to work.

Closes #31801

8 years agoFix to_lowercase example
Gökhan Karabulut [Sun, 21 Feb 2016 11:19:50 +0000 (13:19 +0200)]
Fix to_lowercase example

8 years agoAuto merge of #31799 - cshaffer:book-fixes, r=steveklabnik
bors [Sun, 21 Feb 2016 11:15:13 +0000 (11:15 +0000)]
Auto merge of #31799 - cshaffer:book-fixes, r=steveklabnik

I noticed a few PRs fixing some of the words around the code refactor in the guessing game tutorial, this should be all that's left.

8 years agoAuto merge of #31785 - sanxiyn:gitmodules, r=alexcrichton
bors [Sun, 21 Feb 2016 09:16:30 +0000 (09:16 +0000)]
Auto merge of #31785 - sanxiyn:gitmodules, r=alexcrichton

libc moved from rust-lang-nursery to rust-lang.

8 years agostd: Use Android LFS off64_t, ftruncate64, and lseek64
Josh Stone [Sun, 21 Feb 2016 09:04:14 +0000 (01:04 -0800)]
std: Use Android LFS off64_t, ftruncate64, and lseek64

Android should use 64-bit LFS symbols for `lseek` and `ftruncate`, lest
those offset parameters suffer a lossy cast down to a 32-bit `off_t`.

Unlike GNU/Linux, Android's `stat`, `dirent`, and related functions are
always 64-bit LFS compatible, and `open` already implies `O_LARGEFILE`,
so all those don't need to follow Linux.  It might be nice to unify them
anyway, but those other LFS symbols aren't present in API 18 bionic.

r? @alexcrichton

8 years agoAuto merge of #31791 - alexcrichton:llvmup3, r=dotdash
bors [Sun, 21 Feb 2016 04:59:50 +0000 (04:59 +0000)]
Auto merge of #31791 - alexcrichton:llvmup3, r=dotdash

Looks like they picked up a bunch of fixes, one of which is even quite relevant
to us!

Closes #31505

8 years agomk: Add missing rustbuild dirs to `dist`
Alex Crichton [Sun, 21 Feb 2016 02:34:07 +0000 (18:34 -0800)]
mk: Add missing rustbuild dirs to `dist`

Forgot to add a few directories to `make dist` so `--enable-rustbuild` can
continue to work.

Closes #31801

8 years agoFix number of lines and methods in guessing game
Chad Shaffer [Sun, 21 Feb 2016 01:00:54 +0000 (17:00 -0800)]
Fix number of lines and methods in guessing game

8 years agoAuto merge of #31761 - Amanieu:volatile, r=alexcrichton
bors [Sun, 21 Feb 2016 00:56:08 +0000 (00:56 +0000)]
Auto merge of #31761 - Amanieu:volatile, r=alexcrichton

Tracking issue: #31756
RFC: rust-lang/rfcs#1467

I've made these unstable for now. Should they be stabilized straight away since we've had plenty of experience with people using the unstable intrinsics?

8 years agoAuto merge of #31757 - petrochenkov:unitdotdot, r=nikomatsakis
bors [Sat, 20 Feb 2016 20:33:33 +0000 (20:33 +0000)]
Auto merge of #31757 - petrochenkov:unitdotdot, r=nikomatsakis

This warning was introduced on Nov 28, 2015 and got into 1.6 stable, it was later requalified from a hardwired warning to a warn-by-default lint.
If this patch is landed soon enough, then `match_of_unit_variant_via_paren_dotdot` will get into 1.8 stable as a deny-by-default lint.
My intention is to turn it into a hard error after March 3, 2016, then it will hit stable at 1.9.

r? @nikomatsakis
cc @pnkfelix

8 years agoAuto merge of #31608 - frewsxcv:osstring-simple-functions, r=alexcrichton
bors [Sat, 20 Feb 2016 18:35:16 +0000 (18:35 +0000)]
Auto merge of #31608 - frewsxcv:osstring-simple-functions, r=alexcrichton

https://github.com/rust-lang/rust/issues/29453

8 years agoAnother rebase on the 3.8 release branch of LLVM
Alex Crichton [Sat, 20 Feb 2016 17:31:17 +0000 (09:31 -0800)]
Another rebase on the 3.8 release branch of LLVM

Looks like they picked up a bunch of fixes, one of which is even quite relevant
to us!

Closes #31505

8 years agoAdd Capacity/length methods for OsString.
Corey Farwell [Fri, 12 Feb 2016 17:21:57 +0000 (12:21 -0500)]
Add Capacity/length methods for OsString.

https://github.com/rust-lang/rust/issues/29453

8 years agoAuto merge of #31747 - jseyfried:stop_resolve_after_fail, r=nrc
bors [Sat, 20 Feb 2016 14:33:13 +0000 (14:33 +0000)]
Auto merge of #31747 - jseyfried:stop_resolve_after_fail, r=nrc

Now that #31461 is merged, a failing resolution can never become indeterminate or succeed, so we no longer have to keep trying to resolve failing import directives.
r? @nrc

8 years agoAuto merge of #31474 - arielb1:mir-typeck, r=nikomatsakis
bors [Sat, 20 Feb 2016 12:38:18 +0000 (12:38 +0000)]
Auto merge of #31474 - arielb1:mir-typeck, r=nikomatsakis

This should stop broken MIR from annoying us when we try to implement things

8 years agoUpdate .gitmodules
Seo Sanghyeon [Sat, 20 Feb 2016 11:37:30 +0000 (20:37 +0900)]
Update .gitmodules

8 years agoaddress review comments
Ariel Ben-Yehuda [Fri, 12 Feb 2016 23:01:08 +0000 (01:01 +0200)]
address review comments

8 years agoAuto merge of #31674 - VladUreche:issue/21221, r=nikomatsakis
bors [Sat, 20 Feb 2016 10:40:42 +0000 (10:40 +0000)]
Auto merge of #31674 - VladUreche:issue/21221, r=nikomatsakis

This commit adds functionality that allows the name resolution pass
to search for entities (traits/types/enums/structs) by name, in
order to show recommendations along with the errors.

For now, only E0405 and E0412 have suggestions attached, as per the
request in bug #21221, but it's likely other errors can also benefit
from the ability to generate suggestions.

8 years agoAuto merge of #31620 - alexcrichton:fix-out-of-tree-builds, r=brson
bors [Sat, 20 Feb 2016 08:47:25 +0000 (08:47 +0000)]
Auto merge of #31620 - alexcrichton:fix-out-of-tree-builds, r=brson

This removes creating some extraneous directories and also fixes some submodule management with out of tree builds.

Closes #31619

8 years agoAuto merge of #31777 - steveklabnik:rollup, r=steveklabnik
bors [Sat, 20 Feb 2016 04:48:34 +0000 (04:48 +0000)]
Auto merge of #31777 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #31721, #31737, #31741, #31750, #31763, #31764, #31765, #31775
- Failed merges:

8 years agoAuto merge of #31771 - alexcrichton:oops-that-didnt-fix-anything, r=brson
bors [Sat, 20 Feb 2016 02:52:01 +0000 (02:52 +0000)]
Auto merge of #31771 - alexcrichton:oops-that-didnt-fix-anything, r=brson

In #31717 we rebased our LLVM fork over the 3.8 release branch, and it was
thought that this fixed #31702. The testing, however, must have been erroneous,
as it unfortunately didn't fix the issue! Our MUSL nightly builders are failing
from the same assertion reported in the issue, so we at least know the test case
is a reproduction!

I believe the failure is only happening on the MUSL nightly builders because
none of the auto builders have LLVM assertions enabled, and the Linux nightly
builder *does* have assertions enabled for the binaries we generate but the
distcheck run doesn't test a compiler with LLVM assertions enabled.

8 years agoAuto merge of #31781 - alexcrichton:wtf-segfault, r=aturon
bors [Sat, 20 Feb 2016 00:58:49 +0000 (00:58 +0000)]
Auto merge of #31781 - alexcrichton:wtf-segfault, r=aturon

It's unclear to me whether this test failing under valgrind is actually legit.
The test only fails in valgrind when everything is dynamically linked, and it
appears to work when statically linked.

For now just add the `// no-prefer-dynamic` directive and let's just chalk it up
to a weird valgrind issue.

Closes #31328

8 years agotest: Fix a spuriously failing test on valgrind
Alex Crichton [Sat, 20 Feb 2016 00:53:06 +0000 (16:53 -0800)]
test: Fix a spuriously failing test on valgrind

It's unclear to me whether this test failing under valgrind is actually legit.
The test only fails in valgrind when everything is dynamically linked, and it
appears to work when statically linked.

For now just add the `// no-prefer-dynamic` directive and let's just chalk it up
to a weird valgrind issue.

Closes #31328

8 years agouse the FulfillmentContext and InferCtxt more correctly
Ariel Ben-Yehuda [Fri, 12 Feb 2016 22:23:16 +0000 (00:23 +0200)]
use the FulfillmentContext and InferCtxt more correctly

8 years agoTODO -> FIXME
Ariel Ben-Yehuda [Thu, 11 Feb 2016 16:41:01 +0000 (18:41 +0200)]
TODO -> FIXME

8 years agotype-check lvalues
Ariel Ben-Yehuda [Thu, 11 Feb 2016 16:05:28 +0000 (18:05 +0200)]
type-check lvalues

8 years agofix a few remaining bugs - make check runs!
Ariel Ben-Yehuda [Thu, 11 Feb 2016 13:38:52 +0000 (15:38 +0200)]
fix a few remaining bugs - make check runs!

8 years agostore the normalized types of field accesses
Ariel Ben-Yehuda [Thu, 11 Feb 2016 16:31:42 +0000 (18:31 +0200)]
store the normalized types of field accesses

Fixes #31504

8 years agoderef the argument of overloaded MIR autoderef
Ariel Ben-Yehuda [Thu, 11 Feb 2016 16:31:31 +0000 (18:31 +0200)]
deref the argument of overloaded MIR autoderef

Fixes #31466

8 years agomake *mut T -> *const T a coercion
Ariel Ben-Yehuda [Thu, 11 Feb 2016 16:31:20 +0000 (18:31 +0200)]
make *mut T -> *const T a coercion

rather than being implicit quasi-subtyping. Nothing good can come out
of quasi-subtyping.

8 years agotuple arguments to overloaded calls
Ariel Ben-Yehuda [Thu, 11 Feb 2016 16:30:34 +0000 (18:30 +0200)]
tuple arguments to overloaded calls

also fix translation of "rust-call" functions, although that could use
more optimizations

8 years agoAdd tests for read_volatile and write_volatile
Amanieu d'Antras [Fri, 19 Feb 2016 17:40:36 +0000 (17:40 +0000)]
Add tests for read_volatile and write_volatile

8 years agobe more type-safe in panic/panic_bounds_check
Ariel Ben-Yehuda [Thu, 11 Feb 2016 16:29:44 +0000 (18:29 +0200)]
be more type-safe in panic/panic_bounds_check

TODO: find a correct borrow region

Fixes #31482

8 years agointroduce an early pass to clear dead blocks
Ariel Ben-Yehuda [Sun, 7 Feb 2016 21:09:15 +0000 (23:09 +0200)]
introduce an early pass to clear dead blocks

this makes the the MIR assignment pass complete successfully

8 years agoadd -Z mir-opt-level to disable MIR optimizations
Ariel Ben-Yehuda [Sun, 7 Feb 2016 20:46:39 +0000 (22:46 +0200)]
add -Z mir-opt-level to disable MIR optimizations

setting -Z mir-opt-level=0 will disable all MIR optimizations
for easier debugging

8 years agoRollup merge of #31775 - nxnfufunezn:issue-31769, r=eddyb
Steve Klabnik [Fri, 19 Feb 2016 19:23:29 +0000 (14:23 -0500)]
Rollup merge of #31775 - nxnfufunezn:issue-31769, r=eddyb

Fixes : #31769
r? @eddyb

8 years agoRollup merge of #31765 - tshepang:shorten, r=steveklabnik
Steve Klabnik [Fri, 19 Feb 2016 19:23:29 +0000 (14:23 -0500)]
Rollup merge of #31765 - tshepang:shorten, r=steveklabnik

8 years agoRollup merge of #31764 - tshepang:overlong-sentence, r=steveklabnik
Steve Klabnik [Fri, 19 Feb 2016 19:23:28 +0000 (14:23 -0500)]
Rollup merge of #31764 - tshepang:overlong-sentence, r=steveklabnik

8 years agoRollup merge of #31763 - tshepang:extraneous-word, r=steveklabnik
Steve Klabnik [Fri, 19 Feb 2016 19:23:28 +0000 (14:23 -0500)]
Rollup merge of #31763 - tshepang:extraneous-word, r=steveklabnik

8 years agoRollup merge of #31750 - GuillaumeGomez:mailmap, r=nikomatsakis
Steve Klabnik [Fri, 19 Feb 2016 19:23:28 +0000 (14:23 -0500)]
Rollup merge of #31750 - GuillaumeGomez:mailmap, r=nikomatsakis

It's notably for #31707

8 years agoRollup merge of #31741 - alexcrichton:fix-ios, r=nikomatsakis
Steve Klabnik [Fri, 19 Feb 2016 19:23:28 +0000 (14:23 -0500)]
Rollup merge of #31741 - alexcrichton:fix-ios, r=nikomatsakis

Similar to OSX, these symbols are prefixed by default.

8 years agoRollup merge of #31737 - dhuseby:netbsd_fixes, r=alexcrichton
Steve Klabnik [Fri, 19 Feb 2016 19:23:28 +0000 (14:23 -0500)]
Rollup merge of #31737 - dhuseby:netbsd_fixes, r=alexcrichton

this fixes a small compile error when building for netbsd.

8 years agoRollup merge of #31721 - rphmeier:err_tuplestruct_count, r=Manishearth
Steve Klabnik [Fri, 19 Feb 2016 19:23:28 +0000 (14:23 -0500)]
Rollup merge of #31721 - rphmeier:err_tuplestruct_count, r=Manishearth

Fixes #31706

Also fixes a phrasing error in the diagnostic.

8 years agoFix error[E0518] not displayed for #[inline] on structs inside fns
nxnfufunezn [Fri, 19 Feb 2016 16:57:50 +0000 (22:27 +0530)]
Fix error[E0518] not displayed for #[inline] on structs inside fns

8 years agobegin implementing mir-typeck
Ariel Ben-Yehuda [Sun, 7 Feb 2016 19:13:00 +0000 (21:13 +0200)]
begin implementing mir-typeck

8 years agoAuto merge of #31742 - frewsxcv:needless-lifetimes, r=pnkfelix
bors [Fri, 19 Feb 2016 13:49:46 +0000 (13:49 +0000)]
Auto merge of #31742 - frewsxcv:needless-lifetimes, r=pnkfelix

These explicit lifetimes can be ommitted because of lifetime elision
rules. Instances were found using rust-clippy.

8 years agoAuto merge of #31738 - seanmonstar:sys-rand, r=alexcrichton
bors [Fri, 19 Feb 2016 10:58:53 +0000 (10:58 +0000)]
Auto merge of #31738 - seanmonstar:sys-rand, r=alexcrichton

8 years agoAuto merge of #31736 - bluss:write-char, r=alexcrichton
bors [Fri, 19 Feb 2016 08:04:11 +0000 (08:04 +0000)]
Auto merge of #31736 - bluss:write-char, r=alexcrichton

fmt: Make sure write_fmt's implementation can use write_char

It looks like the Adapter inside write_fmt was never updated to forward
the write_char method.

8 years agoIgnore the test added in #31717
Alex Crichton [Fri, 19 Feb 2016 06:47:42 +0000 (22:47 -0800)]
Ignore the test added in #31717

In #31717 we rebased our LLVM fork over the 3.8 release branch, and it was
thought that this fixed #31702. The testing, however, must have been erroneous,
as it unfortunately didn't fix the issue! Our MUSL nightly builders are failing
from the same assertion reported in the issue, so we at least know the test case
is a reproduction!

I believe the failure is only happening on the MUSL nightly builders because
none of the auto builders have LLVM assertions enabled, and the Linux nightly
builder *does* have assertions enabled for the binaries we generate but the
distcheck run doesn't test a compiler with LLVM assertions enabled.

8 years agoAuto merge of #31735 - aliclark:freebsd-link-defs, r=alexcrichton
bors [Fri, 19 Feb 2016 05:15:17 +0000 (05:15 +0000)]
Auto merge of #31735 - aliclark:freebsd-link-defs, r=alexcrichton

The FreeBSD linker config is missing some options present in the other BSD configs.

This seems accidental, with other BSDs having the flags added in platform-specific commits, or with the flags present from day 1.

Some other BSD commits for reference:
https://github.com/aliclark/rust/commit/fcb30a0b67b1bd4acbc3422ff74fac5d031ae1ae#diff-db69d903e469b7769aefaa31786fc2c4R1
https://github.com/aliclark/rust/commit/0b7c4f57f6ba59dabe4db2808fe45e8bd8bbce22#diff-1c7b74536ce0291d1f89953035f26a71R1

https://github.com/aliclark/rust/commit/cfd2a5cfa148b1c927571cc2e9f06e242831b696

8 years agoAuto merge of #31716 - jseyfried:fix_privacy_for_def_err, r=nrc
bors [Fri, 19 Feb 2016 02:18:25 +0000 (02:18 +0000)]
Auto merge of #31716 - jseyfried:fix_privacy_for_def_err, r=nrc

Fixes #31714

8 years agoImprove dummy bindings for unresolved imports
Jeffrey Seyfried [Fri, 19 Feb 2016 00:42:30 +0000 (00:42 +0000)]
Improve dummy bindings for unresolved imports

8 years agoShow candidates for names not in scope
Vlad Ureche [Sun, 14 Feb 2016 01:47:27 +0000 (02:47 +0100)]
Show candidates for names not in scope

This commit adds functionality that allows the name resolution pass
to search for entities (traits/types/enums/structs) by name, in
order to show recommendations along with the errors.

For now, only E0405 and E0412 have suggestions attached, as per the
request in bug #21221, but it's likely other errors can also benefit
from the ability to generate suggestions.

8 years agoAuto merge of #31684 - tmiasko:alternate-stack, r=alexcrichton
bors [Thu, 18 Feb 2016 23:23:22 +0000 (23:23 +0000)]
Auto merge of #31684 - tmiasko:alternate-stack, r=alexcrichton

Remove alternate stack with sigaltstack before unmaping it.

Also reuse existing signal stack if already set, this is especially
useful when working with sanitizers that configure alternate stack
themselves.

This change depends on SS_DISABLE recently introduced in libc crate and updates
this git submodule accordingly.

8 years agoAdd compare_exchange and compare_exchange_weak to atomic types
Amanieu d'Antras [Sun, 17 Jan 2016 05:11:31 +0000 (05:11 +0000)]
Add compare_exchange and compare_exchange_weak to atomic types

8 years agodoc: make the sentence more simple
Tshepang Lekhonkhobe [Thu, 18 Feb 2016 21:13:22 +0000 (23:13 +0200)]
doc: make the sentence more simple

8 years agodoc: reduce overlong sentence
Tshepang Lekhonkhobe [Thu, 18 Feb 2016 20:59:03 +0000 (22:59 +0200)]
doc: reduce overlong sentence

8 years agoAuto merge of #31600 - nagisa:mir-msvc-seh-2, r=nikomatsakis
bors [Thu, 18 Feb 2016 20:46:28 +0000 (20:46 +0000)]
Auto merge of #31600 - nagisa:mir-msvc-seh-2, r=nikomatsakis

r? @alexcrichton for the translator changes and @nikomatsakis for the no-landing-pads pass.

8 years agodoc: remove a word that makes the sentence hard to read
Tshepang Lekhonkhobe [Thu, 18 Feb 2016 20:46:03 +0000 (22:46 +0200)]
doc: remove a word that makes the sentence hard to read

8 years agoImplement read_volatile and write_volatile
Amanieu d'Antras [Thu, 18 Feb 2016 20:01:11 +0000 (20:01 +0000)]
Implement read_volatile and write_volatile

8 years agoMake future-compat lint `match_of_unit_variant_via_paren_dotdot` deny by default
Vadim Petrochenkov [Thu, 18 Feb 2016 19:30:57 +0000 (22:30 +0300)]
Make future-compat lint `match_of_unit_variant_via_paren_dotdot` deny by default

8 years agoAdd intrinsics for compare_exchange and compare_exchange_weak
Amanieu d'Antras [Sat, 16 Jan 2016 23:40:11 +0000 (23:40 +0000)]
Add intrinsics for compare_exchange and compare_exchange_weak

8 years agoAuto merge of #31734 - aliclark:bsd-stat-fixes, r=alexcrichton
bors [Thu, 18 Feb 2016 16:29:55 +0000 (16:29 +0000)]
Auto merge of #31734 - aliclark:bsd-stat-fixes, r=alexcrichton

In https://github.com/rust-lang/rust/issues/25155 the os::freebsd::raw stat was split for the x86 vs. x86-64 cases, which appears to have been done to implement the padding on the end of struct stat for the x86 case (the struct is otherwise the same notwistanding the size of long).

This PR de-duplicates the struct using #[cfg(target_arch = "x86")] for the __unused field, which also fixes the definitions which had sinced changed with the LFS work d088b671872f1df6993ccca6fa6139ebed0a8cf3.

Also changed definitions to c_long for dragonfly and freebsd where appropriate.

Also removes some unused imports that the compiler was complaining about.

dragonfly's long time_t:
https://gitweb.dragonflybsd.org/dragonfly.git/blob/a2a57c243ff8016578bc559f8603fb25bbcf1768:/lib/libstand/machine/stdint.h

freebsd's long time_t:
https://svnweb.freebsd.org/base/release/10.1.0/sys/x86/include/_types.h?view=markup
https://github.com/rust-lang/rust/blob/d088b671872f1df6993ccca6fa6139ebed0a8cf3/src/liblibc/lib.rs#L980

freebsd's padding for i686 stat:
https://svnweb.freebsd.org/base/release/10.1.0/sys/sys/stat.h?view=markup#l139
https://github.com/rust-lang/rust/blob/d088b671872f1df6993ccca6fa6139ebed0a8cf3/src/liblibc/lib.rs#L1038

8 years agoRemove unnecessary explicit lifetime bounds.
Corey Farwell [Thu, 18 Feb 2016 01:20:41 +0000 (20:20 -0500)]
Remove unnecessary explicit lifetime bounds.

These explicit lifetimes can be ommitted because of lifetime elision
rules. Instances were found using rust-clippy.

8 years agoAuto merge of #31394 - nikomatsakis:incr-comp-variance, r=pnkfelix
bors [Thu, 18 Feb 2016 13:28:27 +0000 (13:28 +0000)]
Auto merge of #31394 - nikomatsakis:incr-comp-variance, r=pnkfelix

Make the dep. graph edges created by variance just mirror the constraint graph.

Note that this extends <https://github.com/rust-lang/rust/pull/31304>, so the first few commits are on a different topic.

r? @pnkfelix

8 years agoAdd another email address corresponding to Guillaume Gomez account
ggomez [Thu, 18 Feb 2016 10:38:59 +0000 (11:38 +0100)]
Add another email address corresponding to Guillaume Gomez account

8 years agoAuto merge of #31728 - Amanieu:recoversafe_into_inner, r=alexcrichton
bors [Thu, 18 Feb 2016 10:35:25 +0000 (10:35 +0000)]
Auto merge of #31728 - Amanieu:recoversafe_into_inner, r=alexcrichton

This allows a `FnOnce` to be wrapped in an `AssertRecoverSafe`.

8 years agoChange how dep-graph edges are handled in variance to
Niko Matsakis [Wed, 3 Feb 2016 21:00:23 +0000 (16:00 -0500)]
Change how dep-graph edges are handled in variance to
be more fine-grained, fixing the `dep-graph-struct-signature`
test.

8 years agoFix a weird case in the HIR map, where fields are not present in the
Niko Matsakis [Wed, 3 Feb 2016 20:59:35 +0000 (15:59 -0500)]
Fix a weird case in the HIR map, where fields are not present in the
map. Perhaps I ought to just add them instead, but this seems harmless
enough.

8 years agoBreak the `variance` module into submodules for ease of comprehension.
Niko Matsakis [Wed, 3 Feb 2016 16:37:23 +0000 (11:37 -0500)]
Break the `variance` module into submodules for ease of comprehension.

8 years agoAuto merge of #31727 - semarie:openbsd-llvm-cpu, r=alexcrichton
bors [Thu, 18 Feb 2016 07:35:49 +0000 (07:35 +0000)]
Auto merge of #31727 - semarie:openbsd-llvm-cpu, r=alexcrichton

The initial purpose is to workaround the LLVM bug
https://llvm.org/bugs/show_bug.cgi?id=26554 for OpenBSD.

By default, the `cpu` is defined to `generic`. But with a 64bit
processor, the optimization for `generic` will use invalid asm code as
NOP (the generated code for NOP isn't a NOP).

According to #20777, "x86-64" is the right thing to do for x86_64
builds.

Closes: #31363
r? @alexcrichton

8 years agoRemove alternate stack with sigaltstack before unmapping it.
Tomasz Miąsko [Mon, 15 Feb 2016 14:45:52 +0000 (15:45 +0100)]
Remove alternate stack with sigaltstack before unmapping it.

Also reuse existing signal stack if already set, this is especially
useful when working with sanitizers that configure alternate stack
themselves.

8 years agoAuto merge of #31641 - petrochenkov:reach, r=alexcrichton
bors [Thu, 18 Feb 2016 03:35:21 +0000 (03:35 +0000)]
Auto merge of #31641 - petrochenkov:reach, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/16734 and probably some other issues

This is a continuation of https://github.com/rust-lang/rust/pull/29822, but the algorithm is mostly a copy of https://github.com/rust-lang/rust/pull/29973, so
r? @alexcrichton or @nikomatsakis

8 years agoAuto merge of #31739 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 18 Feb 2016 00:33:58 +0000 (00:33 +0000)]
Auto merge of #31739 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #31565, #31679, #31694, #31695, #31703, #31720, #31733
- Failed merges:

8 years agostd: Prefix jemalloc symbols on iOS
Alex Crichton [Thu, 18 Feb 2016 00:24:00 +0000 (16:24 -0800)]
std: Prefix jemalloc symbols on iOS

Similar to OSX, these symbols are prefixed by default.

8 years agostd: restructure rand os code into sys modules
Sean McArthur [Wed, 17 Feb 2016 21:56:16 +0000 (13:56 -0800)]
std: restructure rand os code into sys modules

8 years agoReplace the field `imports` in Module with `unresolved_imports` and refactor away...
Jeffrey Seyfried [Wed, 17 Feb 2016 22:45:05 +0000 (22:45 +0000)]
Replace the field `imports` in Module with `unresolved_imports` and refactor away `resolved_import_count`

8 years agoStop trying to resolve an import directive after the resolution fails
Jeffrey Seyfried [Wed, 17 Feb 2016 09:29:17 +0000 (09:29 +0000)]
Stop trying to resolve an import directive after the resolution fails

8 years agoRollup merge of #31733 - gkoz:strip_prefix_docs, r=alexcrichton
Steve Klabnik [Wed, 17 Feb 2016 23:14:36 +0000 (18:14 -0500)]
Rollup merge of #31733 - gkoz:strip_prefix_docs, r=alexcrichton

It wasn't fixed after copy-pasting. This probably needs to be backported to beta.

8 years agoRollup merge of #31720 - frewsxcv:std-mem-transmute-copy-example, r=steveklabnik
Steve Klabnik [Wed, 17 Feb 2016 23:14:36 +0000 (18:14 -0500)]
Rollup merge of #31720 - frewsxcv:std-mem-transmute-copy-example, r=steveklabnik

Prior to this commit, it was a trivial example that did not demonstrate
the effects of using the function.

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

8 years agoRollup merge of #31703 - WiSaGaN:bugfix/fix-link-in-release-notes, r=alexcrichton
Steve Klabnik [Wed, 17 Feb 2016 23:14:36 +0000 (18:14 -0500)]
Rollup merge of #31703 - WiSaGaN:bugfix/fix-link-in-release-notes, r=alexcrichton

8 years agoRollup merge of #31695 - oconnor663:chardocs, r=alexcrichton
Steve Klabnik [Wed, 17 Feb 2016 23:14:36 +0000 (18:14 -0500)]
Rollup merge of #31695 - oconnor663:chardocs, r=alexcrichton

Previously the docs suggested that '❤️' doesn't fit in a char because
it's 6 bytes. But that's misleading. 'a̚' also doesn't fit in a char,
even though it's only 3 bytes. The important thing is the number of code
points, not the number of bytes. Clarify the primitive char docs around
this.

8 years agoRollup merge of #31694 - oconnor663:insertdocs, r=steveklabnik
Steve Klabnik [Wed, 17 Feb 2016 23:14:36 +0000 (18:14 -0500)]
Rollup merge of #31694 - oconnor663:insertdocs, r=steveklabnik

The first time I read the docs for `insert()`, I thought it was saying it didn't update existing *values*, and I was confused. Reword the docs to make it clear that `insert()` does update values.

8 years agoRollup merge of #31679 - GuillaumeGomez:long_error_explanation, r=Manishearth
Steve Klabnik [Wed, 17 Feb 2016 23:14:36 +0000 (18:14 -0500)]
Rollup merge of #31679 - GuillaumeGomez:long_error_explanation, r=Manishearth

r? @Manishearth