]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #32058 - pczarn:hashmap-initial-refactoring, r=apasel422
bors [Wed, 23 Mar 2016 04:21:45 +0000 (21:21 -0700)]
Auto merge of #32058 - pczarn:hashmap-initial-refactoring, r=apasel422

Basic refactoring of HashMap

8 years agoAuto merge of #32204 - alexcrichton:redesign-char-encoding-types, r=aturon
bors [Tue, 22 Mar 2016 23:05:39 +0000 (16:05 -0700)]
Auto merge of #32204 - alexcrichton:redesign-char-encoding-types, r=aturon

std: Change `encode_utf{8,16}` to return iterators

Currently these have non-traditional APIs which take a buffer and report how
much was filled in, but they're not necessarily ergonomic to use. Returning an
iterator which *also* exposes an underlying slice shouldn't result in any
performance loss as it's just a lazy version of the same implementation, and
it's also much more ergonomic!

cc #27784

8 years agostd: Change `encode_utf{8,16}` to return iterators
Alex Crichton [Fri, 11 Mar 2016 19:01:46 +0000 (11:01 -0800)]
std: Change `encode_utf{8,16}` to return iterators

Currently these have non-traditional APIs which take a buffer and report how
much was filled in, but they're not necessarily ergonomic to use. Returning an
iterator which *also* exposes an underlying slice shouldn't result in any
performance loss as it's just a lazy version of the same implementation, and
it's also much more ergonomic!

cc #27784

8 years agoAuto merge of #32156 - pnkfelix:borrowck-on-mir-move-analysis, r=nikomatsakis
bors [Tue, 22 Mar 2016 17:00:12 +0000 (10:00 -0700)]
Auto merge of #32156 - pnkfelix:borrowck-on-mir-move-analysis, r=nikomatsakis

Move analysis for MIR borrowck

This PR adds code for doing MIR-based gathering of the moves in a `fn` and the dataflow to determine where uninitialized locations flow to, analogous to how the same thing is done in `borrowck`.

It also adds a couple attributes to print out graphviz visualizations of the analyzed MIR that includes the dataflow analysis results.

cc @nikomatsakis

8 years agoAdd rustbuild dependency from `rustc_borrowck` upon `rustc_mir` crate.
Felix S. Klock II [Tue, 22 Mar 2016 17:09:57 +0000 (18:09 +0100)]
Add rustbuild dependency from `rustc_borrowck` upon `rustc_mir` crate.

8 years agoAuto merge of #32341 - frewsxcv:compiletest-enum, r=nikomatsakis
bors [Tue, 22 Mar 2016 15:02:13 +0000 (08:02 -0700)]
Auto merge of #32341 - frewsxcv:compiletest-enum, r=nikomatsakis

Use enum for message kind in compiletest harness.

None

8 years agof clarification, docs
Piotr Czarnecki [Tue, 22 Mar 2016 11:52:31 +0000 (12:52 +0100)]
f clarification, docs

8 years agoAuto merge of #32264 - GuillaumeGomez:lang_item, r=nikomatsakis
bors [Tue, 22 Mar 2016 11:06:59 +0000 (04:06 -0700)]
Auto merge of #32264 - GuillaumeGomez:lang_item, r=nikomatsakis

Lang item

Fixes #32033

8 years agoAuto merge of #32388 - semarie:snapshot-openbsd, r=alexcrichton
bors [Tue, 22 Mar 2016 09:05:16 +0000 (02:05 -0700)]
Auto merge of #32388 - semarie:snapshot-openbsd, r=alexcrichton

register openbsd snapshot

Here openbsd version for latest snapshot.

The archive is at http://semarie.online.fr/rust/rust-stage0-2016-03-18-235d774-openbsd-x86_64-c5b6feda38138a12cd5c05574b585dadebbb5e87.tar.bz2

These segmentation fault starts to be annoying. @dhuseby do you think it would be possible to have a shell access to openbsd buildbot in order to try to investigating a bit the reason of them ?

r? @alexcrichton
Ref #32345

8 years agof Put and DerefMut
Piotr Czarnecki [Tue, 22 Mar 2016 08:45:51 +0000 (09:45 +0100)]
f Put and DerefMut

