]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agomake `parent_id` not optional
Niko Matsakis [Wed, 21 Mar 2018 08:45:21 +0000 (04:45 -0400)]
make `parent_id` not optional

It'd be pretty buggy if `None` were supplied anyway; we'd skip over
in-band lifetimes completely!

6 years agochange `with_in_scope_lifetime_defs` to take an iterator
Niko Matsakis [Wed, 21 Mar 2018 08:27:35 +0000 (04:27 -0400)]
change `with_in_scope_lifetime_defs` to take an iterator

6 years agorustfmt lowering.rs
Niko Matsakis [Wed, 21 Mar 2018 08:24:27 +0000 (04:24 -0400)]
rustfmt lowering.rs

6 years agoAuto merge of #49264 - kennytm:rollup, r=kennytm
bors [Thu, 22 Mar 2018 16:58:57 +0000 (16:58 +0000)]
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:

6 years agoRollup merge of #49038 - canndrew:replace-infallible-with-never, r=SimonSapin
kennytm [Thu, 22 Mar 2018 15:22:38 +0000 (23:22 +0800)]
Rollup merge of #49038 - canndrew:replace-infallible-with-never, r=SimonSapin

replace `convert::Infallible` with `!`

6 years agoRollup merge of #49105 - SimonSapin:from_utf8_lossy_example, r=alexcrichton
kennytm [Thu, 22 Mar 2018 15:20:11 +0000 (23:20 +0800)]
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

6 years agoRevert "Temporarily disable dist-ing RLS, Rustfmt and Clippy."
kennytm [Thu, 22 Mar 2018 09:52:57 +0000 (17:52 +0800)]
Revert "Temporarily disable dist-ing RLS, Rustfmt and Clippy."

This reverts commit 9f792e199bc53a75afdad72547a151a0bc86ec5d.

6 years agoRollup merge of #49244 - varkor:type_dependent_defs_ExprMethodCall, r=estebank
kennytm [Thu, 22 Mar 2018 09:51:41 +0000 (17:51 +0800)]
Rollup merge of #49244 - varkor:type_dependent_defs_ExprMethodCall, r=estebank

Fix type_dependent_defs ICE on method calls

Fixes #49241.

6 years agoRollup merge of #49242 - Mrowqa:typaram-attrs, r=petrochenkov
kennytm [Thu, 22 Mar 2018 09:51:40 +0000 (17:51 +0800)]
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

6 years agoRollup merge of #49234 - kennytm:revert-fix-dpl-788, r=alexcrichton
kennytm [Thu, 22 Mar 2018 09:51:38 +0000 (17:51 +0800)]
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.

6 years agoRollup merge of #49231 - gnzlbg:fix_vec_fminmax, r=rkruppe
kennytm [Thu, 22 Mar 2018 09:51:37 +0000 (17:51 +0800)]
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.

6 years agoRollup merge of #49225 - QuietMisdreavus:all-the-features-all-the-time, r=alexcrichton
kennytm [Thu, 22 Mar 2018 09:51:36 +0000 (17:51 +0800)]
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.

6 years agoRollup merge of #49216 - bjorn3:patch-1, r=estebank
kennytm [Thu, 22 Mar 2018 09:51:35 +0000 (17:51 +0800)]
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

6 years agoRollup merge of #49211 - varkor:chalk-lowering-Implemented-From-Env, r=nikomatsakis
kennytm [Thu, 22 Mar 2018 09:51:34 +0000 (17:51 +0800)]
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

6 years agoRollup merge of #49209 - Zoxc:run-make-last, r=Mark-Simulacrum
kennytm [Thu, 22 Mar 2018 09:51:32 +0000 (17:51 +0800)]
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

6 years agoRollup merge of #49189 - GuillaumeGomez:fix-implied-shortcut-links, r=QuietMisdreavus
kennytm [Thu, 22 Mar 2018 09:51:30 +0000 (17:51 +0800)]
Rollup merge of #49189 - GuillaumeGomez:fix-implied-shortcut-links, r=QuietMisdreavus

Fix automatic urls with backticks

Fixes #49164.

r? @QuietMisdreavus

6 years agoRollup merge of #49188 - memoryleak47:macro_use_doctest, r=QuietMisdreavus
kennytm [Thu, 22 Mar 2018 09:51:29 +0000 (17:51 +0800)]
Rollup merge of #49188 - memoryleak47:macro_use_doctest, r=QuietMisdreavus

