Commit Graph

90124 Commits

Author SHA1 Message Date
Ralf Jung
2c6981a315 improve linked list -> drop transition 2019-02-19 21:23:53 +01:00
Ralf Jung
11e48ebb29 please the mericless tidy, oh tidy 2019-02-19 21:18:56 +01:00
Ralf Jung
c8f4efc006 mention interaction with Deref in intro 2019-02-19 21:12:48 +01:00
Ralf Jung
c774bc650a examples 2019-02-19 20:54:31 +01:00
Ralf Jung
3040380206 rewrite pin module intro 2019-02-19 20:50:16 +01:00
Ralf Jung
0ba99f62d1 more work on projections and RefCell example 2019-02-19 20:26:42 +01:00
Ralf Jung
442c486736 separate section for doubly-linked list, reword projections intro 2019-02-19 20:17:20 +01:00
Ralf Jung
a8111b7d30
Apply suggestions from code review
Co-Authored-By: RalfJung <post@ralfj.de>
2019-02-19 19:50:43 +01:00
Ralf Jung
a8d18b9560 apply some of the feedback 2019-02-19 19:46:33 +01: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
74e35d2700 Auto merge of #57896 - oli-obk:permissive_existence, r=cramertj
Be more permissive with required bounds on existential types

fixes  #54184

r? @pnkfelix
2019-02-19 15:30:38 +00:00
Simon Sapin
3906cb9187 Stabilize iter::from_fn
FCP: https://github.com/rust-lang/rust/issues/55977#issuecomment-463964234
2019-02-19 14:10:07 +01:00
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
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