Commit Graph

61323 Commits

Author SHA1 Message Date
Alex Crichton
ce4abc3515 Delete Travis/AppVeyor makefile builders
We no longer need these builders as we're no longer testing the old build
system.
2017-02-06 08:42:54 -08:00
Alex Crichton
9b0e6af110 Delete swaths of the configure script
This commit deletes swaths of the configure script related to the old build
system which are now no longer needed when using rustbuild.
2017-02-06 08:42:54 -08:00
Alex Crichton
9ab8090bd4 Delete the mk folder
This commit deletes the old build system located in the `mk` folder as it's now
been obsoleted for two cycles and is replaced by rustbuild.
2017-02-06 08:42:54 -08:00
Niko Matsakis
4f5fc4e242 fix case where some edges can't be recreated by expanding the graph
cc #39569 -- almost certainly a fix for that
2017-02-06 10:20:23 -05:00
Michael Woerister
fa0a728ed6 back: Limit the number of LLVM worker threads. 2017-02-06 10:15:20 -05:00
Jonathan A. Kollasch
78f542b78a Rename i686-unknown-netbsdelf target to i686-unknown-netbsd 2017-02-06 08:49:16 -06:00
Niko Matsakis
b9757863df regr test 2017-02-06 09:37:32 -05:00
bors
324b175174 Auto merge of #39500 - michaelwoerister:fix-ich-testing, r=nikomatsakis
Let the dep-tracking test framework check that all #[rustc_dirty] attrs have been actually checked

r? @nikomatsakis
2017-02-06 14:10:13 +00:00
Son
7c8c45e762 Extract collections benchmarks to libcollections/benches
And libcore/benches
2017-02-06 21:38:47 +11:00
Michael Woerister
ab3c8269f4 Add comment about why the regular unused-attributes infrastructure
is not used for #[rustc_dirty]/#[rustc_clean].
2017-02-06 03:56:58 -05:00
bors
4711ac314c Auto merge of #38436 - bluecereal:patch-1, r=frewsxcv
Update if-let.md

Calling if-let a combination of if and let is confusing, as some may be led to believe that it's a literal combination, instead of syntactic sugar added to the language as a convenience.  What's there to stop someone from thinking if-let is just if and let together?

I do think this article does a good job of implying what's really going on; however, I was only able to notice this after I had begun to understand if/while-let statements, courtesy of the Rust IRC chat.

Basically, this article lacks the clarity and explicitness an inexperienced programmer like me needs in order to understand the contents fully.  This is shown by my inability to understand the if-let concept from this page of the Book alone.

I think convenience, sugar, and (if-let != if + let) should all be made mention of in a clear, explicit manner. I lack confidence in my understanding of this issue, so I wrote just enough to hopefully get my thoughts across.
2017-02-06 06:55:10 +00:00
king6cong
380ba6dbad go back to use // 2017-02-06 10:12:30 +08:00
bluecereal
fb7f211c0c Update if-let.md 2017-02-05 20:20:43 -05:00
Clar Charr
8b2e334e0e Ipv6Addr <-> u128 2017-02-05 18:55:37 -05:00
bors
a3da24bba9 Auto merge of #38897 - nikomatsakis:issue-32330-followup, r=arielb1
make lifetimes that only appear in return type early-bound

This is the full and proper fix for #32330. This also makes some effort to give a nice error message (as evidenced by the `ui` test), sending users over to the tracking issue for a fuller explanation and offering a `--explain` message in some cases.

This needs a crater run before we land.

r? @arielb1
2017-02-05 22:53:10 +00:00
Niko Matsakis
b26120db11 make lifetimes that only appear in return type early-bound
This is the full and proper fix for #32330. This also makes some effort
to give a nice error message (as evidenced by the `ui` test), sending
users over to the tracking issue for a full explanation.
2017-02-05 16:30:03 -05:00
bors
031c1168b9 Auto merge of #39567 - frewsxcv:rollup, r=frewsxcv
Rollup of 12 pull requests

- Successful merges: #39439, #39472, #39481, #39491, #39501, #39509, #39514, #39519, #39526, #39528, #39530, #39538
- Failed merges:
2017-02-05 19:33:55 +00:00
Corey Farwell
a419dd1c01 Rollup merge of #39538 - stjepang:slightly-optimize-sort, r=alexcrichton
Slightly optimize slice::sort

First, get rid of some bound checks.

Second, instead of comparing by ternary `compare` function, use a binary function testing whether an element is less than some other element. This apparently makes it easier for the compiler to reason about the code. I've noticed the same effect with [pdqsort](https://github.com/stjepang/pdqsort) crate.

Benchmark:

