Commit Graph

89876 Commits

Author SHA1 Message Date
kennytm
120e9cb70f
Rollup merge of #58303 - GuillaumeGomez:stability-tags-display, r=QuietMisdreavus
Improve stability tags display

The issue was the font color on dark theme. Fixed now:

<img width="352" alt="screenshot 2019-02-08 at 14 15 24" src="https://user-images.githubusercontent.com/3050060/52483276-bd810380-2bb3-11e9-8d46-95368569ac85.png">

r? @QuietMisdreavus
2019-02-20 11:58:11 +08:00
kennytm
5a06eab1f5
Rollup merge of #56470 - llogiq:process-termination-doctest, r=GuillaumeGomez
Modify doctest's auto-`fn main()` to allow `Result`s

This lets the default `fn main()` ~~return `impl Termination`~~ unwrap Results, which allows the use of `?` in most tests without adding it manually. This fixes #56260

~~Blocked on `std::process::Termination` stabilization.~~

Using `Termination` would have been cleaner, but this should work OK.
2019-02-20 01:13:12 +08:00
bors
4d66b7b76d Auto merge of #58571 - Manishearth:rustup, r=Manishearth
Update clippy, RLS, and rustfmt

moved from https://github.com/rust-lang/rust/pull/58337
2019-02-19 10:06:55 +00:00
Manish Goregaokar
cd99bd3a3d Update clippy to rust-lang/rust-clippy@d61b25419b 2019-02-19 13:36:31 +05:30
bors
fcccf06fc9 Auto merge of #56514 - ollie27:rustdoc_test_libdir, r=QuietMisdreavus
rustdoc: Don't modify library path for doctests

It shouldn't be needed anymore because doctests are no longer compiled with `prefer-dynamic` (since #54939).

r? @QuietMisdreavus
2019-02-19 07:27:39 +00:00
bors
32471f7ea4 Auto merge of #58503 - varkor:const-generics-hir, r=petrochenkov
Add const generics to the HIR

Split out from https://github.com/rust-lang/rust/pull/53645.

cc @yodaldevoid

r? @eddyb
2019-02-19 00:46:12 +00:00
bors
c61b92beaa Auto merge of #58543 - jonas-schievink:bumpstrap, r=pietroalbini
Bump the bootstrap compiler

This compiler includes https://github.com/rust-lang/rust/pull/58501, which fixes an annoying ICE while working on rustc itself.

r? @pietroalbini
2019-02-18 22:03:41 +00:00
bors
146aa60f34 Auto merge of #58549 - pietroalbini:fix-docker-ci-hash, r=Mark-Simulacrum
ci: fix docker cache hash collision

#58416 uncovered a bug in our caching for docker images: if the image `foo` pulls files from the image `bar` and a file in `bar` changed, the hash of `foo` will be the same even though it should be different. In that PR's case, `dist-i686-linux` pulls scripts from `dist-x86_64-linux`, and the PR only changed those scripts, causing an hash collision for `dist-i686-linux`.

We have to fix this, since the image will be rebuilt every time bors switches from testing master to testing beta/stable (and when it switches back), making CI way more painful than it currently is.

The approach used by this PR is to just include all the files in `src/ci/docker` in the hash. It's a bit heavy-handed and it will cause a rebuild of all the images every time a single image changes, but it's the best I can think of.

r? @Mark-Simulacrum
cc @alexcrichton @kennytm
2019-02-18 17:34:14 +00:00
Pietro Albini
2b2045d161
ci: fix docker cache hash collision
Before this commit the hash used to cache docker images was calculated
from the image's files and the files in the scripts/ directory. This
worked fine when all the files used by an image were in those
directories, but some images pull files from other images, causing hash
collisions in some cases.

This commit changes the hash to include the files of all the docker
images, causing a rebuild of all the images when a single one changes.
That's a bit heavy-handed, but we have no way to track which files an
image pulls in and hash collisions are really painful to deal with.
2019-02-18 15:28:10 +01:00
flip1995
4c228cc9b8
Update Cargo.lock 2019-02-18 10:32:58 +01:00
flip1995
4f96a03ab3
Add constant_time_eq to license exception list of tidy tool 2019-02-18 10:32:00 +01:00
flip1995
919b3f9da3
Update Cargo.toml of rustc-workspace-hack 2019-02-18 10:31:59 +01:00
flip1995
5f483570a0
Update rustfmt to rust-lang/rustfmt@d6829d 2019-02-18 10:31:59 +01:00
flip1995
ed17700018
Update RLS to rust-lang/rls@0d6f53 2019-02-18 10:31:59 +01:00
flip1995
af38382dec
Update Clippy to rust-lang/rust-clippy@32ee30 2019-02-18 10:31:59 +01:00
bors
684b09ba7f Auto merge of #58541 - kennytm:fix-publish-toolstate-py-again, r=oli-obk
publish_toolstate.py: further fix the runtime errors

