about summary refs log tree commit diff
path: root/src/librustc_const_eval
AgeCommit message (Collapse)AuthorLines
2018-03-28Delete leftover librustc_const_evalOliver Schneider-59/+0
Probably accidentally reintroduced in a rebase/merge
2018-03-26Stabilize i128_typeMark Mansi-1/+1
2018-03-20Stabilize slice patterns without `..`Vadim Petrochenkov-1/+0
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
2018-03-13add `canonicalize` method to `InferCtxt` [VIC]Niko Matsakis-0/+1
2018-03-08Move librustc_const_eval to librustc_mirOliver Schneider-4209/+0
2018-03-08Produce instead of pointersOliver Schneider-239/+456
2018-03-08Add a variant to ConstVal for storing miri resultsOliver Schneider-0/+1
2018-03-05Turn features() into a query.Michael Woerister-4/+4
2018-02-24Rollup merge of #48452 - varkor:unpacked-kind, r=eddybManish Goregaokar-1/+1
Introduce UnpackedKind This adds an `UnpackedKind` type as a typesafe counterpart to `Kind`. This should make future changes to kinds (such as const generics!) more resilient, as the type-checker will be able to catch more potential issues. r? @eddyb cc @yodaldevoid
2018-02-23Introduce UnpackedKindvarkor-1/+1
This adds an `UnpackedKind` type as a typesafe counterpart to `Kind`. This should make future changes to kinds (such as const generics!) more resilient, as the type-checker should catch more potential issues.
2018-02-20stage0 cfg cleanupMark Simulacrum-1/+0
2018-02-17fix more typos found by codespell.Matthias Krüger-1/+1
2018-02-08Encode (in MIR) whether borrows are explicit in source or arise due to autoref.Felix S. Klock II-2/+2
This is foundation for issue 46747 (limit two-phase borrows to method-call autorefs).
2018-02-05Rollup merge of #47892 - Badel2:const_type_id_of, r=oli-obkkennytm-0/+4
Turn `type_id` into a constant intrinsic https://github.com/rust-lang/rust/issues/27745 The method `get_type_id` in `Any` is intended to support reflection. It's currently unstable in favor of using an associated constant instead. This PR makes the `type_id` intrinsic a constant intrinsic, the same as `size_of` and `align_of`, allowing `TypeId::of` to be a `const fn`, which will allow using an associated constant in `Any`.
2018-02-04Auto merge of #47915 - eddyb:layout-of, r=nikomatsakisbors-2/+1
rustc: prefer ParamEnvAnd and LayoutCx over tuples for LayoutOf. This PR provides `tcx.layout_of(param_env.and(ty))` as the idiomatic replacement for the existing `(tcx, param_env).layout_of(ty)` and removes fragile (coherence-wise) layout-related tuple impls. r? @nikomatsakis
2018-02-01Turn `type_id` into a constant intrinsicBadel2-0/+4
Add rustc_const_unstable attribute for `any::TypeId::of` Add test for `const fn TypeId::of`
2018-02-01rustc: prefer ParamEnvAnd and LayoutCx over tuples for LayoutOf.Eduard-Mihai Burtescu-2/+1
2018-01-31Rollup merge of #47876 - GuillaumeGomez:associated-const-error, r=nikomatsakiskennytm-3/+19
Update associated constants error message Fixes #47570.
2018-01-30Update associated constants error messageGuillaume Gomez-3/+19
2018-01-25Auto merge of #47374 - topecongiro:issue-47096, r=nikomatsakisbors-1/+3
Simplify irrefutable slice patterns Closes #47096.
2018-01-17Simplify irrefutable slice patternsSeiichi Uchida-1/+3
Closes #47096.
2018-01-13fix commentsAriel Ben-Yehuda-5/+21
2018-01-13check_match: fix handling of privately uninhabited typesAriel Ben-Yehuda-9/+18
the match-checking code used to use TyErr for signaling "unknown, inhabited" types for a long time. It had been switched to using the exact type in #38069, to handle uninhabited types. However, in #39980, we discovered that we still needed the "unknown inhabited" logic, but I used `()` instead of `TyErr` to handle that. Revert to using `TyErr` to fix that problem.
2018-01-13Use delay_span_bug() over debug!()Seiichi Uchida-1/+2
2018-01-12Ignore CTFE errors while lowering patternsSeiichi Uchida-1/+1
Closes #43105.
2018-01-07Try to fix a perf regression by updating logMalo Jaffré-1/+1
Upgrade `log` to `0.4` in multiple crates.
2018-01-07Rollup merge of #47170 - eddyb:us-vs-usize, r=nikomatsakiskennytm-4/+4
rustc: use {U,I}size instead of {U,I}s shorthands. `Us`/`Is` come from a time when `us` and `is` were the literal suffixes that are now `usize` / `isize`. r? @nikomatsakis
2018-01-04rustc: Don't use relative paths for extended errorsAlex Crichton-0/+1
These no longer work now that Cargo changes the cwd of rustc while it's running. Instead use an absolute path that's set by rustbuild.
2018-01-04rustc: use {U,I}size instead of {U,I}s shorthands.Eduard-Mihai Burtescu-4/+4
2017-12-20Various tweaksEsteban Küber-2/+2
2017-12-19Use a label for catch-all pattern instead of noteEsteban Küber-1/+1
2017-12-12Move large chunks of miri from rustc::mir::interpret to rustc_mir::interpretOliver Schneider-296/+0
2017-12-12Put miri const eval checking behind -ZmiriOliver Schneider-20/+24
2017-12-06miri: don't use an associated constant for a Machine's own data.Eduard-Mihai Burtescu-4/+4
2017-12-06miri: move param_env from Machine to EvalContext.Eduard-Mihai Burtescu-2/+2
2017-12-06miri: monomorphize types iff they came from MIR.Eduard-Mihai Burtescu-3/+4
2017-12-06Update miri to rustc changesOliver Schneider-205/+441
2017-09-29Expose miri <-> ctfe differencesOliver Schneider-17/+17
miri needs to start storing everything in the TyCtxt so we can have relocations and aggregates
2017-09-29Adjust imports to librustc::mir::interpretOliver Schneider-1/+72
2017-09-18incr.comp.: Already hash HIR bodies during metadata export so they don't ↵Michael Woerister-4/+3
have to be hashed in downstream crates.
2017-09-16change #![feature(const_fn)] to specific gatesAlex Burka-1/+3
2017-09-11rustc: evaluate fixed-length array length expressions lazily.Eduard-Mihai Burtescu-10/+14
2017-09-11rustc: remove obsolete const_val::ErrKind::{Negate,Not}On.Eduard-Mihai Burtescu-7/+5
2017-09-11rustc: use ty::Const for the length of TyArray.Eduard-Mihai Burtescu-8/+17
2017-09-11rustc: replace usize with u64 and ConstUsize.Eduard-Mihai Burtescu-29/+30
2017-09-11rustc: introduce ty::Const { ConstVal, Ty }.Eduard-Mihai Burtescu-56/+63
2017-09-11rustc: intern ConstVal's in TyCtxt.Eduard-Mihai Burtescu-121/+131
2017-09-08Use NodeId/HirId instead of DefId for local variables.Eduard-Mihai Burtescu-14/+13
2017-09-05rustc: Store InternedString in `DefPathData`Alex Crichton-1/+1
Previously a `Symbol` was stored there, but this ended up causing hash collisions in situations that otherwise shouldn't have a hash collision. Only the symbol's string value was hashed, but it was possible for distinct symbols to have the same string value, fooling various calcuations into thinking that these paths *didn't* need disambiguating data when in fact they did! By storing `InternedString` instead we're hopefully triggering all the exising logic to disambiguate paths with same-name `Symbol` but actually distinct locations.
2017-09-05rustc: Rename item_body query to extern_const_bodyAlex Crichton-3/+3
Should hopefully more accurately reflect what's happening! This commit also removes the cache in the cstore implementation as it's already cached through the query infrastructure.