about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/const_eval/fn_queries.rs
AgeCommit message (Collapse)AuthorLines
2021-09-07Rename rustc_mir to rustc_const_eval.Camille GILLOT-112/+0
2021-04-25remove now-unused 'is_min_const_fn'Ralf Jung-49/+0
2021-01-12Separate out a `hir::Impl` structJoshua Nelson-1/+1
This makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases.
2020-09-28Rollup merge of #77170 - ecstatic-morse:const-fn-ptr, r=oli-obkRalf Jung-6/+0
Remove `#[rustc_allow_const_fn_ptr]` and add `#![feature(const_fn_fn_ptr_basics)]` `rustc_allow_const_fn_ptr` was a hack to work around the lack of an escape hatch for the "min `const fn`" checks in const-stable functions. Now that we have co-opted `allow_internal_unstable` for this purpose, we no longer need a bespoke attribute. Now this functionality is gated under `const_fn_fn_ptr_basics` (how concise!), and `#[allow_internal_unstable(const_fn_fn_ptr_basics)]` replaces `#[rustc_allow_const_fn_ptr]`. `const_fn_fn_ptr_basics` allows function pointer types to appear in the arguments and locals of a `const fn` as well as function pointer casts to be performed inside a `const fn`. Both of these were allowed in constants and statics already. Notably, this does **not** allow users to invoke function pointers in a const context. Presumably, we will use a nicer name for that (`const_fn_ptr`?). r? @oli-obk
2020-09-27Remove `rustc_allow_const_fn_ptr`Dylan MacKenzie-6/+0
This was a hack to work around the lack of an escape hatch for the "min `const fn`" checks in const-stable functions. Now that we have co-opted `allow_internal_unstable` for this purpose, we no longer need the bespoke attribute.
2020-09-25Change error in `fn_queries` to `delay_span_bug`Dylan MacKenzie-1/+1
This should be caught by the new check in `rustc_passes`. At some point, this function will be removed entirely.
2020-08-30mv compiler to compiler/mark-0/+167