]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #58669 - Centril:rollup, r=Centril
bors [Sat, 23 Feb 2019 14:14:04 +0000 (14:14 +0000)]
Auto merge of #58669 - Centril:rollup, r=Centril

Rollup of 16 pull requests

Successful merges:

 - #58100 (Transition librustdoc to Rust 2018)
 - #58122 (RangeInclusive internal iteration performance improvement.)
 - #58199 (Add better error message for partial move)
 - #58227 (Updated RELEASES.md for 1.33.0)
 - #58353 (Check the Self-type of inherent associated constants)
 - #58453 (SGX target: fix panic = abort)
 - #58476 (Remove `LazyTokenStream`.)
 - #58526 (Special suggestion for illegal unicode curly quote pairs)
 - #58595 (Turn duration consts into associated consts)
 - #58609 (Allow Self::Module to be mutated.)
 - #58628 (Optimise vec![false; N] to zero-alloc)
 - #58643 (Don't generate minification variables if minification disabled)
 - #58648 (Update tests to account for cross-platform testing and miri.)
 - #58654 (Do not underflow after resetting unmatched braces count)
 - #58658 (Add expected/provided byte alignments to validation error message)
 - #58667 (Reduce Miri-related Code Repetition `like (n << amt) >> amt`)

Failed merges:

r? @ghost

5 years agoAuto merge of #58655 - kennytm:download-docker-cache-with-timeout, r=alexcrichton
bors [Sat, 23 Feb 2019 11:32:10 +0000 (11:32 +0000)]
Auto merge of #58655 - kennytm:download-docker-cache-with-timeout, r=alexcrichton

Added a connection timeout and speed threshold when downloading the Docker cache

This is an attempt to fix one possible cause of #56112. Similar to #52846, this changed the download docker-cache command to fail if it cannot connect or falls below 10 bytes/s after 30 seconds, so it could be retried sooner.

5 years agoRollup merge of #58667 - kenta7777:reduce-mir-code-repetition, r=petrochenkov
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:39 +0000 (09:25 +0100)]
Rollup merge of #58667 - kenta7777:reduce-mir-code-repetition, r=petrochenkov

Reduce Miri-related Code Repetition `like (n << amt) >> amt`

This Pull Request fixes a part of [#49937](https://github.com/rust-lang/rust/issues/49937).

5 years agoRollup merge of #58658 - pmccarter:align_msg, r=matthewjasper
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:37 +0000 (09:25 +0100)]
Rollup merge of #58658 - pmccarter:align_msg, r=matthewjasper

Add expected/provided byte alignments to validation error message

Fixes #58617

5 years agoRollup merge of #58654 - estebank:underflow, r=nikomatsakis
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:36 +0000 (09:25 +0100)]
Rollup merge of #58654 - estebank:underflow, r=nikomatsakis

Do not underflow after resetting unmatched braces count

Fix #58638.

r? @oli-obk

5 years agoRollup merge of #58648 - pnkfelix:issue-23926-update-tests, r=nikomatsakis
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:34 +0000 (09:25 +0100)]
Rollup merge of #58648 - pnkfelix:issue-23926-update-tests, r=nikomatsakis

Update tests to account for cross-platform testing and miri.

Fix #23926

5 years agoRollup merge of #58643 - GuillaumeGomez:extra-variables, r=Manishearth
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:33 +0000 (09:25 +0100)]
Rollup merge of #58643 - GuillaumeGomez:extra-variables, r=Manishearth

Don't generate minification variables if minification disabled

If the minification is disabled, there is no sense having those variables.

r? @QuietMisdreavus

5 years agoRollup merge of #58628 - RReverser:optimise-vec-false, r=oli-obk
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:32 +0000 (09:25 +0100)]
Rollup merge of #58628 - RReverser:optimise-vec-false, r=oli-obk

Optimise vec![false; N] to zero-alloc

Nowadays booleans have a well-defined representation, so there is no reason not to optimise their allocation.

5 years agoRollup merge of #58609 - gabi-250:mutable-refs, r=oli-obk
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:30 +0000 (09:25 +0100)]
Rollup merge of #58609 - gabi-250:mutable-refs, r=oli-obk

Allow Self::Module to be mutated.

This only changes `&Self::Module` to `&mut Self::Module` in a couple of places.

`codegen_allocator` and `write_metadata` from `ExtraBackendMethods` mutate the underlying LLVM module. As such, it makes sense for these two functions to receive a mutable reference to the module (as opposed to an immutable one).

