bors [Thu, 6 Jun 2019 06:36:12 +0000 (06:36 +0000)]
Auto merge of #61373 - tmandry:emit-storagedead-along-unwind, r=eddyb
Emit StorageDead along unwind paths for generators
Completion of the work done in #60840. That PR made a change to implicitly consider a local `StorageDead` after Drop, but that was incorrect for DropAndReplace (see also #61060 which tried to fix this in a different way).
This finally enables the optimization implemented in #60187.
bors [Thu, 6 Jun 2019 03:56:22 +0000 (03:56 +0000)]
Auto merge of #57428 - alexreg:associated_type_bounds, r=nikomatsakis,Centril
Implementation of RFC 2289 (associated_type_bounds)
This PR implements the [`asociated_type_bounds` feature](https://github.com/rust-lang/rfcs/blob/master/text/2289-associated-type-bounds.md).
Associated type bounds are implemented in:
- function/method arguments and return types
- structs, enums, unions
- associated items in traits
- type aliases
- type parameter defaults
- trait objects
- let bindings
bors [Wed, 5 Jun 2019 18:29:39 +0000 (18:29 +0000)]
Auto merge of #61548 - Centril:rollup-5t6cvbk, r=Centril
Rollup of 5 pull requests
Successful merges:
- #61503 (Fix cfg(test) build for x86_64-fortanix-unknown-sgx)
- #61534 (Edit docs of ExitStatus)
- #61536 (Don't allow using const fn arguments as "args_required_const")
- #61538 (Don't use GNU noexec stack note)
- #61546 (azure: Fix some minor issues which have broken our configuration )
Rollup merge of #61546 - alexcrichton:fix-azure, r=pietroalbini
azure: Fix some minor issues which have broken our configuration
* Ensure that when we enable IPv6 for Docker on Linux that the various directories before writing a config file
* Delete a previously installed rustup if any since it seems to interfere with Cargo's test suite.
Alex Crichton [Wed, 5 Jun 2019 14:36:19 +0000 (07:36 -0700)]
azure: Uninstall previous rustc from builders if any
Looks like Azure has updated images recently to install Rust by default,
but that can interfere with our own compiler (for example Cargo's test
suite we think) so be sure to uninstall it before proceeding.
bors [Wed, 5 Jun 2019 08:20:20 +0000 (08:20 +0000)]
Auto merge of #61502 - alexcrichton:update-backtrace, r=estebank
std: Update dependency on `backtrace`
Discovered in #61416 an accidental regression in libstd's backtrace
behavior is that it previously attempted to consult libbacktrace and
would then fall back to `dladdr` if libbacktrace didn't report anything.
The `backtrace` crate, however, did not do this, so that's now been
fixed!
Alex Crichton [Mon, 3 Jun 2019 19:29:53 +0000 (12:29 -0700)]
std: Update dependency on `backtrace`
Discovered in #61416 an accidental regression in libstd's backtrace
behavior is that it previously attempted to consult libbacktrace and
would then fall back to `dladdr` if libbacktrace didn't report anything.
The `backtrace` crate, however, did not do this, so that's now been
fixed!
The commit combines two calls into one by saving the result in a local
variable. The commit also moves the check for `async` later, so that
when a different keyword is present the `rust_2018` call will be avoided
completely.
They can each now do a single `HygieneData::with` call by replacing the
`SyntaxContext` and `Mark` methods with the equivalent methods from
`HygieneData`.
Pietro Albini [Tue, 4 Jun 2019 20:39:41 +0000 (22:39 +0200)]
Rollup merge of #61523 - Nemo157:hide-gen-future, r=cramertj
Hide gen_future API from documentation
This is internal rustc only API which should never be used outside code created by the current `async` transform, if it is used then the panic messages don't make sense as they're written from the perspective of that meaning there is a bug in the `async` transform (e.g. #61482).
Pietro Albini [Tue, 4 Jun 2019 20:39:38 +0000 (22:39 +0200)]
Rollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix
Fix NLL typeck ICEs
* Don't ICE when a type containing a region is constrained by nothing
* Don't ICE trying to normalize a type in a `ParamEnv` containing global bounds.
To explain what was happening in the `issue-61311-normalize.rs` case:
* When borrow checking the `the_fn` in the last `impl` we would try to normalize `Self::Proj` (`<Unit as HasProjFn>::Proj`).
* We would find the `impl` that we're checking and and check its `where` clause.
* This would need us to check `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`
* We find two possible implementations, the blanket impl and the bound in our `ParamEnv`.
* The bound in our `ParamEnv` was canonicalized, so we don't see it as a global bound. As such we prefer it to the `impl`.
* This means that we cannot normalize `<Box<dyn Obj + 'static> as HasProj>::Proj` to `Unit`.
* The `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound` bound, which looks like it should be in our `ParamEnv` has been normalized to `Unit: Bound`.
* We fail to prove `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`.
* We ICE, since we believe typeck have errored.
bors [Tue, 4 Jun 2019 20:10:54 +0000 (20:10 +0000)]
Auto merge of #61407 - phansch:annotate_snippet_refactoring1, r=oli-obk
Add new diagnostic writer using annotate-snippet library
This adds a new diagnostic writer `AnnotateRsEmitterWriter` that uses
the [`annotate-snippet`][as] library to print out the human readable
diagnostics.
The goal of #59346 is to eventually switch over to using the library instead of
maintaining our own diagnostics output.
This PR does **not** add all the required features to the new
diagnostics writer. It is only meant as a starting point so that other
people can start contributing as well.
There are some FIXMEs in `librustc_errors/annotate_rs_emitter.rs` that
point at yet to be implemented features of the new diagnostic emitter, however
those are most likely not exhaustive.
Philipp Hansch [Fri, 31 May 2019 20:01:27 +0000 (22:01 +0200)]
Add new diagnostic writer using annotate-snippet library
This adds a new diagnostic writer `AnnotateRsEmitterWriter` that uses
the [`annotate-snippet`][as] library to print out the human readable
diagnostics.
The goal is to eventually switch over to using the library instead of
maintaining our own diagnostics output.
This commit does *not* add all the required features to the new
diagnostics writer. It is only meant as a starting point so that other
people can contribute as well.
bors [Tue, 4 Jun 2019 08:31:53 +0000 (08:31 +0000)]
Auto merge of #61136 - matthewjasper:cannot-move-errors, r=pnkfelix
Make cannot move errors more consistent with other borrowck errors
* Note the type of the place being moved in all cases.
* Note the place being moved from.
* Simplify the search for overloaded place operators
* Extend the note for move from overloaded deref apply to all types.
* Add a note for moves from overloaded index.
* Special case moves for closure captures.
bors [Tue, 4 Jun 2019 05:37:44 +0000 (05:37 +0000)]
Auto merge of #61510 - Centril:rollup-bvi95y2, r=Centril
Rollup of 13 pull requests
Successful merges:
- #61135 (Fix documentation of `Rc::make_mut` regarding `rc::Weak`.)
- #61404 (miri unsizing: fix projecting into a field of an operand)
- #61409 (Fix an ICE with a const argument in a trait)
- #61413 (Re-implement async fn drop order lowering )
- #61419 (Add an unusual-conversion example to to_uppercase)
- #61420 (Succinctify splice docs)
- #61444 (Suggest using `as_ref` on `*const T`)
- #61446 (On TerminatorKind::DropAndReplace still handle unused_mut correctly)
- #61485 (azure: retry s3 upload if it fails)
- #61489 (ci: Reenable step timings on AppVeyor)
- #61496 (Do not panic in tidy on unbalanced parentheses in cfg's)
- #61497 (Treat 0 as special value for codegen-units-std)
- #61499 (Add regression test for existential type ICE #53457)