rust/tests/mir-opt/inline
Matthias Krüger 260e07b0cb
Rollup merge of #115626 - clarfonthey:unchecked-math, r=thomcc
Clean up unchecked_math, separate out unchecked_shifts

Tracking issue: #85122

Changes:

1. Remove `const_inherent_unchecked_arith` flag and make const-stability flags the same as the method feature flags. Given the number of other unsafe const fns already stabilised, it makes sense to just stabilise these in const context when they're stabilised.
2. Move `unchecked_shl` and `unchecked_shr` into a separate `unchecked_shifts` flag, since the semantics for them are unclear and they'll likely be stabilised separately as a result.
3. Add an `unchecked_neg` method exclusively to signed integers, under the `unchecked_neg` flag. This is because it's a new API and probably needs some time to marinate before it's stabilised, and while it *would* make sense to have a similar version for unsigned integers since `checked_neg` also exists for those there is absolutely no case where that would be a good idea, IMQHO.

The longer-term goal here is to prepare the `unchecked_math` methods for an FCP and stabilisation since they've existed for a while, their semantics are clear, and people seem in favour of stabilising them.
2023-11-01 11:29:41 +01:00
..
asm_unwind.main.Inline.panic-abort.diff make MIR less verbose 2023-08-24 14:26:26 +02:00
asm_unwind.main.Inline.panic-unwind.diff make MIR less verbose 2023-08-24 14:26:26 +02:00
asm_unwind.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
caller_with_trivial_bound.foo.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
caller_with_trivial_bound.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
cycle.f.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
cycle.f.Inline.panic-unwind.diff make MIR less verbose 2023-08-24 14:26:26 +02:00
cycle.g.Inline.panic-abort.diff Explicitly don't inline user-written rust-call fns 2023-08-03 18:35:56 +00:00
cycle.g.Inline.panic-unwind.diff make MIR less verbose 2023-08-24 14:26:26 +02:00
cycle.main.Inline.panic-abort.diff Explicitly don't inline user-written rust-call fns 2023-08-03 18:35:56 +00:00
cycle.main.Inline.panic-unwind.diff make MIR less verbose 2023-08-24 14:26:26 +02:00
cycle.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
dont_ice_on_generic_rust_call.call.Inline.panic-abort.diff bless 2023-08-03 18:42:12 +00:00
dont_ice_on_generic_rust_call.call.Inline.panic-unwind.diff make MIR less verbose 2023-08-24 14:26:26 +02:00
dont_ice_on_generic_rust_call.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
dyn_trait.get_query.Inline.panic-abort.diff Turn copy into moves during DSE. 2023-07-19 09:59:12 +00:00
dyn_trait.get_query.Inline.panic-unwind.diff Turn copy into moves during DSE. 2023-07-19 09:59:12 +00:00
dyn_trait.mk_cycle.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
dyn_trait.mk_cycle.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
dyn_trait.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
dyn_trait.try_execute_query.Inline.panic-abort.diff Turn copy into moves during DSE. 2023-07-19 09:59:12 +00:00
dyn_trait.try_execute_query.Inline.panic-unwind.diff Turn copy into moves during DSE. 2023-07-19 09:59:12 +00:00
exponential_runtime.main.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
exponential_runtime.main.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
exponential_runtime.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_any_operand.bar.Inline.after.mir Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_any_operand.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_async.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
inline_box_fn.call.Inline.panic-abort.diff bless 2023-08-03 18:42:12 +00:00
inline_box_fn.call.Inline.panic-unwind.diff make MIR less verbose 2023-08-24 14:26:26 +02:00
inline_box_fn.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_closure_borrows_arg.foo.Inline.after.mir adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
inline_closure_borrows_arg.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_closure_captures.foo.Inline.after.mir Remove mir::LocalDecl::internal. 2023-10-04 17:55:15 +00:00
inline_closure_captures.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_closure.foo.Inline.after.mir adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
inline_closure.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_compatibility.rs Require target features to match exactly during inlining 2023-10-24 22:49:15 +02:00
inline_coroutine.main.Inline.panic-abort.diff s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
inline_coroutine.main.Inline.panic-unwind.diff s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
inline_coroutine.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
inline_cycle_generic.main.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_cycle_generic.main.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
inline_cycle_generic.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_cycle.one.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_cycle.one.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
inline_cycle.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_cycle.two.Inline.panic-abort.diff Explicitly don't inline user-written rust-call fns 2023-08-03 18:35:56 +00:00
inline_cycle.two.Inline.panic-unwind.diff Explicitly don't inline user-written rust-call fns 2023-08-03 18:35:56 +00:00
inline_diverging.f.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_diverging.f.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
inline_diverging.g.Inline.panic-abort.diff lower ExprKind::Use, LogicalOp::Or and UnOp::Not 2023-08-30 17:24:10 +08:00
inline_diverging.g.Inline.panic-unwind.diff lower ExprKind::Use, LogicalOp::Or and UnOp::Not 2023-08-30 17:24:10 +08:00
inline_diverging.h.Inline.panic-abort.diff Also consider call and yield as MIR SSA. 2023-10-08 16:05:26 +00:00
inline_diverging.h.Inline.panic-unwind.diff Also consider call and yield as MIR SSA. 2023-10-08 16:05:26 +00:00
inline_diverging.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_instruction_set.default.Inline.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_instruction_set.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_instruction_set.t32.Inline.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_into_box_place.main.Inline.panic-abort.diff Remove mir::LocalDecl::internal. 2023-10-04 17:55:15 +00:00
inline_into_box_place.main.Inline.panic-unwind.diff Remove mir::LocalDecl::internal. 2023-10-04 17:55:15 +00:00
inline_into_box_place.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_options.main.Inline.after.panic-abort.mir Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_options.main.Inline.after.panic-unwind.mir Bless tests 2023-06-23 18:36:25 +01:00
inline_options.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_retag.bar.Inline.after.mir Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_retag.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_shims.clone.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_shims.clone.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
inline_shims.drop.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_shims.drop.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
inline_shims.rs FileCheck inline_shims. 2023-10-19 15:51:54 +00:00
inline_specialization.main.Inline.panic-abort.diff Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_specialization.main.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
inline_specialization.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_trait_method_2.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_trait_method_2.test2.Inline.after.panic-abort.mir Turn copy into moves during DSE. 2023-07-19 09:59:12 +00:00
inline_trait_method_2.test2.Inline.after.panic-unwind.mir Turn copy into moves during DSE. 2023-07-19 09:59:12 +00:00
inline_trait_method.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
inline_trait_method.test.Inline.after.panic-abort.mir Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
inline_trait_method.test.Inline.after.panic-unwind.mir Bless tests 2023-06-23 18:36:25 +01:00
issue_58867_inline_as_ref_as_mut.a.Inline.after.mir Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
issue_58867_inline_as_ref_as_mut.b.Inline.after.mir Remove mir::LocalDecl::internal. 2023-10-04 17:55:15 +00:00
issue_58867_inline_as_ref_as_mut.c.Inline.after.mir Remove comments from mir-opt MIR dumps 2023-06-15 15:19:11 -04:00
issue_58867_inline_as_ref_as_mut.d.Inline.after.mir Remove mir::LocalDecl::internal. 2023-10-04 17:55:15 +00:00
issue_58867_inline_as_ref_as_mut.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
issue_76997_inline_scopes_parenting.main.Inline.after.mir Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
issue_76997_inline_scopes_parenting.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
issue_78442.bar.Inline.panic-abort.diff Automatically enable cross-crate inlining for small functions 2023-10-17 19:53:51 -04:00
issue_78442.bar.Inline.panic-unwind.diff Automatically enable cross-crate inlining for small functions 2023-10-17 19:53:51 -04:00
issue_78442.bar.RevealAll.panic-abort.diff Unconditionally run RevealAll pass and run it earlier 2023-09-28 16:13:38 +00:00
issue_78442.bar.RevealAll.panic-unwind.diff Unconditionally run RevealAll pass and run it earlier 2023-09-28 16:13:38 +00:00
issue_78442.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
issue_106141.outer.Inline.panic-abort.diff Remove mir::LocalDecl::internal. 2023-10-04 17:55:15 +00:00
issue_106141.outer.Inline.panic-unwind.diff Remove mir::LocalDecl::internal. 2023-10-04 17:55:15 +00:00
issue_106141.rs FileCheck issue_106141. 2023-10-19 15:51:54 +00:00
polymorphic_recursion.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
unchecked_shifts.rs Rollup merge of #115626 - clarfonthey:unchecked-math, r=thomcc 2023-11-01 11:29:41 +01:00
unchecked_shifts.unchecked_shl_unsigned_bigger.Inline.panic-abort.diff Promote unchecked_add/sub/mul/shl/shr to mir::BinOp 2023-06-19 01:47:03 -07:00
unchecked_shifts.unchecked_shl_unsigned_bigger.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
unchecked_shifts.unchecked_shl_unsigned_bigger.PreCodegen.after.panic-abort.mir Promote unchecked_add/sub/mul/shl/shr to mir::BinOp 2023-06-19 01:47:03 -07:00
unchecked_shifts.unchecked_shl_unsigned_bigger.PreCodegen.after.panic-unwind.mir Promote unchecked_add/sub/mul/shl/shr to mir::BinOp 2023-06-19 01:47:03 -07:00
unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-abort.diff Always propagate into operands. 2023-07-20 21:30:51 +00:00
unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.panic-unwind.diff Always propagate into operands. 2023-07-20 21:30:51 +00:00
unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.panic-abort.mir Always propagate into operands. 2023-07-20 21:30:51 +00:00
unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.panic-unwind.mir Always propagate into operands. 2023-07-20 21:30:51 +00:00
unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-abort.diff Promote unchecked_add/sub/mul/shl/shr to mir::BinOp 2023-06-19 01:47:03 -07:00
unchecked_shifts.unchecked_shr_signed_bigger.Inline.panic-unwind.diff Bless tests 2023-06-23 18:36:25 +01:00
unchecked_shifts.unchecked_shr_signed_bigger.PreCodegen.after.panic-abort.mir Promote unchecked_add/sub/mul/shl/shr to mir::BinOp 2023-06-19 01:47:03 -07:00
unchecked_shifts.unchecked_shr_signed_bigger.PreCodegen.after.panic-unwind.mir Promote unchecked_add/sub/mul/shl/shr to mir::BinOp 2023-06-19 01:47:03 -07:00
unchecked_shifts.unchecked_shr_signed_smaller.Inline.panic-abort.diff Always propagate into operands. 2023-07-20 21:30:51 +00:00
unchecked_shifts.unchecked_shr_signed_smaller.Inline.panic-unwind.diff Always propagate into operands. 2023-07-20 21:30:51 +00:00
unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.panic-abort.mir Always propagate into operands. 2023-07-20 21:30:51 +00:00
unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.panic-unwind.mir Always propagate into operands. 2023-07-20 21:30:51 +00:00
unit_test.rs Only check in a single place if a pass is enabled. 2023-10-18 16:59:23 +00:00
unsized_argument.caller.Inline.diff Do not create move paths that do not need dropping. 2023-10-21 10:32:59 +00:00
unsized_argument.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
unwrap_unchecked.rs Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff Only emit != assumptions if the otherwise target is reachable. 2023-10-31 11:44:23 +00:00
unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff Only emit != assumptions if the otherwise target is reachable. 2023-10-31 11:44:23 +00:00
unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-abort.mir Only emit != assumptions if the otherwise target is reachable. 2023-10-31 11:44:23 +00:00
unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-unwind.mir Only emit != assumptions if the otherwise target is reachable. 2023-10-31 11:44:23 +00:00