I am trying to implement `codegen_allocator` for my backend, and I need to be able to mutate `Self::Module`:
https://github.com/rust-lang/rust/blob/f66e4697ae286985ddefc53c3a047614568458bb/src/librustc_codegen_ssa/traits/backend.rs#L41
Modifying the module in `codegen_allocator`/`write_metadata` is not a problem for the LLVM backend, because [ModuleLlvm](https://github.com/rust-lang/rust/blob/master/src/librustc_codegen_llvm/lib.rs#L357) contains a raw pointer to the underlying LLVM module, so it can easily be mutated through FFI calls.

I am trying to avoid interior mutability and `unsafe` as much as I can. What do you think? Does this change make sense, or is there a reason why this should stay the way it is?

5 years agoRollup merge of #58595 - stjepang:make-duration-consts-associated, r=oli-obk
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:29 +0000 (09:25 +0100)]
Rollup merge of #58595 - stjepang:make-duration-consts-associated, r=oli-obk

Turn duration consts into associated consts

As suggested in https://github.com/rust-lang/rust/issues/57391#issuecomment-459658236, I'm moving `Duration` constants (`SECOND`, `MILLISECOND` and so on; currently behind unstable `duration_constants` feature) into the `impl Duration` block.

cc @frewsxcv @SimonSapin

5 years agoRollup merge of #58526 - pmccarter:master, r=estebank
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:27 +0000 (09:25 +0100)]
Rollup merge of #58526 - pmccarter:master, r=estebank

Special suggestion for illegal unicode curly quote pairs

Fixes #58436

Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark.

The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).

5 years agoRollup merge of #58476 - nnethercote:rm-LazyTokenStream, r=petrochenkov
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:26 +0000 (09:25 +0100)]
Rollup merge of #58476 - nnethercote:rm-LazyTokenStream, r=petrochenkov

Remove `LazyTokenStream`.

`LazyTokenStream` was added in #40939. Perhaps it was an effective optimization then, but no longer. This PR removes it, making the code both simpler and faster.

r? @alexcrichton

5 years agoRollup merge of #58453 - jethrogb:jb/sgx-panic-abort, r=nagisa
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:24 +0000 (09:25 +0100)]
Rollup merge of #58453 - jethrogb:jb/sgx-panic-abort, r=nagisa

SGX target: fix panic = abort

What is the difference between `no_mangle` and `rustc_std_internal_symbol`?

5 years agoRollup merge of #58353 - matthewjasper:typeck-pattern-constants, r=arielb1
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:23 +0000 (09:25 +0100)]
Rollup merge of #58353 - matthewjasper:typeck-pattern-constants, r=arielb1

Check the Self-type of inherent associated constants

r? @arielb1

5 years agoRollup merge of #58227 - Aaronepower:master, r=Centril
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:19 +0000 (09:25 +0100)]
Rollup merge of #58227 - Aaronepower:master, r=Centril

Updated RELEASES.md for 1.33.0

[Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)

r? @Mark-Simulacrum

cc @rust-lang/release

5 years agoRollup merge of #58199 - clintfred:partial-move-err-msg, r=estebank
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:17 +0000 (09:25 +0100)]
Rollup merge of #58199 - clintfred:partial-move-err-msg, r=estebank

Add better error message for partial move

closes #56657

r? @davidtwco

5 years agoRollup merge of #58122 - matthieu-m:range_incl_perf, r=dtolnay
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:12 +0000 (09:25 +0100)]
Rollup merge of #58122 - matthieu-m:range_incl_perf, r=dtolnay

RangeInclusive internal iteration performance improvement.

Specialize `Iterator::try_fold` and `DoubleEndedIterator::try_rfold` to improve code generation in all internal iteration scenarios.

This changes brings the performance of internal iteration with `RangeInclusive` on par with the performance of iteration with `Range`:

 - Single conditional jump in hot loop,
 - Unrolling and vectorization,
 - And even Closed Form substitution.

Unfortunately, it only applies to internal iteration. Despite various attempts at stream-lining the implementation of `next` and `next_back`, LLVM has stubbornly refused to optimize external iteration appropriately, leaving me with a choice between:

 - The current implementation, for which Closed Form substitution is performed, but which uses 2 conditional jumps in the hot loop when optimization fail.
 - An implementation using a `is_done` boolean, which uses 1 conditional jump in the hot loop when optimization fail, allowing unrolling and vectorization, but for which Closed Form substitution fails.

In the absence of any conclusive evidence as to which usecase matters most, and with no assurance that the lack of Closed Form substitution is not indicative of other optimizations being foiled, there is no way
to pick one implementation over the other, and thus I defer to the statu quo as far as `next` and `next_back` are concerned.

5 years agoRollup merge of #58100 - h-michael:librustdoc-2018, r=Centril
Mazdak Farrokhzad [Sat, 23 Feb 2019 08:25:11 +0000 (09:25 +0100)]
Rollup merge of #58100 - h-michael:librustdoc-2018, r=Centril

Transition librustdoc to Rust 2018

#58099

