]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAdd test for #34979
Yuki Okushi [Wed, 6 May 2020 17:13:51 +0000 (02:13 +0900)]
Add test for #34979

4 years agoAdd test for #29988
Yuki Okushi [Wed, 6 May 2020 17:13:20 +0000 (02:13 +0900)]
Add test for #29988

4 years agoAuto merge of #71951 - Dylan-DPC:rollup-j9v1p0f, r=Dylan-DPC
bors [Wed, 6 May 2020 16:59:45 +0000 (16:59 +0000)]
Auto merge of #71951 - Dylan-DPC:rollup-j9v1p0f, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #71269 (Define UB in float-to-int casts to saturate)
 - #71591 (use new interface to create threads on HermitCore)
 - #71819 (x.py: Give a more helpful error message if curl isn't installed)
 - #71893 (Use the `impls` module to import pre-existing dataflow analyses)
 - #71929 (Use -fvisibility=hidden for libunwind)
 - #71937 (Ignore SGX on a few ui tests)
 - #71944 (Add comment for `Ord` implementation for array)

Failed merges:

r? @ghost

4 years agoUpdate cargo
Eric Huss [Tue, 5 May 2020 15:48:06 +0000 (08:48 -0700)]
Update cargo

4 years agoRollup merge of #71944 - ldm0:arrordhint, r=sfackler
Dylan DPC [Wed, 6 May 2020 14:59:04 +0000 (16:59 +0200)]
Rollup merge of #71944 - ldm0:arrordhint, r=sfackler

Add comment for `Ord` implementation for array

Corresponding to `Ord` implementation for slice. It hints new comer the rule of comparing two arrays.

4 years agoRollup merge of #71937 - mzohreva:mz/ui-tests-ignore-sgx, r=nikomatsakis
Dylan DPC [Wed, 6 May 2020 14:59:02 +0000 (16:59 +0200)]
Rollup merge of #71937 - mzohreva:mz/ui-tests-ignore-sgx, r=nikomatsakis

Ignore SGX on a few ui tests

cc @jethrogb

4 years agoRollup merge of #71929 - petrhosek:unwind-visibility, r=tmandry
Dylan DPC [Wed, 6 May 2020 14:59:00 +0000 (16:59 +0200)]
Rollup merge of #71929 - petrhosek:unwind-visibility, r=tmandry

Use -fvisibility=hidden for libunwind

We don't want to export any symbols from Rust's version of libunwind
as these may collide with other copies of libunwind e.g. when linking
Rust staticlib together C/C++ libraries that have their own version.

4 years agoRollup merge of #71893 - ecstatic-morse:dataflow-impls-import, r=jonas-schievink
Dylan DPC [Wed, 6 May 2020 14:58:58 +0000 (16:58 +0200)]
Rollup merge of #71893 - ecstatic-morse:dataflow-impls-import, r=jonas-schievink

Use the `impls` module to import pre-existing dataflow analyses

Currently, existing analyses live in the same module as the traits and types used to define new dataflow analyses. This muddles the [documentation for the `dataflow` module](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/dataflow/index.html). After this PR, `dataflow::impls` will refer to concrete dataflow analyses, and `dataflow` to the generic interface.

4 years agoRollup merge of #71819 - jyn514:check-for-tools, r=Mark-Simulacrum
Dylan DPC [Wed, 6 May 2020 14:58:57 +0000 (16:58 +0200)]
Rollup merge of #71819 - jyn514:check-for-tools, r=Mark-Simulacrum

x.py: Give a more helpful error message if curl isn't installed

Before:

```
Updating only changed submodules
Submodules updated in 0.01 seconds
Traceback (most recent call last):
  File "./x.py", line 11, in <module>
    bootstrap.main()
  ...
  File "/home/joshua/src/rust/src/bootstrap/bootstrap.py", line 137, in run
    ret = subprocess.Popen(args, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
```

After:

```
Updating only changed submodules
Submodules updated in 0.01 seconds

spurious failure, trying again

spurious failure, trying again

spurious failure, trying again

spurious failure, trying again
failed to run: curl -s -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmpSWF21P.sha256 https://static.rust-lang.org/dist/2020-04-22/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz.sha256: [Errno 2] No such file or directory
Build completed unsuccessfully in 0:00:00
```

4 years agoRollup merge of #71591 - hermitcore:thread_create, r=hanna-kruppe
Dylan DPC [Wed, 6 May 2020 14:58:53 +0000 (16:58 +0200)]
Rollup merge of #71591 - hermitcore:thread_create, r=hanna-kruppe

use new interface to create threads on HermitCore

- the new interface allows to define the stack size
- increase the default stack size to 1 MByte

