diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-22 19:46:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-22 19:46:07 +0100 |
| commit | 97bee3a793e287162d8f10635d6769e8d28befab (patch) | |
| tree | 622673b10419d797b82ece48ca3b7f8fb15e022a /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 0d2817a439c2ad9fe343f6347eb6d90947893363 (diff) | |
| parent | c010d843aacc32ed2bc03d36121aa7f6e08ef045 (diff) | |
| download | rust-97bee3a793e287162d8f10635d6769e8d28befab.tar.gz rust-97bee3a793e287162d8f10635d6769e8d28befab.zip | |
Rollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obk
Add simpler entry points to const eval for common usages. I found the `tcx.const_eval` API to be complex/awkward to work with, because of the inherent complexity from all of the different situations it is called from. Though it mainly used in one of the following ways: - Evaluates the value of a constant without any substitutions, e.g. evaluating a static, discriminant, etc. - Evaluates the value of a resolved instance of a constant. this happens when evaluating unevaluated constants or normalising trait constants. - Evaluates a promoted constant. This PR adds three new functions `const_eval_mono`, `const_eval_resolve`, and `const_eval_promoted` to `TyCtxt`, which each cater to one of the three ways `tcx.const_eval` is normally used.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
