about summary refs log tree commit diff
path: root/src/librustc/traits/structural_impls.rs
AgeCommit message (Collapse)AuthorLines
2019-04-28Fix lint findings in librustcflip1995-2/+2
2019-04-10Suggest removing `?` to resolve type errors.David Wood-0/+2
This commit adds a suggestion to remove the `?` from expressions if removing the `?` would resolve a type error.
2019-03-15rustc: make util::ppaux private.Eduard-Mihai Burtescu-2/+3
2019-02-14Rollup merge of #58267 - estebank:match-arms, r=matthewjasperMazdak Farrokhzad-3/+14
Tweak "incompatible match arms" error - Point at the body expression of the match arm with the type error. - Point at the prior match arms explicitly stating the evaluated type. - Point at the entire match expr in a secondary span, instead of primary. - For type errors in the first match arm, the cause is outside of the match, treat as implicit block error to give a more appropriate error. Fix #46776, fix #57206. CC #24157, #38234.
2019-02-08review comments: (marginally) reduce memory consumtionEsteban Küber-4/+9
2019-02-07Reweork incompatible match arms errorEsteban Küber-3/+9
- Point at the body expression of the match arm with the type error. - Point at the prior match arms explicitely stating the evaluated type. - Point at the entire match expr in a secondary span, instead of primary. - For type errors in the first match arm, the cause is outside of the match, treat as implicit block error to give a more appropriate error.
2019-02-05move librustc to 2018Mark Mansi-11/+11
2019-01-13Suggest removal of semicolon when appropriateEsteban Küber-1/+5
2019-01-13Tweak output of type mismatch between "then" and `else` `if` armsEsteban Küber-1/+1
2019-01-12Point at the match discriminant when arm pattern has a type mismatchEsteban Küber-0/+3
2018-12-27Handle sub-typing in chalk-enginescalexm-0/+3
2018-12-27Implement "lifetime juggling" methods from chalk integration traitscalexm-2/+26
Fixes #55097.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-03pass the parameter environment to `traits::find_associated_item`Ariel Ben-Yehuda-2/+2
dropping the param-env on the floor is obviously the wrong thing to do. The ICE was probably exposed by #54490 adding the problem-exposing use of `traits::find_associated_item`. Fixes #55380.
2018-11-24Move `BoundTy` debruijn index to the `TyKind` enum variantscalexm-1/+1
2018-11-13Reorder code in `rustc::traits::structural_impls`scalexm-340/+340
2018-11-13Bypass ppaux for `Outlives` predicatesscalexm-4/+34
2018-11-13Pretty print quantified goals and clausesscalexm-5/+144
2018-11-03Added support for trait aliases as bounds.Alexander Regueiro-6/+36
2018-10-25preserve const eval error information through trait error systemRalf Jung-1/+1
2018-10-25Report const eval error inside the queryOliver Schneider-3/+1
2018-10-17Categorize chalk clausesscalexm-2/+7
2018-10-17Use `Environment` instead of `ty::ParamEnv` in chalk contextscalexm-1/+37
2018-10-08Pass around interned refs to goals and not goalsscalexm-17/+17
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-21/+21
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-09-26Auto merge of #54199 - nikomatsakis:predicate_may_hold-failure, r=eddybbors-1/+1
overlook overflows in rustdoc trait solving Context: The new rustdoc "auto trait" feature walks across impls and tries to run trait solving on them with a lot of unconstrained variables. This is prone to overflows. These overflows used to cause an ICE because of a caching bug (fixed in this PR). But even once that is fixed, it means that rustdoc causes an overflow rather than generating docs. This PR therefore adds a new helper that propagates the overflow error out. This requires rustdoc to then decide what to do when it encounters such an overflow: technically, an overflow represents neither "yes" nor "no", but rather a failure to make a decision. I've decided to opt on the side of treating this as "yes, implemented", since rustdoc already takes an optimistic view. This may prove to include too many items, but I *suspect* not. We could probably reduce the rate of overflows by unifying more of the parameters from the impl -- right now we only seem to consider the self type. Moreover, in the future, as we transition to Chalk, overflow errors are expected to just "go away" (in some cases, though, queries might return an ambiguous result). Fixes #52873 cc @QuietMisdreavus -- this is the stuff we were talking about earlier cc @GuillaumeGomez -- this supersedes #53687
2018-09-18A few cleanups and minor improvements to rustc/traitsljedrz-21/+21
2018-08-29Remove `AccumulateVec` and its uses.Nicholas Nethercote-3/+3
It's basically just a less capable version of `SmallVec`.
2018-08-29Replace bug! call with OverflowGuillaume Gomez-1/+1
2018-08-22Rename ty::Slice to ty::Listvarkor-2/+2
2018-08-19Add notes on unsized argument errors.Masaki Hara-0/+1
2018-08-15fix error for unsized packed struct fieldRalf Jung-1/+1
2018-06-28Move the Lrc outside the error type and name the fieldsOliver Schneider-1/+3
2018-06-04Refactor the chalkify lowering processscalexm-30/+73
2018-05-24implement the chalk traits, albeit with many placeholdersNiko Matsakis-144/+214
2018-05-17Rename trans to codegen everywhere.Irina Popa-1/+1
2018-05-15Feature gate trivial boundsMatthew Jasper-0/+1
2018-05-08Store the GeneratorInterior in the new GeneratorSubstsJohn Kåre Alsaker-5/+5
2018-04-26Remove the stored obligation in OverflowError to simplify thingsAravind Gollakota-1/+1
We will shortly refactor things so that it is no longer needed
2018-04-26Refactor overflow handling in traits::select to propagate overflow instead ↵Aravind Gollakota-0/+1
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-23add `Goal::CannotProve` and extract `ProgramClause` structNiko Matsakis-0/+2
2018-04-15Implement Chalk lowering rule Normalize-From-ImplFabian Zaiser-0/+2
2018-04-12traits: Implement interning for Goal and ClauseTatsuyuki Ishi-0/+34
2018-03-30Tweak `Clause` definition and HRTBsscalexm-16/+26
2018-03-14Address niko's nitsscalexm-119/+71
2018-03-14Add MVP for chalkificationscalexm-0/+183
2018-03-13refactor `ParamEnv::empty(Reveal)` into two distinct methodsNiko Matsakis-2/+0
- `ParamEnv::empty()` -- does not reveal all, good for typeck - `ParamEnv::reveal_all()` -- does, good for trans - `param_env.with_reveal_all()` -- converts an existing parameter environment
2018-03-13improve TypeFoldable/Lift macros and make a bunch of stuff use themNiko Matsakis-236/+45
Improvements: - Use Clone not Copy for the "simple cases" - Separate TypeFoldable and Lift for the "simple cases" - Support generics type parameters - Support named fields in enum variants - etc
2018-03-04Remove ty::Predicate::Equate and ty::EquatePredicate (dead code)Tatsuyuki Ishi-3/+0
2018-01-29Require yield types to be sizedJohn Kåre Alsaker-0/+3