Commit Graph

75852 Commits

Author SHA1 Message Date
Alex Crichton
7cf4cb5a7b
Rollup merge of #48265 - SimonSapin:nonzero, r=KodrAus
Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero

RFC: https://github.com/rust-lang/rfcs/pull/2307
Tracking issue: ~~https://github.com/rust-lang/rust/issues/27730~~ https://github.com/rust-lang/rust/issues/49137
Fixes https://github.com/rust-lang/rust/issues/27730
2018-03-23 09:27:06 -05:00
bors
55e1104dd9 Auto merge of #49285 - nrc:update, r=alexcrichton
Update RLS and Rustfmt

Fixes broken RLS tests/build

r? @alexcrichton
2018-03-23 05:43:00 +00:00
Nick Cameron
aa238a3780 Update RLS and Rustfmt
Fixes broken RLS tests/build
2018-03-23 10:34:47 +13:00
bors
52f7e8836c Auto merge of #49210 - oli-obk:pango_crash, r=eddyb
Fix the conversion between bit representations and i128 representations

fixes #49181

the `Discr` type now encodes the bit representation instead of `i128` or `u128` casted to `u128`.

r? @eddyb
2018-03-22 20:02:14 +00:00
bors
5092c6b01a Auto merge of #49264 - kennytm:rollup, r=kennytm
Rollup of 23 pull requests

- Successful merges: #48374, #48596, #48759, #48939, #49029, #49069, #49093, #49109, #49117, #49140, #49158, #49188, #49189, #49209, #49211, #49216, #49225, #49231, #49234, #49242, #49244, #49105, #49038
- Failed merges:
2018-03-22 16:58:57 +00:00
kennytm
2c6f911463
Rollup merge of #49038 - canndrew:replace-infallible-with-never, r=SimonSapin
replace `convert::Infallible` with `!`
2018-03-22 23:22:38 +08:00
kennytm
2b9674d2b1
Rollup merge of #49105 - SimonSapin:from_utf8_lossy_example, r=alexcrichton
Add an example of lossy decoding to str::Utf8Error docs

CC https://github.com/rust-lang/rust/issues/33906
2018-03-22 23:20:11 +08:00
kennytm
a4bc859011
Revert "Temporarily disable dist-ing RLS, Rustfmt and Clippy."
This reverts commit 9f792e199b.
2018-03-22 22:43:56 +08:00
kennytm
d54f74ea0a
Rollup merge of #49244 - varkor:type_dependent_defs_ExprMethodCall, r=estebank
Fix type_dependent_defs ICE on method calls

Fixes #49241.
2018-03-22 22:43:55 +08:00
kennytm
eb99deb9c6
Rollup merge of #49242 - Mrowqa:typaram-attrs, r=petrochenkov
Pass attributes to hir::TyParam

Required by https://github.com/servo/servo/pull/20264
Discussed here: https://gitter.im/servo/servo?at=5aafdcd1012ff2bf681da97a

CC @nikomatsakis
2018-03-22 22:43:53 +08:00
kennytm
a10db97069
Rollup merge of #49234 - kennytm:revert-fix-dpl-788, r=alexcrichton
dpl 1.9.5 has been released, revert #49217.

dpl 1.9.5 has been released which includes travis-ci/dpl#789, so we could move back to the standard Travis settings before that `s3-eager-autoload` branch is removed.
2018-03-22 22:43:52 +08:00
kennytm
87f5a4b6f2
Rollup merge of #49231 - gnzlbg:fix_vec_fminmax, r=rkruppe
fix vector fmin/fmax non-fast/fast intrinsics NaN handling

This bugs shows up in release mode tests of `stdsimd`: https://github.com/rust-lang-nursery/stdsimd/pull/391 . The intrinsics are thoroughly tested there for roundoff errors, NaN, and overflow behavior.