8 years agoAuto merge of #32253 - durka:derive-31886, r=alexcrichton
bors [Tue, 22 Mar 2016 04:07:28 +0000 (21:07 -0700)]
Auto merge of #32253 - durka:derive-31886, r=alexcrichton

derive: assume enum repr defaults to isize

derive: assume enum repr defaults to isize

Fixes #31886.

Spawned from #32139.

r? @alexcrichton

8 years agoAuto merge of #32402 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 22 Mar 2016 01:36:13 +0000 (18:36 -0700)]
Auto merge of #32402 - steveklabnik:rollup, r=steveklabnik

Rollup of 6 pull requests

- Successful merges: #32322, #32339, #32340, #32373, #32376, #32397
- Failed merges:

8 years agoRefactor 'kind' extraction to use `str::split_whitespace`.
Corey Farwell [Tue, 22 Mar 2016 01:16:07 +0000 (21:16 -0400)]
Refactor 'kind' extraction to use `str::split_whitespace`.

8 years agoAuto merge of #32062 - Marwes:unification_table_for_eq_relations, r=nikomatsakis
bors [Mon, 21 Mar 2016 23:00:08 +0000 (16:00 -0700)]
Auto merge of #32062 - Marwes:unification_table_for_eq_relations, r=nikomatsakis

Improve time complexity of equality relations

This PR adds a `UnificationTable` to the `TypeVariableTable` type which is used store information about variable equality instead of just storing them in a vector for later processing. By using a `UnificationTable` equality relations can be resolved in O(n) (for all realistic values of n) rather than O(n!) which can give massive speedups in certain cases (see combine as an example).

Link to combine: https://github.com/Marwes/combine

8 years agof dead code
Piotr Czarnecki [Mon, 21 Mar 2016 22:53:55 +0000 (23:53 +0100)]
f dead code

8 years agoImprove time complexity of equality relations
Markus Westerlind [Thu, 3 Mar 2016 09:43:52 +0000 (10:43 +0100)]
Improve time complexity of equality relations

This PR adds a `UnificationTable` to the `TypeVariableTable` type which
is used store information about variable equality instead of just
storing them in a vector for later processing. By using a
`UnificationTable` equality relations can be resolved in O(n) (for all
realistic values of n) rather than O(n!) which can give massive
speedups in certain cases (see combine as an example).

Link to combine: https://github.com/Marwes/combine

8 years agoAuto merge of #32393 - dotdash:32389, r=eddyb
bors [Mon, 21 Mar 2016 18:03:17 +0000 (11:03 -0700)]
Auto merge of #32393 - dotdash:32389, r=eddyb

Fix tupling of fn args for rust-call ABI functions

Fixes #32389

8 years agoassigning a (MIR) box into an lvalue allocates heap storage that will
Felix S. Klock II [Tue, 15 Mar 2016 15:59:48 +0000 (16:59 +0100)]
assigning a (MIR) box into an lvalue allocates heap storage that will
need to be initialized. create a MoveOut to represent that deref'ed
`*lval` path.

8 years agoremove uses of `RefCell` from move data builder.
Felix S. Klock II [Tue, 15 Mar 2016 14:23:10 +0000 (15:23 +0100)]
remove uses of `RefCell` from move data builder.

8 years agoMake `fn move_path_for` take `&mut self` instead of `&self`. This is a
Felix S. Klock II [Tue, 15 Mar 2016 14:03:21 +0000 (15:03 +0100)]
Make `fn move_path_for` take `&mut self` instead of `&self`. This is a
precursor for a number of other simplifying changes (mostly removing
uses of `RefCell`).

Factor lookup method out of `fn move_path_for`.

8 years agodont create MovePathIndex's for individual statics.
Felix S. Klock II [Tue, 15 Mar 2016 12:57:02 +0000 (13:57 +0100)]
dont create MovePathIndex's for individual statics.

Instead, create a single MovePathIndex that represents all statics.

(An alternative here would be to disallow representing statics at all.
I am hesitant to do that right now, in part because it could impose a
requirement that I thread checks for static data into the calling
code, either as pre- or post-invocation of `fn move_path_for`.)