4 years agoRollup merge of #71269 - Mark-Simulacrum:sat-float-casts, r=nikic
Dylan DPC [Wed, 6 May 2020 14:58:50 +0000 (16:58 +0200)]
Rollup merge of #71269 - Mark-Simulacrum:sat-float-casts, r=nikic

Define UB in float-to-int casts to saturate

This closes #10184 by defining the behavior there to saturate infinities and values exceeding the integral range (on the lower or upper end). `NaN` is sent to zero.

4 years agoRemove warning about UB
Mark Rousskov [Tue, 21 Apr 2020 13:00:36 +0000 (09:00 -0400)]
Remove warning about UB

4 years agoFixup tests to test both const-eval and runtime
Mark Rousskov [Sun, 19 Apr 2020 15:53:51 +0000 (11:53 -0400)]
Fixup tests to test both const-eval and runtime

4 years agoPull in miri test cases
Mark Rousskov [Sat, 18 Apr 2020 22:43:08 +0000 (18:43 -0400)]
Pull in miri test cases

4 years agoDefine UB in float-to-int casts to saturate
Mark Rousskov [Sat, 18 Apr 2020 01:42:22 +0000 (21:42 -0400)]
Define UB in float-to-int casts to saturate

- Round to zero, and representable values cast directly.
- `NaN` goes to 0
- Values beyond the limits of the type are saturated to the "nearest value"
  (essentially rounding to zero, in some sense) in the integral type, so e.g.
  `f32::INFINITY` would go to `{u,i}N::MAX.`

4 years agomore precise vtable errors
Ralf Jung [Wed, 6 May 2020 11:46:01 +0000 (13:46 +0200)]
more precise vtable errors

4 years agotry_validation: handle multi-branching, and use macro for most remaining manual throw...
Ralf Jung [Wed, 6 May 2020 11:26:24 +0000 (13:26 +0200)]
try_validation: handle multi-branching, and use macro for most remaining manual throw_validation_failure sites

4 years agoAuto merge of #71949 - Dylan-DPC:rollup-0gg02wd, r=Dylan-DPC
bors [Wed, 6 May 2020 11:24:13 +0000 (11:24 +0000)]
Auto merge of #71949 - Dylan-DPC:rollup-0gg02wd, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #71510 (Btreemap iter intertwined)
 - #71727 (SipHasher with keys initialized to 0 should just use new())
 - #71889 (Explain our RwLock implementation)
 - #71905 (Add command aliases from Cargo to x.py commands)
 - #71914 (Backport 1.43.1 release notes to master)
 - #71921 (explain the types used in the open64 call)

Failed merges:

r? @ghost

4 years agoRollup merge of #71921 - RalfJung:open-mode, r=hanna-kruppe
Dylan DPC [Wed, 6 May 2020 11:22:22 +0000 (13:22 +0200)]
Rollup merge of #71921 - RalfJung:open-mode, r=hanna-kruppe

explain the types used in the open64 call

Fixes https://github.com/rust-lang/rust/issues/71915, where I learned about this quirk. I don't actually know what I am talking about here. ;)

4 years agoRollup merge of #71914 - pietroalbini:relnotes-1.43.1, r=Mark-Simulacrum
Dylan DPC [Wed, 6 May 2020 11:22:21 +0000 (13:22 +0200)]
Rollup merge of #71914 - pietroalbini:relnotes-1.43.1, r=Mark-Simulacrum

Backport 1.43.1 release notes to master

r? @Mark-Simulacrum

4 years agoRollup merge of #71905 - mibac138:x-cmd-alias, r=Mark-Simulacrum
Dylan DPC [Wed, 6 May 2020 11:22:19 +0000 (13:22 +0200)]
Rollup merge of #71905 - mibac138:x-cmd-alias, r=Mark-Simulacrum

Add command aliases from Cargo to x.py commands

Fixes #71357

4 years agoRollup merge of #71889 - RalfJung:rwlock, r=Amanieu
Dylan DPC [Wed, 6 May 2020 11:22:17 +0000 (13:22 +0200)]
Rollup merge of #71889 - RalfJung:rwlock, r=Amanieu

Explain our RwLock implementation

Turns out that [with the latest POSIX docs](https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_wrlock.html), our `RwLock` implementation is actually correct. However, we cannot fully rely on that due to bugs in older glibc (fix released in 2016). Update the comments to explain that.

I also clarified our Mutex docs a bit and fixed another instance of https://github.com/rust-lang/rust/pull/55865.

r? @Amanieu
Fixes https://github.com/rust-lang/rust/issues/53127