The problem was that the non-fast intrinsics where specifying `NoNaNs == true`, which meant that they don't support NaNs. This is incorrect, the non-fast intrinsics should handle NaNs properly.

Also, the "fast" intrinsics where specifying `NoNaNs == false` which meant that they support NaNs and then fast-math, which probably disables this support. This was not intended either.

I've added a comment specifying what the boolean flags do.
2018-03-22 22:43:51 +08:00
kennytm
3e95c71c18
Rollup merge of #49225 - QuietMisdreavus:all-the-features-all-the-time, r=alexcrichton
whitelist every target feature for rustdoc

When https://github.com/rust-lang-nursery/stdsimd/pull/367 was attempted to be upstreamed, it failed to document on non-x86 targets because it made every intrinsic visible, even the ones on foreign arches. This change makes it so that whenever rustdoc asks for the target feature whitelist, it gets a list of every feature known to every arch in `rustc_trans/llvm_util.rs`.

Before pushing, i temporarily updated the `stdsimd` submodule to include the `doc(cfg)` change, generated documentation for `aarch64-unknown-linux-gnu`, and it completed without a problem. The generated `core::arch` docs contained complete submodules for all main arches.
2018-03-22 22:43:50 +08:00
kennytm
346a46e9d6
Rollup merge of #49216 - bjorn3:patch-1, r=estebank
Don't check interpret_interner when accessing a static to fix miri mutable statics

Mutable statics don't work in my PR to fix the standalone [miri](https://github.com/solson/miri), as init_static didn't get called when the interpret_interner already contained a entry for the static, which is always immutable.

cc solson/miri#364
2018-03-22 22:43:48 +08:00
kennytm
70ae9174ee
Rollup merge of #49211 - varkor:chalk-lowering-Implemented-From-Env, r=nikomatsakis
Implement Chalk lowering rule "Implemented-From-Env"

This extends the Chalk lowering pass with the "Implemented-From-Env" rule for generating program clauses from a trait definition as part of #49177.

r? @nikomatsakis
2018-03-22 22:43:47 +08:00
kennytm
34eca5346f
Rollup merge of #49209 - Zoxc:run-make-last, r=Mark-Simulacrum
Run the `run-make` tests last, so more tests run on Windows when `make` is unavailable

Just https://github.com/rust-lang/rust/pull/47996 again.

r? @Mark-Simulacrum
2018-03-22 22:43:45 +08:00
kennytm
d7eda77692
Rollup merge of #49189 - GuillaumeGomez:fix-implied-shortcut-links, r=QuietMisdreavus
Fix automatic urls with backticks

Fixes #49164.

r? @QuietMisdreavus
2018-03-22 22:43:43 +08:00
kennytm
95967c7c72
Rollup merge of #49188 - memoryleak47:macro_use_doctest, r=QuietMisdreavus
Put `#[macro_use] extern crate <crate>` before fn main() in doctests

Closes #49174.
2018-03-22 22:43:41 +08:00
kennytm
c9457250ce
Rollup merge of #49158 - varkor:compiletest-triples, r=rkruppe
Make compiletest do exact matching on triples

This avoids the issues of the previous substring matching, ensuring `ARCH_TABLE` and `OS_TABLE` will no longer contain redundant entries. Fixes #48893.

r? @rkruppe
2018-03-22 22:43:40 +08:00
kennytm
20eaf351a2
Rollup merge of #49140 - semarie:rustdoc-test-path, r=alexcrichton
Allow test target to pass without installing

explicitly pass -L target-lib to rustdoc

on OpenBSD, without it, it fails on several tests with:
```
error[E0463]: can't find crate for `std`
```
2018-03-22 22:43:38 +08:00
kennytm
8d3f3f0cac
Rollup merge of #49117 - nivkner:fixme_fixup3, r=estebank
address some FIXME whose associated issues were marked as closed

part of #44366
2018-03-22 22:43:37 +08:00
kennytm
245f4c4631
Rollup merge of #49109 - SimonSapin:deprecate-asciiext, r=alexcrichton
Deprecate the AsciiExt trait in favor of inherent methods