```
name                                        before ns/iter        after ns/iter         diff ns/iter   diff %
slice::bench::sort_large_ascending          8,969 (8919 MB/s)     7,410 (10796 MB/s)          -1,559  -17.38%
slice::bench::sort_large_big_ascending      355,640 (3599 MB/s)   359,137 (3564 MB/s)          3,497    0.98%
slice::bench::sort_large_big_descending     427,112 (2996 MB/s)   424,721 (3013 MB/s)         -2,391   -0.56%
slice::bench::sort_large_big_random         2,207,799 (579 MB/s)  2,138,804 (598 MB/s)       -68,995   -3.13%
slice::bench::sort_large_descending         13,694 (5841 MB/s)    13,514 (5919 MB/s)            -180   -1.31%
slice::bench::sort_large_mostly_ascending   239,697 (333 MB/s)    203,542 (393 MB/s)         -36,155  -15.08%
slice::bench::sort_large_mostly_descending  270,102 (296 MB/s)    234,263 (341 MB/s)         -35,839  -13.27%
slice::bench::sort_large_random             513,406 (155 MB/s)    470,084 (170 MB/s)         -43,322   -8.44%
slice::bench::sort_large_random_expensive   23,650,321 (3 MB/s)   23,675,098 (3 MB/s)         24,777    0.10%
slice::bench::sort_medium_ascending         143 (5594 MB/s)       132 (6060 MB/s)                -11   -7.69%
slice::bench::sort_medium_descending        197 (4060 MB/s)       188 (4255 MB/s)                 -9   -4.57%
slice::bench::sort_medium_random            3,358 (238 MB/s)      3,271 (244 MB/s)               -87   -2.59%
slice::bench::sort_small_ascending          32 (2500 MB/s)        32 (2500 MB/s)                   0    0.00%
slice::bench::sort_small_big_ascending      97 (13195 MB/s)       97 (13195 MB/s)                  0    0.00%
slice::bench::sort_small_big_descending     247 (5182 MB/s)       249 (5140 MB/s)                  2    0.81%
slice::bench::sort_small_big_random         502 (2549 MB/s)       498 (2570 MB/s)                 -4   -0.80%
slice::bench::sort_small_descending         55 (1454 MB/s)        61 (1311 MB/s)                   6   10.91%
slice::bench::sort_small_random             358 (223 MB/s)        356 (224 MB/s)                  -2   -0.56%
```
2017-02-05 12:45:15 -05:00
Corey Farwell
70cc1d34fd Rollup merge of #39530 - TimNN:more-gdb, r=alexcrichton
ignore more gdb versions with buggy rust support

This extends the versions of gdb which were ignored in #39039. While just ignoring gdb versions up to 7.12.1 would have been sufficient for now, I believe (after consulting https://sourceware.org/gdb/wiki/Internals%20Versions)  that ignoring versions up to 7.12.9 will prevent the tests failing again for 7.12.2, etc. while still running all tests for the development versions of gdb (which will be >= 7.12.10 as far as I can tell).

This should fix #39522.

cc @Manishearth, @michaelwoerister, #38948
2017-02-05 12:45:14 -05:00
Corey Farwell
3e7ee3535e Rollup merge of #39528 - dylanmckay:llvm-4.0-diglobalvar, r=alexcrichton
[LLVM 4.0] Support a debug info API change for LLVM 4.0

Instead of directly creating a `DIGlobalVariable`, we now have to create
a `DIGlobalVariableExpression` which itself contains a reference to a
'DIGlobalVariable'.

This is a straightforward change.

In the future, we should rename `DIGlobalVariable` in the FFI
bindings, assuming we will only refer to `DIGlobalVariableExpression`
and not `DIGlobalVariable`.
2017-02-05 12:45:13 -05:00
Corey Farwell
4e67bf92e3 Rollup merge of #39526 - canndrew:uninhabited-while-let-fix, r=arielb1
Uninhabited while-let pattern fix

This fix makes it so while-let with an unsatisfiable pattern raises a correct warning rather than an incorrect error.
2017-02-05 12:45:12 -05:00
Corey Farwell
13b8e4b416 Rollup merge of #39519 - nagisa:more-snap, r=alexcrichton
More snap cleanup

r? @alexcrichton
2017-02-05 12:45:11 -05:00
Corey Farwell
d194688c20 Rollup merge of #39514 - tbu-:pr_less_syscalls_fd, r=alexcrichton
Use less syscalls in `FileDesc::set_{nonblocking,cloexec}`

Only set the flags if they differ from what the OS reported, use
`FIONBIO` to atomically set the non-blocking IO flag on Linux.
2017-02-05 12:45:10 -05:00
Corey Farwell
ae3aafacdf Rollup merge of #39509 - petrochenkov:rb2, r=alexcrichton
libbacktrace: Fix uninitialized variable

Fixes https://github.com/rust-lang/rust/issues/39468
2017-02-05 12:45:08 -05:00
Corey Farwell
ac329cd122 Rollup merge of #39501 - phungleson:libcorebench, r=alexcrichton
Extract libcore benchmarks to a separate folder