8 years agoSwitch newtype Index wrappers to use NonZero instead of INVALID constants.
Felix S. Klock II [Tue, 15 Mar 2016 11:25:58 +0000 (12:25 +0100)]
Switch newtype Index wrappers to use NonZero instead of INVALID constants.

8 years agofactor the wrapped Index newtype definitions into a macro.
Felix S. Klock II [Tue, 15 Mar 2016 10:34:17 +0000 (11:34 +0100)]
factor the wrapped Index newtype definitions into a macro.

8 years agoAdd `fn clear_bit` method on BitSlice trait for setting a bit to zero.
Felix S. Klock II [Mon, 14 Mar 2016 16:12:35 +0000 (17:12 +0100)]
Add `fn clear_bit` method on BitSlice trait for setting a bit to zero.

8 years agoscaffolding for borrowck on MIR.
Felix S. Klock II [Mon, 25 Jan 2016 13:34:34 +0000 (14:34 +0100)]
scaffolding for borrowck on MIR.

emit (via debug!) scary message from `fn borrowck_mir` until basic
prototype is in place.

Gather children of move paths and set their kill bits in
dataflow. (Each node has a link to the child that is first among its
siblings.)

Hooked in libgraphviz based rendering, including of borrowck dataflow
state.

doing this well required some refactoring of the code, so I cleaned it
up more generally (adding comments to explain what its trying to do
and how it is doing it).

Update: this newer version addresses most review comments (at least
the ones that were largely mechanical changes), but I left the more
interesting revisions to separate followup commits (in this same PR).

8 years agoExpose attached attributes to `FnKind` abstraction so that I can look at them in...
Felix S. Klock II [Mon, 25 Jan 2016 13:11:51 +0000 (14:11 +0100)]
Expose attached attributes to `FnKind` abstraction so that I can look at them in borrowck.

8 years agoSwitch libgraphviz from type params to associated types for Node/Edge.
Felix S. Klock II [Tue, 26 Jan 2016 21:23:05 +0000 (22:23 +0100)]
Switch libgraphviz from type params to associated types for Node/Edge.

8 years agoRollup merge of #32397 - tclfs:patch-7, r=steveklabnik
Steve Klabnik [Mon, 21 Mar 2016 15:46:53 +0000 (11:46 -0400)]
Rollup merge of #32397 - tclfs:patch-7, r=steveklabnik

docs: Make some changes in texts

In my understanding, the description is somehow inappropriate.

8 years agoRollup merge of #32376 - cyplo:cyplo_fix_E0368_documentation, r=steveklabnik
Steve Klabnik [Mon, 21 Mar 2016 15:46:53 +0000 (11:46 -0400)]
Rollup merge of #32376 - cyplo:cyplo_fix_E0368_documentation, r=steveklabnik

Documentation fix for E0368

Made the 'good' example compile.

I got to the [E0368 error page](https://doc.rust-lang.org/error-index.html#E0368) 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.

On the other hand the docstring contained `compile_fail` flag, which might indicate that this was intentional.
I am also assuming here that the `Rust Compiler Error Index` page is generated from the file I changed.

Please let me know what do you think. Thanks a lot !

8 years agoRollup merge of #32373 - tclfs:patch-5, r=steveklabnik
Steve Klabnik [Mon, 21 Mar 2016 15:46:53 +0000 (11:46 -0400)]
Rollup merge of #32373 - tclfs:patch-5, r=steveklabnik

docs: Correct an  improper description

In the example, we made a immutable borrow to `println!`, not a mutable one.

8 years agoRollup merge of #32340 - Digipom:master, r=steveklabnik
Steve Klabnik [Mon, 21 Mar 2016 15:46:52 +0000 (11:46 -0400)]
Rollup merge of #32340 - Digipom:master, r=steveklabnik

Update of the book; Error handling, section on custom error types: we…

… should also show the changes to the `cause` method.

When I started creating my own error type, I found that we also have to update the cause method, otherwise we have a missing match branch.

It would also be nice to elaborate on the relationship and difference between the description() and fmt() method, but that should be done by someone with more experience with them. :)

