about summary refs log tree commit diff
path: root/src/librustc/traits
AgeCommit message (Collapse)AuthorLines
2016-05-17refactor: use `select` inside of a probeNiko Matsakis-188/+281
We ought not to be affecting inference state when assembling candidates, so invoke select inside of a probe.
2016-05-17introduce a specializes cacheNiko Matsakis-2/+31
This query is frequently used during trait selection and caching the result can be a reasonable performance win.
2016-05-16Auto merge of #33491 - arielb1:obligation-jungle, r=nikomatsakisbors-552/+102
Replace the obligation forest with a graph In the presence of caching, arbitrary nodes in the obligation forest can be merged, which makes it a general graph. Handle it as such, using cycle-detection algorithms in the processing. I should do performance measurements sometime. This was pretty much written as a proof-of-concept. Please help me write this in a less-ugly way. I should also add comments explaining what is going on. r? @nikomatsakis
2016-05-16change on_unimplented logicAriel Ben-Yehuda-5/+12
2016-05-14Rollup merge of #33576 - soltanmm:vtable, r=nikomatsakisManish Goregaokar-102/+221
Plumb inference obligations through selection, take 2 Using a `SnapshotVec` and dumping inferred obligations into `Vtable` variants. r? @nikomatsakis
2016-05-14Rollup merge of #33555 - soltanmm:ambiguous-nixon, r=nikomatsakisManish Goregaokar-57/+1
Remove unification despite ambiguity in projection Turns out that closures aren't explicitly considered in `project.rs`, so the ambiguity handling w.r.t. closures can just be removed as the change done in `select.rs` covers it. r? @nikomatsakis
2016-05-13rewrite fuzzy `on_unimplemented` matching to avoid ICEsAriel Ben-Yehuda-181/+33
2016-05-13address review commentsAriel Ben-Yehuda-6/+9
2016-05-13add cycle-reporting logicAriel Ben-Yehuda-8/+10
Fixes #33344
2016-05-13rewrite obligation forest. cycles still handled incorrectly.Ariel Ben-Yehuda-367/+53
2016-05-11Plumb inference obligations through selectionMasood Malekghassemi-66/+118
2016-05-11Don't mutate the inference context when assemblingMasood Malekghassemi-1/+1
2016-05-11Add inferred obligation storage to all Vtable variants and SelectionContextMasood Malekghassemi-38/+105
2016-05-11Remove unification despite ambiguity in projectionMasood Malekghassemi-57/+1
2016-05-11Update to eddyb's PRggomez-199/+129
2016-05-11Create Weight enumGuillaume Gomez-34/+64
Add more comments for the global understanding
2016-05-11Improve weight algorithm and testsggomez-52/+107
2016-05-11Improve error message for Index trait on slicesGuillaume Gomez-28/+79
2016-05-11Extend rustc_on_unimplemented flag: if a message is available at an impl, ↵ggomez-4/+179
this message will be displayed instead
2016-05-11Fixup indentation after methodification.Eduard Burtescu-1122/+1126
2016-05-11rustc: Split local type contexts interners from the global one.Eduard Burtescu-18/+81
2016-05-11rustc: More interning for data used in Ty<'tcx>.Eduard Burtescu-23/+22
2016-05-11rustc: Generalize a minimum set of functions over 'tcx != 'gcx.Eduard Burtescu-259/+335
2016-05-11rustc: Wrap users of InferCtxt in an anonymous scope.Eduard Burtescu-87/+103
2016-05-11rustc: Remove the TyCtxt field from ParameterEnvironment.Eduard Burtescu-6/+6
2016-05-11rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users.Eduard Burtescu-100/+109
2016-05-11rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.Eduard Burtescu-118/+117
2016-05-11rustc: Avoid free functions taking &TyCtxt and &InferCtxt.Eduard Burtescu-416/+345
2016-05-11infer: Use methods for creating an InferCtxt.Eduard Burtescu-8/+6
2016-05-07Rollup merge of #33438 - birkenfeld:dup-words, r=steveklabnikSteve Klabnik-1/+1
Fix some some duplicate words.
2016-05-05Fix some some duplicate words.Georg Brandl-1/+1
2016-05-03stop dropping impls from cause backtracesAriel Ben-Yehuda-23/+25
2016-05-03stop using commit_if_ok where no errors can happenAriel Ben-Yehuda-52/+31
2016-05-03change the newly-added errors to warningsAriel Ben-Yehuda-89/+211
this commit should be reverted after a release cycle
2016-05-03improve error message for WF TuplesAriel Ben-Yehuda-0/+4
2016-05-03require the existential bounds of an object type to be object-safeAriel Ben-Yehuda-3/+9
This is required, as Copy and Sized are object-unsafe. As a soundness fix, this is a [breaking-change] Fixes #32963
2016-05-03require the non-last elements of a tuple to be SizedAriel Ben-Yehuda-2/+17
This requirement appears to be missing from RFC1214, but is clearly necessary for translation. The last field of a tuple/enum remains in a state of limbo, compiling but causing an ICE when it is used - we should eventually fix that somehow. this is a [breaking-change] - a soundness fix - and requires a crater run.
2016-05-03refactor the handling of builtin candidatesAriel Ben-Yehuda-198/+101
2016-05-03Short-cut Sized matching on ADTsAriel Ben-Yehuda-82/+73
Put a constraint type on every ADT def, such that the ADT def is sized iff the constraint type is, and use that in selection. This ignores types that are obviously sized. This improves typeck performance by ~15%.
2016-05-02replace fileline_{help,note} with {help,note}Niko Matsakis-109/+56
The extra filename and line was mainly there to keep the indentation relative to the main snippet; now that this doesn't include filename/line-number as a prefix, it is distracted.
2016-04-26Auto merge of #32962 - taralx:patch-1, r=GuillaumeGomezbors-5/+2
Clean up some info log spam. Some of this looks like merge cruft, but the region spam is especially noisy.
2016-04-25Auto merge of #32258 - nikomatsakis:fewer-errors, r=arielb1bors-0/+6
Suppress fallback and ambiguity errors If the infcx has observed other errors, then suppress both default type parameter fallback (which can be unreliable, as the full constraint set is not available) and errors related to unresovled variables (annoyingly, integer type variables cannot currently be unified with error, so that has to be a separate mechanism). Also add a flag to `infcx` to allow us to independently indicate when we have observed an error and hence should trigger this suppression mode. Fixes #31997 cc @alexcrichton r? @arielb1
2016-04-16Auto merge of #32909 - sanxiyn:unused-trait-import-2, r=alexcrichtonbors-2/+0
Remove unused trait imports
2016-04-14Clean up some info log spam.JP Sugarbroad-5/+2
2016-04-13Auto merge of #32780 - soltanmm:consider-the-following, r=nikomatsakisbors-74/+69
Replace consider_unification_despite_ambiguity with new obligation variant Is work towards #32730. Addresses part one of #32286. Addresses #24210 and #26046 to some degree. r? @nikomatsakis
2016-04-13Fix obscure compilation errorMasood Malekghassemi-3/+4
2016-04-12Suppress fallback and ambiguity errorsNiko Matsakis-0/+6
If the infcx has observed other errors, then suppress both default type parameter fallback (which can be unreliable, as the full constraint set is not available) and errors related to unresovled variables (annoyingly, integer type variables cannot currently be unified with error, so that has to be a separate mechanism). Also add a flag to `infcx` to allow us to independently indicate when we have observed an error and hence should trigger this suppression mode.
2016-04-12Remove unused trait importsSeo Sanghyeon-2/+0
2016-04-07Rollup merge of #32748 - aturon:simplified-spec, r=nikomatsakisManish Goregaokar-56/+149
Reinstate fast_reject for overlap checking The initial implementation of specialization did not use the `fast_reject` mechanism when checking for overlap, which caused a serious performance regression in some cases. This commit modifies the specialization graph to use simplified types for fast rejection when possible, and along the way refactors the logic for building the specialization graph. Closes #32499 r? @nikomatsakis
2016-04-07Auto merge of #32583 - arielb1:need-a-bound, r=nikomatsakisbors-56/+134
Suggest adding a where-clause when that can help Suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it. r? @nikomatsakis