summary refs log tree commit diff
path: root/src/librustc/traits/structural_impls.rs
AgeCommit message (Collapse)AuthorLines
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
2017-11-25avoid type-live-for-region obligations on dummy nodesAriel Ben-Yehuda-4/+11
Type-live-for-region obligations on DUMMY_NODE_ID cause an ICE, and it turns out that in the few cases they are needed, these obligations are not needed anyway because they are verified elsewhere. Fixes #46069.
2017-11-15convert EXTRA_REQUIREMENT_IN_IMPL into a hard errorNiko Matsakis-3/+1
cc #37166
2017-11-15move region constraints into inference contextNiko Matsakis-7/+0
2017-11-03[Syntax Breaking] Rename DefaultImpl to AutoImplleonardo.yvens-8/+8
DefaultImpl is a highly confusing name for what we now call auto impls, as in `impl Send for ..`. The name auto impl is not formally decided but for sanity anything is better than `DefaultImpl` which refers neither to `default impl` nor to `impl Default`.
2017-09-11rustc: evaluate fixed-length array length expressions lazily.Eduard-Mihai Burtescu-0/+3
2017-08-21Merge remote-tracking branch 'origin/master' into genAlex Crichton-1/+1
2017-08-22Auto merge of #43690 - scalexm:issue-28229, r=nikomatsakisbors-1/+1
Generate builtin impls for `Clone` This fixes a long-standing ICE and limitation where some builtin types implement `Copy` but not `Clone` (whereas `Clone` is a super trait of `Copy`). However, this PR has a few side-effects: * `Clone` is now marked as a lang item. * `[T; N]` is now `Clone` if `T: Clone` (currently, only if `T: Copy` and for `N <= 32`). * `fn foo<'a>() where &'a mut (): Clone { }` won't compile anymore because of how bounds for builtin traits are handled (e.g. same thing currently if you replace `Clone` by `Copy` in this example). Of course this function is unusable anyway, an error would pop as soon as it is called. Hence, I'm wondering wether this PR would need an RFC... Also, cc-ing @nikomatsakis, @arielb1. Related issues: #28229, #24000.
2017-08-21Merge remote-tracking branch 'origin/master' into genAlex Crichton-3/+3
2017-08-18Handle structs, unions and enums unsized field/variant separatelyGuillaume Gomez-3/+3
2017-08-14Do not store `ty`scalexm-12/+4
2017-08-14Make `Clone` a lang item and generate builtin impls.scalexm-4/+12
Fixes #28229. Fixes #24000.
2017-07-28Generator literal supportJohn Kåre Alsaker-0/+43
2017-07-05use field init shorthand in src/librustcZack M. Davis-16/+16
The field init shorthand syntax was stabilized in 1.17.0 (aebd94f); we are now free to use it in the compiler.
2017-06-29Check explicitly that tuple initializer is Sized.Masaki Hara-0/+3
2017-06-24Detect missing `;` on methods with return type `()`Esteban Küber-27/+17
- Point out the origin of a type requirement when it is the return type of a method - Point out possibly missing semicolon when the return type is () and the implicit return makes sense as a statement - Suggest changing the return type of methods with default return type - Don't suggest changing the return type on fn main() - Don't suggest changing the return type on impl fn
2017-06-01strip param-env from infcxNiko Matsakis-0/+1
2017-04-11fix long lineNiko Matsakis-1/+2
2017-04-11add Subtype predicateNiko Matsakis-0/+1
2017-03-30add an `ObligationCauseCode` we'll use later (`ReturnNoExpression`)Niko Matsakis-0/+3
2017-02-25rustc_typeck: hook up collect and item/body check to on-demand.Eduard-Mihai Burtescu-27/+0
2016-11-28Remove BuiltinBound and BuiltinBounds.Mark-Simulacrum-5/+0
2016-11-15remove TypeOrigin and use ObligationCause insteadNiko Matsakis-0/+46
In general having all these different structs for "origins" is not great, since equating types can cause obligations and vice-versa. I think we should gradually collapse these things. We almost certainly also need to invest a big more energy into the `error_reporting` code to rationalize it: this PR does kind of the minimal effort in that direction.
2016-11-01introduce new origin for `Trait+'b`Niko Matsakis-0/+11
This helps us to preserve the existing errors.
2016-11-01compare-method lintNiko Matsakis-1/+3
2016-11-01cleanup error reporting and add `ui` testsNiko Matsakis-4/+10
2016-08-12typeck: leak auto trait obligations through impl Trait.Eduard Burtescu-0/+181
2016-05-11Add inferred obligation storage to all Vtable variants and SelectionContextMasood Malekghassemi-10/+40
2016-05-11rustc: Split local type contexts interners from the global one.Eduard Burtescu-0/+52
2016-05-11rustc: More interning for data used in Ty<'tcx>.Eduard Burtescu-2/+1
2016-05-11rustc: Generalize a minimum set of functions over 'tcx != 'gcx.Eduard Burtescu-8/+34
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-0/+256