The regex was missing a `,`, causing `relevant_pr_match` to become None and set the PR number to -1 and assigned the new issue to `@<unknown user>`. This causes the 422 error when creating the issue due to invalid assignee and unable to leave the tool-is-broken comment since PR -1 does not exist.

The default user names are now also changed to @ghost to prevent the 422 error in case anything goes wrong again.
2019-02-18 08:37:18 +00:00
bors
d215d9591f Auto merge of #58373 - RalfJung:maybe-uninit, r=gnzlbg
update stdsimd and remove now-unused MaybeUninit::into_inner

That's a huge diff for stdsimd... Cc @gnzlbg @alexcrichton
2019-02-18 02:56:18 +00:00
Jonas Schievink
1a0d800ef6 Bump the bootstrap compiler 2019-02-17 18:14:32 +01:00
Andre Bogus
dad211ef9f Modify doctest's auto-fn main() to allow Results
This lets the default `fn main()` unwrap any `Result`s, which
allows the use of `?` in most tests without adding it manually.
2019-02-17 16:42:49 +01:00
kennytm
66ae3131fc
publish_toolstate.py: further fix the runtime errors
The regex was missing a `,`, causing `relevant_pr_match` to become None
and set the PR number to -1 and assigned the new issue to
`@<unknown user>`. This causes the 422 error when creating the issue due
to invalid assignee and unable to leave the tool-is-broken comment since
PR -1 does not exist.

The default user names are now also changed to @ghost to prevent the
422 error in case anything goes wrong again.
2019-02-17 23:39:50 +08:00
bors
9a3392e174 Auto merge of #58416 - cuviper:dist-linux-gcc, r=alexcrichton
[CI] Update GCC in the dist-linux builders

Upstream LLVM is planning to raise their minimum toolchain requirements, so they may start using C++14 features. This new policy has already landed in the form of a "soft" error.
http://lists.llvm.org/pipermail/llvm-dev/2019-February/130117.html

For GCC, they will require at least version 5.1. This PR moves our crosstool-ng builders to their max GCC 5.2, with a few small patches to fix compatibility. The dist-x86_64-linux builder is updated to GCC 5.5 and LLVM/Clang 8.0.0-rc2, which also affects dist-i686-linux sharing the same scripts.

r? @alexcrichton
2019-02-17 14:29:33 +00:00
Ralf Jung
aba0d29320 update stdsimd 2019-02-17 11:22:04 +01:00
bors
8af675a075 Auto merge of #58495 - kennytm:rollup, r=kennytm
Rollup of 19 pull requests

Successful merges:

 - #57929 (Rustdoc remove old style files)
 - #57981 (Fix #57730)
 - #58074 (Stabilize slice_sort_by_cached_key)
 - #58196 (Add specific feature gate error for const-unstable features)
 - #58293 (Remove code for updating copyright years in generate-deriving-span-tests)
 - #58306 (Don't default on std crate when manipulating browser history)
 - #58359 (librustc_mir: use ? in impl_snapshot_for! macro)
 - #58395 (Instant::checked_duration_since)
 - #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr)
 - #58433 (Update which libcore/liballoc tests Miri ignores, and document why)
 - #58438 (Use posix_spawn_file_actions_addchdir_np when possible)
 - #58440 (Whitelist the ARM v6 target-feature)
 - #58448 (rustdoc: mask `compiler_builtins` docs)
 - #58468 (split MaybeUninit into several features, expand docs a bit)
 - #58479 (compile-pass test for #53606)
 - #58489 (Fix runtime error in generate-keyword-tests)
 - #58496 (Fix documentation for std::path::PathBuf::pop)
 - #58509 (Notify myself when Clippy toolstate changes)
 - #58521 (Fix tracking issue for error iterators)