5 years agoFix tidy check errors
Hirokazu Hata [Sat, 23 Feb 2019 08:02:57 +0000 (17:02 +0900)]
Fix tidy check errors

5 years agoTransition librustdoc to 2018 edition
Hirokazu Hata [Sat, 23 Feb 2019 07:40:07 +0000 (16:40 +0900)]
Transition librustdoc to 2018 edition

5 years agoreduce an mir code repetition like (n << amt) >> amt
kenta7777 [Sat, 23 Feb 2019 01:07:09 +0000 (10:07 +0900)]
reduce an mir code repetition like (n << amt) >> amt

5 years ago#58658 bless after line split for tidy
Patrick McCarter [Sat, 23 Feb 2019 00:23:03 +0000 (19:23 -0500)]
#58658 bless after line split for tidy

5 years agotidy line length override #58617
Patrick McCarter [Fri, 22 Feb 2019 22:07:13 +0000 (17:07 -0500)]
tidy line length override #58617

5 years agoChange byte align message wording #58617
Patrick McCarter [Fri, 22 Feb 2019 21:36:39 +0000 (16:36 -0500)]
Change byte align message wording #58617

5 years agoAuto merge of #58644 - Centril:rollup, r=Centril
bors [Fri, 22 Feb 2019 21:32:15 +0000 (21:32 +0000)]
Auto merge of #58644 - Centril:rollup, r=Centril

Rollup of 17 pull requests

Successful merges:

 - #57656 (Deprecate the unstable Vec::resize_default)
 - #58059 (deprecate before_exec in favor of unsafe pre_exec)
 - #58064 (override `VecDeque::try_rfold`, also update iterator)
 - #58198 (Suggest removing parentheses surrounding lifetimes)
 - #58431 (fix overlapping references in BTree)
 - #58555 (Add a note about 2018e if someone uses `try {` in 2015e)
 - #58588 (remove a bit of dead code)
 - #58589 (cleanup macro after 2018 transition)
 - #58591 (Dedup a rustdoc diagnostic construction)
 - #58600 (fix small documentation typo)
 - #58601 (Search for target_triple.json only if builtin target not found)
 - #58606 (Docs: put Future trait into spotlight)
 - #58607 (Fixes #58586: Make E0505 erronous example fail for the 2018 edition)
 - #58615 (miri: explain why we use static alignment in ref-to-place conversion)
 - #58620 (introduce benchmarks of BTreeSet.intersection)
 - #58621 (Update miri links)
 - #58632 (Make std feature list sorted)

Failed merges:

r? @ghost

5 years agoInvalid byte alignment expected/provided in message #58617
Patrick McCarter [Fri, 22 Feb 2019 20:49:07 +0000 (15:49 -0500)]
Invalid byte alignment expected/provided in message #58617

5 years agoDo not underflow after resetting unmatched braces count
Esteban Küber [Fri, 22 Feb 2019 19:17:30 +0000 (11:17 -0800)]
Do not underflow after resetting unmatched braces count

Fix #58638.

5 years agoAdded a connection timeout and speed threshold when downloading the Docker cache
kennytm [Fri, 22 Feb 2019 18:21:41 +0000 (02:21 +0800)]
Added a connection timeout and speed threshold when downloading the Docker cache

5 years agoUpdate RELEASES.md
Mazdak Farrokhzad [Fri, 22 Feb 2019 16:50:18 +0000 (17:50 +0100)]
Update RELEASES.md

5 years agoSwitch from error patterns to `//~ ERROR` markers.
Felix S. Klock II [Fri, 22 Feb 2019 15:07:15 +0000 (16:07 +0100)]
Switch from error patterns to `//~ ERROR` markers.

AFAICT, we do not have the same const-eval issues that we used to when
rust-lang/rust#23926 was filed. (Probably because of the switch to
miri for const-evaluation.)

5 years agoMake target pointer-width specific variants of (very old) huge-array-simple.rs test.
Felix S. Klock II [Fri, 22 Feb 2019 14:13:07 +0000 (15:13 +0100)]
Make target pointer-width specific variants of (very old) huge-array-simple.rs test.

(and now unignore the test since it shouldn't break tests of
cross-compiles anymore.)

5 years agoRollup merge of #58632 - matklad:reduce-contention, r=Centril
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:16 +0000 (14:58 +0100)]
Rollup merge of #58632 - matklad:reduce-contention, r=Centril

Make std feature list sorted

This helps to avoid merge conflicts when concurrent PRs append features to the end of the list.

5 years agoRollup merge of #58621 - phansch:update_miri_links, r=oli-obk
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:15 +0000 (14:58 +0100)]
Rollup merge of #58621 - phansch:update_miri_links, r=oli-obk

Update miri links

Miri has been moved to `rust-lang` a couple of days ago.

