@@ -246,16 +246,16 @@ end) : EXPR = struct
246
246
(typ : ty ) =
247
247
let overloaded_names_of_binop : Thir.bin_op -> Concrete_ident.name =
248
248
function
249
- | Add -> Core__ops__arith__Add__add
250
- | Sub -> Core__ops__arith__Sub__sub
251
- | Mul -> Core__ops__arith__Mul__mul
249
+ | Add | AddUnchecked -> Core__ops__arith__Add__add
250
+ | Sub | SubUnchecked -> Core__ops__arith__Sub__sub
251
+ | Mul | MulUnchecked -> Core__ops__arith__Mul__mul
252
252
| Div -> Core__ops__arith__Div__div
253
253
| Rem -> Core__ops__arith__Rem__rem
254
254
| BitXor -> Core__ops__bit__BitXor__bitxor
255
255
| BitAnd -> Core__ops__bit__BitAnd__bitand
256
256
| BitOr -> Core__ops__bit__BitOr__bitor
257
- | Shl -> Core__ops__bit__Shl__shl
258
- | Shr -> Core__ops__bit__Shr__shr
257
+ | Shl | ShlUnchecked -> Core__ops__bit__Shl__shl
258
+ | Shr | ShrUnchecked -> Core__ops__bit__Shr__shr
259
259
| Lt -> Core__cmp__PartialOrd__lt
260
260
| Le -> Core__cmp__PartialOrd__le
261
261
| Ne -> Core__cmp__PartialEq__ne
@@ -271,16 +271,16 @@ end) : EXPR = struct
271
271
| Offset -> Core__ptr__const_ptr__Impl__offset
272
272
in
273
273
let primitive_names_of_binop : Thir.bin_op -> Concrete_ident.name = function
274
- | Add -> Rust_primitives__u128__add
275
- | Sub -> Rust_primitives__u128__sub
276
- | Mul -> Rust_primitives__u128__mul
274
+ | Add | AddUnchecked -> Rust_primitives__u128__add
275
+ | Sub | SubUnchecked -> Rust_primitives__u128__sub
276
+ | Mul | MulUnchecked -> Rust_primitives__u128__mul
277
277
| Div -> Rust_primitives__u128__div
278
278
| Rem -> Rust_primitives__u128__rem
279
279
| BitXor -> Rust_primitives__u128__bit_xor
280
280
| BitAnd -> Rust_primitives__u128__bit_and
281
281
| BitOr -> Rust_primitives__u128__bit_or
282
- | Shl -> Rust_primitives__u128__shl
283
- | Shr -> Rust_primitives__u128__shr
282
+ | Shl | ShlUnchecked -> Rust_primitives__u128__shl
283
+ | Shr | ShrUnchecked -> Rust_primitives__u128__shr
284
284
| Lt -> Rust_primitives__u128__lt
285
285
| Le -> Rust_primitives__u128__le
286
286
| Ne -> Rust_primitives__u128__ne
@@ -332,11 +332,12 @@ end) : EXPR = struct
332
332
let expected, f =
333
333
match op with
334
334
| Add | Sub | Mul | AddWithOverflow | SubWithOverflow
335
- | MulWithOverflow | Div ->
335
+ | MulWithOverflow | AddUnchecked | SubUnchecked | MulUnchecked | Div
336
+ ->
336
337
both int < |> both float
337
338
| Rem | Cmp -> both int
338
339
| BitXor | BitAnd | BitOr -> both int < |> both bool
339
- | Shl | Shr -> int < *> int
340
+ | Shl | Shr | ShlUnchecked | ShrUnchecked -> int < *> int
340
341
| Lt | Le | Ne | Ge | Gt -> both int < |> both float
341
342
| Eq -> both int < |> both float < |> both bool
342
343
| Offset -> (" " , fun _ -> Some " " )
0 commit comments