bors [Fri, 3 May 2019 10:15:48 +0000 (10:15 +0000)]
Auto merge of #60423 - varkor:update-getopts, r=alexcrichton
Update getopts
This is a prerequisite to fixing https://github.com/rust-lang/rust/issues/32352. The rustbuild fix has been pulled out of https://github.com/rust-lang/rust/pull/59440.
bors [Fri, 3 May 2019 07:26:46 +0000 (07:26 +0000)]
Auto merge of #59883 - ebarnard:clonefile, r=sfackler
Make `std::fs::copy` attempt to create copy-on-write clones of files on MacOS
The behaviour of MacOS now matches Linux which uses `copy_file_range` to perform CoW file copies where available and supported by the underlying filesystem.
bors [Thu, 2 May 2019 07:38:36 +0000 (07:38 +0000)]
Auto merge of #60156 - RalfJung:macos-rand, r=oli-obk,alexcrichton
use SecRandomCopyBytes on macOS in Miri
This is a hack to fix https://github.com/rust-lang/miri/issues/686: on macOS, rustc will open `/dev/urandom` to initialize a `HashMap`. That's quite hard to emulate properly in Miri without a full-blown implementation of file descriptors. However, Miri needs an implementation of `SecRandomCopyBytes` anyway to support [getrandom](https://crates.io/crates/getrandom), so using it here should work just as well.
This will only have an effect when libstd is compiled specifically for Miri, but that will generally be the case when people use `cargo miri`.
This is clearly a hack, so I am opening this to start a discussion about whether we are okay with such a hack or not.
bors [Thu, 2 May 2019 04:47:36 +0000 (04:47 +0000)]
Auto merge of #59008 - varkor:const-generics-infer, r=eddyb
Add const generics to infer (and transitive dependencies)
Split out from #53645. This work is a collaborative effort with @yodaldevoid.
There are a number of stubs. These are mainly to ensure we don't overlook them when completing the implementation, but are not necessary for the initial implementation. We plan to address these in follow up PRs.
bors [Thu, 2 May 2019 02:01:31 +0000 (02:01 +0000)]
Auto merge of #60460 - Centril:rollup-gz5bc8i, r=Centril
Rollup of 7 pull requests
Successful merges:
- #59634 (Added an explanation for the E0704 error.)
- #60348 (move some functions from parser.rs to diagostics.rs)
- #60385 (Emit metadata files earlier)
- #60428 (Refactor `eval_body_using_ecx` so that it doesn't need to query for MIR)
- #60437 (Ensure that drop order of `async fn` matches `fn` and that users cannot refer to generated arguments.)
- #60439 (doc: Warn about possible zombie apocalypse)
- #60452 (Remove Context and ContextKind)
Rollup merge of #60439 - vorner:zombie-apocalypse-warn, r=TimNN
doc: Warn about possible zombie apocalypse
Extend the std::process::Child docs with warning about possible zombies.
The previous version mentioned that when dropping the Child, the
process is not killed. However, the wording gave the impression that
such behaviour is fine to do (leaving the reader believe low-level
details like reaping zombies of the dead processes is taken over by std
somehow; or simply leaving the reader unaware about the problem).
Rollup merge of #60348 - agnxy:refactor-parser, r=petrochenkov
move some functions from parser.rs to diagostics.rs
Starting with a few functions mentioned in https://github.com/rust-lang/rust/issues/60015#issuecomment-484259773. We might refactor parser.rs further in subsequent changes.
r? @petrochenkov
Rollup merge of #59634 - DevQps:explain-E0704, r=estebank
Added an explanation for the E0704 error.
# Description
Adds an explanation on the E0704 error. I tried to stick as closely to the message that the compiler generates. It's the first time I am fixing error messages here, so if there is something I did wrong or should improve, please let me know.
bors [Wed, 1 May 2019 17:24:11 +0000 (17:24 +0000)]
Auto merge of #60435 - Centril:rollup-aa5lmuw, r=Centril
Rollup of 7 pull requests
Successful merges:
- #60287 (Use references for variances_of)
- #60327 (Search for incompatible universes in borrow errors)
- #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1)
- #60366 (build-gcc: Create missing cc symlink)
- #60369 (Support ZSTs in DispatchFromDyn)
- #60404 (Implement `BorrowMut<str>` for `String`)
- #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.)
Extend the std::process::Child docs with warning about possible zombies.
The previous version mentioned that when dropping the Child, the
process is not killed. However, the wording gave the impression that
such behaviour is fine to do (leaving the reader believe low-level
details like reaping zombies of the dead processes is taken over by std
somehow; or simply leaving the reader unaware about the problem).
David Wood [Wed, 1 May 2019 13:31:27 +0000 (14:31 +0100)]
Ensure that users cannot use generated arguments.
This commit gensyms the generated ident for replacement arguments so
that users cannot refer to them. It also ensures that levenshtein
distance suggestions do not suggest gensymed identifiers.
bors [Wed, 1 May 2019 12:21:04 +0000 (12:21 +0000)]
Auto merge of #60137 - eddyb:rustdoc-rm-def-ctor-hax, r=petrochenkov
rustdoc: remove def_ctor hack.
~~No longer necessary since we have `describe_def`.~~
Turns out `def_ctor` was used in conjunction with abusing `tcx.type_of(def_id)` working on both type definitions and `impl`s (specifically, of builtin types), but also reimplementing a lot of the logic that `Clean` already provides on `Ty` / `ty::TraitRef`.
The first commit now does the minimal refactor to keep it working, while the second commit contains the rest of the refactor I started (parts of which I'm not sure we need to keep).
The commit moves metadata writing from `link_binary` to
`encode_metadata` (and renames the latter as
`encode_and_write_metadata`). This is at the very start of code
generation.