about summary refs log tree commit diff
path: root/src/librustc_infer/traits
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-919/+0
2020-07-27introduce PredicateAtomBastian Kauschke-26/+14
2020-07-27add reuse_or_mk_predicateBastian Kauschke-3/+2
2020-07-27this might be unqualified, but at least it's now quantifiedBastian Kauschke-1/+1
2020-07-27split ignore_qualifiersBastian Kauschke-11/+10
2020-07-27reviewBastian Kauschke-28/+14
2020-07-27fix elaborate for predicates with unbound variablesBastian Kauschke-9/+5
2020-07-27`PredicateKint` -> `PredicateKind`, the beginning of the endBastian Kauschke-40/+41
2020-07-27progressBastian Kauschke-3/+3
2020-07-27elaborateBastian Kauschke-14/+20
2020-07-27subst_supertraitBastian Kauschke-2/+2
2020-07-27convert trivial predicatesBastian Kauschke-4/+4
2020-07-27anonymize_predicateBastian Kauschke-22/+15
2020-07-05Shrink ParamEnv to 16 bytesMark Rousskov-1/+1
2020-06-20Auto merge of #73563 - Manishearth:rollup-oowgwwm, r=Manishearthbors-2/+0
Rollup of 9 pull requests Successful merges: - #72456 (Try to suggest dereferences on trait selection failed) - #72788 (Projection bound validation) - #72790 (core/time: Add Duration methods for zero) - #73227 (Allow multiple `asm!` options groups and report an error on duplicate options) - #73287 (lint: normalize projections using opaque types) - #73291 (Pre-compute `LocalDefId` <-> `HirId` mappings and remove `NodeId` <-> `HirId` conversion APIs) - #73378 (Remove use of specialization from librustc_arena) - #73411 (Update bootstrap to rustc 1.45.0-beta.2 (1dc0f6d8e 2020-06-15)) - #73443 (ci: allow gating GHA on everything but macOS) Failed merges: r? @ghost
2020-06-20Move bounds on associated types to the typeMatthew Jasper-2/+0
Given `trait X { type U; }` the bound `<Self as X>::U` now lives on the type, rather than the trait. This is feature gated on `feature(generic_associated_types)` for now until more testing can be done. The also enabled type-generic associated types since we no longer need "implies bounds".
2020-06-20int -> i32Bastian Kauschke-4/+4
2020-06-16Auto merge of #72962 - lcnr:ObligationCause-lrc, r=ecstatic-morsebors-5/+7
store `ObligationCause` on the heap Stores `ObligationCause` on the heap using an `Rc`. This PR trades off some transient memory allocations to reduce the size of–and thus the number of instructions required to memcpy–a few widely used data structures in trait solving.
2020-06-07store `ObligationCause` on the heapBastian Kauschke-5/+7
2020-06-05Rename traits::Vtable to ImplSource.Ana-Maria Mihalache-4/+4
2020-05-29Add Extend::{extend_one,extend_reserve}Josh Stone-0/+8
This adds new optional methods on `Extend`: `extend_one` add a single element to the collection, and `extend_reserve` pre-allocates space for the predicted number of incoming elements. These are used in `Iterator` for `partition` and `unzip` as they shuffle elements one-at-a-time into their respective collections.
2020-05-28Auto merge of #72494 - lcnr:predicate-cleanup, r=nikomatsakisbors-26/+20
Pass more `Copy` types by value. There are a lot of locations where we pass `&T where T: Copy` by reference, which should both be slightly less performant and less readable IMO. This PR currently consists of three fairly self contained commits: - passes `ty::Predicate` by value and stops depending on `AsRef<ty::Predicate>`. - changes `<&List<_>>::into_iter` to iterate over the elements by value. This would break `List`s of non copy types. But as the only list constructor requires `T` to be copy anyways, I think the improved readability is worth this potential future restriction. - passes `mir::PlaceElem` by value. Mir currently has quite a few copy types which are passed by reference, e.g. `Local`. As I don't have a lot of experience working with MIR, I mostly did this to get some feedback from people who use MIR more frequently - tries to reuse `ty::Predicate` in case it did not change in some places, which should hopefully fix the regression caused by #72055 r? @nikomatsakis for the first commit, which continues the work of #72055 and makes adding `PredicateKind::ForAll` slightly more pleasant. Feel free to reassign though
2020-05-27Auto merge of #71996 - Marwes:detach_undo_log, r=nikomatsakisbors-0/+2
perf: Revert accidental inclusion of a part of #69218 This was accidentally included in #69464 after a rebase and given how much `inflate` and `keccak` stresses the obligation forest seems like a likely culprit to the regression in those benchmarks. (It is necessary in #69218 as obligation forest needs to accurately track the root variables or unifications will get lost)
2020-05-24perf: Add inline on commonly used methods added in 69464Markus Westerlind-0/+2
Reclaims most of the regression in inflate
2020-05-23fix Predicate perf regressionBastian Kauschke-18/+12
2020-05-23take predicates by value instead of by referenceBastian Kauschke-8/+8
2020-05-20change `Predicate::kind` to return a referenceBastian Kauschke-9/+9
2020-05-20intern `PredicateKind`Bastian Kauschke-1/+1
2020-05-20introduce newtype'd `Predicate<'tcx>`Bastian Kauschke-12/+22
2020-05-20make `to_predicate` take a `tcx` argumentNiko Matsakis-3/+3
2020-05-20rename `Predicate` to `PredicateKind`, introduce aliasBastian Kauschke-30/+30
2020-05-17Assume unevaluated consts are equal to the other consts and add ConstEquate ↵Ben Lewis-1/+11
obligation. This delays the need to evaluate consts eagerly and therefore gets around const eval query cycles.
2020-05-11Fix clippy warningsMatthias Krüger-3/+2
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-2/+2
2020-05-05Fix review commentsMarkus Westerlind-3/+3
2020-05-05Rebase and use ena 0.14Markus Westerlind-3/+7
2020-05-05refactor: Rename Logs to InferCtxtUndoLogsMarkus Westerlind-4/+9
2020-05-05Move projection_cache into the combined undo logMarkus Westerlind-26/+41
2020-05-05Allow SnapshotMap to have a separate undo_logMarkus Westerlind-4/+0
2020-04-20Remove some allocations in predicate evaluationEsteban Küber-4/+3
2020-04-20Remove some `Vec` allocations in an effort to improve perfEsteban Küber-6/+4
2020-04-12Update links of `rustc guide`Yuki Okushi-2/+2
2020-04-11Auto merge of #70161 - cjgillot:query-arena, r=nikomatsakisbors-1/+1
Allocate some query results on an arena This avoids a cloning few `Lrc` and `Vec`s in the queries.
2020-04-08Use `PredicateObligation`s instead of `Predicate`sEsteban Küber-20/+48
Keep more information about trait binding failures.
2020-04-05Allocate query Vecs on the arena.Camille GILLOT-1/+1
2020-04-01Remove duplicated code in trait selectionEsteban Küber-3/+79
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-5/+5
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-12/+12
2020-03-25Rename `def_span` to `guess_head_span`Esteban Küber-3/+3
2020-03-21don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-2/+2