Commit Graph

90393 Commits

Author SHA1 Message Date
Simon Sapin
95d2795907 Stabilize iter::successors
FCP: https://github.com/rust-lang/rust/issues/58045#issuecomment-464674773
2019-02-19 13:58:55 +01:00
Ralf Jung
4059889539 improve Pin documentation 2019-02-19 13:24:17 +01:00
Guillaume Gomez
31ee20db3e Add missing fmt structs examples 2019-02-19 11:20:00 +01:00
Guillaume Gomez
b53305df7f Fix tables display 2019-02-19 11:07:16 +01: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
kenta7777
94b6bf240a reduced some code repetitions. 2019-02-19 16:23:03 +09:00
Benjamin Peterson
b96d6fb4b3 Fix a transposition in driver.rs. 2019-02-18 17:33:52 -08: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
Thomas Eizinger
75c541f228 Fix typo in std::future::Future docs 2019-02-19 09:36:41 +11:00
Dan Robertson
f8b6449f80
Fix style nits
Fix style nits discovered in reading code.
2019-02-18 22:22:19 +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
Andre Bogus
64c915e3ad override VecDeque::try_rfold, also update iterator
This keeps the slice based iteration and updates the iterator
state after each slice. It also uses a loop to reduce the amount
of code.

This uses unsafe code, so some thorough review would be
appreciated.
2019-02-18 22:30:51 +01:00
Clint Frederickson
de0554805c re-blessing error output: ./x.py test src/test/ui --stage 1 --bless 2019-02-18 12:33:33 -07:00
Aaron Stillwell
c9fbcc1f39 Fixed doc example for Path::with_capacity 2019-02-18 17:42:07 +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
Scott McMurray
9312ca10b6 Add a note about 2018e if someone uses try { in 2015e 2019-02-17 23:55:45 -08:00
Scott McMurray
3bea2ca49d Use more impl header lifetime elision
There are two big categories of changes in here

- Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`)
- Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`)

I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2019-02-17 19:42:36 -08: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
Stein Somers
01bebdf193 Merge remote-tracking branch 'upstream/master' 2019-02-18 00:31:41 +01:00
Nicholas Nethercote
895a79423b Remove some unnecessary into() calls.
These are probably leftovers from recent `TokenStream` simplifications.
2019-02-18 10:17:59 +11:00
Stein Somers
0b9ad6e6fd Explain a panic in test case net::tcp::tests::double_bind 2019-02-18 00:13:31 +01:00
Nicholas Nethercote
82ad4f1f45 Make interpolated_to_tokenstream a method on Nonterminal. 2019-02-18 10:06:26 +11:00
Nicholas Nethercote
f0d8fbd283 Avoid a clone() in transcribe().
The current code (expensively) clones the value within an `Rc`. This
commit changes things so that the `Rc` itself is (cheaply) cloned
instead, avoid some allocations.

This requires converting a few `Rc` instances to `Lrc`.
2019-02-18 09:46:33 +11:00
Nicholas Nethercote
f8801f3bf6 Remove LazyTokenStream.
It's present within `Token::Interpolated` as an optimization, so that if
a nonterminal is converted to a `TokenStream` multiple times, the
first-computed value is saved and reused.

But in practice it's not needed. `interpolated_to_tokenstream()` is a
cold function: it's only called a few dozen times while compiling rustc
itself, and a few hundred times across the entire `rustc-perf` suite.
Furthermore, when it is called, it is almost always the first
conversion, so no benefit is gained from it.

So this commit removes `LazyTokenStream`, along with the now-unnecessary
`Token::interpolated()`.

As well as a significant simplification, the removal speeds things up
slightly, mostly due to not having to `drop` the `LazyTokenStream`
instances.
2019-02-18 09:46:33 +11:00
Nicholas Nethercote
d26bf742db Change Token::interpolated_to_tokenstream().
It is currently a method of `Token`, but it only is valid to call if
`self` is a `Token::Interpolated`. This commit eliminates the
possibility of misuse by changing it to an associated function that
takes a `Nonterminal`, which also simplifies the call sites.

This requires splitting out a new function, `nonterminal_to_string`.
2019-02-18 09:38:34 +11:00
Simon Sapin
cf267540eb Review comments 2019-02-17 21:30:38 +01:00
Guy Taylor
88e462bf7f Add links to codegen docs for rustc synonym flags
The rustc "-g" and "-o" fags are synonyms of the "-c" codegen flags.
This adds a link to the codegen docs for each synonym.
2019-02-17 19:45:13 +00:00
Guy Taylor
55c25f8c8d Fix doc for rustc "-g" flag
The rustc "-g" CLI flag was miss documented to be a synonym of "-C
debug-level=2" and not the correct "-C debuginfo=2".
2019-02-17 19:44:45 +00:00
Taiki Endo
1b7ca961d9 librustc_codegen_llvm => 2018 2019-02-18 03:58:58 +09:00
emlai
ee948d9981 Add regression test for a specialization-related ICE (#39448) 2019-02-17 20:41:18 +02:00
Jonas Schievink
1a0d800ef6 Bump the bootstrap compiler 2019-02-17 18:14:32 +01:00
Aaron Stillwell
35d8c4400d Changed feature gate for new PathBuf methods
Feature gate changed to `path_buf_capacity` as per advice from @Mark-Simulacrum
2019-02-17 17:14:10 +00:00
Aaron Stillwell
dbf60d9ca1 Fixes for implementation of PathBuf methods (aliases for OsString)
- Fixed incorrect `mut` usage
- Fixed style in accordance with tidy
- Marked all methods as unstable
- Changed feature identifier to path_buf_alias_os_string_methods
2019-02-17 16:41:05 +00: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
Aaron Stillwell
a23c40ec94 Add alias methods to PathBuf for underlying OsString
Implemented the following methods on PathBuf which
forward to the underlying OsString.

- capacity
- with_capacity
- clear
- reserve
- reserve_exact
- shrink_to_fit
- shrink_to
2019-02-17 15:17:46 +00: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
Konrad Borowski
0cf1a912e3 Remove UB in test_ptr_subtraction test 2019-02-17 13:04:48 +01:00
Konrad Borowski
3281e62188 Remove UB in test_is_null test 2019-02-17 12:58:48 +01:00
Dale Wijnand
8fbb013c1c
Mention capping forbid lints
I felt the description of forbid was misleading/incomplete without
mentioning how --cap-lints interacts with it.
2019-02-17 10:24:25 +00:00