Fix #39484

r? @alexcrichton since you seem to know about this :)

Thanks!
2017-02-05 12:45:07 -05:00
Corey Farwell
b3518aff90 Rollup merge of #39491 - dumbbell:support-aarch64-unknown-freebsd, r=alexcrichton
Support aarch64-unknown-freebsd
2017-02-05 12:45:06 -05:00
Corey Farwell
d021a3fd69 Rollup merge of #39481 - ishitatsuyuki:master, r=alexcrichton
liballoc_jemalloc: fix linking with system library

Fix #39215
2017-02-05 12:45:05 -05:00
Corey Farwell
ddd01e0d55 Rollup merge of #39472 - est31:unadjusted_only_for_win, r=nagisa
Don't use "unadjusted" ABI on non windows platforms

We introduced the unadjusted ABI to work around wrong
(buggy) ABI expectations by LLVM on Windows [1].
Therefore, it should be solely used on Windows and not
on other platforms, like right now is the case.

[1]: see this comment for details https://github.com/rust-lang/rust/pull/38482#issuecomment-269074031
2017-02-05 12:45:04 -05:00
Corey Farwell
388db666f4 Rollup merge of #39439 - king6cong:move, r=alexcrichton
rename other than copy/remove
2017-02-05 12:45:02 -05:00
bors
fc02736d59 Auto merge of #39408 - ollie27:i128_try_from, r=alexcrichton
Fix TryFrom for i128/u128

Another case of `as` cast silent truncation being error prone.

This also adds a few missing TryFrom tests to libcoretest.

cc #33417
cc #35118
2017-02-05 16:57:29 +00:00
Andrew Cann
7135d0ab94 Fix make tidy 2017-02-05 22:29:06 +08:00
bors
9c8cdb2923 Auto merge of #39563 - frewsxcv:rollup, r=frewsxcv
Rollup of 19 pull requests

- Successful merges: #38518, #38921, #38959, #38983, #39009, #39107, #39193, #39289, #39312, #39393, #39442, #39443, #39453, #39454, #39471, #39477, #39478, #39527, #39552
- Failed merges:
2017-02-05 14:15:18 +00:00
Corey Farwell
0a09274e27 Rollup merge of #39552 - zackmdavis:more_struct_aliases_stabilization_version, r=petrochenkov
correct version in which more_struct_aliases was/will be stable