5 years agoRollup merge of #58620 - ssomers:btreeset_intersection_benchmarks, r=KodrAus
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:14 +0000 (14:58 +0100)]
Rollup merge of #58620 - ssomers:btreeset_intersection_benchmarks, r=KodrAus

introduce benchmarks of BTreeSet.intersection

16 tests combining 4 kinds of contents with different sizes exposing edge cases.
The ones with asymmetric sizes are addressed by https://github.com/rust-lang/rust/pull/58577.
The pos_vs_neg cases seems (are were meant to be) the same as the neg_vs_pos case (same thing, reverse order) but reality shows a surprsing 25% difference.

5 years agoRollup merge of #58615 - RalfJung:ref-to-place-alignment, r=oli-obk
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:12 +0000 (14:58 +0100)]
Rollup merge of #58615 - RalfJung:ref-to-place-alignment, r=oli-obk

miri: explain why we use static alignment in ref-to-place conversion

@eddyb @oli-obk do you think this makes sense? Or should we use the run-time alignment (`align_of_val`)? I am a bit worried about custom DSTs, but that affects way more areas of Miri so I'd ignore them for now.

r? @oli-obk

5 years agoRollup merge of #58607 - gurgalex:fail_E0505_for_2018_edition, r=matthewjasper
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:11 +0000 (14:58 +0100)]
Rollup merge of #58607 - gurgalex:fail_E0505_for_2018_edition, r=matthewjasper

Fixes #58586: Make E0505 erronous example fail for the 2018 edition

The original example worked for 2015, but not the 2018 edition of Rust.

Borrowing the moved value after ownership is transferred seems required for 2018.

[this](https://github.com/rust-lang/rust/compare/rust-lang:f66e469...gurgalex:b2a02c8#diff-4ca866aea4a6efecd732f1975faaad88R1564) line though is correct for 2018, but not for the 2015 edition.

Fix #58586

5 years agoRollup merge of #58606 - stjepang:put-future-into-spotlight, r=alexcrichton
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:09 +0000 (14:58 +0100)]
Rollup merge of #58606 - stjepang:put-future-into-spotlight, r=alexcrichton

Docs: put Future trait into spotlight

If a function returns a type that implements `Future`, there should be a small "i" symbol next to it indicating the return type implements an important trait.

5 years agoRollup merge of #58601 - gnzlbg:json_error, r=oli-obk
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:08 +0000 (14:58 +0100)]
Rollup merge of #58601 - gnzlbg:json_error, r=oli-obk

Search for target_triple.json only if builtin target not found

Before this commit, if the builtin target was found, but an error
happened when instantiating it (e.g. validating the target
specification file failed, etc.), then we ignored those errors
and proceeded to try to find a `target_triple.json` file, and if
that failed, reported that as an error.

With this commit, if rustc is supposed to provide the builtin target,
and something fails while instantiating it, that error will
get properly propagated.

r? @oli-obk

5 years agoRollup merge of #58600 - llogiq:documentation-tests-typo, r=frewsxcv
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:07 +0000 (14:58 +0100)]
Rollup merge of #58600 - llogiq:documentation-tests-typo, r=frewsxcv

fix small documentation typo

Thanks to @stjepang for catching my mistake.

5 years agoRollup merge of #58591 - dwijnand:dedup-a-rustdoc-diag-construction, r=GuillaumeGomez
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:06 +0000 (14:58 +0100)]
Rollup merge of #58591 - dwijnand:dedup-a-rustdoc-diag-construction, r=GuillaumeGomez

Dedup a rustdoc diagnostic construction

None

5 years agoRollup merge of #58589 - matklad:remove-hack, r=petrochenkov
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:04 +0000 (14:58 +0100)]
Rollup merge of #58589 - matklad:remove-hack, r=petrochenkov

cleanup macro after 2018 transition

We can now use `?`

5 years agoRollup merge of #58588 - matklad:dead-code, r=petrochenkov
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:03 +0000 (14:58 +0100)]
Rollup merge of #58588 - matklad:dead-code, r=petrochenkov

remove a bit of dead code

[Six years](https://github.com/rust-lang/rust/commit/5dc5efefd47527067ab5b7862d89a99da4824f49) seem to be a long enough transition period :rofl:

5 years agoRollup merge of #58555 - scottmcm:try-2015, r=Centril
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:02 +0000 (14:58 +0100)]
Rollup merge of #58555 - scottmcm:try-2015, r=Centril

Add a note about 2018e if someone uses `try {` in 2015e

Inspired by https://github.com/rust-lang/rust/issues/58491, where a `try_blocks` example was accidentally run in 2015, which of course produces a bunch of errors.

What's the philosophy about gating for this?  The keyword is stably a keyword in 2018, so I haven't gated it for now but am not mentioning what the keyword _does_.  Let me know if I should do differently.

