File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ while a slice is being mutated to grant permission for the slice
559
559
to mutate the collection in-place while sharing ownership. This
560
560
flexibility can be exposed by a pair of accessors that are called
561
561
before and after a mutation. The "get" stage produces both the
562
- value to mutate, and a state value (whose type must be declared) to
562
+ value to mutate and a state value (whose type must be declared) to
563
563
forward to the "set" stage. A pinning accessor can then look something
564
564
like this::
565
565
@@ -585,7 +585,8 @@ like this::
585
585
}
586
586
587
587
``getForMutation `` and ``setForMutation `` must appear as a pair;
588
- neither one is valid on its own.
588
+ neither one is valid on its own. A ``get `` and ``set `` accessor
589
+ should also still be provided for simple read and write operations.
589
590
When the compiler has visibility that storage is implemented in
590
591
terms of ``getForMutation `` and ``setForMutation ``, it lowers a mutable
591
592
projection using those accessors as follows::
You can’t perform that action at this time.
0 commit comments