Put `#[macro_use] extern crate <crate>` before fn main() in doctests

Closes #49174.

6 years agoRollup merge of #49158 - varkor:compiletest-triples, r=rkruppe
kennytm [Thu, 22 Mar 2018 09:51:27 +0000 (17:51 +0800)]
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

6 years agoRollup merge of #49140 - semarie:rustdoc-test-path, r=alexcrichton
kennytm [Thu, 22 Mar 2018 09:51:26 +0000 (17:51 +0800)]
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`
```

6 years agoRollup merge of #49117 - nivkner:fixme_fixup3, r=estebank
kennytm [Thu, 22 Mar 2018 09:51:25 +0000 (17:51 +0800)]
Rollup merge of #49117 - nivkner:fixme_fixup3, r=estebank

address some FIXME whose associated issues were marked as closed

part of #44366

6 years agoRollup merge of #49109 - SimonSapin:deprecate-asciiext, r=alexcrichton
kennytm [Thu, 22 Mar 2018 09:51:24 +0000 (17:51 +0800)]
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

6 years agoRollup merge of #49093 - Zoxc:speedup, r=aidanhs
kennytm [Thu, 22 Mar 2018 09:51:22 +0000 (17:51 +0800)]
Rollup merge of #49093 - Zoxc:speedup, r=aidanhs

Update submodules in parallel

6 years agoRollup merge of #49069 - wesleywiser:incr_soa, r=michaelwoerister
kennytm [Thu, 22 Mar 2018 09:51:21 +0000 (17:51 +0800)]
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

6 years agoRollup merge of #49029 - GuillaumeGomez:atomic-docs, r=QuietMisdreavus
kennytm [Thu, 22 Mar 2018 09:51:20 +0000 (17:51 +0800)]
Rollup merge of #49029 - GuillaumeGomez:atomic-docs, r=QuietMisdreavus

Make Atomic doc examples specific to each type

Fixes #49018.

r? @QuietMisdreavus

6 years agoRollup merge of #48939 - wesleywiser:incr_query_wf_checking, r=michaelwoerister
kennytm [Thu, 22 Mar 2018 09:51:19 +0000 (17:51 +0800)]
Rollup merge of #48939 - wesleywiser:incr_query_wf_checking, r=michaelwoerister

Querify WF-checking so it can be cached

r? @michaelwoerister

6 years agoRollup merge of #48759 - QuietMisdreavus:simd-feature-docs, r=GuillaumeGomez
kennytm [Thu, 22 Mar 2018 09:51:16 +0000 (17:51 +0800)]
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)

6 years agoRollup merge of #48596 - GuillaumeGomez:invalid-code-block-start, r=QuietMisdreavus
kennytm [Thu, 22 Mar 2018 09:51:15 +0000 (17:51 +0800)]
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

6 years agoRollup merge of #48374 - Aaronepower:master, r=Mark-Simulacrum
kennytm [Thu, 22 Mar 2018 09:51:13 +0000 (17:51 +0800)]
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)

6 years agoAuto merge of #49094 - alexcrichton:print-step-duration, r=kennytm
bors [Thu, 22 Mar 2018 09:46:06 +0000 (09:46 +0000)]
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

6 years agoAuto merge of #49041 - nikomatsakis:issue-46541-impl-trait-hidden-lifetimes, r=cramertj
bors [Thu, 22 Mar 2018 06:56:16 +0000 (06:56 +0000)]
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