Resolves #53672

5 years agoRollup merge of #58431 - RalfJung:btree, r=Mark-Simulacrum
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:58:00 +0000 (14:58 +0100)]
Rollup merge of #58431 - RalfJung:btree, r=Mark-Simulacrum

fix overlapping references in BTree

This fixes two kinds of overlapping references in BTree (both found by running the BTree test suite in Miri).

In `into_slices_mut`, we did `k.into_key_slice_mut()` followed by `self.into_val_slice_mut()` (where `k` is a copy of `self`). Calling `into_val_slice_mut` calls `self.len()`, which creates a shared reference to `NodeHeader`, which unfortunately (due to padding) overlaps with the mutable reference returned by `into_key_slice_mut`.  Hence the key slice got (partially) invalidated.  The fix is to avoid creating an `&NodeHeader` after the first slice got created.

In the iterators, we used to first create the references that will be returned, and then perform the walk on the tree.  Walking the tree creates references (such as `&mut InternalNode`) that overlap with all of the keys and values stored in a pointer; in particular, they overlap with the references the iterator will later return. This is fixed by reordering the operations of walking the tree and obtaining the inner references.

The test suite still passes (and it passes in Miri now!), but there is a lot of code here that I do not understand...

5 years agoRollup merge of #58198 - igorsdv:suggest-removing-parentheses-surrounding-lifetimes...
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:57:59 +0000 (14:57 +0100)]
Rollup merge of #58198 - igorsdv:suggest-removing-parentheses-surrounding-lifetimes, r=estebank

Suggest removing parentheses surrounding lifetimes

Fixes #57386.

r? @estebank

5 years agoRollup merge of #58064 - llogiq:vec-deque-try-rfold, r=scottmcm
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:57:58 +0000 (14:57 +0100)]
Rollup merge of #58064 - llogiq:vec-deque-try-rfold, r=scottmcm

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. Cc @RalfJung

5 years agoRollup merge of #58059 - RalfJung:before_exec, r=alexcrichton
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:57:56 +0000 (14:57 +0100)]
Rollup merge of #58059 - RalfJung:before_exec, r=alexcrichton

deprecate before_exec in favor of unsafe pre_exec

Fixes https://github.com/rust-lang/rust/issues/39575