8 years agoRollup merge of #32339 - tclfs:patch-4, r=apasel422
Steve Klabnik [Mon, 21 Mar 2016 15:46:52 +0000 (11:46 -0400)]
Rollup merge of #32339 - tclfs:patch-4, r=apasel422

docs: make some tiny modification about spelling

I think it would be better after modification.

8 years agoRollup merge of #32322 - GuillaumeGomez:cmp_doc, r=steveklabnik
Steve Klabnik [Mon, 21 Mar 2016 15:46:52 +0000 (11:46 -0400)]
Rollup merge of #32322 - GuillaumeGomez:cmp_doc, r=steveklabnik

Add doc examples

Fixes #29347

r? @steveklabnik

8 years agoAuto merge of #32378 - petrochenkov:patch-1, r=alexcrichton
bors [Mon, 21 Mar 2016 13:35:17 +0000 (06:35 -0700)]
Auto merge of #32378 - petrochenkov:patch-1, r=alexcrichton

Correct Windows build instructions in README.md

http://mingw-w64.org/doku.php/download/mingw-builds now provides GCC 5.3 as a default version, but avoiding 5.x is exactly the reason why Mingw-builds are recommended instead of MSYS2's own mingw toolchain. One of the 4.9.x versions has to be manually chosen during installation.

r? @alexcrichton

8 years agodocs: Make some changes in texts
Tang Chenglong [Mon, 21 Mar 2016 13:00:04 +0000 (21:00 +0800)]
docs: Make some changes in texts

In my understanding, the description is somehow inappropriate.

8 years agoFix tupling of fn args for rust-call ABI functions
Björn Steinbrink [Mon, 21 Mar 2016 10:38:48 +0000 (11:38 +0100)]
Fix tupling of fn args for rust-call ABI functions

Fixes #32389

8 years agoAuto merge of #32369 - frewsxcv:librustc-driver-lib, r=alexcrichton
bors [Mon, 21 Mar 2016 10:27:53 +0000 (03:27 -0700)]
Auto merge of #32369 - frewsxcv:librustc-driver-lib, r=alexcrichton

Minor cleanup for 'src/librustc_driver/lib.rs'

Reading through this file my first time. Cleaned up some stuff on the way.

8 years agoAuto merge of #32054 - seanmonstar:impl-debug-core, r=alexcrichton
bors [Mon, 21 Mar 2016 07:07:33 +0000 (00:07 -0700)]
Auto merge of #32054 - seanmonstar:impl-debug-core, r=alexcrichton

libcore: add Debug implementations to most missing types

Also adds `#![deny(missing_debug_implementations)]` to the core crate.

cc #31869

8 years agoregister openbsd snapshot
Sébastien Marie [Mon, 21 Mar 2016 05:04:57 +0000 (06:04 +0100)]
register openbsd snapshot

8 years agoAuto merge of #32302 - sfackler:unix-socket, r=alexcrichton
bors [Mon, 21 Mar 2016 03:13:49 +0000 (20:13 -0700)]
Auto merge of #32302 - sfackler:unix-socket, r=alexcrichton

Add unix socket support to the standard library

r? @alexcrichton

8 years agoAdd unix socket support to the standard library
Steven Fackler [Thu, 17 Mar 2016 03:50:45 +0000 (20:50 -0700)]
Add unix socket support to the standard library

8 years agoAuto merge of #32344 - aturon:issue-32324, r=eddyb
bors [Mon, 21 Mar 2016 00:48:09 +0000 (17:48 -0700)]
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

8 years agoAuto merge of #32345 - eddyb:snap-to-orbit, r=alexcrichton
bors [Sun, 20 Mar 2016 21:46:22 +0000 (14:46 -0700)]
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).

8 years agoUpdate snapshots to 2016-03-18 (235d774).
Eduard Burtescu [Sun, 20 Mar 2016 20:37:35 +0000 (22:37 +0200)]
Update snapshots to 2016-03-18 (235d774).

8 years agoFix mis-uses of projection mode
Aaron Turon [Sat, 19 Mar 2016 00:01:33 +0000 (17:01 -0700)]
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

