Skip to content

Commit c192af3

Browse files
committed
Fix wording on the aliasing section
It should've said "the value of a local variable cannot alias things...".
1 parent 0904427 commit c192af3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/aliasing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ fn compute(input: &u32, output: &mut u32) {
118118
}
119119
```
120120

121-
We're still relying on alias analysis to assume that `temp` doesn't alias
122-
`input`, but the proof is much simpler: the value of a local variable can't be
121+
We're still relying on alias analysis to assume that `input` doesn't alias
122+
`temp`, but the proof is much simpler: the value of a local variable can't be
123123
aliased by things that existed before it was declared. This is an assumption
124124
every language freely makes, and so this version of the function could be
125125
optimized the way we want in any language.

0 commit comments

Comments
 (0)