The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.

Fixes https://github.com/rust-lang/rust/issues/39658
2018-03-22 22:43:36 +08:00
kennytm
08526c8a9d
Rollup merge of #49093 - Zoxc:speedup, r=aidanhs
Update submodules in parallel
2018-03-22 22:43:35 +08:00
kennytm
50850c62c5
Rollup merge of #49069 - wesleywiser:incr_soa, r=michaelwoerister
Convert SerializedDepGraph to be a struct-of-arrays

Fixes #47326

I did not try the "`mem::swap()` to avoid copying the arrays" idea because that would leave the DepGraph in an incorrect state and that doesn't seem like a good idea for me.

r? @michaelwoerister
2018-03-22 22:43:33 +08:00
kennytm
ca54ff22f2
Rollup merge of #49029 - GuillaumeGomez:atomic-docs, r=QuietMisdreavus
Make Atomic doc examples specific to each type

Fixes #49018.

r? @QuietMisdreavus
2018-03-22 22:43:31 +08:00
kennytm
b7ee149c47
Rollup merge of #48939 - wesleywiser:incr_query_wf_checking, r=michaelwoerister
Querify WF-checking so it can be cached

r? @michaelwoerister
2018-03-22 22:43:30 +08:00
Oliver Schneider
b272749197
Fix the conversion between bit representations and i128 representations 2018-03-22 12:38:40 +01:00
kennytm
d67084215d
Rollup merge of #48759 - QuietMisdreavus:simd-feature-docs, r=GuillaumeGomez
rustdoc: expose #[target_feature] attributes as doc(cfg) flags

This change exposes `#[target_feature(enable = "feat")]` attributes on an item as if they were also `#[doc(cfg(target_feature = "feat"))]` attributes. This gives them a banner on their documentation listing which feature is required to use the item. It also modifies the rendering code for doc(cfg) tags to handle `target_feature` tags. I made it print just the feature name on "short" printings (as in the function listing on a module page), and use "target feature `feat`" in the full banner on the item page itself.

This way, the function listing in `std::arch` shows which feature is required for each function:

