@@ -313,72 +313,72 @@ impl forall [N:! IntLiteral(), T:! ImplicitAs(UInt(N))]
313313
314314impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
315315 UInt (N) as AddAssignWith (U) {
316- fn Op[addr self: Self* ](other: Self) = "int.uadd_assign" ;
316+ fn Op[ref self: Self](other: Self) = "int.uadd_assign" ;
317317}
318318
319319impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
320320 UInt (N) as BitAndAssignWith (U) {
321- fn Op[addr self: Self* ](other: Self) = "int.and_assign" ;
321+ fn Op[ref self: Self](other: Self) = "int.and_assign" ;
322322}
323323
324324impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
325325 UInt (N) as BitOrAssignWith (U) {
326- fn Op[addr self: Self* ](other: Self) = "int.or_assign" ;
326+ fn Op[ref self: Self](other: Self) = "int.or_assign" ;
327327}
328328
329329impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
330330 UInt (N) as BitXorAssignWith (U) {
331- fn Op[addr self: Self* ](other: Self) = "int.xor_assign" ;
331+ fn Op[ref self: Self](other: Self) = "int.xor_assign" ;
332332}
333333
334334impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
335335 UInt (N) as DivAssignWith (U) {
336- fn Op[addr self: Self* ](other: Self) = "int.udiv_assign" ;
336+ fn Op[ref self: Self](other: Self) = "int.udiv_assign" ;
337337}
338338
339339impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
340340 UInt (N) as LeftShiftAssignWith (U) {
341- fn Op[addr self: Self* ](other: Self) = "int.left_shift_assign" ;
341+ fn Op[ref self: Self](other: Self) = "int.left_shift_assign" ;
342342}
343343
344344impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
345345 UInt (N) as ModAssignWith (U) {
346- fn Op[addr self: Self* ](other: Self) = "int.umod_assign" ;
346+ fn Op[ref self: Self](other: Self) = "int.umod_assign" ;
347347}
348348
349349impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
350350 UInt (N) as MulAssignWith (U) {
351- fn Op[addr self: Self* ](other: Self) = "int.umul_assign" ;
351+ fn Op[ref self: Self](other: Self) = "int.umul_assign" ;
352352}
353353
354354impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
355355 UInt (N) as RightShiftAssignWith (U) {
356- fn Op[addr self: Self* ](other: Self) = "int.right_shift_assign" ;
356+ fn Op[ref self: Self](other: Self) = "int.right_shift_assign" ;
357357}
358358
359359impl forall [N:! IntLiteral (), U:! ImplicitAs (UInt (N))]
360360 UInt (N) as SubAssignWith (U) {
361- fn Op[addr self: Self* ](other: Self) = "int.usub_assign" ;
361+ fn Op[ref self: Self](other: Self) = "int.usub_assign" ;
362362}
363363
364364// Increment and decrement.
365365
366366// TODO: Add builtins for these to avoid emitting a call.
367367
368368impl forall [N:! IntLiteral ()] UInt (N) as Dec {
369- fn Op[addr self: Self* ]() {
370- // TODO: `* self -= 1;` should work, but fails because the `impl IntLiteral
369+ fn Op[ref self: Self]() {
370+ // TODO: `self -= 1;` should work, but fails because the `impl IntLiteral
371371 // as ImplicitAs(Int(N))` is not final, which causes us to not attempt the
372372 // conversion from `1` to `Int(N)` until runtime, when we've lost the
373373 // constant value.
374374 fn AsUInt (n: IntLiteral ()) - > UInt (N) = "int.convert_checked" ;
375- * self - = AsUInt (1 );
375+ self - = AsUInt (1 );
376376 }
377377}
378378
379379impl forall [N:! IntLiteral ()] UInt (N) as Inc {
380- fn Op[addr self: Self* ]() {
380+ fn Op[ref self: Self]() {
381381 fn AsUInt (n: IntLiteral ()) - > UInt (N) = "int.convert_checked" ;
382- * self + = AsUInt (1 );
382+ self + = AsUInt (1 );
383383 }
384384}
0 commit comments