Commit Graph

68680 Commits

Author SHA1 Message Date
Pirh
7ab20c850e Explain difference between panic! and abort in abort docs
As per #29370
2017-09-27 22:47:21 +01:00
Pirh
6dfa45d2ed Remove extraneous brackets from abort documentation
As per #29370
2017-09-27 21:13:07 +01:00
Tomas Nilsson
0f97b6b73c Apply attr proc macros before cfg processing
Now items are not fully configured until right before expanding derives.
2017-09-27 22:08:45 +02:00
Santiago Pastorino
e0e14c9a5b Remove SerializedDepNodeIndex::new it is already impl for Idx 2017-09-27 16:41:35 -03:00
Santiago Pastorino
70c3a3da6d Remove DepNodeIndexNew::new and ::index, they are already impl for Idx 2017-09-27 16:32:27 -03:00
Nikolai Vazquez
36d663fcfc Remove mem::transmute used in Box<str> conversions 2017-09-27 14:56:20 -04:00
Santiago Pastorino
cde47cef0f Remove DepNodeIndex::new is already impl for Idx 2017-09-27 15:11:22 -03:00
Jonathan A. Kollasch
90aa66bfc2 bootstrap: use tar -z on extract
Some tar(1) programs—such as NetBSD's—do not automatically decompress.
2017-09-27 11:17:42 -05:00
Jonathan A. Kollasch
b53b853129 bootstrap: use shasum(1) on NetBSD build hosts
NetBSD doesn't ship with sha256sum.  The openssl build will probably
try to use perl anyway, so using perl's shasum is reasonable.
2017-09-27 11:17:42 -05:00
bors
0e6f4cf51c Auto merge of #44709 - Badel2:inclusive-range-dotdoteq, r=petrochenkov
Initial support for `..=` syntax

#28237

This PR adds `..=` as a synonym for `...` in patterns and expressions.
Since `...` in expressions was never stable, we now issue a warning.

cc @durka
r? @aturon
2017-09-27 16:04:31 +00:00
Luca Barbato
7bdf013a0e Add support for Vector Negative Multiply Subtract Float on PowerPC 2017-09-27 13:35:18 +00:00
Luca Barbato
e41381454b Add support for Vector Truncate on PowerPC 2017-09-27 13:33:32 +00:00
Luca Barbato
9dd3690017 Add support for Vector Round on PowerPC 2017-09-27 13:33:32 +00:00
Luca Barbato
3740d32446 Add support for Vector Ceiling on PowerPC 2017-09-27 13:33:32 +00:00
Luca Barbato
73dd6aecc4 Add support for Vector Reciprocal Square Root Estimate Float on PowerPC 2017-09-27 13:33:31 +00:00
Luca Barbato
8fb0bcb56f Add support for Vector Reciprocal Estimate Float on PowerPC 2017-09-27 13:33:31 +00:00
Luca Barbato
1206ae2b12 Add support for Vector Log2 Estimate Float on PowerPC 2017-09-27 13:33:31 +00:00
Luca Barbato
f52f1ab7e8 Add support for Vector Floor on PowerPC 2017-09-27 13:33:31 +00:00
Luca Barbato
03a2aea4e9 Add support for Vector 2 Raised to the Exponent Estimate Float on PowerPC 2017-09-27 13:33:27 +00:00
Luca Barbato
f6f828c670 Add support for Vector Multiply Add Float on PowerPC 2017-09-27 13:32:49 +00:00
bors
1fd3a42c62 Auto merge of #44713 - zackmdavis:fn_main_in_a_comment_in_rustdoc_breaks_tests, r=QuietMisdreavus
don't let rustdoc get confused by text "fn main" in a line comment

~~~Resolves~~~ (edited) partially addresses #21299.