![image](https://user-images.githubusercontent.com/5217170/37003222-f41b9d66-2091-11e8-9656-8719e5b34832.png)

![image](https://user-images.githubusercontent.com/5217170/37003234-feb1a7a2-2091-11e8-94de-6d1d76a2d3ee.png)
2018-03-22 17:51:16 +08:00
kennytm
a848336a31
Rollup merge of #48596 - GuillaumeGomez:invalid-code-block-start, r=QuietMisdreavus
Add warning for invalid start of code blocks in rustdoc

Follow up of #48382.

Still two things to consider:
 1. Adding test for rustdoc output (but where? In UI or in rustdoc tests?).
 2. Try to fix the span issue.

r? @QuietMisdreavus
2018-03-22 17:51:15 +08:00
kennytm
d313700014
Rollup merge of #48374 - Aaronepower:master, r=Mark-Simulacrum
Update RELEASES.md for 1.25.0

[rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)
2018-03-22 17:51:13 +08:00
bors
b176285ba7 Auto merge of #49094 - alexcrichton:print-step-duration, r=kennytm
ci: Print out how long each step takes on CI

This commit updates CI configuration to inform rustbuild that it should print
out how long each step takes on CI. This'll hopefully allow us to track the
duration of steps over time and follow regressions a bit more closesly (as well
as have closer analysis of differences between two builds).

cc #48829
2018-03-22 09:46:06 +00:00
bors
e575773141 Auto merge of #49041 - nikomatsakis:issue-46541-impl-trait-hidden-lifetimes, r=cramertj
Detect illegal hidden lifetimes in `impl Trait`

This branch fixes #46541 -- however, it presently doesn't build because it also *breaks* a number of existing usages of impl Trait. I'm opening it as a WIP for now, just because we want to move on impl Trait, but I'll try to fix the problem in a bit.

~~(The problem is due to the fact that we apparently infer stricter lifetimes in closures that we need to; for example, if you capture a variable of type `&'a &'b u32`, we will put *precisely* those lifetimes into the closure, even if the closure would be happy with `&'a &'a u32`. This causes the present chance to affect things that are not invariant.)~~ fixed

r? @cramertj
2018-03-22 06:56:16 +00:00
bors
eb8d08d904 Auto merge of #49246 - kennytm:download-gcc-stuff-from-https, r=alexcrichton
Download the GCC artifacts from the HTTP server instead of FTP server.

Try to bring back the `dist-i686-linux` and `dist-x86_64-linux alt` builders which has mysteriously lost their cache 14 hours ago and stuck forever unable to download `mpfr-2.4.2.tar.bz2` since it keeps getting

```
==> PASV ... couldn't connect to 209.132.180.131 port 10058: Connection timed out
```
2018-03-22 01:54:51 +00:00
kennytm
9f792e199b
Temporarily disable dist-ing RLS, Rustfmt and Clippy.
Unfortunately we don't have sufficient time to rebuild the cache *and*
distribute everything in `dist-x86_64-linux alt`, the debug assertions are
really slow.

We will re-enable them after the PR has been successfully merged, thus
successfully updating the cache (freeing up 40 minutes), giving us enough
time to build these tools.
2018-03-22 09:45:48 +08:00
QuietMisdreavus
b3fb0d10f0 add target_feature items to doc_cfg rustdoc test 2018-03-21 19:57:10 -05:00
Niko Matsakis
2e8a1abc2d also fix the Fixed code 2018-03-21 19:23:29 -04:00
Niko Matsakis
48c4e352d3 WIP do not use in-band lifetimes 2018-03-21 19:22:41 -04:00
Mrowqa
99b49b532c Now it compiles 2018-03-21 23:11:27 +01:00
kennytm
56a19a9eec
Handle redirects correctly. 2018-03-22 05:28:11 +08:00
kennytm
78bcbb0f96
Download the GCC artifacts from the HTTP server instead of FTP server.
The former seems much more stable, in case the cache becomes invalidated.
2018-03-22 05:28:04 +08:00
varkor
3272b63f34 Moved test to ui 2018-03-21 21:00:38 +00:00
QuietMisdreavus
2ba41e9d79 update stdsimd 2018-03-21 15:43:06 -05:00
Niko Matsakis
3955708576 WIP tweak example to include feature gate 2018-03-21 16:31:20 -04:00
varkor
4b673249f8 Fix type_dependent_defs ICE on method calls 2018-03-21 18:01:51 +00:00
Simon Sapin
c09b9f9372 Deprecate the AsciiExt trait in favor of inherent methods
The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.

Fixes https://github.com/rust-lang/rust/issues/39658
2018-03-21 17:54:33 +01:00
kennytm
c7bdd371a6
Revert "Apply a fix to travis-ci/dpl#788 manually until dpl 1.9.5 is released."
This reverts commit 20e65f11f3.
2018-03-21 22:03:24 +08:00
bjorn3
5aa29c4c82 Fix test error 2018-03-21 14:43:07 +01:00
Niko Matsakis
94eebaa325 WIP fix mir-opt-end-region-8 2018-03-21 09:24:32 -04:00
Niko Matsakis
9d5ec9ef1a work around fallout from these changes in rustc 2018-03-21 05:40:59 -04:00
Niko Matsakis
f71de45b23 use subtyping when we create a closure instead of for upvar types
We used to make the upvar types in the closure `==` but that was
stronger than we needed. Subtyping suffices, since we are copying the
upvar value into the closure field. This in turn allows us to infer
smaller lifetimes in captured values in some cases (like the example
here), avoiding errors.
2018-03-21 05:40:59 -04:00