bors [Fri, 2 Nov 2018 12:45:03 +0000 (12:45 +0000)]
Auto merge of #55316 - RalfJung:retagging, r=oli-obk
Add Retagging statements
This adds a `Retag` statement kind to MIR, used to perform the retagging operation from [Stacked Borrows](https://www.ralfj.de/blog/2018/08/07/stacked-borrows.html). It also kills the old `Validate` statements that I added last year.
NOTE: This includes https://github.com/rust-lang/rust/pull/55270. Only [these commits are new](https://github.com/RalfJung/rust/compare/stacked-borrows-ng...RalfJung:retagging).
bors [Fri, 2 Nov 2018 09:46:11 +0000 (09:46 +0000)]
Auto merge of #54718 - froydnj:aarch64-ci, r=alexcrichton
add an appveyor config for aarch64-pc-windows-msvc
This is purely a cargo-cult of things to solicit feedback from humans and/or automation failures. Not sure that the build artifacts would get packaged properly to start providing nightly tarballs for `libstd`, but this is at least a start.
bors [Fri, 2 Nov 2018 04:20:36 +0000 (04:20 +0000)]
Auto merge of #55359 - alex:command-exec-uaf, r=alexcrichton
Fixes #46775 -- don't mutate the process's environment in Command::exec
Instead, pass the environment to execvpe, so the kernel can apply it directly to the new process. This avoids a use-after-free in the case where exec'ing the new process fails for any reason, as well as a race condition if there are other threads alive during the exec.
bors [Fri, 2 Nov 2018 01:19:17 +0000 (01:19 +0000)]
Auto merge of #55305 - nikomatsakis:universes-refactor-3, r=scalexm
universes refactor 3
Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't **believe** this branch changes our behavior in any notable way, though I'm marking the branch as `WIP` to give myself a chance to verify this.
bors [Thu, 1 Nov 2018 16:06:15 +0000 (16:06 +0000)]
Auto merge of #55579 - pietroalbini:rollup, r=kennytm
Rollup of 13 pull requests
Successful merges:
- #55280 (Add libproc_macro to rust-src distribution)
- #55469 (Regression tests for issue #54477.)
- #55504 (Use vec![x; n] instead of iter::repeat(x).take(n).collect())
- #55522 (use String::from() instead of format!() macro to construct Strings.)
- #55536 (Pass suggestions as impl Iterator instead of Vec)
- #55542 (syntax: improve a few allocations)
- #55558 (Tweak `MatcherPos::matches`)
- #55561 (Fix double_check tests on big-endian targets)
- #55573 (Make sure the `aws` executable is in $PATH on macOS)
- #55574 (Use `SmallVec` within `MoveData`.)
- #55575 (Fix invalid_const_promotion test on some archs)
- #55578 (Made doc example of `impl Default for …` use `-> Self` instead of explicit self type)
- #55582 (Remove unused import copy from publish_toolstate.py)
kennytm [Thu, 1 Nov 2018 14:56:12 +0000 (22:56 +0800)]
Rollup merge of #55561 - smaeul:test-fixes, r=alexcrichton
Fix double_check tests on big-endian targets
Since the enums get optimized down to 1 byte long, the bits set in the `usize` member don't align with the `enum` values on big-endian machines. Avoid this issue by shrinking the integer member to the
same size as the enums.
Alex Gaynor [Thu, 25 Oct 2018 19:44:32 +0000 (19:44 +0000)]
Fixes #46775 -- don't mutate the process's environment in Command::exec
Instead, pass the environment to execvpe, so the kernel can apply it directly to the new process. This avoids a use-after-free in the case where exec'ing the new process fails for any reason, as well as a race condition if there are other threads alive during the exec.
bors [Thu, 1 Nov 2018 02:41:00 +0000 (02:41 +0000)]
Auto merge of #55521 - nrc:rls-fix, r=petrochenkov
save-analysis: bug fix and optimisation.
The first commit fixes a bug in name resolution and save-analysis (introduced in #54145) and removes an unused parameter. This fixes the RLS tests, which are currently blocking distribution of the RLS. The second commit removes macro uses from save-analysis data, since these are never used, they just take up space.
Samuel Holland [Sun, 16 Sep 2018 18:27:56 +0000 (18:27 +0000)]
Fix double_check tests on big-endian targets
Since the enums get optimized down to 1 byte long, the bits
set in the usize member don't align with the enums on big-endian
machines. Avoid this issue by shrinking the integer member to the
same size as the enums.
bors [Wed, 31 Oct 2018 13:52:00 +0000 (13:52 +0000)]
Auto merge of #54806 - parched:park, r=RalfJung
thread::unpark: Avoid notifying with mutex locked.
This means when the other thread wakes it can continue right away
instead of having to wait for the mutex.
Also add some comments explaining why the mutex needs to be locked in
the first place.
This is a follow up to https://github.com/rust-lang/rust/pull/54174
I did some tests with relacy [here](https://gist.github.com/parched/b7fb88c97755a81e5cb9f9048a15f7fb) (This PR is InnerV2). If anyone can think of some other test case worth adding let me know.
bors [Wed, 31 Oct 2018 06:42:24 +0000 (06:42 +0000)]
Auto merge of #55304 - alexcrichton:update-credentials, r=kennytm
ci: Move global credentials to web configuration
This commit moves a number of our encrypted credentials stored in
configuration files in this repository to env vars on the web UI. This
will hopefully make it easier to rotate credentials in the future as
well as quickly change them if the need arises. (quicker than landing a
PR that is).
This also updates the travis deployment process to always use the `aws`
command line tool which we're already installing on Linux and should
enable us to avoid all `dpl` gem issues as well as have greater control
over what's going where.
bors [Tue, 30 Oct 2018 23:36:10 +0000 (23:36 +0000)]
Auto merge of #54004 - tromey:enum-debuginfo, r=tromey
Fix DWARF generation for enums
The DWARF generated for Rust enums was always somewhat unusual.
Rather than using DWARF constructs directly, it would emit magic field
names like "RUST$ENCODED$ENUM$0$Name" and "RUST$ENUM$DISR". Since
PR #45225, though, even this has not worked -- the ad hoc scheme was
not updated to handle the wider variety of niche-filling layout
optimizations now available.
This patch changes the generated DWARF to use the standard tags meant
for this purpose; namely, DW_TAG_variant and DW_TAG_variant_part.
The patch to implement this went in to LLVM 7. In order to work with
older versions of LLVM, and because LLVM doesn't do anything here for
PDB, the existing code is kept as a fallback mode.
Support for this DWARF is in the Rust lldb and in gdb 8.2.
Tom Tromey [Thu, 27 Sep 2018 16:17:00 +0000 (10:17 -0600)]
Add legacy debuginfo tests
The enum debuginfo patch includes a legacy mode that is used when
building against LLVM 5 and LLVM 6. The main enum debuginfo tests
have been updated to rely on the new approach and a new-enough gdb.
This patch makes a copy of these tests so that the fallback mode will
continue to be tested.
Note that nil-enum.rs is not copied; it seemed not to provide enough
value to bother.
A new header directive is added, "ignore-llvm-version". I will send a
patch to update the rustc documentation once this lands.
Tom Tromey [Wed, 26 Sep 2018 18:58:10 +0000 (12:58 -0600)]
Update enum debuginfo tests
Bug #52452 notes some debuginfo test regressions when moving to gdb
8.1. This series will also cause versions of gdb before 8.2 to fail
when a recent LLVM is used -- DW_TAG_variant_part support was not
added until 8.2.
This patch updates one of the builders to a later version of Ubuntu,
which comes with gdb 8.2. It updates the relevant tests to require
both a new-enough LLVM and a new-enough gdb; the subsequent patch
arranges to continue testing the fallback mode.
The "gdbg" results are removed from these tests because the tests now
require a rust-enabled gdb.
If you read closely, you'll see that some of the lldb results in this
patch still look a bit strange. This will be addressed in a
subsequent patch; I believe the fix is to disable the Python
pretty-printers when lldb is rust-enabled.
Tom Tromey [Wed, 29 Nov 2017 21:42:25 +0000 (14:42 -0700)]
Fix DWARF generation for enums
The DWARF generated for Rust enums was always somewhat unusual.
Rather than using DWARF constructs directly, it would emit magic field
names like "RUST$ENCODED$ENUM$0$Name" and "RUST$ENUM$DISR". Since
PR #45225, though, even this has not worked -- the ad hoc scheme was
not updated to handle the wider variety of niche-filling layout
optimizations now available.
This patch changes the generated DWARF to use the standard tags meant
for this purpose; namely, DW_TAG_variant and DW_TAG_variant_part.
The patch to implement this went in to LLVM 7. In order to work with
older versions of LLVM, and because LLVM doesn't do anything here for
PDB, the existing code is kept as a fallback mode.
Support for this DWARF is in the Rust lldb and in gdb 8.2.
bors [Tue, 30 Oct 2018 11:38:31 +0000 (11:38 +0000)]
Auto merge of #55502 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests
Successful merges:
- #54885 (Don't lint 'unused_parens` on `if (break _) { .. }`)
- #55205 (Improve a few cases of collecting to an FxHash(Map/Set))
- #55450 (msp430: remove the whole Atomic* API)
- #55459 (Add UI test for #49296)
- #55472 (Use opt.take() instead of mem::replace(opt, None))
- #55473 (Take advantage of impl Iterator in (transitive/elaborate)_bounds)
- #55474 (Fix validation false positive)
- #55476 (Change a flat_map with 0/1-element vecs to a filter_map)
- #55487 (Adjust Ids of path segments in visibility modifiers)
- #55493 (Doc fixes)
- #55494 (borrowck=migrate must look at parents of closures)
- #55496 (Update clippy)
kennytm [Tue, 30 Oct 2018 10:55:37 +0000 (18:55 +0800)]
Rollup merge of #55494 - pnkfelix:issue-55492-borrowck-migrate-must-look-at-parents-of-closures, r=davidtwco
borrowck=migrate must look at parents of closures
This fixes the NLL migration mode (which is the default with edition=2018) to inspect all parents of a closure in addition to the closure itself when looking to see if AST-borrowck issues an error for the given code.
kennytm [Tue, 30 Oct 2018 10:55:27 +0000 (18:55 +0800)]
Rollup merge of #55450 - japaric:msp430, r=alexcrichton
msp430: remove the whole Atomic* API
PR #51953 enabled the Atomic*.{load,store} API on MSP430. Unfortunately,
the LLVM backend doesn't currently support those atomic operations, so this
commit removes the API and leaves instructions on how and when to enable it
in the future.
the second fixes compiling liballoc for msp430
closes #54511
r? @alexcrichton
cc @chernomor @awygle @cr1901 @pftbest
I removed the original file that more completely captured the original
crate's tests, as its source crate
(https://crates.io/crates/collection) is licensed under GPL3, and I
suspect that license is not loose enough for me to put into our repo
under our MIT/Apache licensing.
(Would it be an option to attach the GPL3 licesne to just the one
test? Probably. But do I want to bother with it that that point?
Nope!)
bors [Mon, 29 Oct 2018 10:19:17 +0000 (10:19 +0000)]
Auto merge of #55462 - pietroalbini:rollup, r=pietroalbini
Rollup of 9 pull requests
Successful merges:
- #54965 (update tcp stream documentation)
- #55269 (fix typos in various places)
- #55384 (Avoid unnecessary allocations in `float_lit` and `integer_lit`.)
- #55423 (back out bogus `Ok`-wrapping suggestion on `?` arm type mismatch)
- #55426 (Make a bunch of trivial methods of NonNull be `#[inline]`)
- #55438 (Avoid directly catching BaseException in bootstrap configure script)
- #55439 (Remove unused sys import from generate-deriving-span-tests)
- #55440 (Remove unreachable code in hasClass function in Rustdoc)
- #55447 (Fix invalid path in generate-deriving-span-tests.py.)