about summary refs log tree commit diff
path: root/src/librustc_const_eval/check_match.rs
AgeCommit message (Collapse)AuthorLines
2017-01-21Fix some nitsAndrew Cann-0/+2
2017-01-17Change unreachable patterns ICEs to warningsAndrew Cann-11/+2
Allow code with unreachable `?` and `for` patterns to compile. Add some tests.
2017-01-06rustc: keep track of tables everywhere as if they were per-body.Eduard-Mihai Burtescu-9/+9
2017-01-04Fix build after rebaseAndrew Cann-1/+1
2017-01-03Fix build after rebase.Andrew Cann-2/+4
Mostly just rename stuff. Visibility checks use DefIds rather than NodeIds now.
2017-01-03Disable unreachable patterns error entirelyAndrew Cann-12/+9
2017-01-03More pattern matching for empty types changesAndrew Cann-28/+22
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-03Make is_useful handle empty types properlyAndrew Cann-7/+13
2017-01-01rustc_const_eval: convert constants to Pattern instead of hir::Pat.Eduard-Mihai Burtescu-7/+0
2017-01-01rustc_const_eval: build Pattern instead of hir::Pat for pretty-printing.Eduard-Mihai Burtescu-21/+15
2016-12-28rustc: always print nested nodes where a HIR map is available.Eduard-Mihai Burtescu-4/+7
2016-12-28rustc: move function arguments into hir::Body.Eduard-Mihai Burtescu-32/+9
2016-12-28rustc: separate bodies for static/(associated)const and embedded constants.Eduard-Mihai Burtescu-2/+2
2016-12-28rustc: separate TraitItem from their parent Item, just like ImplItem.Eduard-Mihai Burtescu-1/+1
2016-11-29revamp `Visitor` with a single method for controlling nested visitsNiko Matsakis-5/+9
2016-11-29Split nested_visit_mode function off from nested_visit_mapFlorian Diebold-3/+7
... and make the latter mandatory to implement.
2016-11-29rustc_const_eval: fix compilationFlorian Diebold-12/+16
2016-11-28rustc: embed path resolutions into the HIR instead of keeping DefMap.Eduard-Mihai Burtescu-28/+22
2016-11-22Make is_uninhabited respect privacyAndrew Cann-1/+1
2016-11-16refactor Visitor into ItemLikeVisitor and intravisit::VisitorNiko Matsakis-1/+2
There are now three patterns (shallow, deep, and nested visit). These are described in detail on the docs in `itemlikevisit::ItemLikeVisitor`.
2016-11-10rustc: use an Expr instead of a Block for function bodies.Eduard Burtescu-2/+2
2016-11-02rustc: make all read access to tcx.tables go through a method.Eduard Burtescu-3/+3
2016-10-26handle mixed byte literal and byte array patternsAriel Ben-Yehuda-5/+5
Convert byte literal pattern to byte array patterns when they are both used together. so matching them is properly handled. I could've done the conversion eagerly, but that could have caused a bad worst-case for massive byte-array matches. Fixes #18027. Fixes #25051. Fixes #26510.
2016-10-26remove StaticInliner and NaN checkingAriel Ben-Yehuda-153/+61
NaN checking was a lint for a deprecated feature. It can go away.
2016-10-26stop using MatchCheckCtxt to hold the param-env for check_matchAriel Ben-Yehuda-117/+161
2016-10-26change match checking to use HAIRAriel Ben-Yehuda-9/+8
no intended functional changes
2016-10-26un-break the `construct_witness` logicAriel Ben-Yehuda-2/+2
Fixes #35609.
2016-10-26split the exhaustiveness-checking logic to its own moduleAriel Ben-Yehuda-680/+27
`check_match` is now left with its grab bag of random checks.
2016-10-26refactor the `pat_is_catchall` logicAriel Ben-Yehuda-20/+20
2016-10-26use a struct abstraction in check_matchAriel Ben-Yehuda-60/+94
2016-10-26remove SliceWithSubslice, only used from old transAriel Ben-Yehuda-12/+0
2016-10-26comment some ugly points in check_matchAriel Ben-Yehuda-15/+23
2016-10-09Update E0303 to new error formatJohn Firebaugh-2/+4
2016-10-06Rollup merge of #36909 - GuillaumeGomez:merge_e0002_e0004, r=arielb1Jonathan Turner-7/+15
Merge E0002 into E0004 Fixes #36724. r? @jonathandturner
2016-10-04Turn some impossible definitions into ICEsVadim Petrochenkov-7/+8
2016-10-04Eliminate ty::VariantKind in favor of def::CtorKindVadim Petrochenkov-5/+5
2016-10-04Separate Def::StructCtor/Def::VariantCtor from Def::Struct/Def::VariantVadim Petrochenkov-6/+6
2016-10-02Merge E0002 into E0004Guillaume Gomez-7/+15
2016-09-28Fix rebase falloutJonas Schievink-4/+4
2016-09-28Call arrays "arrays" instead of "vecs" internallyJonas Schievink-5/+5
2016-09-20rustc_metadata: group information into less tags.Eduard Burtescu-3/+3
2016-09-20rustc_metadata: remove ty{en,de}code and move to auto-derived serialization.Eduard Burtescu-14/+13
2016-09-20rustc: remove hir::fold.Eduard Burtescu-50/+55
2016-09-20rustc_metadata: go only through rustc_serialize in astencode.Eduard Burtescu-2/+2
2016-09-10Update E0297 to new error formatJohn Firebaugh-2/+5
2016-09-08Refactor `TyStruct`/`TyEnum`/`TyUnion` into `TyAdt`Vadim Petrochenkov-18/+21
2016-09-04Replace `_, _` with `..`Vadim Petrochenkov-6/+6
2016-09-03Some better support for unions through the compilerVadim Petrochenkov-3/+4
2016-08-30E0165 Update error format #35270Gavin Baker-1/+4
- Fixes #35270 - Part of #35233 r? @jonathandturner
2016-08-27rustc: pass ty::Region behind an interned 'tcx reference.Eduard Burtescu-1/+1