summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2019-07-04Swap to stable releaseMark Rousskov-2/+2
2019-07-04Auto merge of #62332 - Mark-Simulacrum:beta-next, r=pietroalbinibors-7/+22
[beta] master -> beta promotion for 1.37 This includes the release note patch from stable. r? @pietroalbini
2019-07-03HashMap is UnwindSafeSimon Sapin-0/+12
Fixes https://github.com/rust-lang/rust/issues/62301, a regression in 1.36.0 which was caused by hashbrown using `NonZero<T>` where the older hashmap used `Unique<T>`.
2019-07-03Amend release notes with compat-notes for stdsimdMark Rousskov-2/+5
2019-07-03Switch to beta channelMark Rousskov-5/+5
2019-07-03Auto merge of #61775 - ↵bors-548/+2580
nikomatsakis:issue-56238-multiple-lifetimes-async-fn-region-solver, r=MatthewJasper generalize impl trait to permit multiple lifetime bounds Generalizes the region solver to support "pick constraints". These have the form: ``` pick R0 from [R1..Rn] ``` where `R1..Rn` are called the "option regions". The idea is that `R0` must be equal to *some* region in the set `R1..Rn`. These constraints are then used to handle cases like this: ```rust fn foo<'a, 'b>(...) -> impl Trait<'a, 'b> { .. } ``` The problem here is that every region R in the hidden type must be equal to *either* `'a` *or* `'b` (or `'static`) -- in the past, the only kinds of constraints we had were outlives constraints, and since `'a` and `'b` are unrelated, there was no outlives constraint we could issue that would enforce that (`R: 'a` and `R: 'b` are both too strict, for example). But now we can issue a pick constraint: `pick R from ['a, 'b]`. In general, solving pick constraints is tricky. We integrate them into the solver as follows. In general, during the propagation phase, we are monotonically growing a set of inference regions. To handle a case like `pick R from [O...]`, where `O...` represents the option regions, we do the following: - Look for all the *lower bounds* of the region R -- that is, every region LB such that `R: LB` must hold. - Look for all the *upper bounds* of the region R -- that is, every region UB such that `UB: R` must hold. - Let the *viable options* be each option region O such that `UB: O` and `O: LB` for each UB, LB bound. - Find the *minimal viable option* M, where `O: M` holds for every option region O. If there is such a *minimal viable option*, then we make `R: M`. (This may in turn influence other bits of inference.) If there is no minimal viable option, either because all options were eliminated or because none of the remaining options are minimal, we do nothing. Ultimately, if the pick constraint is not satisfied, an error is reported. For this logic, we currently require that the option regions O are always lifetime parameters. To determine the bounds, we walk the various outlives edges that were otherwise introduced. r? @matthewjasper cc @cramertj Fixes #56238 TODO: - [ ] Error messages include region variable info sometimes, how to fix? - [ ] Tests for bare `existential type` and other impl Trait usage
2019-07-02Auto merge of #61268 - michaelwoerister:stabilize-pgo, r=alexcrichtonbors-36/+189
Stabilize support for Profile-guided Optimization This PR makes profile-guided optimization available via the `-C profile-generate` / `-C profile-use` pair of commandline flags and adds end-user documentation for the feature to the [rustc book](https://doc.rust-lang.org/rustc/). The PR thus ticks the last two remaining checkboxes of the [stabilization tracking issue](https://github.com/rust-lang/rust/issues/59913). From the tracking issue: > Profile-guided optimization (PGO) is a common optimization technique for ahead-of-time compilers. It works by collecting data about a program's typical execution (e.g. probability of branches taken, typical runtime values of variables, etc) and then uses this information during program optimization for things like inlining decisions, machine code layout, or indirect call promotion. If you are curious about how this can be used, there is a rendered version of the documentation this PR adds available [here]( https://github.com/michaelwoerister/rust/blob/stabilize-pgo/src/doc/rustc/src/profile-guided-optimization.md). r? @alexcrichton cc @rust-lang/compiler
2019-07-02fix ICE with delay-span-bugNiko Matsakis-3/+39
2019-07-02address nitsNiko Matsakis-6/+6
2019-07-02Update src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.rsNiko Matsakis-1/+1
Co-Authored-By: matthewjasper <mjjasper1@gmail.com>
2019-07-02Update src/test/ui/async-await/multiple-lifetimes/elided.rsNiko Matsakis-1/+1
Co-Authored-By: matthewjasper <mjjasper1@gmail.com>
2019-07-02Update src/test/ui/async-await/multiple-lifetimes/fn-ptr.rsNiko Matsakis-1/+1
Co-Authored-By: matthewjasper <mjjasper1@gmail.com>
2019-07-02Update src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rsNiko Matsakis-1/+1
Co-Authored-By: matthewjasper <mjjasper1@gmail.com>
2019-07-02introduce more tests covering `async fn` surfaceNiko Matsakis-4/+239
2019-07-02more nits + typosNiko Matsakis-8/+8
2019-07-02pass a parameter to enable impl Trait instead of a vecNiko Matsakis-11/+7
2019-07-02more centril nitsNiko Matsakis-30/+39
2019-07-02region_constraints: nitsNiko Matsakis-5/+5
2019-07-02opaque_types: more nitsNiko Matsakis-6/+6
2019-07-02s/abstract_type_generics/opaque_type_generics/Niko Matsakis-5/+5
2019-07-02opaque_types: various nitsNiko Matsakis-10/+10
2019-07-02cleanup formatting of comment and add attributionNiko Matsakis-22/+23
2019-07-02rewrite `dup_vec` to use `IndexVec` instead of `u32`Niko Matsakis-7/+6
2019-07-02various centril nitsNiko Matsakis-10/+11
2019-07-02explain why the code is the way it isNiko Matsakis-0/+2
2019-07-02Update src/librustc/infer/lexical_region_resolve/mod.rsNiko Matsakis-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-02Update src/doc/unstable-book/src/language-features/member-constraints.mdNiko Matsakis-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-02feature-gate member constraints outside of async-awaitNiko Matsakis-7/+147
Minimizes risk.
2019-07-02implement `TypeFoldable` for `Arc`Niko Matsakis-0/+10
2019-07-02rename `pick_constraints.rs` to `member_constraints.rs`Niko Matsakis-0/+0
2019-07-02rename to "member constraints"Niko Matsakis-261/+275
2019-07-02implement Lift for ArcNiko Matsakis-0/+8
2019-07-02switch to LrcNiko Matsakis-11/+11
2019-07-02fix silly bugs in binary_search_util testNiko Matsakis-2/+3
2019-07-02bless test outputNiko Matsakis-6/+3
2019-07-02address nits by mattewjasperNiko Matsakis-64/+13
2019-07-02account for the pick-constraint edges when reporting errorsNiko Matsakis-18/+195
Also, thread through better span info to improve the error message to something tolerable.
2019-07-02just create a binary search slice helper fnNiko Matsakis-114/+72
2019-07-02add a `VecMap` data structureNiko Matsakis-0/+114
2019-07-02test with explicit existential typeNiko Matsakis-0/+2
2019-07-02add a preliminary existential test; not really enoughNiko Matsakis-0/+29
2019-07-02pacify the mercilous tidyNiko Matsakis-6/+15
long lines, trailing newlines
2019-07-02remove outdated TODO markersNiko Matsakis-3/+1
These were left behind to remind me to cleanup the code -- but the relevant cleanups were already done.
2019-07-02explain why pick-constraints can be an empty vectorNiko Matsakis-1/+8
2019-07-02add a FIXME related to the non-free-region caseNiko Matsakis-3/+43
I don't think it would actually be harmful to just ignore such cases but I'm inclined not to take chances.
2019-07-02update the async-fn-multiple-lifetimes testNiko Matsakis-23/+4
2019-07-02fix tests and remove outdated stderr filesNiko Matsakis-54/+0
2019-07-02integrate reverse graph and upper-bound computationNiko Matsakis-17/+69
2019-07-02add a `depth_first_search` helper functionNiko Matsakis-1/+49
2019-07-02introduce a `VecGraph` abstraction that cheaply stores graphsNiko Matsakis-3/+197
This is perhaps better than the linked list approach I was using before. Lower memory overhead, Theta(N+E) storage. Does require a sort. =)