summary refs log tree commit diff
path: root/src/librustc_const_eval/eval.rs
AgeCommit message (Collapse)AuthorLines
2016-06-29Rollup merge of #34497 - oli-obk:double_negation, r=eddybManish Goregaokar-48/+41
Revert "skip double negation in const eval" This reverts commit 735c018974e5570ea13fd887aa70a011a5b8e7b8. fixes #34395 The original commit was based on a mis-understanding of the overflowing literal lint. This needs to be ported to beta. r? @eddyb
2016-06-27Revert "skip double negation in const eval"Oliver Schneider-48/+41
This reverts commit 735c018974e5570ea13fd887aa70a011a5b8e7b8.
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-2/+2
2016-06-21don't warn on casting byte strs to slicesOliver Schneider-0/+1
2016-06-10Auto merge of #34174 - shepmaster:16-bit-mir, r=Aatchbors-20/+5
Support 16-bit pointers in MIR
2016-06-10Allow truncating constants to 16-bit u/isizeJake Goulding-20/+5
2016-06-10Introduce TyCtxt::expect_def/expect_resolution helpers and use them where ↵Vadim Petrochenkov-25/+14
possible
2016-06-05rustc_const_eval: work around double rounding.Eduard Burtescu-38/+71
2016-06-05rustc_const_eval: track the length and index in IndexOutOfBounds.Eduard Burtescu-5/+14
2016-06-05rustc_const_eval: strings are not indexable in Rust 1.x.Eduard Burtescu-3/+0
2016-06-05rustc_const_eval: remove unused arithmetic ErrKind variants.Eduard Burtescu-12/+0
2016-06-03Auto merge of #33460 - shepmaster:16-bit-pointers, r=Aatchbors-0/+3
Support 16-bit pointers as well as i/usize I'm opening this pull request to get some feedback from the community. Although Rust doesn't support any platforms with a native 16-bit pointer at the moment, the [AVR-Rust][ar] fork is working towards that goal. Keeping this forked logic up-to-date with the changes in master has been onerous so I'd like to merge these changes so that they get carried along when refactoring happens. I do not believe this should increase the maintenance burden. This is based on the original work of Dylan McKay (@dylanmckay). [ar]: https://github.com/avr-rust/rust
2016-05-26Implement `..` in tuple (struct) patternsVadim Petrochenkov-5/+4
2016-05-19Support 16-bit pointers as well as i/usizeJake Goulding-0/+3
This is based on the original work of Dylan McKay for the [avr-rust project][ar]. [ar]: https://github.com/avr-rust/rust
2016-05-11rustc: Split local type contexts interners from the global one.Eduard Burtescu-2/+1
2016-05-11rustc: More interning for data used in Ty<'tcx>.Eduard Burtescu-3/+3
2016-05-11rustc: Wrap users of InferCtxt in an anonymous scope.Eduard Burtescu-38/+37
2016-05-11rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users.Eduard Burtescu-17/+23
2016-05-11rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.Eduard Burtescu-32/+31
2016-05-11rustc: Avoid free functions taking &TyCtxt and &InferCtxt.Eduard Burtescu-7/+6
2016-05-11infer: Use methods for creating an InferCtxt.Eduard Burtescu-2/+3
2016-05-09Auto merge of #33457 - oli-obk:const_err/cast_u8_ptr, r=eddybbors-0/+6
casting `&[u8]` to `* const u8` doesn't work in const_eval fixes #33452 r? @eddyb cc @Ms2ger
2016-05-08Auto merge of #33091 - sanxiyn:unused-trait-import-3, r=nrcbors-1/+1
Warn unused trait imports, rebased Rebase of #30021. Fix #25730.
2016-05-08casting `b"text"` to `* const u8` doesn't work in const_evalOliver 'ker' Schneider-0/+6
2016-05-03Rollup merge of #33339 - oli-obk:fix/const_eval, r=japaricManish Goregaokar-48/+37
fix various const eval errors These were found after const_evaluating arbitrary expressions and linting if the const evaluator failed fixes #33275 (int -> float casts for negative ints) fixes #33291 (int -> char casts (new! wasn't allowed in constants until this PR)) r? @eddyb cc @bluss @japaric
2016-05-03Remove unused trait imports flagged by lintSeo Sanghyeon-1/+1
2016-05-02refactor infer functionOliver Schneider-20/+20
There was no span available in the cast function, but we need to infer the `x` in `x as char` to `u8`. The spans are now removed from all functions using `infer` and instead added in `eval_const_expr_partial`
2016-05-02`* as char` assumes `*` to be of type `u8`Oliver Schneider-6/+11
2016-05-02check for wrong const_err warningsOliver Schneider-14/+12
2016-05-02remove unused constant error variantsOliver Schneider-14/+0
2016-04-30Fix patterns of the constants that are const methSimonas Kazlauskas-1/+1
See the regression test for the sample code this fixes
2016-04-26skip double negation in const evalOliver Schneider-38/+45
2016-04-11don't report errors in constants at every use siteOliver Schneider-4/+20
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-3/+3
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-5/+5
2016-04-03check constants even if they are unused in the current crateOliver Schneider-6/+17
2016-03-31librustc_const_eval: use bug!(), span_bug!()Benjamin Herr-13/+13
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-0/+1226