mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 19:44:33 -06:00
fix some links
This commit is contained in:
@@ -67,4 +67,4 @@ Rust attributes are used for a number of different things. There is a full list
|
||||
of attributes [in the reference][reference]. Currently, you are not allowed to
|
||||
create your own attributes, the Rust compiler defines them.
|
||||
|
||||
[reference]: ../reference/attributes.html
|
||||
[reference]: ../../reference/attributes.html
|
||||
|
||||
@@ -24,7 +24,7 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
[deref]: ../std/ops/trait.Deref.html
|
||||
[deref]: ../../std/ops/trait.Deref.html
|
||||
|
||||
This is useful for writing custom pointer types. However, there’s a language
|
||||
feature related to `Deref`: ‘deref coercions’. Here’s the rule: If you have a
|
||||
|
||||
@@ -76,7 +76,7 @@ This [unfortunate error](https://github.com/rust-lang/rust/issues/22547) is
|
||||
correct; documentation comments apply to the thing after them, and there's
|
||||
nothing after that last comment.
|
||||
|
||||
[rc-new]: ../std/rc/struct.Rc.html#method.new
|
||||
[rc-new]: ../../std/rc/struct.Rc.html#method.new
|
||||
|
||||
### Writing documentation comments
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Now that we’ve discussed traits, let’s talk about a particular trait provide
|
||||
by the Rust standard library, [`Drop`][drop]. The `Drop` trait provides a way
|
||||
to run some code when a value goes out of scope. For example:
|
||||
|
||||
[drop]: ../std/ops/trait.Drop.html
|
||||
[drop]: ../../std/ops/trait.Drop.html
|
||||
|
||||
```rust
|
||||
struct HasDrop;
|
||||
@@ -64,4 +64,4 @@ reference-counted type. When `Drop` is called, it will decrement the reference
|
||||
count, and if the total number of references is zero, will clean up the
|
||||
underlying value.
|
||||
|
||||
[arc]: ../std/sync/struct.Arc.html
|
||||
[arc]: ../../std/sync/struct.Arc.html
|
||||
|
||||
Reference in New Issue
Block a user