Commit Graph

51643 Commits

Author SHA1 Message Date
Steven Fackler
c0d989ed6b Add unix socket support to the standard library 2016-03-20 18:57:58 -07:00
bors
7f5c568e0a Auto merge of #32344 - aturon:issue-32324, r=eddyb
Fix mis-uses of projection mode

A couple of places where we construct a fresh inference context were
incorrectly assuming that we were past coherence checking. This commit
corrects them to use `Topmost` rather than `AnyFinal` as the projection mode.

Fixes #32324

r? @nikomatsakis
2016-03-20 17:48:09 -07:00
bors
399b52217b Auto merge of #32345 - eddyb:snap-to-orbit, r=alexcrichton
Update snapshots to 2016-03-18 (235d774).

The new snapshots notably include @nikomatsakis' #32164 fix for the regionck error spew.
Also, `./configure --enable-orbit` *and/or* `make RUSTFLAGS="-Z orbit"` should work now (#32080).
2016-03-20 14:46:22 -07:00
Eduard Burtescu
ec84ab0e0f Update snapshots to 2016-03-18 (235d774). 2016-03-20 22:37:35 +02:00
Aaron Turon
09263a6137 Fix mis-uses of projection mode
A couple of places where we construct a fresh inference context were
incorrectly assuming that we were past coherence checking. This commit
corrects them to use `Topmost` rather than `AnyFinal` as the projection mode.

Fixes #32324
2016-03-20 13:37:28 -07:00
Vadim Petrochenkov
90474c7930 Correct Windows build instructions in README.md
http://mingw-w64.org/doku.php/download/mingw-builds now provides GCC 5.x as a default version, but avoiding 5.x is exactly the reason why Mingw-builds is recommended instead of MSYS2's own mingw toolchain. One of the 4.9.x versions has to manually chosen during installation.
2016-03-20 23:36:48 +03:00
bors
2af3dd73db Auto merge of #32010 - devonhollowood:non-c-like-enum-repr, r=Aatch
Add tests for #26114

First step in fixing #26114
2016-03-20 12:49:46 -07:00
Cyryl Płotnicki-Chudyk
903bcb84a1 Documentation fix for E0368
Made the 'good' example compile.

I got to the E0368 error page by following the link in the output of the
compiler. My understanding is that the first example is 'bad' and the
second one is 'good'. Following that logic, I pasted the second example
into the file and to my surprise it did not compile. This commit fixes
the example to make it paste-able.
2016-03-20 19:27:00 +01:00
bors
978bc070a6 Auto merge of #32375 - phil-opp:patch-1, r=japaric
docs: The `data-layout` field is no longer required in custom targets

The `data-layout` field is no longer required. It was made optional in 958d563825.

The `os` field is always required.

Related to #31367
2016-03-20 10:30:38 -07:00
Sean McArthur
e0945937c4 libcore: add Debug implementations to most missing types 2016-03-20 10:04:55 -07:00
Philipp Oppermann
953260208a The data-layout field is no longer required, but the os field is
The `data-layout` field  was made optional in 958d563825. The `os` field is always required.
2016-03-20 17:18:39 +01:00
Corey Farwell
4d52b0f550 Utilize if..let over single match branch. 2016-03-20 11:01:23 -04:00
Corey Farwell
77eb78a8c5 Remove double-negative conditionals. 2016-03-20 11:01:23 -04:00
Tang Chenglong
06d8b21372 docs: Correct an improper description
In the example, we made a immutable borrow to `println!`, not a mutable one.
2016-03-20 21:24:46 +08:00
bors
173676efdc Auto merge of #32367 - tiehuis:tiehuis-E0412-help, r=nagisa
Alter E0412 help message wording

The initial wording does not make sense due to an extra 'to'.

There are two potential candidates we can change this to:
 - 'you can import it into scope'
 - 'to import it into scope'

In keeping the changes minimal, we choose the first, as this is more in line with the grammar of the extended candidates help message.
2016-03-20 04:18:13 -07:00
bors
015d3b7092 Auto merge of #32361 - japaric:no-llvm-assertions-on-arm, r=alexcrichton
disable llvm assertions on ARM compilers

workaround for #32360

r? @alexcrichton
2016-03-19 23:58:20 -07:00
tiehuis
63b66bfbcd Update tests which reference E0421 2016-03-20 19:18:32 +13:00
bors
b6fcab5c7c Auto merge of #32358 - Manishearth:pr-32053, r=Manishearth
Add note if method is called on a function object

rebase of #32053
2016-03-19 21:15:23 -07:00
Corey Farwell
4238d0b639 Replace unneeded owned Vec usage with slice. 2016-03-20 00:04:59 -04:00
tiehuis
1138866b1f Alter E0412 help message wording
The initial wording does not make sense due to an extra 'to'.

There are two potential candidates we can change this to:
 - 'you can import it into scope'
 - 'to import it into scope'

In keeping the changes minimal, we choose the first, as this is more in line with the grammar of the extended candidates help message.
2016-03-20 16:02:31 +13:00
bors
78e8a00514 Auto merge of #32306 - nikomatsakis:issue-32278, r=eddyb
create fewer region variables in coercions

Fixes #32278.

r? @eddyb
2016-03-19 18:39:50 -07:00
bors
02310fd313 Auto merge of #32362 - bluss:float-fast-math, r=eddyb
Fix floating point fast-math intrinsics

The implementation did not handle the case where both operands were constants, which caused an llvm assertion:

```
rustc: //buildslave//rust-buildbot//slave//nightly-dist-rustc-musl-linux//build//src//llvm//include/llvm/Support/Casting.h:237:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::Instruction; Y = llvm::Value; typename llvm::cast_retty<X, Y*>::ret_type = llvm::Instruction*]:
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
```
2016-03-19 15:41:42 -07:00
Ulrik Sverdrup
ba89b255e8 Update float_math test to not use constants 2016-03-19 22:35:28 +01:00
Ulrik Sverdrup
e22d6d569f Fix LLVMRustSetHasUnsafeAlgebra to only have effect on instructions 2016-03-19 22:35:28 +01:00
Jorge Aparicio
afbbb74fec disable llvm assertions on ARM compilers
workaround for #32360
2016-03-19 15:00:42 -05:00
bors
8eeb5062d1 Auto merge of #32244 - Amanieu:compare_exchange_result, r=alexcrichton
Change compare_exchange to return a Result<T, T>

As per the discussion in #31767

I also changed the feature name from `extended_compare_and_swap` to `compare_exchange`.

r? @alexcrichton
2016-03-19 12:25:34 -07:00
bors
151be09333 Auto merge of #32314 - alexcrichton:ascii-fun, r=aturon
std: Revert addition of `into_ascii_*` methods

The addition of these methods in #31335 required adding impls of the trait for
the `String` and `Vec<T>` types. This unfortunately caused a regression (#32074)
in type inference for using these methods which the libs team has decided to not
push forward with. These methods were stabilized in #32020 which was intended to
get backported to beta, but the backport hasn't happened just yet. This commit
reverts both the addition and stabilization of these methods.

One proposed method of handling this, in #32076, was to move the methods to an
extra trait to avoid conflicts with type inference. After some discussion,
however, the libs team concluded that we probably want to reevaluate what we're
doing here, so discussion will continue on the tracking issue, #27809.

Closes #32074
2016-03-19 09:39:26 -07:00
Daniel J Rollins
88ad22998b Add Help and Suggestion to issue-29124 tests 2016-03-19 22:06:45 +05:30
Daniel J Rollins
234371216e Use last path segment for uncalled method note if span_to_segment fails
PR: #32053
2016-03-19 22:06:45 +05:30
Daniel J Rollins
fa0efa69c5 Add test for issue 29124 2016-03-19 22:06:45 +05:30
Daniel J Rollins
5e3b36c100 Fix code review actions in PR #32053
Split `fileline_note` into a `file_line note` and `span_suggestion` as per
@Manishearth's suggestions.

Change nested `match`es to `if let`s.
2016-03-19 22:06:45 +05:30
Daniel J Rollins
2dd5776b11 Add note if method is called on a function object
Fixes issue #29124.

If method is called on a function type a note is generated to suggest
that the developer may have forgotten to call it.

e.g.

fn main() {
    let mut guess = String::new();
    std::io::stdin.read_line(&mut guess);
}

will generate the note:

note: called method on function type. did you mean `std::io::stdin().read_line(..)`?
2016-03-19 22:06:41 +05:30
Amanieu d'Antras
421fed188c Change compare_exchange to return a Result<T, T> 2016-03-19 11:44:38 +00:00
bors
7c66a89849 Auto merge of #32351 - eddyb:rollup, r=eddyb
Rollup of 14 pull requests

- Successful merges: #32265, #32269, #32271, #32288, #32308, #32316, #32319, #32321, #32327, #32329, #32332, #32337, #32342, #32347
- Failed merges:
2016-03-19 04:42:02 -07:00
Eduard-Mihai Burtescu
5bf1e58bc0 Rollup merge of #32347 - Amanieu:volatile_fat_ptr, r=eddyb
Fix volatile stores of fat pointers

This was previously causing an LLVM assertion.

r? @eddyb
2016-03-19 12:30:02 +02:00
Eduard-Mihai Burtescu
835d2a952c Rollup merge of #32342 - petevine:patch-1, r=alexcrichton
Use explicit -march flags in the i586 mk file

`-march` should definitely go last, after the environment `$C(XX)FLAGS`, or it's going to remain brittle.

This should fix cross-compilation issues on x86_64 (possibly x86 too on some newer distros) - it was far too assuming of me to expect you really had to want i586 using your own flags.
2016-03-19 12:30:02 +02:00
Eduard-Mihai Burtescu
4a67405ba9 Rollup merge of #32337 - dotdash:llvm-aa-perf, r=alexcrichton
Update LLVM to include a backport to restore AA performance

cc #31435
r? @alexcrichton
2016-03-19 12:30:02 +02:00
Eduard-Mihai Burtescu
34bd8f3a20 Rollup merge of #32332 - jonas-schievink:issue32323, r=arielb1
liveness: substitute bound regions with free ones before normalizing the return type

Fixes #32323

r? @arielb1
2016-03-19 12:30:01 +02:00
Eduard-Mihai Burtescu
b29e299c18 Rollup merge of #32329 - sfackler:assert-recover-safe-pub, r=aturon
Make AssertRecoverSafe's field public

It's basically the very definition of a newtype, so we might as well
make things easy on people and let them construct and access it
directly.

r? @aturon
2016-03-19 12:30:01 +02:00
Eduard-Mihai Burtescu
d5dceba8fa Rollup merge of #32327 - toddlucas:master, r=apasel422
Minor phrasing adjustment to book references-and-borrowing
2016-03-19 12:30:01 +02:00
Eduard-Mihai Burtescu
9413d904ff Rollup merge of #32321 - alexcrichton:cross-to-netbsd, r=japaric
rustbuild: Fix cross to netbsd from Linux

Apparently the NetBSD compiler-rt builds into the linux directory as well.
I'm... detecting a trend!
2016-03-19 12:30:01 +02:00
Eduard-Mihai Burtescu
472fe10652 Rollup merge of #32319 - benaryorg:patch-3, r=alexcrichton
documentation fix in RELEASES.md

f32 should probably be denoted as 0.0 as it might improve readability.
2016-03-19 12:30:01 +02:00
Eduard-Mihai Burtescu
cb9b1b26c0 Rollup merge of #32316 - tclfs:patch-3, r=steveklabnik
docs: `let` introduces a statement

I changes *expression* to *statement* to make more accurate, because in Rust, `let` introduces a declaration statement.
2016-03-19 12:30:01 +02:00
Eduard-Mihai Burtescu
5a5b5f1e9f Rollup merge of #32308 - bombless:patch-2, r=alexcrichton
Fix usability problem when browse document locally

You cannot use `history.replaceState` when you browse locally, it breaks the security policy of Chrome and perhaps other browsers.
Closes https://github.com/rust-lang/rust/issues/32307
Thank @crumblingstatue for the help!
2016-03-19 12:30:00 +02:00
Eduard-Mihai Burtescu
33c28b45c8 Rollup merge of #32288 - tclfs:patch-2, r=apasel422
docs: One typo

I think it's a mistake of spelling.
2016-03-19 12:30:00 +02:00
Eduard-Mihai Burtescu
e28a1b6cf5 Rollup merge of #32271 - frewsxcv:compiletest-ignored-help-note, r=nikomatsakis
Add comment about opt-in nature of compiletest note/help messages.

The opt-in functionality was proposed and discussed in
https://github.com/rust-lang/rust/issues/21195
2016-03-19 12:30:00 +02:00
Eduard-Mihai Burtescu
8be1d7d1a9 Rollup merge of #32269 - richo:impl-totokens-p-implitem, r=nikomatsakis
syntax: impl ToTokens for P<ast::ImplItem>

I'm working on updating zinc for latest rust, and it appears that I need this impl[0].

More generally, I realise that libsyntax is "Whatever the compiler team needs to build a compiler", but should I just open a PR fleshing this out for all types?

https://github.com/hackndev/zinc/blob/master/ioreg/src/builder/setter.rs#L194-L197
2016-03-19 12:30:00 +02:00
Eduard-Mihai Burtescu
8a13440486 Rollup merge of #32265 - tclfs:patch-1, r=alexcrichton
FreeBSD has already supported Cargo

Both Packages and Ports of FreeBSD have Cargo in present.
2016-03-19 12:30:00 +02:00
bors
b854149a48 Auto merge of #32304 - pravic:fix-variadic-ffi-test, r=alexcrichton
test: Fix missing call of function pointer

Also an unused variable warning was here.
2016-03-19 01:53:11 -07:00
bors
b9a93fad92 Auto merge of #32256 - bluss:float-fast-math, r=alexcrichton
Add intrinsics for float arithmetic with `fast` flag enabled

Add intrinsics for float arithmetic with `fast` flag enabled

`fast` a.k.a UnsafeAlgebra is the flag for enabling all "unsafe"
(according to llvm) float optimizations.

See LangRef for more information http://llvm.org/docs/LangRef.html#fast-math-flags

Providing these operations with less associativity rules (for example)
is useful to numerical applications.

For example, the summation loop:

    let sum = 0.;
    for element in data {
        sum += *element;
    }

Using the default floating point semantics, this loop expresses that the
floats must be added in a sequence, one after another. This constraint
is usually completely unintended, and it means that no auto-vectorization
is possible.
2016-03-18 21:12:00 -07:00