6 years agoAuto merge of #49246 - kennytm:download-gcc-stuff-from-https, r=alexcrichton
bors [Thu, 22 Mar 2018 01:54:51 +0000 (01:54 +0000)]
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
```

6 years agoTemporarily disable dist-ing RLS, Rustfmt and Clippy.
kennytm [Thu, 22 Mar 2018 01:02:51 +0000 (09:02 +0800)]
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.

6 years agoadd target_feature items to doc_cfg rustdoc test
QuietMisdreavus [Thu, 22 Mar 2018 00:57:10 +0000 (19:57 -0500)]
add target_feature items to doc_cfg rustdoc test

6 years agoalso fix the Fixed code
Niko Matsakis [Wed, 21 Mar 2018 23:23:29 +0000 (19:23 -0400)]
also fix the Fixed code

6 years agoWIP do not use in-band lifetimes
Niko Matsakis [Wed, 21 Mar 2018 23:22:41 +0000 (19:22 -0400)]
WIP do not use in-band lifetimes

6 years agoNow it compiles
Mrowqa [Wed, 21 Mar 2018 22:11:27 +0000 (23:11 +0100)]
Now it compiles

6 years agoHandle redirects correctly.
kennytm [Wed, 21 Mar 2018 20:07:29 +0000 (04:07 +0800)]
Handle redirects correctly.

6 years agoDownload the GCC artifacts from the HTTP server instead of FTP server.
kennytm [Wed, 21 Mar 2018 18:29:01 +0000 (02:29 +0800)]
Download the GCC artifacts from the HTTP server instead of FTP server.

The former seems much more stable, in case the cache becomes invalidated.

6 years agoMoved test to ui
varkor [Wed, 21 Mar 2018 21:00:38 +0000 (21:00 +0000)]
Moved test to ui

6 years agoupdate stdsimd
QuietMisdreavus [Wed, 21 Mar 2018 20:43:06 +0000 (15:43 -0500)]
update stdsimd

6 years agoWIP tweak example to include feature gate
Niko Matsakis [Wed, 21 Mar 2018 20:31:20 +0000 (16:31 -0400)]
WIP tweak example to include feature gate

6 years agoFix type_dependent_defs ICE on method calls
varkor [Wed, 21 Mar 2018 18:01:51 +0000 (18:01 +0000)]
Fix type_dependent_defs ICE on method calls

6 years agoDeprecate the AsciiExt trait in favor of inherent methods
Simon Sapin [Sat, 17 Mar 2018 11:15:24 +0000 (12:15 +0100)]
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

6 years agoRevert "Apply a fix to travis-ci/dpl#788 manually until dpl 1.9.5 is released."
kennytm [Wed, 21 Mar 2018 14:03:24 +0000 (22:03 +0800)]
Revert "Apply a fix to travis-ci/dpl#788 manually until dpl 1.9.5 is released."

This reverts commit 20e65f11f3bb0538c5676425e74b593676bd0f12.

6 years agoFix test error
bjorn3 [Wed, 21 Mar 2018 13:34:46 +0000 (14:34 +0100)]
Fix test error

6 years agoWIP fix mir-opt-end-region-8
Niko Matsakis [Wed, 21 Mar 2018 13:24:32 +0000 (09:24 -0400)]
WIP fix mir-opt-end-region-8

6 years agowork around fallout from these changes in rustc
Niko Matsakis [Thu, 15 Mar 2018 20:17:27 +0000 (16:17 -0400)]
work around fallout from these changes in rustc

6 years agouse subtyping when we create a closure instead of for upvar types
Niko Matsakis [Thu, 15 Mar 2018 14:49:05 +0000 (10:49 -0400)]
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.

6 years agoreport an error if we see an unexpected lifetime in impl Trait
Niko Matsakis [Thu, 15 Mar 2018 09:10:42 +0000 (05:10 -0400)]
report an error if we see an unexpected lifetime in impl Trait

But leave closure substs alone.

6 years agofix vector fmin/fmax non-fast/fast intrinsics NaN handling
gnzlbg [Wed, 21 Mar 2018 09:32:53 +0000 (10:32 +0100)]
fix vector fmin/fmax non-fast/fast intrinsics NaN handling

6 years agoRevert "remove FIXME(#33435) and remove the spurious failures counter measure"
Niv Kaminer [Wed, 21 Mar 2018 05:25:32 +0000 (07:25 +0200)]
Revert "remove FIXME(#33435) and remove the spurious failures counter measure"

This reverts commit be73a1f963e7830de2dbfbea6b362673ab7e6ded.

6 years agoAuto merge of #49200 - oli-obk:extern_static_metadata, r=michaelwoerister
bors [Wed, 21 Mar 2018 01:06:16 +0000 (01:06 +0000)]
Auto merge of #49200 - oli-obk:extern_static_metadata, r=michaelwoerister

Encode/decode extern statics in metadata and incremental cache

fixes #49153

cc @abonander

r? @michaelwoerister incremental ICE

6 years agowhitelist every target feature for rustdoc
QuietMisdreavus [Wed, 21 Mar 2018 00:36:30 +0000 (19:36 -0500)]
whitelist every target feature for rustdoc

6 years agoAuto merge of #49221 - kennytm:rollup, r=kennytm
bors [Tue, 20 Mar 2018 22:19:50 +0000 (22:19 +0000)]
Auto merge of #49221 - kennytm:rollup, r=kennytm

Rollup of 3 pull requests

- Successful merges: #49182, #49196, #49217
- Failed merges:

6 years agoRollup merge of #49217 - kennytm:fix-dpl-788, r=alexcrichton
kennytm [Tue, 20 Mar 2018 22:18:33 +0000 (06:18 +0800)]
Rollup merge of #49217 - kennytm:fix-dpl-788, r=alexcrichton

Apply temporary fix of travis-ci/dpl#788.

6 years agoRollup merge of #49196 - Phlosioneer:49123-sort-where-conditions, r=QuietMisdreavus
kennytm [Tue, 20 Mar 2018 22:18:32 +0000 (06:18 +0800)]
Rollup merge of #49196 - Phlosioneer:49123-sort-where-conditions, r=QuietMisdreavus

Fix ordering of auto-generated trait bounds in rustdoc output

While the order of the where clauses was deterministic, the
ordering of bounds and lifetimes was not. This made the order flip-
flop randomly when new traits and impls were added to libstd.

This PR makes the ordering of bounds and lifetimes deterministic,
and re-enables the test that was causing the issue.

Fixes #49123

6 years agoRollup merge of #49182 - matklad:update-clap, r=kennytm
kennytm [Tue, 20 Mar 2018 22:18:31 +0000 (06:18 +0800)]
Rollup merge of #49182 - matklad:update-clap, r=kennytm

Update clap

This should fix a regression in Cargo after swithing to clap, when
an external subcommand was not discovered, if its name was close to
a built in command.

bug report: https://github.com/rust-lang/rust/pull/48986#issuecomment-374094440
fix: https://github.com/kbknapp/clap-rs/pull/1215

6 years agoApply a fix to travis-ci/dpl#788 manually until dpl 1.9.5 is released.
kennytm [Tue, 20 Mar 2018 18:59:07 +0000 (02:59 +0800)]
Apply a fix to travis-ci/dpl#788 manually until dpl 1.9.5 is released.

6 years agoPass attributes to hir::TyParam
Mrowqa [Tue, 20 Mar 2018 21:12:31 +0000 (22:12 +0100)]
Pass attributes to hir::TyParam

6 years agorewrite to use a custom folder
Niko Matsakis [Wed, 14 Mar 2018 21:29:09 +0000 (17:29 -0400)]
rewrite to use a custom folder

6 years agoDon't check interpret_interner when accessing a static to fix miri mutable statics
bjorn3 [Tue, 20 Mar 2018 18:21:38 +0000 (19:21 +0100)]
Don't check interpret_interner when accessing a static to fix miri mutable statics

6 years agoAdd unit test for Implemented-From-Env
varkor [Tue, 20 Mar 2018 15:23:54 +0000 (15:23 +0000)]
Add unit test for Implemented-From-Env

6 years agoImplement Rule Implemented-From-Env
varkor [Tue, 20 Mar 2018 15:13:44 +0000 (15:13 +0000)]
Implement 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.

6 years agoImprove comments for Rule Implemented-From-Impl
varkor [Tue, 20 Mar 2018 15:11:26 +0000 (15:11 +0000)]
Improve comments for Rule Implemented-From-Impl

6 years agoRun the `run-make` tests last, so more tests run on Windows when `make` is unavailable
John Kåre Alsaker [Tue, 20 Mar 2018 14:33:22 +0000 (15:33 +0100)]
Run the `run-make` tests last, so more tests run on Windows when `make` is unavailable

6 years agoci: Print out how long each step takes on CI
Alex Crichton [Fri, 16 Mar 2018 19:10:47 +0000 (12:10 -0700)]
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

6 years agoUpdate Cargo to fix regression
Aleksey Kladov [Mon, 19 Mar 2018 18:57:41 +0000 (21:57 +0300)]
Update Cargo to fix regression

This should fix regressions in Cargo after swithing to clap:

* If an external subcommand name was close to built-in one, clap
  errored (fixed by updating clap version)

* External subcomands didn't received their name as a first arg

6 years agoMake compiletest do exact matching on triples
varkor [Mon, 19 Mar 2018 01:36:53 +0000 (01:36 +0000)]
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.

6 years agoAdd more canonicalisations for OS_TABLE and ARCH_TABLE
varkor [Mon, 19 Mar 2018 19:07:13 +0000 (19:07 +0000)]
Add more canonicalisations for OS_TABLE and ARCH_TABLE

6 years agoAuto merge of #49190 - kennytm:rollup, r=kennytm
bors [Tue, 20 Mar 2018 10:18:34 +0000 (10:18 +0000)]
Auto merge of #49190 - kennytm:rollup, r=kennytm

Rollup of 17 pull requests

- Successful merges: #46518, #48810, #48834, #48902, #49004, #49092, #49096, #49099, #49104, #49125, #49139, #49152, #49157, #49161, #49166, #49176, #49184
- Failed merges:

6 years agoEncode/decode extern statics in metadata and incremental cache
Oliver Schneider [Tue, 20 Mar 2018 09:36:45 +0000 (10:36 +0100)]
Encode/decode extern statics in metadata and incremental cache

6 years agoAuto merge of #48516 - petrochenkov:stabsl, r=nikomatsakis
bors [Tue, 20 Mar 2018 07:42:19 +0000 (07:42 +0000)]
Auto merge of #48516 - petrochenkov:stabsl, r=nikomatsakis

Stabilize slice patterns without `..`

And merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`.