4 years agoRollup merge of #71727 - hbina:simplified_usage, r=Mark-Simulacrum
Dylan DPC [Wed, 6 May 2020 11:22:13 +0000 (13:22 +0200)]
Rollup merge of #71727 - hbina:simplified_usage, r=Mark-Simulacrum

SipHasher with keys initialized to 0 should just use new()

I believe that is what the `new()` is for, for good reasons.

4 years agoRollup merge of #71510 - ssomers:btreemap_iter_intertwined, r=Mark-Simulacrum
Dylan DPC [Wed, 6 May 2020 11:22:05 +0000 (13:22 +0200)]
Rollup merge of #71510 - ssomers:btreemap_iter_intertwined, r=Mark-Simulacrum

Btreemap iter intertwined

3 commits:

1. Introduced benchmarks for `BTreeMap::iter()`. Benchmarks named `iter_20` were of the whole iteration process, so I renamed them. Also the benchmarks of `range` that I wrote earlier weren't very good. I included an (awkwardly named) one that compares `iter()` to `range(..)` on the same set, because the contrast is surprising:
```
 name                                           ns/iter
 btree::map::range_unbounded_unbounded          28,176
 btree::map::range_unbounded_vs_iter            89,369
```
Both dig up the same pair of leaf edges. `range(..)` also checks that some keys are correctly ordered, the only thing `iter()` does more is to copy the map's length.

2. Slightly refactoring the code to what I find more readable (not in chronological order of discovery), boosts performance:
```
>cargo-benchcmp.exe benchcmp a1 a2 --threshold 5
 name                                   a1 ns/iter  a2 ns/iter  diff ns/iter   diff %  speedup
 btree::map::find_rand_100              18          17                    -1   -5.56%   x 1.06
 btree::map::first_and_last_10k         64          71                     7   10.94%   x 0.90
 btree::map::iter_0                     2,939       2,209               -730  -24.84%   x 1.33
 btree::map::iter_1                     6,845       2,696             -4,149  -60.61%   x 2.54
 btree::map::iter_100                   8,556       3,672             -4,884  -57.08%   x 2.33
 btree::map::iter_10k                   9,292       5,884             -3,408  -36.68%   x 1.58
 btree::map::iter_1m                    10,268      6,510             -3,758  -36.60%   x 1.58
 btree::map::iteration_mut_100000       478,575     453,050          -25,525   -5.33%   x 1.06
 btree::map::range_unbounded_unbounded  28,176      36,169             7,993   28.37%   x 0.78
 btree::map::range_unbounded_vs_iter    89,369      38,290           -51,079  -57.16%   x 2.33
 btree::set::clone_100_and_remove_all   4,801       4,245               -556  -11.58%   x 1.13
 btree::set::clone_10k_and_remove_all   529,450     496,030          -33,420   -6.31%   x 1.07
```
But you can tell from the `range_unbounded_*` lines that, despite an unwarranted, vengeful attack on the range_unbounded_unbounded benchmark, this change still doesn't allow `iter()` to catch up with `range(..)`.

3. I guess that `range(..)` copes so well because it intertwines the leftmost and rightmost descend towards leaf edges, doing the two root node accesses close together, perhaps exploiting a CPU's internal pipelining? So the third commit distils a version of `range_search` (which we can't use directly because of the `Ord` bound), and we get another boost:
```
cargo-benchcmp.exe benchcmp a2 a3 --threshold 5
 name                                   a2 ns/iter  a3 ns/iter  diff ns/iter   diff %  speedup
 btree::map::first_and_last_100         40          43                     3    7.50%   x 0.93
 btree::map::first_and_last_10k         71          64                    -7   -9.86%   x 1.11
 btree::map::iter_0                     2,209       1,719               -490  -22.18%   x 1.29
 btree::map::iter_1                     2,696       2,205               -491  -18.21%   x 1.22
 btree::map::iter_100                   3,672       2,943               -729  -19.85%   x 1.25
 btree::map::iter_10k                   5,884       3,929             -1,955  -33.23%   x 1.50
 btree::map::iter_1m                    6,510       5,532               -978  -15.02%   x 1.18
 btree::map::iteration_mut_100000       453,050     476,667           23,617    5.21%   x 0.95
 btree::map::range_included_excluded    405,075     371,297          -33,778   -8.34%   x 1.09
 btree::map::range_included_included    427,577     397,440          -30,137   -7.05%   x 1.08
 btree::map::range_unbounded_unbounded  36,169      28,175            -7,994  -22.10%   x 1.28
 btree::map::range_unbounded_vs_iter    38,290      30,838            -7,452  -19.46%   x 1.24
```
But I think this is just fake news from the microbenchmarking media. `iter()` is still trying to catch up with `range(..)`. And we can sure do without another function. So I would skip this 3rd commit.

