about summary refs log tree commit diff
path: root/src/librustc_const_eval
AgeCommit message (Collapse)AuthorLines
2017-04-24rustc: expose the common DUMMY_SP query case as tcx methods.Eduard-Mihai Burtescu-2/+2
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-5/+5
2017-04-23rustc_const_eval: support all unit enum variants.Eduard-Mihai Burtescu-45/+40
2017-04-23rustc_const_eval: CallOn isn't needed, typeck/const-qualif handle those cases.Eduard-Mihai Burtescu-1/+1
2017-04-23rustc: make the const-eval cache polymorphic.Eduard-Mihai Burtescu-107/+89
2017-04-18convert calls to `visit_all_item_likes_in_krate`Niko Matsakis-4/+1
We no longer need to track the tasks in these cases since these particular tasks have no outputs (except, potentially, errors...) and they always execute.
2017-04-16rustc: use monomorphic const_eval for cross-crate enum discriminants.Eduard-Mihai Burtescu-4/+7
2017-04-16rustc: expose monomorphic const_eval through on-demand.Eduard-Mihai Burtescu-34/+15
2017-04-16rustc_const_eval: move ConstEvalErr to the rustc crate.Eduard-Mihai Burtescu-209/+24
2017-03-31Don't warn about `char` comparisons in constexprsMatthew Jasper-0/+11
2017-03-27Fix various useless derefs and slicingsOliver Schneider-3/+3
2017-03-23Remove internal liblogAlex Crichton-1/+1
This commit deletes the internal liblog in favor of the implementation that lives on crates.io. Similarly it's also setting a convention for adding crates to the compiler. The main restriction right now is that we want compiler implementation details to be unreachable from normal Rust code (e.g. requires a feature), and by default everything in the sysroot is reachable via `extern crate`. The proposal here is to require that crates pulled in have these lines in their `src/lib.rs`: #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] This'll mean that by default they're not using these attributes but when compiled as part of the compiler they do a few things: * Mark themselves as entirely unstable via the `staged_api` feature and the `#![unstable]` attribute. * Allow usage of other unstable crates via `feature(rustc_private)` which is required if the crate relies on any other crates to compile (other than std).
2017-03-13clean up visuals on error index #40425Joshua Horwitz-3/+3
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: demand that the MIR qualify_consts ran on each evaluated body.Eduard-Mihai Burtescu-1/+2
2017-02-25rustc_const_eval: always demand typeck_tables for evaluating constants.Eduard-Mihai Burtescu-510/+251
2017-02-25rustc_typeck: rework coherence to be almost completely on-demand.Eduard-Mihai Burtescu-2/+2
2017-02-25rustc_typeck: hook up collect and item/body check to on-demand.Eduard-Mihai Burtescu-4/+2
2017-02-25rustc: introduce a query system for type information in ty::maps.Eduard Burtescu-1/+1
2017-02-25rustc: consolidate dep-tracked hashmaps in tcx.maps.Eduard-Mihai Burtescu-5/+5
2017-02-23use a more conservative inhabitableness ruleAriel Ben-Yehuda-1/+15
This is a [breaking-change] from 1.15, because this used to compile: ```Rust enum Void {} fn foo(x: &Void) { match x {} } ```
2017-02-20check_match: don't treat privately uninhabited types as uninhabitedAriel Ben-Yehuda-30/+82
Fixes #38972.
2017-02-10Use global recursion limit when evaluating inhabitednessAndrew Cann-3/+3
2017-02-09Add recursion limit to inhabitedness checkAndrew Cann-1/+1
Fixes #39489. Add test aswell.
2017-02-05Rollup merge of #39526 - canndrew:uninhabited-while-let-fix, r=arielb1Corey Farwell-5/+22
Uninhabited while-let pattern fix This fix makes it so while-let with an unsatisfiable pattern raises a correct warning rather than an incorrect error.
2017-02-05Rollup merge of #39519 - nagisa:more-snap, r=alexcrichtonCorey Farwell-6/+3
More snap cleanup r? @alexcrichton
2017-02-05Fix make tidyAndrew Cann-2/+3
2017-02-05Rollup merge of #39009 - canndrew:default-unit-warnings, r=nikomatsakisCorey Farwell-3/+3
Add warning for () to ! switch With feature(never_type) enabled diverging type variables will default to `!` instead of `()`. This can cause breakages where a trait is resolved on such a type. This PR emits a future-compatibility warning when it sees this happen.
2017-02-05Remove use of ptr::eqAndrew Cann-14/+18
2017-02-04Uninhabited while-let pattern fixAndrew Cann-4/+16
2017-02-04More snap cleanupSimonas Kazlauskas-6/+3
2017-02-03Bump version, upgrade bootstrapAlex Crichton-5/+1
This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.
2017-02-03Add warning for () to ! switchAndrew Cann-3/+3
2017-01-31use suggestions instead of helps with code in themOliver Schneider-2/+0
2017-01-30Merge ty::TyBox into ty::TyAdtVadim Petrochenkov-3/+1
2017-01-27Rollup merge of #39290 - canndrew:hide-uninhabitedness, r=nikomatsakisAlex Crichton-4/+13
Hide uninhabitedness checks behind feature gate This reverts the fix to match exhaustiveness checking so that it can be discussed. The new code is now hidden behind the `never_type` feature gate.
2017-01-26rustc: don't call the HIR AST.Eduard-Mihai Burtescu-5/+5
2017-01-26rustc: rename TyCtxt's `map` field to `hir`.Eduard-Mihai Burtescu-23/+23
2017-01-25rename `Tables` to `TypeckTables`Niko Matsakis-11/+11
2017-01-25Hide uninhabitedness checks behind feature gateAndrew Cann-4/+13
2017-01-25Auto merge of #35712 - oli-obk:exclusive_range_patterns, r=nikomatsakisbors-24/+47
exclusive range patterns adds `..` patterns to the language under a feature gate (`exclusive_range_pattern`). This allows turning ``` rust match i { 0...9 => {}, 10...19 => {}, 20...29 => {}, _ => {} } ``` into ``` rust match i { 0..10 => {}, 10..20 => {}, 20..30 => {}, _ => {} } ```
2017-01-22Auto merge of #39127 - canndrew:unreachable-pattern-errors-into-warnings, ↵bors-11/+4
r=arielb1 Change unreachable pattern ICEs to warnings Allow code with unreachable `?` and `for` patterns to compile. Add some tests.
2017-01-22Remove unused `extern crate`s.Jeffrey Seyfried-2/+0
2017-01-21Fix some nitsAndrew Cann-0/+2
2017-01-19add exclusive range patterns under a feature gateOliver Schneider-24/+47
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-11Fix two const-eval issues related to i128 negationSimonas Kazlauskas-13/+16
First issue here was the fact that we’d only allow negating integers in i64 range in case the integer was not infered yes. While this is not the direct cause of the issue, its still good to fix it. The real issue here is the code handling specifically the `min_value` literals. While I128_OVERFLOW has the expected value (0x8000_..._0000), match using this value as a pattern is handled incorrectly by the stage1 compiler (it seems to be handled correctly, by the stage2 compiler). So what we do here is extract this pattern into an explicit `==` until the next snapshot. Fixes #38987
2017-01-06rustc: store ty::Tables separately for each body (except closures').Eduard-Mihai Burtescu-30/+44
2017-01-06rustc: keep track of tables everywhere as if they were per-body.Eduard-Mihai Burtescu-213/+218
2017-01-06fix doc test for E0001Andrew Cann-1/+1