As per the [lang team decision](https://github.com/rust-lang/rust/issues/39575#issuecomment-442993358):

> The language team agreed that before_exec should be unsafe, and leaves the details of a transition plan to the libs team.

Cc @alexcrichton @rust-lang/libs how would you like to proceed?

5 years agoRollup merge of #57656 - scottmcm:deprecate-resize_default, r=SimonSapin
Mazdak Farrokhzad [Fri, 22 Feb 2019 13:57:55 +0000 (14:57 +0100)]
Rollup merge of #57656 - scottmcm:deprecate-resize_default, r=SimonSapin

Deprecate the unstable Vec::resize_default

As a way to either get additional feedback to stabilize or help move nightly users off it.

Tracking issue: https://github.com/rust-lang/rust/issues/41758#issuecomment-449719961

r? @SimonSapin

5 years agoAuto merge of #57997 - nitnelave:master, r=RalfJung
bors [Fri, 22 Feb 2019 13:52:41 +0000 (13:52 +0000)]
Auto merge of #57997 - nitnelave:master, r=RalfJung

Wrap write_bytes in a function. Move docs

This will allow us to add debug assertions.
See issue #53871.

5 years agoDon't generate minification variable if minification disabled
Guillaume Gomez [Fri, 22 Feb 2019 12:50:17 +0000 (13:50 +0100)]
Don't generate minification variable if minification disabled

5 years agoMake std feature list sorted
Aleksey Kladov [Fri, 22 Feb 2019 08:04:10 +0000 (11:04 +0300)]
Make std feature list sorted

This helps to avoid merge conflicts when concurrent PRs append
features to the end of the list.

5 years agoAuto merge of #56113 - spastorino:erroneous-loop-diagnostic-in-nll, r=pnkfelix
bors [Fri, 22 Feb 2019 06:52:39 +0000 (06:52 +0000)]
Auto merge of #56113 - spastorino:erroneous-loop-diagnostic-in-nll, r=pnkfelix

Erroneous loop diagnostic in nll

Closes #53773

r? @nikomatsakis

5 years agoAuto merge of #58574 - RalfJung:pin, r=Mark-Simulacrum
bors [Fri, 22 Feb 2019 04:11:23 +0000 (04:11 +0000)]
Auto merge of #58574 - RalfJung:pin, r=Mark-Simulacrum

improve Pin documentation

Incorporates a bunch of the documentation-related comments that came up when discussing `Pin` stabilization.

Cc @alexcrichton @withoutboats @cramertj @jonhoo

Fixes https://github.com/rust-lang/rust/issues/58130

5 years agoAuto merge of #58616 - vertexclique:destabilize-fixed-width-atomic-integers, r=dtolnay
bors [Fri, 22 Feb 2019 01:29:34 +0000 (01:29 +0000)]
Auto merge of #58616 - vertexclique:destabilize-fixed-width-atomic-integers, r=dtolnay

Destabilize fixed-width const defined atomic integers

With this PR version 1.34.0 onwards const declarations of atomic integers will be unstable.

* Closes https://github.com/rust-lang/rust/issues/58089
* Reverts partially: https://github.com/rust-lang/rust/pull/57425

5 years agoOptimise vec![false; N] to zero-alloc
Ingvar Stepanyan [Thu, 21 Feb 2019 23:02:34 +0000 (23:02 +0000)]
Optimise vec![false; N] to zero-alloc

Nowadays booleans have a well-defined representation, so there is no reason not to optimise their allocation.

5 years agotake a bit more space for new_unchecked examples
Ralf Jung [Thu, 21 Feb 2019 22:13:49 +0000 (23:13 +0100)]
take a bit more space for new_unchecked examples

5 years agoAuto merge of #58592 - nikomatsakis:universe-leak-check, r=aturon
bors [Thu, 21 Feb 2019 21:35:21 +0000 (21:35 +0000)]
Auto merge of #58592 - nikomatsakis:universe-leak-check, r=aturon

Re-implement leak check in terms of universes

This PR temporarily restores the leak-check, but implemented in terms of universes. This is not because the leak check behavior was necessarily **correct**, but because (a) we may want to have a transition period and because (b) we want to have more breathing room to work through the full implications of handling higher-ranked types correctly. Note that this PR builds atop https://github.com/rust-lang/rust/pull/58056.

Fixes #58451
Fixes #46989
Fixes #57639

r? @aturon
cc @arielb1, @lqd

~~Temporary note: I've not finished running `./x.py test` locally -- I'm confident a lot of error messages in tests will need updating. I sort of expect them to revert to the older, (imo) less good error messages, which is mildly unfortunate. There might be a way to preserve the new error messages, not sure.~~

5 years agoFix more nursery links in CONTRIBUTING.md
Philipp Hansch [Thu, 21 Feb 2019 19:58:56 +0000 (20:58 +0100)]
Fix more nursery links in CONTRIBUTING.md

5 years agoUpdate miri links
Philipp Hansch [Thu, 21 Feb 2019 18:26:45 +0000 (19:26 +0100)]
Update miri links

Miri has been moved to `rust-lang` a couple of days ago.

5 years agopartially revert 904a0bde93f0348f69914ee90b1f8b6e4e0d7cbc
Niko Matsakis [Thu, 21 Feb 2019 17:14:30 +0000 (12:14 -0500)]
partially revert 904a0bde93f0348f69914ee90b1f8b6e4e0d7cbc

This preserves the error you currently get on stable for the
old-lub-glb-object.rs test.

5 years agoAuto merge of #58584 - ehuss:update-cargo, r=alexcrichton
bors [Thu, 21 Feb 2019 17:18:53 +0000 (17:18 +0000)]
Auto merge of #58584 - ehuss:update-cargo, r=alexcrichton

Update cargo

9 commits in 865cb70106a6b1171a500ff68f93ab52eea56e72..b33ce7fc9092962b0657b4c25354984b5e5c47e4
2019-02-10 15:49:37 +0000 to 2019-02-19 18:42:50 +0000
- Don't retry invalid credentials from git credential helpers (rust-lang/cargo#6681)
- Fix some typos in resolver tests (rust-lang/cargo#6682)
- Add an unstable option to build proc macros for both the host and the target (rust-lang/cargo#6547)
- Test cases proving RUSTC_WRAPPER can be a relative path (rust-lang/cargo#6638)
- Add support for Azure DevOps (rust-lang/cargo#6264)
- Update docs for removed `patch` restriction. (rust-lang/cargo#6663)
- Fix incorrect help message (rust-lang/cargo#6555)
- Stabilize Alternative Registries (rust-lang/cargo#6654)
- Having a [patch] section when publishing is not an error (rust-lang/cargo#6535)

5 years agoupdate test files to reflect new output
Niko Matsakis [Wed, 20 Feb 2019 17:52:23 +0000 (12:52 -0500)]
update test files to reflect new output

One surprise: old-lub-glb-object.rs, may indicate a bug

5 years agorestore the actual leak-check
Niko Matsakis [Wed, 20 Feb 2019 10:39:04 +0000 (05:39 -0500)]
restore the actual leak-check

5 years agointroduce a dummy leak check and invoke it in all the right places
Niko Matsakis [Wed, 20 Feb 2019 10:22:23 +0000 (05:22 -0500)]
introduce a dummy leak check and invoke it in all the right places

This set of diffs was produced by combing through
b68fad670bb3612cac26e50751e4fd9150e59977 and seeing where the
`leak_check` used to be invoked and how.

5 years agoreintroduce `commit_if_ok` calls to `subtype_predicate`
Niko Matsakis [Tue, 19 Feb 2019 23:48:29 +0000 (18:48 -0500)]
reintroduce `commit_if_ok` calls to `subtype_predicate`

5 years agoreintroduce `commit_if_ok` call into `higher_ranked_sub`
Niko Matsakis [Tue, 19 Feb 2019 23:38:42 +0000 (18:38 -0500)]
reintroduce `commit_if_ok` call into `higher_ranked_sub`

5 years agos/skol_/placeholder_/
Niko Matsakis [Wed, 20 Feb 2019 09:57:32 +0000 (04:57 -0500)]
s/skol_/placeholder_/

5 years agointroduce benchmarks of BTreeSet.intersection
Stein Somers [Thu, 21 Feb 2019 16:26:10 +0000 (17:26 +0100)]
introduce benchmarks of BTreeSet.intersection

5 years agofix link
Ralf Jung [Thu, 21 Feb 2019 16:18:18 +0000 (17:18 +0100)]
fix link

5 years agoremark about the one place where place computation calls size_and_align_of
Ralf Jung [Thu, 21 Feb 2019 15:14:31 +0000 (16:14 +0100)]
remark about the one place where place computation calls size_and_align_of

5 years agothis is for you, tidy
Ralf Jung [Thu, 21 Feb 2019 15:05:49 +0000 (16:05 +0100)]
this is for you, tidy

5 years agoAuto merge of #58597 - pietroalbini:appveyor-gce, r=alexcrichton
bors [Thu, 21 Feb 2019 14:34:49 +0000 (14:34 +0000)]
Auto merge of #58597 - pietroalbini:appveyor-gce, r=alexcrichton

ci: switch appveyor to gce builders to try debugging the 259 failure

r? @alexcrichton

5 years agoexplain unsafe
Ralf Jung [Thu, 21 Feb 2019 14:33:55 +0000 (15:33 +0100)]
explain unsafe

5 years agowe only list some examples of basic types
Ralf Jung [Thu, 21 Feb 2019 14:31:09 +0000 (15:31 +0100)]
we only list some examples of basic types

5 years agotweaks and fix weird space
Ralf Jung [Thu, 21 Feb 2019 14:30:31 +0000 (15:30 +0100)]
tweaks and fix weird space

5 years agoApply suggestions from code review
Mazdak Farrokhzad [Thu, 21 Feb 2019 14:28:46 +0000 (15:28 +0100)]
Apply suggestions from code review

Co-Authored-By: RalfJung <post@ralfj.de>
5 years agocodegen and write_metadata can mutate ModuleLLvm.
Gabriela Alexandra Moldovan [Thu, 21 Feb 2019 13:38:44 +0000 (13:38 +0000)]
codegen and write_metadata can mutate ModuleLLvm.

5 years agoUpdate RELEASES.md
Aaron Power [Thu, 21 Feb 2019 13:10:24 +0000 (14:10 +0100)]
Update RELEASES.md

5 years agoDestabilize fixed-width const defined atomic integers
Mahmut Bulut [Thu, 21 Feb 2019 12:57:51 +0000 (13:57 +0100)]
Destabilize fixed-width const defined atomic integers

* With this PR 1.34.0 onwards const declarations of atomic integers will be
  unstable.

5 years agoexplain why we use static alignment in ref-to-place conversion
Ralf Jung [Thu, 21 Feb 2019 12:15:59 +0000 (13:15 +0100)]
explain why we use static alignment in ref-to-place conversion

5 years agoAuto merge of #58535 - RalfJung:miri, r=oli-obk
bors [Thu, 21 Feb 2019 11:44:16 +0000 (11:44 +0000)]
Auto merge of #58535 - RalfJung:miri, r=oli-obk

update miri

r? @oli-obk

Fixes https://github.com/rust-lang/rust/issues/58558

5 years agoUpdate RELEASES.md
Aaron Power [Thu, 21 Feb 2019 09:27:22 +0000 (10:27 +0100)]
Update RELEASES.md

5 years agofinal pin projections tweaking
Ralf Jung [Thu, 21 Feb 2019 09:21:59 +0000 (10:21 +0100)]
final pin projections tweaking

5 years agomore pin projections tweaking
Ralf Jung [Thu, 21 Feb 2019 08:57:29 +0000 (09:57 +0100)]
more pin projections tweaking

5 years agoEnable feature duration_constants in examples
Stjepan Glavina [Thu, 21 Feb 2019 08:13:50 +0000 (09:13 +0100)]
Enable feature duration_constants in examples

5 years agoRemove braces from most E0505 examples
Alex Gurganus [Wed, 20 Feb 2019 22:12:28 +0000 (16:12 -0600)]
Remove braces from most E0505 examples

The solution which uses braces to release the borrow
before it is moved is only required to satisfy the 2015
edition borrow checker.

All other examples give the expected results for both
2015 and 2018 editions.

5 years agoUpdate RELEASES.md
Trevor Spiteri [Wed, 20 Feb 2019 22:10:54 +0000 (23:10 +0100)]
Update RELEASES.md

Co-Authored-By: Aaronepower <Aaronepower@users.noreply.github.com>
5 years agoAllow Self::Module to be mutated.
Gabriela Alexandra Moldovan [Wed, 20 Feb 2019 16:37:52 +0000 (16:37 +0000)]
Allow Self::Module to be mutated.

`codegen_allocator` and `write_metadata` mutate the underlying LLVM module. As
such, it makes sense for these two functions to receive a mutable reference to
the module (as opposed to an immutable one).

5 years agoAuto merge of #58056 - nikomatsakis:issue-57843-universe-leak, r=pnkfelix
bors [Wed, 20 Feb 2019 21:12:18 +0000 (21:12 +0000)]
Auto merge of #58056 - nikomatsakis:issue-57843-universe-leak, r=pnkfelix

make generalization code create new variables in correct universe

In our type inference system, when we "generalize" a type T to become
a suitable value for a type variable V, we sometimes wind up creating
new inference variables. So, for example, if we are making V be some
subtype of `&'X u32`, then we might instantiate V with `&'Y u32`.
This generalized type is then related `&'Y u32 <: &'X u32`, resulting
in a region constriant `'Y: 'X`. Previously, however, we were making
these fresh variables like `'Y` in the "current universe", but they
should be created in the universe of V. Moreover, we sometimes cheat
in an invariant context and avoid creating fresh variables if we know
the result must be equal -- we can only do that when the universes
work out.

Fixes #57843

r? @pnkfelix

5 years agoPut Future trait into spotlight
Stjepan Glavina [Wed, 20 Feb 2019 20:59:13 +0000 (21:59 +0100)]
Put Future trait into spotlight

5 years agoAdd examples for duration constants
Stjepan Glavina [Wed, 20 Feb 2019 20:58:20 +0000 (21:58 +0100)]
Add examples for duration constants

5 years agoFixes #58586: Make E0505 explain example fail for 2018 edition
Alex Gurganus [Wed, 20 Feb 2019 19:03:52 +0000 (13:03 -0600)]
Fixes #58586: Make E0505 explain example fail for 2018 edition

5 years agoexpand pinning projections
Ralf Jung [Wed, 20 Feb 2019 18:34:10 +0000 (19:34 +0100)]
expand pinning projections

5 years agoSearch for target_triple.json only if builtin target not found
gnzlbg [Wed, 20 Feb 2019 17:08:21 +0000 (18:08 +0100)]
Search for target_triple.json only if builtin target not found

Before this commit, if the builtin target was found, but an error
happened when instantiating it (e.g. validating the target
specification file failed, etc.), then we ignored those errors
and proceeded to try to find a `target_triple.json` file, and if
that failed, reported that as an error.

With this commit, if rustc is supposed to provide the builtin target,
and something fails while instantiating it, that error will
get properly propagated.

5 years agotweak pinning projections
Ralf Jung [Wed, 20 Feb 2019 17:28:12 +0000 (18:28 +0100)]
tweak pinning projections

5 years agofix typo
Andre Bogus [Wed, 20 Feb 2019 16:59:17 +0000 (17:59 +0100)]
fix typo

5 years ago./x.py test src/test/ui --stage 1 --bless -i --compare-mode=nll
Clint Frederickson [Wed, 20 Feb 2019 16:54:10 +0000 (09:54 -0700)]
./x.py test src/test/ui --stage 1 --bless -i --compare-mode=nll

5 years agoci: switch appveyor to gce builders to try debugging the 259 failure
Pietro Albini [Wed, 20 Feb 2019 16:01:29 +0000 (17:01 +0100)]
ci: switch appveyor to gce builders to try debugging the 259 failure

5 years agoRun rustfmt
Santiago Pastorino [Wed, 20 Feb 2019 15:15:27 +0000 (12:15 -0300)]
Run rustfmt

5 years agoFix erroneous loop diagnostic in nll
Santiago Pastorino [Tue, 20 Nov 2018 20:48:16 +0000 (17:48 -0300)]
Fix erroneous loop diagnostic in nll

This commit fixes the logic of detecting when a use happen in a later
iteration of where a borrow was defined

Fixes #53773