r? @Mark-Simulacrum

4 years agoconvert throw_validation_failure macro to same syntax as try_validation
Ralf Jung [Wed, 6 May 2020 09:42:18 +0000 (11:42 +0200)]
convert throw_validation_failure macro to same syntax as try_validation

4 years agoUpdate stacker and psm to 0.1.8
Mateusz Mikuła [Wed, 6 May 2020 09:29:30 +0000 (11:29 +0200)]
Update stacker and psm to 0.1.8

4 years agoproperly catch invalid-drop-fn errors
Ralf Jung [Wed, 6 May 2020 09:31:05 +0000 (11:31 +0200)]
properly catch invalid-drop-fn errors

4 years agoDead-code pass highlights too much of impl functions
mibac138 [Wed, 6 May 2020 08:01:20 +0000 (10:01 +0200)]
Dead-code pass highlights too much of impl functions

4 years agoAdd comment for `Ord` implementation for array
Donough Liu [Wed, 6 May 2020 09:02:53 +0000 (17:02 +0800)]
Add comment for `Ord` implementation for array

4 years agoUpdate librustdoc ID tests
Guillaume Gomez [Wed, 6 May 2020 07:59:47 +0000 (09:59 +0200)]
Update librustdoc ID tests

4 years agoconvert remaining try_validation to new macro
Ralf Jung [Wed, 6 May 2020 07:22:52 +0000 (09:22 +0200)]
convert remaining try_validation to new macro

4 years agoAuto merge of #69464 - Marwes:detach_undo_log, r=nikomatsakis
bors [Wed, 6 May 2020 07:03:31 +0000 (07:03 +0000)]
Auto merge of #69464 - Marwes:detach_undo_log, r=nikomatsakis

perf: Unify the undo log of all snapshot types

Extracted from #69218 and extended to all the current snapshot types.

Since snapshotting is such a frequent action in the compiler and many of the scopes execute so little work, the act of creating the snapshot and rolling back empty/small snapshots end up showing in perf. By unifying all the logs into one the creation of snapshots becomes significantly cheaper at the cost of some complexity when combining the log with the specific data structures that are being mutated.

Depends on https://github.com/rust-lang-nursery/ena/pull/29

4 years agoShrink `LocalDecl` by 16 bytes.
Nicholas Nethercote [Wed, 6 May 2020 02:41:15 +0000 (12:41 +1000)]
Shrink `LocalDecl` by 16 bytes.

By boxing `user_ty`.

4 years agoShrink `LocalDecl` by 56 bytes.
Nicholas Nethercote [Wed, 6 May 2020 02:29:00 +0000 (12:29 +1000)]
Shrink `LocalDecl` by 56 bytes.

By boxing `local_info`.

4 years agocomment out rustc-dev-guide in NIGHTLY_TOOLS
mark [Wed, 6 May 2020 02:46:12 +0000 (21:46 -0500)]
comment out rustc-dev-guide in NIGHTLY_TOOLS

4 years agoDetect errors caused by `async` block in 2015 edition
Esteban Küber [Sat, 2 May 2020 01:24:14 +0000 (18:24 -0700)]
Detect errors caused by `async` block in 2015 edition

4 years agouse trait_object_dummy_self instead of err
mark [Wed, 6 May 2020 02:32:08 +0000 (21:32 -0500)]
use trait_object_dummy_self instead of err

4 years agoIgnore SGX on a few ui tests
Mohsen Zohrevandi [Wed, 6 May 2020 01:12:50 +0000 (18:12 -0700)]
Ignore SGX on a few ui tests

4 years agoAdd a size assertion for `LocalDecl`.
Nicholas Nethercote [Tue, 5 May 2020 23:35:11 +0000 (09:35 +1000)]
Add a size assertion for `LocalDecl`.

4 years agoImprove `LocalDecl` creation.
Nicholas Nethercote [Wed, 6 May 2020 00:17:38 +0000 (10:17 +1000)]
Improve `LocalDecl` creation.

This commit adds some new `LocalDecl` methods:
- `with_source_info`, a most general constructor.
- `new`, a variant of `with_source_info` which represents the most
  common use case.
- `internal` a modifying method (like the already present `immutable`).

It removes some old `LocalDecl` methods:
- `new_internal` and `new_local`, because they're subsumed by the new
  methods.
- `new_return_place`, because it was identical to `new_temp`.

Finally, it cleans up all the use sites.

4 years agoAdd `SourceInfo::outermost`.
Nicholas Nethercote [Wed, 6 May 2020 00:30:11 +0000 (10:30 +1000)]
Add `SourceInfo::outermost`.

