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