The stabilizing commit is 5056a437, which is not in 1.14, but is (at
time of writing) on the 1.16 beta branch. [See discussion](https://github.com/rust-lang/rust/pull/39282#discussion_r99481687).
2017-02-05 09:14:57 -05:00
Corey Farwell
94fd315173 Rollup merge of #39527 - king6cong:bootstrap-doc, r=alexcrichton
README path correction
2017-02-05 09:14:56 -05:00
Corey Farwell
403ca55a85 Rollup merge of #39478 - alexcrichton:add-xpy, r=japaric
rustbuild: Add x.py to source tarballs

We should be sure to add our build system entry point!

Closes #39476
2017-02-05 09:14:54 -05:00
Corey Farwell
e06fa7cf07 Rollup merge of #39477 - jimmycuadra:try-from-parameter-name, r=alexcrichton
Add a name for the parameter to `TryFrom::try_from`.

Although signatures with anonymous parameters may not be deprecated or removed at this point, the team seems to agree that the ability to have an anonymous parameter is unfortunate historical baggage, and that we shouldn't create new code that uses it.

Context: https://github.com/rust-lang/rust/issues/33417#issuecomment-276933861
2017-02-05 09:14:53 -05:00
Corey Farwell
e7f6c36a78 Rollup merge of #39471 - djc:bootstrap-user, r=alexcrichton
Fix bootstrap.py issues with new rustbuild build system (fixes #39469)
2017-02-05 09:14:51 -05:00
Corey Farwell
296c07e27e Rollup merge of #39454 - abonander:proc_macro_tracking_issue, r=jseyfried
Change tracking issue for `proc_macro` feature to #38356

r? @jseyfried
2017-02-05 09:14:50 -05:00
Corey Farwell
ece9240824 Rollup merge of #39453 - nrc:save-path, r=nikomatsakis
save-analysis: be more paranoid about generated paths

fixes https://github.com/rust-lang-nursery/rls/issues/160
2017-02-05 09:14:49 -05:00
Corey Farwell
cd5c520cc2 Rollup merge of #39443 - phungleson:remove-unresolved-things, r=nikomatsakis
Don't suggest to use things which weren't found either

Fixes #38054

The best code I can come up with, suggestions are welcome.

Basically, removing ```. Did you mean to use `DoesntExist1`?``` in the code below, because it is useless.

```rust
error[E0432]: unresolved import `DoesntExist1`
 --> src/lib.rs:1:5
  |
1 | use DoesntExist1;
  |     ^^^^^^^^^^^^ no `DoesntExist1` in the root

error[E0432]: unresolved import `DoesntExist2`
 --> src/lib.rs:2:5
  |
2 | use DoesntExist2;
  |     ^^^^^^^^^^^^ no `DoesntExist2` in the root. Did you mean to use `DoesntExist1`?
```
2017-02-05 09:14:48 -05:00
Corey Farwell
805a99e6cb Rollup merge of #39442 - keeperofdakeys:expand-derives, r=jseyfried
Expand derive macros in the MacroExpander

This removes the expand_derives function, and sprinkles the functionality throughout the Invocation Collector, Expander and Resolver.

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

r? @jseyfried
2017-02-05 09:14:46 -05:00
Corey Farwell
65b24779a9 Rollup merge of #39393 - ollie27:stab_impls, r=alexcrichton
Fix a few impl stability attributes

The versions show up in rustdoc.
2017-02-05 09:14:45 -05:00
Corey Farwell
5cfd5eda97 Rollup merge of #39312 - mgattozzi:rustdoc-help-fix, r=alexcrichton
Fix full path being output with `rustdoc -h`

rustdoc would output the full path to the binary when calling it with
the `-h` or `--help` flags. This is undesired behavior. It has been
replaced with a hardcoded string `rustdoc` to fix the issue.

Fixes #39310
2017-02-05 09:14:44 -05:00
Corey Farwell
76e9ea7382 Rollup merge of #39289 - shahn:option_entry, r=alexcrichton
Provide Entry-like API for Option

This implements #39288.

I am wondering whether to use std::intrinsics::unreachable!() here. Both seems fine to me (the second match optimizes away in release mode).
2017-02-05 09:14:42 -05:00
Corey Farwell
49cd748a07 Rollup merge of #39193 - pepyakin:emcc-strip-panic-rt, r=alexcrichton
Tell emscripten to remove exception handling code when panic=abort

Fixes #36900
2017-02-05 09:14:41 -05:00
Corey Farwell
8163b4b1f2 Rollup merge of #39107 - llogiq:branchless_filter_count, r=alexcrichton
branchless .filter(_).count()

I found that the branchless version is only slower if we have little to no branch misses, which usually isn't the case. I notice speedups between -5% (perfect prediction) and 60% (real world data).
2017-02-05 09:14:40 -05:00
Corey Farwell
4f8ce9efb9 Rollup merge of #39009 - canndrew:default-unit-warnings, r=nikomatsakis
Add warning for () to ! switch

With feature(never_type) enabled diverging type variables will default to `!` instead of `()`. This can cause breakages where a trait is resolved on such a type.

This PR emits a future-compatibility warning when it sees this happen.
2017-02-05 09:14:39 -05:00
Corey Farwell
ca202fe181 Rollup merge of #38983 - APTy:udp-peek, r=aturon
Add peek APIs to std::net

Adds "peek" APIs to `std::net` sockets, including:
- `UdpSocket.peek()`
- `UdpSocket.peek_from()`
- `TcpStream.peek()`

These methods enable socket reads without side-effects. That is, repeated calls to `peek()` return identical data. This is accomplished by providing the POSIX flag `MSG_PEEK` to the underlying socket read operations.

This also moves the current implementation of `recv_from` out of the platform-independent `sys_common` and into respective `sys/windows` and `sys/unix` implementations. This allows for more platform-dependent implementations where necessary.

Fixes #38980
2017-02-05 09:14:38 -05:00
Corey Farwell
c4c6c49e52 Rollup merge of #38959 - Amanieu:atomic128, r=alexcrichton
Add 128-bit atomics

This is currently only supported on AArch64 since that is the only target which unconditionally supports 128-bit atomic operations.

cc #35118
2017-02-05 09:14:37 -05:00
Corey Farwell
6a4c906f7a Rollup merge of #38921 - chris-morgan:windows-unprivileged-symlink-creation, r=alexcrichton
Support unprivileged symlink creation in Windows

Symlink creation on Windows has in the past basically required admin; it’s being opened up a bit in the Creators Update, so that at least people who have put their computers into Developer Mode will be able to create symlinks without special privileges. (It’s unclear from what Microsoft has said whether Developer Mode will be required in the final Creators Update release, but sadly I expect it still will be, so this *still* won’t be as helpful as I’d like.)

Because of compatibility concerns, they’ve hidden this new functionality behind a new flag in the CreateSymbolicLink dwFlags: `SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE`. So we add this flag in order to join the party.

Sources:

- https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/ is the official announcement (search for CreateSymbolicLink)

- https://news.ycombinator.com/item?id=13096354 on why the new flag.
2017-02-05 09:14:36 -05:00