File tree 4 files changed +6
-8
lines changed
4 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -67,4 +67,4 @@ Rust attributes are used for a number of different things. There is a full list
67
67
of attributes [ in the reference] [ reference ] . Currently, you are not allowed to
68
68
create your own attributes, the Rust compiler defines them.
69
69
70
- [ reference ] : reference.html#attributes
70
+ [ reference ] : ../ reference.html#attributes
Original file line number Diff line number Diff line change @@ -19,18 +19,16 @@ this reason.
19
19
# ` static `
20
20
21
21
Rust provides a ‘global variable’ sort of facility in static items. They’re
22
- similar to [ constants] [ const ] , but static items aren’t inlined upon use. This
23
- means that there is only one instance for each value, and it’s at a fixed
24
- location in memory.
22
+ similar to constants, but static items aren’t inlined upon use. This means that
23
+ there is only one instance for each value, and it’s at a fixed location in
24
+ memory.
25
25
26
26
Here’s an example:
27
27
28
28
``` rust
29
29
static N : i32 = 5 ;
30
30
```
31
31
32
- [ const ] : const.html
33
-
34
32
Unlike [ ` let ` ] [ let ] bindings, you must annotate the type of a ` static ` .
35
33
36
34
[ let ] : variable-bindings.html
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ Raw pointers are useful for FFI: Rust’s `*const T` and `*mut T` are similar to
80
80
C’s ` const T* ` and ` T* ` , respectfully. For more about this use, consult the
81
81
[ FFI chapter] [ ffi ] .
82
82
83
- [ ffi ] : ffi.md
83
+ [ ffi ] : ffi.html
84
84
85
85
# References and raw pointers
86
86
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ Rust has a feature called ‘`static mut`’ which allows for mutable global sta
101
101
Doing so can cause a data race, and as such is inherently not safe. For more
102
102
details, see the [ static] [ static ] section of the book.
103
103
104
- [ static ] : static.html
104
+ [ static ] : const-and- static.html#static
105
105
106
106
## Dereference a raw pointer
107
107
You can’t perform that action at this time.
0 commit comments