Skip to content

Commit d8b995a

Browse files
RalfJungSimonSapin
andauthored
fix typo
Co-authored-by: Simon Sapin <[email protected]>
1 parent b5bda55 commit d8b995a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/2582-raw-reference-mir-operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ The lint as described in this RFC would nudge people to instead write
205205

206206
```rust
207207
let x: *mut Struct = NonNull::dangling().as_ptr();
208-
let field: *mut Field = &raw mut (x*).field;
208+
let field: *mut Field = &raw mut (*x).field;
209209
```
210210

211211
which is better, but still UB: we emit a `getelementptr inbounds` for the `.field` offset computation.

0 commit comments

Comments
 (0)