4 years agoAuto merge of #71875 - Xanewok:update-rls, r=tmandry
bors [Tue, 5 May 2020 23:52:56 +0000 (23:52 +0000)]
Auto merge of #71875 - Xanewok:update-rls, r=tmandry

Update RLS

In addition to fixing the toolstate, this also changes the default
compilation model to the out-of-process one, which should hopefully
target considerable memory usage for long-running instances of the RLS.

Fixes #71753

r? @ghost

4 years agoadd test for insufficiently aligned vtable
Ralf Jung [Tue, 5 May 2020 22:13:41 +0000 (00:13 +0200)]
add test for insufficiently aligned vtable

4 years agovalidation: port more checks to the pattern-based macro (and give it the shorter...
Ralf Jung [Tue, 5 May 2020 22:07:53 +0000 (00:07 +0200)]
validation: port more checks to the pattern-based macro (and give it the shorter name)

4 years agoIndex IDs already used by rustdoc template
Guillaume Gomez [Tue, 5 May 2020 21:41:59 +0000 (23:41 +0200)]
Index IDs already used by rustdoc template

4 years agoAdd test for new implementations section title
Guillaume Gomez [Tue, 5 May 2020 11:53:42 +0000 (13:53 +0200)]
Add test for new implementations section title

4 years agoUpdate tests
Guillaume Gomez [Tue, 5 May 2020 11:48:47 +0000 (13:48 +0200)]
Update tests

4 years agoReplace title "Methods" with "Implementations"
Guillaume Gomez [Tue, 5 May 2020 11:48:32 +0000 (13:48 +0200)]
Replace title "Methods" with "Implementations"

4 years agoUnify winapi features for tools
Tyler Mandry [Tue, 5 May 2020 19:50:58 +0000 (12:50 -0700)]
Unify winapi features for tools

4 years agoUse -fvisibility=hidden for libunwind
Petr Hosek [Tue, 5 May 2020 19:41:23 +0000 (12:41 -0700)]
Use -fvisibility=hidden for libunwind

We don't want to export any symbols from Rust's version of libunwind
as these may collide with other copies of libunwind e.g. when linking
Rust staticlib together C/C++ libraries that have their own version.

4 years agoexplain the types used in the open64 call
Ralf Jung [Tue, 5 May 2020 14:43:57 +0000 (16:43 +0200)]
explain the types used in the open64 call

4 years agoUnify some syn 1.0 et al. features for tools
Igor Matuszewski [Tue, 5 May 2020 12:16:15 +0000 (14:16 +0200)]
Unify some syn 1.0 et al. features for tools

4 years agoUpdate RLS
Igor Matuszewski [Mon, 4 May 2020 12:51:31 +0000 (14:51 +0200)]
Update RLS

In addition to fixing the toolstate, this also changes the default
compilation model to the out-of-process one, which should hopefully
target considerable memory usage for long-running instances of the RLS.

4 years agoAuto merge of #71916 - Dylan-DPC:rollup-luj7zx3, r=Dylan-DPC
bors [Tue, 5 May 2020 11:05:18 +0000 (11:05 +0000)]
Auto merge of #71916 - Dylan-DPC:rollup-luj7zx3, r=Dylan-DPC

Rollup of 4 pull requests

Successful merges:

 - #69984 (Add Option to Force Unwind Tables)
 - #71830 (Remove clippy from some leftover lists of "possibly failing" tools)
 - #71894 (Suggest removing semicolon in last expression only if it's type is known)
 - #71897 (Improve docs for embed-bitcode and linker-plugin-lto)

Failed merges:

r? @ghost

4 years agoRollup merge of #71897 - alexcrichton:embed-bitcode-docs, r=nnethercote
Dylan DPC [Tue, 5 May 2020 10:55:13 +0000 (12:55 +0200)]
Rollup merge of #71897 - alexcrichton:embed-bitcode-docs, r=nnethercote

Improve docs for embed-bitcode and linker-plugin-lto

Follow-up from #71716 I wasn't able to add in time.

4 years agoRollup merge of #71894 - mibac138:semicolon-not-always-helpful, r=estebank
Dylan DPC [Tue, 5 May 2020 10:55:11 +0000 (12:55 +0200)]
Rollup merge of #71894 - mibac138:semicolon-not-always-helpful, r=estebank

Suggest removing semicolon in last expression only if it's type is known

Fixes #67971

Is there a syntax for explicitly checking if a note doesn't exist in test output? Something like `//~ !NOTE ...`

I believe r? @estebank deals with diagnostics.

4 years agoRollup merge of #71830 - oli-obk:subrepo_funness, r=Mark-Simulacrum
Dylan DPC [Tue, 5 May 2020 10:55:09 +0000 (12:55 +0200)]
Rollup merge of #71830 - oli-obk:subrepo_funness, r=Mark-Simulacrum

Remove clippy from some leftover lists of "possibly failing" tools

https://github.com/rust-lang/rust/pull/70655 successfully made clippy get built and tested on CI on every merge, but the lack of emitted toolstate info caused the toolstate to get updated to test-fail. We should remove clippy entirely from toolstate, as it now is always test-pass.

The changes made in this PR reflect what we do for `rustdoc`, which is our preexisting tool that is gated on CI.

r? @Mark-Simulacrum

4 years agoRollup merge of #69984 - lenary:lenary/force-uwtables, r=hanna-kruppe
Dylan DPC [Tue, 5 May 2020 10:55:08 +0000 (12:55 +0200)]
Rollup merge of #69984 - lenary:lenary/force-uwtables, r=hanna-kruppe

Add Option to Force Unwind Tables

When panic != unwind, `nounwind` is added to all functions for a target.
This can cause issues when a panic happens with RUST_BACKTRACE=1, as
there needs to be a way to reconstruct the backtrace. There are three
possible sources of this information: forcing frame pointers (for which
an option exists already), debug info (for which an option exists), or
unwind tables.

Especially for embedded devices, forcing frame pointers can have code
size overheads (RISC-V sees ~10% overheads, ARM sees ~2-3% overheads).
In production code, it can be the case that debug info is not kept, so it is useful
to provide this third option, unwind tables, that users can use to
reconstruct the call stack. Reconstructing this stack is harder than
with frame pointers, but it is still possible.

---

This came up in discussion on #69890, and turned out to be a fairly simple addition.

r? @hanna-kruppe

4 years agobackport 1.43.1 release notes
Josh Stone [Fri, 1 May 2020 20:18:15 +0000 (13:18 -0700)]
backport 1.43.1 release notes

4 years agoRestore the snapshot/rollback optimization for region constraints
Markus Westerlind [Tue, 28 Apr 2020 19:05:12 +0000 (21:05 +0200)]
Restore the snapshot/rollback optimization for region constraints

4 years agorefactor: Replace probe_fudge by an explict call for the lengths
Markus Westerlind [Tue, 28 Apr 2020 18:59:34 +0000 (20:59 +0200)]
refactor: Replace probe_fudge by an explict call for the lengths

4 years agorefactor: Move probe_fudge into fudge.rs
Markus Westerlind [Tue, 28 Apr 2020 18:46:02 +0000 (20:46 +0200)]
refactor: Move probe_fudge into fudge.rs

4 years agoImprove naming
Markus Westerlind [Fri, 17 Apr 2020 07:15:28 +0000 (09:15 +0200)]
Improve naming

4 years agoGenerate the UndoLog upcasts with a macro
Markus Westerlind [Fri, 17 Apr 2020 07:00:02 +0000 (09:00 +0200)]
Generate the UndoLog upcasts with a macro

4 years agoFix review comments
Markus Westerlind [Fri, 17 Apr 2020 06:54:28 +0000 (08:54 +0200)]
Fix review comments

4 years agoRebase and use ena 0.14
Markus Westerlind [Mon, 16 Mar 2020 15:43:03 +0000 (16:43 +0100)]
Rebase and use ena 0.14

4 years agorefactor: simplify
Markus Westerlind [Tue, 3 Mar 2020 09:23:04 +0000 (10:23 +0100)]
refactor: simplify

4 years agoPrevent modifications without an undo log
Markus Westerlind [Wed, 26 Feb 2020 09:43:24 +0000 (10:43 +0100)]
Prevent modifications without an undo log

4 years agoFix import
Markus Westerlind [Tue, 25 Feb 2020 22:08:29 +0000 (23:08 +0100)]
Fix import

4 years agorefactor: Extract the undo log to its own modules
Markus Westerlind [Tue, 25 Feb 2020 16:09:01 +0000 (17:09 +0100)]
refactor: Extract the undo log to its own modules

4 years agorefactor: Rename Logs to InferCtxtUndoLogs
Markus Westerlind [Tue, 25 Feb 2020 15:41:29 +0000 (16:41 +0100)]
refactor: Rename Logs to InferCtxtUndoLogs

4 years agosimplify
Markus Westerlind [Tue, 25 Feb 2020 14:39:01 +0000 (15:39 +0100)]
simplify

4 years agoperf: Merge region_obligations snapshotting into the undo log
Markus Westerlind [Tue, 25 Feb 2020 13:45:07 +0000 (14:45 +0100)]
perf: Merge region_obligations snapshotting into the undo log

4 years agoperf: Limit leak check snapshotting to probe_maybe_skip_leak_check
Markus Westerlind [Tue, 25 Feb 2020 13:31:07 +0000 (14:31 +0100)]
perf: Limit leak check snapshotting to probe_maybe_skip_leak_check

4 years agoperf: Lazily recive the Rollback argument in rollback_to
Markus Westerlind [Tue, 25 Feb 2020 13:08:34 +0000 (14:08 +0100)]
perf: Lazily recive the Rollback argument in rollback_to

4 years agoperf: Separate CombinedSnapshot into a FullSnapshot for probing
Markus Westerlind [Tue, 25 Feb 2020 12:32:58 +0000 (13:32 +0100)]
perf: Separate CombinedSnapshot into a FullSnapshot for probing

4 years agoMove projection_cache into the combined undo log
Markus Westerlind [Tue, 25 Feb 2020 12:08:38 +0000 (13:08 +0100)]
Move projection_cache into the combined undo log

4 years agoAllow SnapshotMap to have a separate undo_log
Markus Westerlind [Tue, 25 Feb 2020 09:29:47 +0000 (10:29 +0100)]
Allow SnapshotMap to have a separate undo_log

4 years agoMove region_constraint to the unified undo log
Markus Westerlind [Tue, 25 Feb 2020 08:47:07 +0000 (09:47 +0100)]
Move region_constraint to the unified undo log

4 years agoFix the numbering of the tests
LG3696 [Tue, 5 May 2020 08:08:02 +0000 (10:08 +0200)]
Fix the numbering of the tests

4 years agoperf: Reduce snapshot/rollback overhead
Markus Westerlind [Mon, 24 Feb 2020 09:40:36 +0000 (10:40 +0100)]
perf: Reduce snapshot/rollback overhead

By merging the undo_log of all structures part of the snapshot the cost
of creating a snapshot becomes much cheaper. Since snapshots with no or
few changes are so frequent this ends up mattering more than the slight
overhead of dispatching on the variants that map to each field.

4 years agoAllow `hir().find` to return `None`
John Kåre Alsaker [Mon, 16 Mar 2020 18:17:40 +0000 (19:17 +0100)]
Allow `hir().find` to return `None`

4 years agorely on rdlock/wrlock not returning anything but the specified error codes
Ralf Jung [Tue, 5 May 2020 07:08:00 +0000 (09:08 +0200)]
rely on rdlock/wrlock not returning anything but the specified error codes

4 years agoAuto merge of #71846 - petrochenkov:fresh2, r=davidtwco
bors [Tue, 5 May 2020 06:01:08 +0000 (06:01 +0000)]
Auto merge of #71846 - petrochenkov:fresh2, r=davidtwco

resolve: Relax fresh binding disambiguation slightly to fix regression

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

4 years agoAuto merge of #71907 - Dylan-DPC:rollup-z8iaqlv, r=Dylan-DPC
bors [Tue, 5 May 2020 02:51:41 +0000 (02:51 +0000)]
Auto merge of #71907 - Dylan-DPC:rollup-z8iaqlv, r=Dylan-DPC

Rollup of 10 pull requests

Successful merges:

 - #71587 (Report cannot move errors in promoted MIR)
 - #71711 (Updates to some ignored tests)
 - #71845 (Add const examples)
 - #71878 (Add remove_current_as_list to LinkedList's CursorMut)
 - #71881 (Correctly handle UEFI targets as Windows-like when emitting sections for LLVM bitcode)
 - #71883 (add a missing "at" in a comment)
 - #71891 (¬∃x. ¬y => ∀x. y)
 - #71892 (Update btree_map::VacantEntry::insert docs to actually call insert)
 - #71902 (Suggest to add missing feature when using gated const features)
 - #71904 (fix typo in function name)

Failed merges:

r? @ghost

4 years agoSuggest removing semicolon in last expression only if it's type is known
mibac138 [Mon, 4 May 2020 16:33:05 +0000 (18:33 +0200)]
Suggest removing semicolon in last expression only if it's type is known

4 years agoRollup merge of #71904 - euclio:function-typo, r=jonas-schievink
Dylan DPC [Mon, 4 May 2020 23:49:52 +0000 (01:49 +0200)]
Rollup merge of #71904 - euclio:function-typo, r=jonas-schievink

fix typo in function name

Drive-by fix.

4 years agoRollup merge of #71902 - mibac138:const-feature-diag, r=varkor
Dylan DPC [Mon, 4 May 2020 23:49:51 +0000 (01:49 +0200)]
Rollup merge of #71902 - mibac138:const-feature-diag, r=varkor

Suggest to add missing feature when using gated const features

Fixes #71797

4 years agoRollup merge of #71892 - integer32llc:btreemap-entry-vacant-docs, r=jonas-schievink
Dylan DPC [Mon, 4 May 2020 23:49:49 +0000 (01:49 +0200)]
Rollup merge of #71892 - integer32llc:btreemap-entry-vacant-docs, r=jonas-schievink

Update btree_map::VacantEntry::insert docs to actually call insert

It looks like they were copied from the `or_insert` docs. This change
makes the example more like the hash_map::VacantEntry::insert docs.

4 years agoRollup merge of #71891 - lcnr:not-iter-any, r=Dylan-DPC
Dylan DPC [Mon, 4 May 2020 23:49:48 +0000 (01:49 +0200)]
Rollup merge of #71891 - lcnr:not-iter-any, r=Dylan-DPC

¬∃x. ¬y => ∀x. y

4 years agoRollup merge of #71883 - Dante-Broggi:patch-1, r=Dylan-DPC
Dylan DPC [Mon, 4 May 2020 23:49:46 +0000 (01:49 +0200)]
Rollup merge of #71883 - Dante-Broggi:patch-1, r=Dylan-DPC

add a missing "at" in a comment

4 years agoRollup merge of #71881 - IsaacWoods:master, r=petrochenkov
Dylan DPC [Mon, 4 May 2020 23:49:44 +0000 (01:49 +0200)]
Rollup merge of #71881 - IsaacWoods:master, r=petrochenkov

Correctly handle UEFI targets as Windows-like when emitting sections for LLVM bitcode

This handles UEFI handles when emitting inline assembly for sections containing LLVM bitcode. See details in #71880. I have locally confirmed that this change fixes compilation of projects using the `x86_64-unknown-uefi` target compiling with `cargo-xbuild`, but I am not very familiar with LLVM bitcode so this may not be the correct approach.

r? @alexcrichton as they wrote the initial LLVM bitcode emitting code?

4 years agoRollup merge of #71878 - main--:patch-2, r=Amanieu
Dylan DPC [Mon, 4 May 2020 23:49:43 +0000 (01:49 +0200)]
Rollup merge of #71878 - main--:patch-2, r=Amanieu

Add remove_current_as_list to LinkedList's CursorMut

The `remove_current` method only returns the inner `T` and deallocates the list node. This is unnecessary for move operations, where the element is going to be linked back into this (or even a different) `LinkedList`. The `remove_current_as_list` method avoids this by returning the unlinked list node as a new single-element `LinkedList` structure.

(per https://github.com/rust-lang/rust/issues/58533#issuecomment-623010157)

4 years agoRollup merge of #71845 - steveklabnik:add-const-examples, r=dtolnay
Dylan DPC [Mon, 4 May 2020 23:49:41 +0000 (01:49 +0200)]
Rollup merge of #71845 - steveklabnik:add-const-examples, r=dtolnay

Add const examples

I only added them to `std::f32` to get feedback on this approach before adding the other constants.

When looking at https://github.com/rust-lang/rust/pull/68952, I found the docs a little confusing. Unless you're intimately aware of what's going on here, I don't think it's super clear what is deprecated and what you're supposed to do instead. I think short examples really clarify what's meant here, so that's what I did.

4 years agoRollup merge of #71711 - Mark-Simulacrum:deignore-tests, r=nikomatsakis
Dylan DPC [Mon, 4 May 2020 23:49:37 +0000 (01:49 +0200)]
Rollup merge of #71711 - Mark-Simulacrum:deignore-tests, r=nikomatsakis

Updates to some ignored tests

This removes or fixes some ignored test cases.

cc #13745

4 years agoRollup merge of #71587 - matthewjasper:promoted-move-errors, r=nikomatsakis
Dylan DPC [Mon, 4 May 2020 23:49:32 +0000 (01:49 +0200)]
Rollup merge of #71587 - matthewjasper:promoted-move-errors, r=nikomatsakis

Report cannot move errors in promoted MIR

Closes #70934

4 years agoAdd command aliases from Cargo to x.py commands
mibac138 [Mon, 4 May 2020 22:31:37 +0000 (00:31 +0200)]
Add command aliases from Cargo to x.py commands

4 years agofix typo in function name
Andy Russell [Mon, 4 May 2020 22:27:23 +0000 (18:27 -0400)]
fix typo in function name

4 years agoSuggest to add missing feature when using gated const features
mibac138 [Mon, 4 May 2020 21:33:10 +0000 (23:33 +0200)]
Suggest to add missing feature when using gated const features

4 years agoImprove docs for embed-bitcode and linker-plugin-lto
Alex Crichton [Mon, 4 May 2020 20:45:06 +0000 (13:45 -0700)]
Improve docs for embed-bitcode and linker-plugin-lto

Follow-up from #71716 I wasn't able to add in time.