rust/compiler/rustc_mir/src/transform
Ralf Jung 85a59d40f1
Rollup merge of #77170 - ecstatic-morse:const-fn-ptr, r=oli-obk
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-28 18:39:44 +02:00
..
check_consts Rollup merge of #77170 - ecstatic-morse:const-fn-ptr, r=oli-obk 2020-09-28 18:39:44 +02:00
add_call_guards.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
add_moves_for_packed_drops.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
add_retag.rs Change ty.kind to a method 2020-09-04 17:47:51 +02:00
check_const_item_mutation.rs Note when a a move/borrow error is caused by a deref coercion 2020-09-10 20:56:20 -04:00
check_packed_ref.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
check_unsafety.rs Change ty.kind to a method 2020-09-04 17:47:51 +02:00
cleanup_post_borrowck.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
const_prop.rs Enable const prop into operands at mir_opt_level=2 2020-09-23 19:03:10 +02:00
copy_prop.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
deaggregator.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
dest_prop.rs Fix dest prop miscompilation around references 2020-09-22 20:19:00 +02:00
dump_mir.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
early_otherwise_branch.rs enable on mir-opt-level=1 to test perf 2020-09-20 14:45:47 +02:00
elaborate_drops.rs Add pass names to some common dataflow analyses 2020-09-14 17:56:39 -07:00
generator.rs Add pass names to some common dataflow analyses 2020-09-14 17:56:39 -07:00
inline.rs Auto merge of #76123 - tmiasko:inline-args-storage, r=wesleywiser 2020-09-14 02:13:02 +00:00
instcombine.rs Add optimization to avoid load of address 2020-09-21 22:08:27 +02:00
instrument_coverage.rs use String::from instead of format!() macro to craft string clippy::useless_format 2020-09-10 13:22:51 +02:00
match_branches.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
mod.rs Move qualify_min_const_fn out of rustc into clippy 2020-09-26 16:08:24 +02:00
no_landing_pads.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
nrvo.rs Implement a destination propagation pass 2020-09-18 21:23:00 +02:00
promote_consts.rs Rollup merge of #76888 - matthiaskrgr:clippy_single_match_2, r=Dylan-DPC 2020-09-21 20:40:55 -07:00
remove_noop_landing_pads.rs Fix underflow when calculating the number of no-op jumps folded 2020-09-16 00:00:00 +00:00
remove_unneeded_drops.rs Resolve https://github.com/rust-lang/rust/pull/76673#discussion_r494426303 2020-09-24 21:02:53 +02:00
required_consts.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
rustc_peek.rs Auto merge of #76044 - ecstatic-morse:dataflow-lattice, r=oli-obk 2020-09-07 21:29:43 +00:00
simplify_branches.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
simplify_comparison_integral.rs Fix #76432 2020-09-13 10:47:20 +02:00
simplify_try.rs Add assertion for len of vecs 2020-09-19 23:22:54 +02:00
simplify.rs use matches!() macro for simple if let conditions 2020-09-18 20:28:35 +02:00
uninhabited_enum_branching.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
unreachable_prop.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
validate.rs Validate removal of AscribeUserType, FakeRead, and Shallow borrow 2020-09-10 00:00:00 +00:00