The detailed description can be found in https://github.com/rust-lang/rust/issues/48836.

Slice patterns were unstable for long time since before 1.0 due to many bugs in the implementation, now this stabilization is possible primarily due to work of @arielb1 who [wrote the new MIR-based implementation of slice patterns](https://github.com/rust-lang/rust/pull/32202) and @mikhail-m1 who [fixed one remaining class of codegen issues](https://github.com/rust-lang/rust/pull/47926).

Reference PR https://github.com/rust-lang-nursery/reference/pull/259
cc https://github.com/rust-lang/rust/issues/23121
fixes #48836

6 years agoFix tidy trailing whitespace
Phlosioneer [Tue, 20 Mar 2018 05:02:15 +0000 (01:02 -0400)]
Fix tidy trailing whitespace

6 years agoFix ordering of auto-generated trait bounds in rustdoc output
Phlosioneer [Tue, 20 Mar 2018 03:35:23 +0000 (23:35 -0400)]
Fix ordering of auto-generated trait bounds in rustdoc output

While the order of the where clauses was deterministic, the
ordering of bounds and lifetimes was not. This made the order flip-
flop randomly when new traits and impls were added to libstd.

This PR makes the ordering of bounds and lifetimes deterministic,
and re-enables the test that was causing the issue.

Fixes #49123

6 years agoRollup merge of #49184 - bdrewery:update-beta-freebsd, r=alexcrichton
kennytm [Mon, 19 Mar 2018 23:15:34 +0000 (07:15 +0800)]
Rollup merge of #49184 - bdrewery:update-beta-freebsd, r=alexcrichton

Update beta to version with fixed FreeBSD support from #49023.

Fixes #42681

r? @alexcrichton

6 years agoRollup merge of #49176 - matthiaskrgr:config_example_rm_thinlto, r=alexcrichton
kennytm [Mon, 19 Mar 2018 23:15:33 +0000 (07:15 +0800)]
Rollup merge of #49176 - matthiaskrgr:config_example_rm_thinlto, r=alexcrichton

config.toml.example: thinlto bootstrap was removed

 It was removed in ff227c4a2d8a2fad5abf322f6f1391ae6779197f so remove the option that no longer works (we did not notice because it was commented out by default).

6 years agoRollup merge of #49166 - dileepbapat:pr-49133, r=nikomatsakis
kennytm [Mon, 19 Mar 2018 23:15:32 +0000 (07:15 +0800)]
Rollup merge of #49166 - dileepbapat:pr-49133, r=nikomatsakis

#49133 - Reworded the Error message: "`pub` not needed here" message

6 years agoRollup merge of #49161 - rust-lang:SimonSapin-patch-1, r=KodrAus
kennytm [Mon, 19 Mar 2018 23:15:30 +0000 (07:15 +0800)]
Rollup merge of #49161 - rust-lang:SimonSapin-patch-1, r=KodrAus

Docs: fix incorrect copy-paste for new `X?` in formatting strings

6 years agoRollup merge of #49157 - estebank:const-into, r=oli-obk
kennytm [Mon, 19 Mar 2018 23:15:29 +0000 (07:15 +0800)]
Rollup merge of #49157 - estebank:const-into, r=oli-obk

Do not suggest `.into()` in `const`s

Fix #49100.

6 years agoRollup merge of #49152 - GuillaumeGomez:rustdoc-event-handling, r=QuietMisdreavus
kennytm [Mon, 19 Mar 2018 23:15:28 +0000 (07:15 +0800)]
Rollup merge of #49152 - GuillaumeGomez:rustdoc-event-handling, r=QuietMisdreavus

Fix events handling in rustdoc

Fixes #49075.

6 years agoConvert SerializedDepGraph to be a struct-of-arrays
Wesley Wiser [Thu, 15 Mar 2018 22:56:20 +0000 (18:56 -0400)]
Convert SerializedDepGraph to be a struct-of-arrays

Fixes #47326

6 years agoStabilize slice patterns without `..`
Vadim Petrochenkov [Sat, 24 Feb 2018 19:21:33 +0000 (22:21 +0300)]
Stabilize slice patterns without `..`

Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`

6 years agoRollup merge of #49139 - sfackler:bufreader-buffer, r=SimonSapin
kennytm [Mon, 19 Mar 2018 23:15:25 +0000 (07:15 +0800)]
Rollup merge of #49139 - sfackler:bufreader-buffer, r=SimonSapin

Add BufReader::buffer

This subsumes the need for an explicit is_empty function, and provides
access to the buffered data itself which has been requested from time to
time.

We could call this `buf` to match `fill_buf`, but I think I'd prefer `fill_buffer` anyways in hindsight.

6 years agoRollup merge of #49125 - NovemberZulu:master, r=alexcrichton
kennytm [Mon, 19 Mar 2018 23:15:24 +0000 (07:15 +0800)]
Rollup merge of #49125 - NovemberZulu:master, r=alexcrichton

rustbuild: Ship libsynchronization

Hot on the heels of #49044 comes similar issue with libsynchronization. Discovered while building clippy:
```
<skipped>
Compiling serde_derive v1.0.33
error: linking with `gcc` failed: exit code: 1
<skipped>
  = note: ld: cannot find -lsynchronization
```

r? @nikomatsakis

6 years agoRollup merge of #49104 - csmoe:semicolon_error, r=petrochenkov
kennytm [Mon, 19 Mar 2018 23:15:23 +0000 (07:15 +0800)]
Rollup merge of #49104 - csmoe:semicolon_error, r=petrochenkov

improve error message of inner attribute syntax

Fixes #49040

6 years agoRollup merge of #49099 - glandium:master, r=sfackler
kennytm [Mon, 19 Mar 2018 23:15:22 +0000 (07:15 +0800)]
Rollup merge of #49099 - glandium:master, r=sfackler

Use associated consts for GenericRadix base and prefix

The trait being private, this does not imply an API change.

6 years agoRollup merge of #49096 - alanhdu:master, r=alexcrichton
kennytm [Mon, 19 Mar 2018 23:15:20 +0000 (07:15 +0800)]
Rollup merge of #49096 - alanhdu:master, r=alexcrichton

Update rustfmt to 0.4.1

6 years agoRollup merge of #49092 - mark-i-m:deptrack_readme, r=nikomatsakis
kennytm [Mon, 19 Mar 2018 23:15:19 +0000 (07:15 +0800)]
Rollup merge of #49092 - mark-i-m:deptrack_readme, r=nikomatsakis

Replace many of the last references to readmes

In particular, this removes the dep track readme, so it should not be merged before https://github.com/rust-lang-nursery/rustc-guide/pull/92

Fix #47935

cc #48478

r? @nikomatsakis

6 years agoRollup merge of #49004 - wesleywiser:incr_specialization_graph_query, r=michaelwoerister
kennytm [Mon, 19 Mar 2018 23:15:18 +0000 (07:15 +0800)]
Rollup merge of #49004 - wesleywiser:incr_specialization_graph_query, r=michaelwoerister

Cache the specialization_graph query

Fixes #48987

r? @michaelwoerister

6 years agoRollup merge of #48902 - csmoe:refactor_BorrowckErrors_fn_self, r=nikomatsakis
kennytm [Mon, 19 Mar 2018 23:15:16 +0000 (07:15 +0800)]
Rollup merge of #48902 - csmoe:refactor_BorrowckErrors_fn_self, r=nikomatsakis

refactor the `BorrowckErrors` trait to take `fn(self)`

Fixes #48783

6 years agoRollup merge of #48834 - ysiraichi:suggest-remove-ref, r=estebank
kennytm [Mon, 19 Mar 2018 23:15:15 +0000 (07:15 +0800)]
Rollup merge of #48834 - ysiraichi:suggest-remove-ref, r=estebank

Suggest removing `&`s

This implements the error message discussed in #47744.
We check whether removing each `&` yields a type that satisfies the requested obligation.
Also, it was created a new `NodeId` field in `ObligationCause` in order to iterate through the `&`s. The way it's implemented now, it iterates through the obligation snippet and counts the number of `&`.

r? @estebank

6 years agoRollup merge of #48810 - Phlosioneer:32463-impl-integer-for-wrapping, r=dtolnay
kennytm [Mon, 19 Mar 2018 23:15:14 +0000 (07:15 +0800)]
Rollup merge of #48810 - Phlosioneer:32463-impl-integer-for-wrapping, r=dtolnay

Implement Integer methods for Wrapping

Wrapping<T> now implements:

count_ones, count_zeros, leading_zeros,
trailing_zeros, rotate_left, rotate_right, swap_bytes, from_be,
from_le, to_be, to_le, and pow

where T is:

u8, u16, u32, u64, usize, i8, i16, i32, i64, or isize.

Docs were written for all these methods, as well as examples. The
examples mirror the ones on u8, u16, etc... for consistency.

Closes #32463

6 years agoRollup merge of #46518 - partim:asref-borrow-doc, r=dtolnay
kennytm [Mon, 19 Mar 2018 23:15:12 +0000 (07:15 +0800)]
Rollup merge of #46518 - partim:asref-borrow-doc, r=dtolnay

Improve documentation for Borrow

This is the first step in improving the documentation for all the reference conversion traits. It proposes new text for the trait documentation of `Borrow`. Since I feel it is a somewhat radical rewrite and includes a stricter contract for `Borrow` then the previous text—namely that *all* shared traits need to behave the same, not just a select few—, I wanted to get some feedback before continuing.

Apart from the ‘normative’ description, the new text also includes a fairly extensive explanation of how the trait is used in the examples section. I included it because every time I look at how `HashMap` uses the trait, I need to think for a while as the use is a bit twisted. So, I thought having this thinking written down as part of the trait itself might be useful. One could argue that this should go into The Book, and, while I really like having everything important in the docs, I can see the text moved there, too.

So, before I move on: is this new text any good? Do we feel it is correct, useful, comprehensive, and understandable?

(This PR is in response to #44868 and #24140.)

6 years agoAuto merge of #49058 - withoutboats:pin, r=cramertj
bors [Mon, 19 Mar 2018 23:01:37 +0000 (23:01 +0000)]
Auto merge of #49058 - withoutboats:pin, r=cramertj

Pin, Unpin, PinBox

Implementing rust-lang/rfcs#2349 (do not merge until RFC is merged)

@bors r? @cramertj

6 years agoOkay this is the right way.
boats [Mon, 19 Mar 2018 22:48:48 +0000 (15:48 -0700)]
Okay this is the right way.

6 years agoPut `#[macro_use] extern crate <crate>` before fn main() in doctests
memoryleak47 [Mon, 19 Mar 2018 22:48:02 +0000 (23:48 +0100)]
Put `#[macro_use] extern crate <crate>` before fn main() in doctests

6 years agoComment out entire test.
boats [Mon, 19 Mar 2018 22:34:11 +0000 (15:34 -0700)]
Comment out entire test.

6 years agoFix automatic urls with backticks
Guillaume Gomez [Mon, 19 Mar 2018 22:25:55 +0000 (23:25 +0100)]
Fix automatic urls with backticks

6 years agoMake Atomic doc examples specific to each type
Guillaume Gomez [Wed, 14 Mar 2018 18:41:22 +0000 (19:41 +0100)]
Make Atomic doc examples specific to each type

6 years agoIgnore properly.
boats [Mon, 19 Mar 2018 20:15:15 +0000 (13:15 -0700)]
Ignore properly.