1
Fork 0

fix an error about the static lifetime

The reference should be `x`, not `FOO` itself.
This commit is contained in:
Jay True 2015-01-18 10:58:55 +08:00
parent f4f10dba29
commit 2b6efbf92d

View file

@ -395,7 +395,7 @@ static FOO: i32 = 5;
let x: &'static i32 = &FOO;
```
This adds an `i32` to the data segment of the binary, and `FOO` is a reference
This adds an `i32` to the data segment of the binary, and `x` is a reference
to it.
# Shared Ownership