8 years agoCorrect Windows build instructions in README.md
Vadim Petrochenkov [Sun, 20 Mar 2016 20:36:48 +0000 (23:36 +0300)]
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.

8 years agoAuto merge of #32010 - devonhollowood:non-c-like-enum-repr, r=Aatch
bors [Sun, 20 Mar 2016 19:49:46 +0000 (12:49 -0700)]
Auto merge of #32010 - devonhollowood:non-c-like-enum-repr, r=Aatch

Add tests for #26114

First step in fixing #26114

8 years agoDocumentation fix for E0368
Cyryl Płotnicki-Chudyk [Sun, 20 Mar 2016 15:09:54 +0000 (16:09 +0100)]
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.

8 years agoAuto merge of #32375 - phil-opp:patch-1, r=japaric
bors [Sun, 20 Mar 2016 17:30:38 +0000 (10:30 -0700)]
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 958d5638254958ea42652de7444b63f2e67e7fe3.

The `os` field is always required.

Related to #31367

8 years agolibcore: add Debug implementations to most missing types
Sean McArthur [Sat, 5 Mar 2016 02:49:43 +0000 (18:49 -0800)]
libcore: add Debug implementations to most missing types

8 years agoThe `data-layout` field is no longer required, but the `os` field is
Philipp Oppermann [Sun, 20 Mar 2016 15:51:46 +0000 (16:51 +0100)]
The `data-layout` field is no longer required, but the `os` field is

The `data-layout` field  was made optional in 958d5638254958ea42652de7444b63f2e67e7fe3. The `os` field is always required.

8 years agoUtilize `if..let` over single `match` branch.
Corey Farwell [Sun, 20 Mar 2016 04:46:50 +0000 (00:46 -0400)]
Utilize `if..let` over single `match` branch.

8 years agoRemove double-negative conditionals.
Corey Farwell [Sun, 20 Mar 2016 04:35:46 +0000 (00:35 -0400)]
Remove double-negative conditionals.

8 years agodocs: Correct an improper description
Tang Chenglong [Sun, 20 Mar 2016 13:24:46 +0000 (21:24 +0800)]
docs: Correct an  improper description

In the example, we made a immutable borrow to `println!`, not a mutable one.

8 years agoAuto merge of #32367 - tiehuis:tiehuis-E0412-help, r=nagisa
bors [Sun, 20 Mar 2016 11:18:13 +0000 (04:18 -0700)]
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.

8 years agoAuto merge of #32361 - japaric:no-llvm-assertions-on-arm, r=alexcrichton
bors [Sun, 20 Mar 2016 06:58:20 +0000 (23:58 -0700)]
Auto merge of #32361 - japaric:no-llvm-assertions-on-arm, r=alexcrichton

disable llvm assertions on ARM compilers

workaround for #32360

r? @alexcrichton

8 years agoUpdate tests which reference E0421
tiehuis [Sun, 20 Mar 2016 06:18:32 +0000 (19:18 +1300)]
Update tests which reference E0421

8 years agoAuto merge of #32358 - Manishearth:pr-32053, r=Manishearth
bors [Sun, 20 Mar 2016 04:15:23 +0000 (21:15 -0700)]
Auto merge of #32358 - Manishearth:pr-32053, r=Manishearth

Add note if method is called on a function object

rebase of #32053

8 years agoReplace unneeded owned `Vec` usage with `slice`.
Corey Farwell [Sun, 20 Mar 2016 03:37:13 +0000 (23:37 -0400)]
Replace unneeded owned `Vec` usage with `slice`.

8 years agoAlter E0412 help message wording
tiehuis [Sun, 20 Mar 2016 03:02:31 +0000 (16:02 +1300)]
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.

8 years agoAuto merge of #32306 - nikomatsakis:issue-32278, r=eddyb
bors [Sun, 20 Mar 2016 01:39:50 +0000 (18:39 -0700)]
Auto merge of #32306 - nikomatsakis:issue-32278, r=eddyb

create fewer region variables in coercions

Fixes #32278.

r? @eddyb

