about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/const_eval
AgeCommit message (Collapse)AuthorLines
2020-09-19Rename const eval queries to reflect the validation changesOliver Scherer-7/+7
2020-09-19Do not call the `const_eval` query in mir interpretation except for caching ↵Oliver Scherer-1/+1
of nulary intrinsics
2020-09-19Replace `and_then` `map_err` `and_then` chain with a matchOliver Scherer-15/+16
2020-09-19`turn_into_const` is infallibleOliver Scherer-11/+7
2020-09-19Document `op_to_const`'s purposeOliver Scherer-0/+2
2020-09-19Stop using the `const_eval` query for initializers of staticsOliver Scherer-20/+11
As a side effect, we now represent most promoteds as `ConstValue::Scalar` again. This is useful because all implict promoteds are just references anyway and most explicit promoteds are numeric arguments to `asm!` or SIMD instructions.
2020-09-19Validate constants during `const_eval_raw`Oliver Scherer-16/+35
2020-09-12move guaranteed{ne,eq} implementation to compile-time machineRalf Jung-3/+68
2020-09-04Change ty.kind to a methodLeSeulArtichaut-4/+4
2020-09-02pretty: trim paths of unique symbolsDan Aloni-2/+4
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-30mv compiler to compiler/mark-0/+1212