summary refs log tree commit diff
path: root/src/librustc_const_eval/pattern.rs
AgeCommit message (Collapse)AuthorLines
2017-06-27rustc: move the PolyFnSig out of TyFnDef.Eduard-Mihai Burtescu-3/+3
2017-06-01Auto merge of #42281 - eddyb:well-adjusted, r=nikomatsakisbors-2/+1
Decompose Adjustment into smaller steps and remove the method map. The method map held method callee information for: * actual method calls (`x.f(...)`) * overloaded unary, binary, indexing and call operators * *every overloaded deref adjustment* (many can exist for each expression) That last one was a historical ~~accident~~ hack, and part of the motivation for this PR, along with: * a desire to compose adjustments more freely * containing the autoderef logic better to avoid mutation within an inference snapshot * not creating `TyFnDef` types which are incompatible with the original one * i.e. we used to take a`TyFnDef`'s `for<'a> &'a T -> &'a U` signature and instantiate `'a` using a region inference variable, *then* package the resulting `&'b T -> &'b U` signature in another `TyFnDef`, while keeping *the same* `DefId` and `Substs` * to fix #3548 by explicitly writing autorefs for the RHS of comparison operators Individual commits tell their own story, of "atomic" changes avoiding breaking semantics. Future work based on this PR could include: * removing the signature from `TyFnDef`, now that it's always "canonical" * some questions of variance remain, as subtyping *still* treats the signature differently * moving part of the typeck logic for methods, autoderef and coercion into `rustc::traits` * allowing LUB coercions (joining multiple expressions) to "stack up" many adjustments * transitive coercions (e.g. reify or unsize after multiple steps of autoderef) r? @nikomatsakis
2017-06-01rustc: remove unnecessary ItemSubsts wrapper.Eduard-Mihai Burtescu-2/+1
2017-05-30Turn sufficiently old compatibility lints into hard errorsVadim Petrochenkov-15/+6
2017-04-30intern CodeExtentsNiko Matsakis-2/+2
Make a `CodeExtent<'tcx>` be something allocated in an arena instead of an index into the `RegionMaps`.
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-2/+2
2017-04-23rustc_const_eval: support all unit enum variants.Eduard-Mihai Burtescu-1/+7
2017-04-23rustc: make the const-eval cache polymorphic.Eduard-Mihai Burtescu-3/+8
2017-04-16rustc_const_eval: move ConstEvalErr to the rustc crate.Eduard-Mihai Burtescu-2/+2
2017-03-06Fix ICE: don't use `struct_variant` on enumsEsteban Küber-1/+5
Fix #40221 and add unittest.
2017-02-25rustc_const_eval: always demand typeck_tables for evaluating constants.Eduard-Mihai Burtescu-12/+12
2017-02-03Add warning for () to ! switchAndrew Cann-1/+1
2017-01-30Merge ty::TyBox into ty::TyAdtVadim Petrochenkov-1/+1
2017-01-26rustc: rename TyCtxt's `map` field to `hir`.Eduard-Mihai Burtescu-1/+1
2017-01-25rename `Tables` to `TypeckTables`Niko Matsakis-3/+3
2017-01-19add exclusive range patterns under a feature gateOliver Schneider-7/+13
2017-01-06rustc: store ty::Tables separately for each body (except closures').Eduard-Mihai Burtescu-1/+1
2017-01-06rustc: keep track of tables everywhere as if they were per-body.Eduard-Mihai Burtescu-23/+30
2017-01-04Fix build after rebaseAndrew Cann-12/+15
2017-01-03Fix build after rebaseAndrew Cann-5/+5
2017-01-03More pattern matching for empty types changesAndrew Cann-5/+14
Fix is_uninhabited for enum types. It used to assume that an enums variant's fields were all private. Fix MIR generation for irrefutable Variant pattern matches. This allows code like this to work: let x: Result<32, !> = Ok(123); let Ok(y) = x; Carry type information on dummy wildcard patterns. Sometimes we need to expand these patterns into their constructors and we don't want to be expanding a TyError into a Constructor::Single.
2017-01-01rustc_const_eval: convert constants to Pattern instead of hir::Pat.Eduard-Mihai Burtescu-54/+177
2017-01-01rustc_const_eval: build Pattern instead of hir::Pat for pretty-printing.Eduard-Mihai Burtescu-1/+154
2016-11-29rustc: simplify AdtDef by removing the field types and ty::ivar.Eduard-Mihai Burtescu-20/+10
2016-11-28rustc: embed path resolutions into the HIR instead of keeping DefMap.Eduard-Mihai Burtescu-16/+16
2016-11-10Work around a borrow surviving too long (fixes #37686)Anthony Ramine-1/+2
2016-11-02rustc: make all read access to tcx.tables go through a method.Eduard Burtescu-8/+9
2016-10-28rustc: move mir::repr::* to mir.Eduard Burtescu-1/+1
2016-10-27Address comments + Fix rebaseVadim Petrochenkov-1/+1
2016-10-26flatten nested slice patterns in HAIR constructionAriel Ben-Yehuda-10/+43
nested slice patterns have the same functionality as non-nested ones, so flatten them in HAIR construction. Fixes #26158.
2016-10-26remove StaticInliner and NaN checkingAriel Ben-Yehuda-68/+108
NaN checking was a lint for a deprecated feature. It can go away.
2016-10-26change match checking to use HAIRAriel Ben-Yehuda-5/+167
no intended functional changes
2016-10-26move hair::cx::pattern to const_evalAriel Ben-Yehuda-0/+377