![rustdoc_fn_main](https://user-images.githubusercontent.com/1076988/30630993-9aeecc4a-9d97-11e7-8e56-2b973f23f683.png)

r? @QuietMisdreavus
2017-09-27 10:56:23 +00:00
bors
412ac93dce Auto merge of #44825 - dtolnay:cratelint, r=aturon
Allow unused extern crate again

This is a partial revert of #42588. There is a usability concern reported in #44294 that was not considered in the discussion of the PR, so I would like to back this out of 1.21. As is, I think users would have a worse and more confusing experience with this lint enabled by default. We can re-enabled once there are better diagnostics or the case in #44294 does not trigger the lint.
2017-09-27 08:20:11 +00:00
Keith Yeung
6d4989b821 Add span label to E0384 for MIR borrowck 2017-09-26 22:20:53 -07:00
bors
e53ab9104a Auto merge of #44812 - Mark-Simulacrum:rustdoc-debug, r=alexcrichton
Allow rustdoc to get compiled with debuginfo

Fixes #44810

cc @QuietMisdreavus
r? @alexcrichton
2017-09-27 04:57:34 +00:00
bors
f71b37bc28 Auto merge of #44802 - sfackler:vecdeque-oob, r=Gankro
Fix capacity comparison in reserve

You can otherwise end up in a situation where you don't actually resize
but still call into handle_cap_increase which then corrupts head/tail.

Closes #44800

Not totally sure the right way to write a test for this - there are some debug asserts the old bad behavior will hit but we don't build the stdlib with debug assertions by default.

r? @Gankro
2017-09-27 01:23:24 +00:00
Nikolai Vazquez
8f167b34b7 Merge remote-tracking branch 'upstream/master' into box-conversions 2017-09-26 21:18:36 -04:00
Nikolai Vazquez
edb2c2d291 Remove uses of mem::transmute in Box methods
Makes use of conversions via Unique.
2017-09-26 21:16:59 -04:00
Mark Simulacrum
33b5ec3d4d Allow rustdoc to get compiled with debuginfo 2017-09-26 17:12:19 -06:00
Zack M. Davis
9f68d62e0c don't let rustdoc get confused by text "fn main" in a line comment
This is in the matter of #21299.
2017-09-26 16:00:54 -07:00
bors
d4da744247 Auto merge of #44757 - jseyfried:fix_bad_derive_collection, r=nrc
macros: fix bug in collecting trait and impl items with derives.

Fixes #43023.
r? @nrc
2017-09-26 22:26:13 +00:00
Basile Desloges
b683538ef2 mir-borrowck: Edit compile-fail tests with E0506 error to also test on MIR borrowck 2017-09-26 21:56:37 +02:00
Badel2
5102309b1f bump rustfmt 2017-09-26 20:57:13 +02:00
Matthias Devlamynck
838105f09b Use a different error code to avoid conflicts 2017-09-26 20:51:22 +02:00
bors
930d3b17dd Auto merge of #44741 - qmx:trans_fulfill_obligation_should_not_crash, r=nikomatsakis
use param_env on the trait_cache key

We bailed from making trans_fulfill_obligation return `Option` or `Result`, just made it less prone to crashing outside trans

r? @nikomatsakis
2017-09-26 18:29:57 +00:00
Basile Desloges
e28c73d71f mir-borrowck: Add span labels to report_illegal_mutation_of_borrowed() 2017-09-26 19:09:56 +02:00
Basile Desloges
34d36c0168 mir-borrowck: Add borrow data parameter to report_illegal_mutation_of_borrowed() 2017-09-26 19:09:56 +02:00
Niko Matsakis
73543d53cd fix test reference 2017-09-26 11:56:44 -04:00
gaurikholkar
5c59bbadb3 minor fixes 2017-09-26 11:55:53 -04:00
gaurikholkar
4bbb58d429 remove error code description 2017-09-26 11:55:53 -04:00
Niko Matsakis
9e4649ebf8 remove random newlines from error messages, fix compile-fail test
That kind of formatting seems like the job of other code.
2017-09-26 11:55:53 -04:00
Niko Matsakis
d7bb575b06 use present tense consistently and update references 2017-09-26 11:55:53 -04:00
gaurikholkar
bbf82be076 tidy fix 2017-09-26 11:55:52 -04:00
gaurikholkar
aa6f0c8050 modify message for return time having multiple lifetimes 2017-09-26 11:55:52 -04:00
gaurikholkar
e58f528bb0 merge fixes, addressing CR comments 2017-09-26 11:55:52 -04:00
Matthias Devlamynck
3730dfdaf5 impl Trait in argument position desugaring:
Add a flag to hir and ty TypeParameterDef and raise an error when using
explicit type parameters when calling a function using impl Trait in
argument position.
2017-09-26 17:48:23 +02:00
Alex Crichton
9e35b797b1 rustc: Default 32 codegen units at O0
This commit changes the default of rustc to use 32 codegen units when compiling
in debug mode, typically an opt-level=0 compilation. Since their inception
codegen units have matured quite a bit, gaining features such as:

* Parallel translation and codegen enabling codegen units to get worked on even
  more quickly.
* Deterministic and reliable partitioning through the same infrastructure as
  incremental compilation.
* Global rate limiting through the `jobserver` crate to avoid overloading the
  system.

The largest benefit of codegen units has forever been faster compilation through
parallel processing of modules on the LLVM side of things, using all the cores
available on build machines that typically have many available. Some downsides
have been fixed through the features above, but the major downside remaining is
that using codegen units reduces opportunities for inlining and optimization.
This, however, doesn't matter much during debug builds!

In this commit the default number of codegen units for debug builds has been
raised from 1 to 32. This should enable most `cargo build` compiles that are
bottlenecked on translation and/or code generation to immediately see speedups
through parallelization on available cores.

Work is being done to *always* enable multiple codegen units (and therefore
parallel codegen) but it requires #44841 at least to be landed and stabilized,
but stay tuned if you're interested in that aspect!
2017-09-26 08:18:03 -07:00
Federico Mena Quintero
4143422981 os_str: Fix too-long lines 2017-09-26 08:59:34 -05:00
bors
1c4510adc8 Auto merge of #44736 - pnkfelix:mir-borrowck4, r=arielb1
Some fixes to mir-borrowck

Make the code more closely match the NLL RFC (updated description).

(The biggest visible fix the addition of the Shallow/Deep distinction, which means mir-borrowck stops falsely thinking that StorageDeads need deep access to their input L-value.)
2017-09-26 09:19:03 +00:00
kennytm
16c110f78b
Fix issue #44731.
Also excludes `impl Trait` from everybody_loops if it appears in the path.
2017-09-26 16:46:38 +08:00
bors
4b8bf391fd Auto merge of #44735 - tirr-c:issue-42143, r=arielb1
Friendlier error message for closure argument type mismatch

Rebased #42270.
Fixes #42143.

---

`test.rs`:

```rust
fn main() {
    foo(|_: i32, _: usize| ());
}

fn foo<F>(_: F) where F: Fn(&str, usize) {}
```

Before:

```
error[E0281]: type mismatch: `[closure@test.rs:2:9: 2:30]` implements the trait `std::ops::Fn<(i32, usize)>`, but the trait `for<'r> std::ops::Fn<(&'r str, usize)>` is required
 --> test.rs:2:5
  |
2 |     foo(|_: i32, _: usize| ());
  |     ^^^ --------------------- implements `std::ops::Fn<(i32, usize)>`
  |     |
  |     expected &str, found i32
  |     requires `for<'r> std::ops::Fn<(&'r str, usize)>`
  |
  = note: required by `foo`
```

After (early):

```
error[E0631]: type mismatch in closure arguments
 --> test.rs:2:5
  |
2 |     foo(|_: i32, _: usize| ());
  |     ^^^ --------------------- takes arguments of type `i32` and `usize`
  |     |
  |     expected arguments of type `&str` and `usize`
  |
  = note: required by `foo`
```

After (current):

```
error[E0631]: type mismatch in closure arguments
 --> test.rs:2:5
  |
2 |     foo(|_: i32, _: usize| ());
  |     ^^^ --------------------- found signature of `fn(i32, usize) -> _`
  |     |
  |     expected signature of `for<'r> fn(&'r str, usize) -> _`
  |
  = note: required by `foo`
```

~~Compiler output has been changed, and a few tests are failing. Help me writing/fixing tests!~~

r? @nikomatsakis
2017-09-26 05:02:03 +00:00