about summary refs log tree commit diff
path: root/src/librustc_traits
AgeCommit message (Collapse)AuthorLines
2018-05-01Conservatively assume dropping a generator touches its upvars, via locals' ↵Felix S. Klock II-8/+32
dtors. This is meant to address rust-lang/rust#49918. Review feedback: put back comment justifying skipping interior traversal. Review feedback: dropck generators like trait objects: all their upvars must outlive the generator itself, so just create a DtorckConstraint saying so.
2018-04-27Auto merge of #48995 - aravind-pg:canonical-query, r=nikomatsakisbors-0/+37
Create a canonical trait query for `evaluate_obligation` This builds on the canonical query machinery introduced in #48411 to introduce a new canonical trait query for `evaluate_obligation` in the trait selector. Also ports most callers of the original `evaluate_obligation` to the new system (except in coherence, which requires support for intercrate mode). Closes #48537. r? @nikomatsakis
2018-04-26Retry canonical trait query in standard mode if overflow occursAravind Gollakota-7/+2
This is slightly hacky and hopefully only a somewhat temporary solution.
2018-04-26Remove the stored obligation in OverflowError to simplify thingsAravind Gollakota-2/+2
We will shortly refactor things so that it is no longer needed
2018-04-26Introduce trait query mode and use it to set overflow error handling policy ↵Aravind Gollakota-2/+2
in traits::select
2018-04-26Create a canonical trait query for `evaluate_obligation`Aravind Gollakota-0/+42
2018-04-26improved debug outputNiko Matsakis-0/+2
2018-04-24Make Binder's field private and clean up its usageTyler Mandry-2/+2
2018-04-23sort strings on outputNiko Matsakis-7/+16
2018-04-23eliminate the `Lrc` of a slice and just return the sliceNiko Matsakis-21/+16
Also, introduce `Clauses` and `Goals` type alises for readability.
2018-04-23first draft of `program_clauses_for_env`Niko Matsakis-18/+71
This computes the transitive closure of traits that appear in the environment and then appends their clauses. It needs some work, but it's in the right direction.
2018-04-23in unit tests, use `note` to dump multiple program clausesNiko Matsakis-6/+19
(rather than issuing multiple errors) Also, reorder so that the annotations are considered "used" when the lint runs.
2018-04-23rustfmt lowering.rsNiko Matsakis-50/+59
2018-04-23create a `QueryRegionConstraint` typeNiko Matsakis-18/+22
Chalk wants to be able to pass these constraints around. Also, the form we were using in our existing queries was not as general as we are going to need.
2018-04-15Rebase and fix conflicts.Fabian Zaiser-5/+7
2018-04-15Stop duplicating where clauses from impl's.Fabian Zaiser-9/+7
2018-04-15Rebase and update code.Fabian Zaiser-2/+6
2018-04-15Improve function name.Fabian Zaiser-3/+5
2018-04-15Implement Chalk lowering rule Normalize-From-ImplFabian Zaiser-4/+61
2018-04-13Auto merge of #49800 - ishitatsuyuki:intern-goal, r=nikomatsakisbors-19/+23
traits: Implement interning for Goal and Clause r? @nikomatsakis Close #49054 Contains some refactoring for the interning mechanism, mainly aimed at reducing pain when changing types of interning map. This should be mostly good, although I'm not sure with the naming of `Goal::from_poly_domain_goal`.
2018-04-12Auto merge of #49558 - Zoxc:sync-misc, r=michaelwoeristerbors-8/+5
Even more thread-safety changes r? @michaelwoerister
2018-04-12traits: Implement interning for Goal and ClauseTatsuyuki Ishi-19/+23
2018-04-11Auto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichtonbors-2/+0
Move deny(warnings) into rustbuild This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-04-10Make PerfStats thread-safe and remove unused fieldsJohn Kåre Alsaker-7/+4
2018-04-10Make recursion_limit and type_length_limit thread-safeJohn Kåre Alsaker-1/+1
2018-04-10Auto merge of #49435 - tmandry:rule-implied-bound-from-trait, r=nikomatsakisbors-4/+65
chalkify: Implement lowering rule Implied-Bound-From-Trait For #49177. TODO: - [x] Implement where clauses besides trait and projection predicates - [x] Is the output of the `lower_trait_higher_rank` test correct? - [ ] Remove `Self::Trait` from the query `tcx.predicates_of(<trait_id>).predicates` - [ ] Consider moving tests to compile-fail to make them more manageable
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-2/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-04-07Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakisbors-2/+0
Bump the bootstrap compiler to 1.26.0 beta Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2018-04-06chalkify: Implement Rule Implied-Bound-From-TraitTyler Mandry-4/+65
2018-04-05Rollup merge of #49497 - scalexm:hrtb, r=nikomatsakisAlex Crichton-25/+27
Chalkify - Tweak `Clause` definition and HRTBs r? @nikomatsakis
2018-04-05Bump the bootstrap compiler to 1.26.0 betaAlex Crichton-2/+0
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2018-04-02Fix commentAlexandre Martin-1/+1
2018-03-30Tweak `Clause` definition and HRTBsscalexm-25/+27
2018-03-29Stabilize underscore lifetimesTaylor Cramer-1/+1
2018-03-28Stabilize match_default_bindingsTaylor Cramer-1/+1
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-27Auto merge of #49202 - csmoe:trait_engine, r=nikomatsakisbors-1/+1
Introduce trait engine address #48895 step 1: introduce trait engine
2018-03-23Rollup merge of #49030 - Zoxc:misc, r=michaelwoeristerAlex Crichton-4/+4
Misc changes from my parallel rustc branch r? @michaelwoerister
2018-03-23import trait engine to typeckcsmoe-1/+1
2018-03-20Implement Rule Implemented-From-Envvarkor-0/+32
This extends the Chalk lowering pass with the "Implemented-From-Env" rule for generating program clauses from a trait definition as part of #49177.
2018-03-20Improve comments for Rule Implemented-From-Implvarkor-4/+13
2018-03-18Auto merge of #48985 - scalexm:lowering, r=nikomatsakisbors-0/+186
MVP for chalkification r? @nikomatsakis
2018-03-17Replace Rc with LrcJohn Kåre Alsaker-4/+4
2018-03-15Fix tidyAlexandre Martin-1/+1
2018-03-15add xref to rust-guideNiko Matsakis-0/+4
2018-03-14Add documentationscalexm-0/+12
2018-03-14Move code into librustc_traitsscalexm-0/+170
2018-03-14Fixes after rebaseAndrew Cann-1/+1
2018-03-13add a debug assertion that only outlives-oblig. result from norm.Niko Matsakis-7/+32
2018-03-13introduce `tcx.normalize_erasing_regions(..)` operaton [VIC]Niko Matsakis-0/+41
2018-03-13introduce `infcx.at(..).dropck_outlives(..)` operaton [VIC]Niko Matsakis-0/+288
Backed by a canonicalized query. This computes all the types/regions that need to be live when the destructor runs (i.e., that the dtor may access).