8 years agoAuto merge of #32362 - bluss:float-fast-math, r=eddyb
bors [Sat, 19 Mar 2016 22:41:42 +0000 (15:41 -0700)]
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.
```

8 years agoUpdate float_math test to not use constants
Ulrik Sverdrup [Sat, 19 Mar 2016 21:23:45 +0000 (22:23 +0100)]
Update float_math test to not use constants

8 years agoFix LLVMRustSetHasUnsafeAlgebra to only have effect on instructions
Ulrik Sverdrup [Sat, 19 Mar 2016 21:02:33 +0000 (22:02 +0100)]
Fix LLVMRustSetHasUnsafeAlgebra to only have effect on instructions

8 years agodisable llvm assertions on ARM compilers
Jorge Aparicio [Sat, 19 Mar 2016 19:59:51 +0000 (14:59 -0500)]
disable llvm assertions on ARM compilers

workaround for #32360

8 years agoAuto merge of #32244 - Amanieu:compare_exchange_result, r=alexcrichton
bors [Sat, 19 Mar 2016 19:25:34 +0000 (12:25 -0700)]
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

8 years agoAuto merge of #32314 - alexcrichton:ascii-fun, r=aturon
bors [Sat, 19 Mar 2016 16:39:26 +0000 (09:39 -0700)]
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

8 years agoAdd Help and Suggestion to issue-29124 tests
Daniel J Rollins [Sun, 6 Mar 2016 15:47:05 +0000 (15:47 +0000)]
Add Help and Suggestion to issue-29124 tests

8 years agoUse last path segment for uncalled method note if span_to_segment fails
Daniel J Rollins [Sat, 5 Mar 2016 19:50:34 +0000 (19:50 +0000)]
Use last path segment for uncalled method note if span_to_segment fails

PR: #32053

8 years agoAdd test for issue 29124
Daniel J Rollins [Sat, 5 Mar 2016 18:34:17 +0000 (18:34 +0000)]
Add test for issue 29124

8 years agoFix code review actions in PR #32053
Daniel J Rollins [Sat, 5 Mar 2016 17:17:36 +0000 (17:17 +0000)]
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.

8 years agoAdd note if method is called on a function object
Daniel J Rollins [Sat, 5 Mar 2016 00:26:45 +0000 (00:26 +0000)]
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(..)`?

8 years agoChange compare_exchange to return a Result<T, T>
Amanieu d'Antras [Mon, 14 Mar 2016 10:57:50 +0000 (11:57 +0100)]
Change compare_exchange to return a Result<T, T>

8 years agoAuto merge of #32351 - eddyb:rollup, r=eddyb
bors [Sat, 19 Mar 2016 11:42:02 +0000 (04:42 -0700)]
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:

8 years agoRollup merge of #32347 - Amanieu:volatile_fat_ptr, r=eddyb
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:02 +0000 (12:30 +0200)]
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

8 years agoRollup merge of #32342 - petevine:patch-1, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:02 +0000 (12:30 +0200)]
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.

8 years agoRollup merge of #32337 - dotdash:llvm-aa-perf, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:02 +0000 (12:30 +0200)]
Rollup merge of #32337 - dotdash:llvm-aa-perf, r=alexcrichton

Update LLVM to include a backport to restore AA performance

cc #31435
r? @alexcrichton

8 years agoRollup merge of #32332 - jonas-schievink:issue32323, r=arielb1
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
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

8 years agoRollup merge of #32329 - sfackler:assert-recover-safe-pub, r=aturon
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
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

8 years agoRollup merge of #32327 - toddlucas:master, r=apasel422
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
Rollup merge of #32327 - toddlucas:master, r=apasel422

Minor phrasing adjustment to book references-and-borrowing

8 years agoRollup merge of #32321 - alexcrichton:cross-to-netbsd, r=japaric
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
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!

8 years agoRollup merge of #32319 - benaryorg:patch-3, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
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.

8 years agoRollup merge of #32316 - tclfs:patch-3, r=steveklabnik
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:01 +0000 (12:30 +0200)]
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.

8 years agoRollup merge of #32308 - bombless:patch-2, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
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!

8 years agoRollup merge of #32288 - tclfs:patch-2, r=apasel422
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
Rollup merge of #32288 - tclfs:patch-2, r=apasel422

