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?
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.
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
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.
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.
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.
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.
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.
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.
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.
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
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.
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
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.
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.
Sébastien Marie [Wed, 17 Feb 2016 10:30:42 +0000 (11:30 +0100)]
specify the cpu type for LLVM for OpenBSD target
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.
bors [Wed, 17 Feb 2016 06:01:49 +0000 (06:01 +0000)]
Auto merge of #31685 - petrochenkov:patrefact2, r=eddyb
And split `PatKind::Enum` into `PatKind::TupleStruct` and `PatKind::Path`.
This is the HIR part of https://github.com/rust-lang/rust/pull/31581.
This is also kind of a preparation for https://github.com/rust-lang/rfcs/pull/1492.
bors [Wed, 17 Feb 2016 03:25:45 +0000 (03:25 +0000)]
Auto merge of #31717 - alexcrichton:llvmup2, r=brson
This commit rebases our LLVM submodule on the most recent tip of the
`release_38` branch of LLVM. There's been a few fixes and this notably fixes the
assertion error in #31702.