2019-02-17 07:34:48 +00:00
kennytm
c65a82ab4e
Rollup merge of #58521 - sfackler:error-iter-issue, r=withoutboats
Fix tracking issue for error iterators
2019-02-17 14:54:00 +08:00
kennytm
4fcee62736
Rollup merge of #58509 - phansch:add_myself_to_clippy_toolstate_maintainers, r=oli-obk
Notify myself when Clippy toolstate changes
2019-02-17 14:52:25 +08:00
kennytm
98f1865718
Rollup merge of #58496 - nathan:doc-std-path-pathbuf-pop, r=frewsxcv
Fix documentation for std::path::PathBuf::pop

Closes #58474.
2019-02-17 14:52:24 +08:00
kennytm
17b07f99e8
Rollup merge of #58395 - vi:checked_duration_since, r=dtolnay
Instant::checked_duration_since
2019-02-17 14:52:23 +08:00
kennytm
f8ccdeb0d4
Rollup merge of #57929 - GuillaumeGomez:rustodc-remove-old-style-files, r=ollie27
Rustdoc remove old style files

Reopening of #56577 (which I can't seem to reopen...).

I made the flag unstable so with this change, what was blocking the PR is now gone I assume.
2019-02-17 14:52:21 +08:00
kennytm
4739cd8fea
Rollup merge of #58489 - xfix:fix-keyword-tests-runtime-error, r=alexcrichton
Fix runtime error in generate-keyword-tests

The script was made unusable after removing license headers.
2019-02-17 14:52:20 +08:00
kennytm
cfa6a702cf
Rollup merge of #58479 - saleemjaffer:test_promote_evaluation_unused_result, r=oli-obk
compile-pass test for #53606

fixes #53606
2019-02-17 14:52:18 +08:00
bors
6982acd867 Auto merge of #58477 - rust-lang:fix-publish-toolstate-syntax-error, r=oli-obk
Fix the syntax error in publish_toolstate.py
2019-02-17 04:57:50 +00:00
Steven Fackler
3ba6177515 Fix tracking issue for error iterators 2019-02-16 12:16:18 -08:00
varkor
727e20410c Add a test for const parameter uppercase lint 2019-02-16 13:04:15 +00:00
varkor
425fb58cac Don't abort early when collecting const generics 2019-02-16 13:03:58 +00:00
varkor
2a1b6c52d3 Check for Const param in collect 2019-02-16 13:03:30 +00:00
Philipp Hansch
d6a98f4b3a
Notify myself when Clippy toolstate changes 2019-02-16 11:59:25 +01:00
kennytm
9a2437c0dc
Rollup merge of #58468 - RalfJung:maybe-uninit-split, r=Centril
split MaybeUninit into several features, expand docs a bit

This splits the `maybe_uninit` feature gate into several:

* `maybe_uninit` for what we will hopefully stabilize soon-ish.
* `maybe_uninit_ref` for creating references into `MaybeUninit`, for which the rules are not yet clear.
* `maybe_uninit_slice` for handling slices of `MaybeUninit`, which needs more API design work.
* `maybe_uninit_array` for creating arrays of `MaybeUninit` using a macro (because we don't have https://github.com/rust-lang/rust/issues/49147 yet).

Is that an okay thing to do? The goal is to help people avoid APIs we do not want to stabilize yet. I used this to make sure rustc itself does not use `get_ref` and `get_mut`.

I also extended the docs to advise against uninitialized integers -- again this is something for which the rules are still being discussed.
2019-02-16 14:11:55 +08:00
kennytm
762b988a0a
Rollup merge of #58448 - euclio:missing-summaries, r=QuietMisdreavus
rustdoc: mask `compiler_builtins` docs

Fixes #46783.

I wasn't able to fully confirm the underlying cause, but my theory is that functions in `compiler_builtins` were overwriting functions with the same names in libcore in the search index. Since the functions in `compiler_builtins` didn't have docs, that's why they weren't appearing in the results.

Masking the `compiler_builtins` crate fixes the search results. It appears that this crate was accidentally unmasked in #49503.
2019-02-16 14:11:52 +08:00
kennytm
30019ed413
Rollup merge of #58440 - gnzlbg:v6, r=japaric
Whitelist the ARM v6 target-feature
2019-02-16 14:11:50 +08:00
kennytm
50f3c81c0e
Rollup merge of #58438 - cuviper:posix_spawn_file_actions_addchdir_np, r=alexcrichton
Use posix_spawn_file_actions_addchdir_np when possible

This is a non-POSIX extension implemented in Solaris and in glibc 2.29.
With this we can still use `posix_spawn()` when `Command::current_dir()`
has been set, otherwise we fallback to `fork(); chdir(); exec()`.
2019-02-16 14:11:47 +08:00
kennytm
0fecb6d97d
Rollup merge of #58433 - RalfJung:miri-mark-tests, r=TimNN
Update which libcore/liballoc tests Miri ignores, and document why
2019-02-16 14:11:44 +08:00
kennytm
13b055d5db
Rollup merge of #58429 - RalfJung:box, r=TimNN
fix Box::into_unique effecitvely transmuting to a raw ptr

Miri/Stacked Borrows treat `Box` specially: they assert that it is unique, and tag it appropriately. However, currently, `Box::into_inner` is not aware of that and returns a raw pointer (wrapped in a `Unique`) that carries the same tag as the box, meaning it carries a `Uniq` tag. This leads to all sorts of problems when people use the raw pointer they get out of the `Unique` type.

In the future, it'd be interesting to make `Unique` also carry some kind of uniqueness. In that case, something like this would instead be needed whenever a raw pointer is extracted from a `Unique`. However, that is out-of-scope for the current version of Stacked Borrows. So until then, this changes `into_unique` to perform a proper reference-to-raw-ptr-cast, which clears the tag.
2019-02-16 14:11:41 +08:00
kennytm
092d191965
Rollup merge of #58359 - taiki-e:impl_snapshot_for, r=oli-obk
librustc_mir: use ? in impl_snapshot_for! macro
2019-02-16 14:11:38 +08:00
kennytm
9a3e22e32f
Rollup merge of #58306 - GuillaumeGomez:crate-browser-history, r=QuietMisdreavus
Don't default on std crate when manipulating browser history

Fixes #58263.

r? @QuietMisdreavus
2019-02-16 14:11:35 +08:00
kennytm
9472f0cf6b
Rollup merge of #58293 - xfix:patch-16, r=Mark-Simulacrum
Remove code for updating copyright years in generate-deriving-span-tests

It's no longer necessary, as there is no license header anymore.
2019-02-16 14:11:33 +08:00
kennytm
49107c3398
Rollup merge of #58196 - varkor:const-fn-feature-gate-error, r=oli-obk
Add specific feature gate error for const-unstable features

Before:
```
error: `impl Trait` in const fn is unstable
 --> src/lib.rs:7:19
  |
7 | const fn foo() -> impl T {
  |                   ^^^^^^

error: aborting due to previous error
```

After:
```
error[E0723]: `impl Trait` in const fn is unstable (see issue #57563)
 --> src/lib.rs:7:19
  |
7 | const fn foo() -> impl T {
  |                   ^^^^^^
  = help: add #![feature(const_fn)] to the crate attributes to enable

error: aborting due to previous error
```

This improves the situation with https://github.com/rust-lang/rust/issues/57563. Fixes https://github.com/rust-lang/rust/issues/57544. Fixes https://github.com/rust-lang/rust/issues/54469.

r? @oli-obk
2019-02-16 14:11:30 +08:00
kennytm
f05e6bf708
Rollup merge of #58074 - scottmcm:stabilize-sort_by_cached_key, r=SimonSapin
Stabilize slice_sort_by_cached_key

I was going to ask on the tracking issue (https://github.com/rust-lang/rust/issues/34447), but decided to just send this and hope for an FCP here.  The method was added last March by https://github.com/rust-lang/rust/pull/48639.

Signature: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_by_cached_key
```rust
impl [T] {
    pub fn sort_by_cached_key<K, F>(&mut self, f: F)
        where F: FnMut(&T) -> K, K: Ord;
}
```

That's an identical signature to the existing `sort_by_key`, so I think the questions are just naming, implementation, and the usual "do we want this?".

The implementation seems to have proven its use in rustc at least, which many uses: https://github.com/rust-lang/rust/search?l=Rust&q=sort_by_cached_key

(I'm asking because it's exactly what I just needed the other day:
```rust
    all_positions.sort_by_cached_key(|&n|
        data::CITIES.iter()
            .map(|x| *metric_closure.get_edge(n, x.pos).unwrap())
            .sum::<usize>()
    );
```
since caching that key is a pretty obviously good idea.)

Closes #34447
2019-02-16 14:11:28 +08:00
kennytm
84e88da431
Rollup merge of #57981 - Zoxc:fix-57979, r=nikomatsakis
Fix #57730

cc https://github.com/rust-lang/rust/pull/57730

r? @cramertj
2019-02-16 14:11:20 +08:00
varkor
18ce997e51 Fix rebase issue 2019-02-15 23:34:04 +00:00
varkor
9cfdb80085 Update tests
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15 22:29:24 +00:00