docs: One typo

I think it's a mistake of spelling.

8 years agoRollup merge of #32271 - frewsxcv:compiletest-ignored-help-note, r=nikomatsakis
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
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

8 years agoRollup merge of #32269 - richo:impl-totokens-p-implitem, r=nikomatsakis
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
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

8 years agoRollup merge of #32265 - tclfs:patch-1, r=alexcrichton
Eduard-Mihai Burtescu [Sat, 19 Mar 2016 10:30:00 +0000 (12:30 +0200)]
Rollup merge of #32265 - tclfs:patch-1, r=alexcrichton

FreeBSD has already supported Cargo

Both Packages and Ports of FreeBSD have Cargo in present.

8 years agoAuto merge of #32304 - pravic:fix-variadic-ffi-test, r=alexcrichton
bors [Sat, 19 Mar 2016 08:53:11 +0000 (01:53 -0700)]
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.

8 years agoAuto merge of #32256 - bluss:float-fast-math, r=alexcrichton
bors [Sat, 19 Mar 2016 04:12:00 +0000 (21:12 -0700)]
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.

8 years agoFix volatile stores of fat pointers
Amanieu d'Antras [Sat, 19 Mar 2016 02:18:33 +0000 (02:18 +0000)]
Fix volatile stores of fat pointers

8 years agoAuto merge of #32050 - achanda:from-slice-v4, r=alexcrichton
bors [Sat, 19 Mar 2016 00:30:22 +0000 (17:30 -0700)]
Auto merge of #32050 - achanda:from-slice-v4, r=alexcrichton

Add an impl for From trait

Converts a u8 slice to a Ipv4Addr
More discussion on this here: https://github.com/rust-lang/rfcs/pull/1498#issuecomment-191921655

8 years agoUse enum for message kind in compiletest harness.
Corey Farwell [Mon, 14 Mar 2016 14:28:38 +0000 (10:28 -0400)]
Use enum for message kind in compiletest harness.

8 years agoUse explicit -march flags in the i586 mk file
petevine [Fri, 18 Mar 2016 23:04:27 +0000 (00:04 +0100)]
Use explicit -march flags in the i586 mk file

`-march` should definitely go last, after the environment C(XX)FLAGS, or it's back to square one.
This fixes cross-compilation issues on x86_64.

8 years agoadd assertion and comment about mutability
Niko Matsakis [Fri, 18 Mar 2016 22:40:22 +0000 (18:40 -0400)]
add assertion and comment about mutability

8 years agoAuto merge of #31977 - bluss:partial-eq-save, r=brson
bors [Fri, 18 Mar 2016 21:36:49 +0000 (14:36 -0700)]
Auto merge of #31977 - bluss:partial-eq-save, r=brson

derive: Avoid emitting provided PartialEq, PartialOrd methods for c-like enums

derive: Avoid emitting provided PartialEq, PartialOrd method for c-like enums

`ne` is completely symmetrical with the method `eq`, and we can save
rust code size and compilation time here if we only emit one of them
when possible.

One case where it's easy to recognize is when it's a C-like enum. Most
other cases can not omit ne, because any value field may have a custom
PartialEq implementation.

8 years agoelide noop coercions
Niko Matsakis [Fri, 18 Mar 2016 21:19:52 +0000 (17:19 -0400)]
elide noop coercions

8 years agomake suggestion stuff not swallow errors
Niko Matsakis [Fri, 18 Mar 2016 18:47:40 +0000 (14:47 -0400)]
make suggestion stuff not swallow errors

The older code would sometimes swallow errors or fail to produce a
suggestion. The newer code does not. However, just printing everything
would produce a bunch of new and kind of annoying errors, so continue
to swallow `T: 'a` errors so long as there are other things to show.

8 years agoadd comment clarifying what edges are needed
Niko Matsakis [Thu, 17 Mar 2016 13:55:10 +0000 (09:55 -0400)]
add comment clarifying what edges are needed

8 years agofix coercion behavior for nested references
Niko Matsakis [Thu, 17 Mar 2016 13:47:58 +0000 (09:47 -0400)]
fix coercion behavior for nested references