about summary refs log tree commit diff
path: root/src/librustc/traits
AgeCommit message (Collapse)AuthorLines
2018-05-09Auto merge of #49711 - ibabushkin:auto_trait_refactor, r=nikomatsakisbors-0/+663
Refactor auto trait handling in librustdoc to be accessible from librustc. These commits transfer some of the functionality introduced in https://github.com/rust-lang/rust/pull/47833 to librustc with the intention of making the tools to work with auto traits accessible to third-party code, for example [rust-semverver](https://github.com/rust-lang-nursery/rust-semverver). Some rough edges remain, and I'm certain some of the FIXMEs introduced will need some discussion, most notably the fairly ugly overall approach to pull out the core logic into librustc, which was previously fairly tightly coupled with various bits and bobs from librustdoc. cc @Aaron1011
2018-05-08Insert fields from TypeAndMut into TyRef to allow layout optimizationJohn Kåre Alsaker-6/+4
2018-05-08Store the GeneratorInterior in the new GeneratorSubstsJohn Kåre Alsaker-20/+22
2018-05-08Store generator movability outside GeneratorInteriorJohn Kåre Alsaker-2/+2
2018-05-07Make SelectionCache and EvaluationCache thread-safeJohn Kåre Alsaker-10/+17
2018-05-04Auto merge of #50397 - sgrif:sg-smaller-universe-refactorings, r=nikomatsakisbors-6/+5
Refactorings in preparation for the removal of the leak check This contains all of the commits from #48407 that I was able to pull out on their own. This has most of the refactoring/ground work to unblock other work, but without the behavior changes that still need a crater run and NLL changes. r? @nikomatsakis
2018-05-02track skol levels in the InferCtxt rather than via counterSean Griffin-6/+5
2018-05-02make it compile againflip1995-1/+1
2018-04-30make needs_infer specific to inference variablesNiko Matsakis-2/+2
Notably, excluding ReSkolemized
2018-04-28Rollup merge of #50257 - estebank:fix-49560, r=nikomatsakiskennytm-0/+6
Don't ICE on tuple struct ctor with incorrect arg count Fix #49560.
2018-04-27Auto merge of #50275 - kennytm:rollup, r=kennytmbors-3/+3
Rollup of 7 pull requests Successful merges: - #49707 (Add "the Rustc book") - #50222 (Bump bootstrap compiler to 2018-04-24) - #50227 (Fix ICE with erroneous `impl Trait` in a trait impl) - #50229 (Add setting to go to item if there is only one result) - #50231 (Add more doc aliases) - #50246 (Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.) - #49894 (Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString) Failed merges:
2018-04-27Auto merge of #48995 - aravind-pg:canonical-query, r=nikomatsakisbors-95/+262
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-27Rename InternedString to LocalInternedString and introduce a new thread-safe ↵John Kåre Alsaker-3/+3
InternedString
2018-04-26Retry canonical trait query in standard mode if overflow occursAravind Gollakota-15/+36
This is slightly hacky and hopefully only a somewhat temporary solution.
2018-04-26Remove the stored obligation in OverflowError to simplify thingsAravind Gollakota-24/+22
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-11/+58
in traits::select
2018-04-26Simplify trait selector's evaluation API slightlyAravind Gollakota-22/+6
2018-04-26Port existing callers of `evaluate_obligation` to the new canonical trait queryAravind Gollakota-8/+8
Except the one in coherence, which needs support for intercrate mode.
2018-04-26Create a canonical trait query for `evaluate_obligation`Aravind Gollakota-10/+83
2018-04-26Refactor overflow handling in traits::select to propagate overflow instead ↵Aravind Gollakota-69/+113
of aborting eagerly We store the obligation that caused the overflow as part of the OverflowError, and report it at the public API endpoints (rather than in the implementation internals).
2018-04-26Auto merge of #50253 - nikomatsakis:regressions-2018-04-26, r=eddybbors-3/+9
drop elaboration should reveal all This used to happen implicitly through the normalization function; but we now keep the param-env as is, which seems less surprising. cc #49685 r? @eddyb
2018-04-26Don't ICE on tuple struct ctor with incorrect arg countEsteban Küber-0/+6
2018-04-26Updated comments in auto trait machinery.Inokentiy Babushkin-3/+18
2018-04-26Simplified name mapping in auto trait handling.Inokentiy Babushkin-5/+3
2018-04-26Added a header comment to auto trait innards.Inokentiy Babushkin-0/+3
2018-04-26Reformatted source for auto trait machinery.Inokentiy Babushkin-188/+193
2018-04-26Reformatted and commented various bits of the auto trait machinery.Inokentiy Babushkin-198/+199
2018-04-26Adjusted types and visibility in auto trait machinery.Inokentiy Babushkin-4/+7
2018-04-26Cleaned up for tidy checks.Inokentiy Babushkin-3/+1
2018-04-26Reworked auto trait functionality in rustdoc.Inokentiy Babushkin-193/+27
2018-04-26Made some bits of the auto trait machinery public.Inokentiy Babushkin-14/+14
2018-04-26Begun refactoring auto trait discovery for use outside rustc.Inokentiy Babushkin-0/+806
2018-04-26improved debug outputNiko Matsakis-3/+9
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-3/+3
2018-04-24Remove methods with implicit Binder::skip_boundTyler Mandry-5/+9
Fixes #20664.
2018-04-24Make Binder's field private and clean up its usageTyler Mandry-97/+100
2018-04-23eliminate the `Lrc` of a slice and just return the sliceNiko Matsakis-2/+7
Also, introduce `Clauses` and `Goals` type alises for readability.
2018-04-23add `Goal::CannotProve` and extract `ProgramClause` structNiko Matsakis-1/+4
2018-04-15Implement Chalk lowering rule Normalize-From-ImplFabian Zaiser-0/+3
2018-04-13Auto merge of #49800 - ishitatsuyuki:intern-goal, r=nikomatsakisbors-20/+55
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-5/+5
Even more thread-safety changes r? @michaelwoerister
2018-04-12traits: Implement interning for Goal and ClauseTatsuyuki Ishi-20/+55
2018-04-11Auto merge of #49695 - michaelwoerister:unhygienic-ty-min, r=nikomatsakisbors-2/+2
Use InternedString instead of Symbol for type parameter types (2) Reduced alternative to #49266. Let's see if this causes a performance regression.
2018-04-10Make recursion_limit and type_length_limit thread-safeJohn Kåre Alsaker-5/+5
2018-04-08Auto merge of #49714 - nikomatsakis:issue-49631, r=eddybbors-19/+43
mem-categorization, coherence fix make mem-categorization use adjusted type for patterns: Fixes #49631 do not propagate `Err` when determing causal info: Fixes #48728 r? @eddyb
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-1/+1
2018-04-06Use InternedString instead of Symbol for type parameters.Michael Woerister-2/+2
2018-04-05do not propagate `Err` when determing causal infoNiko Matsakis-19/+43
In intercrate mode, if we determine that a particular `T: Trait` is unknowable, we sometimes also go and get extra causal information. An errant `?` was causing us to propagate an error found in that process out as if `T: Trait` was not unknowable but rather not provable. This led to an ICE.
2018-04-05Rollup merge of #49497 - scalexm:hrtb, r=nikomatsakisAlex Crichton-23/+54
Chalkify - Tweak `Clause` definition and HRTBs r? @nikomatsakis
2018-04-05Rollup merge of #49654 - davidtwco:issue-29893, r=alexcrichtonkennytm-0/+2
Host compiler documentation: Include private items Fixes #29893. Now that compiler documentation is being hosted, including private items seems sensible as these types are going to be being used by contributors working on the compiler. However, including this means that doc comments that contain codeblocks with invalid Rust and can fail the documenting of a given crate (as evidenced by the changes in the second commit included in this PR). We'd need some way of ensuring that this cannot happen so that these failures don't cause documenting to fail. I'm unsure whether this change to documentation steps will cause this to happen already or if something new will be required. r? @alexcrichton