Skip to content

Commit 720c596

Browse files
committedJul 8, 2017
Auto merge of #43075 - durka:error-long-link, r=nikomatsakis
Fix links for typeck diagnostics without tripping tidy Pick up #42624 to fix #43070 (cc @frewsxcv). I fixed a few other links while I was at it.
2 parents b695889 + 7386288 commit 720c596

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed
 

‎src/librustc_typeck/diagnostics.rs

+16-12
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ trait_obj.method_one();
239239
trait_obj.method_two();
240240
```
241241
242-
You can read more about trait objects in the Trait Object section of the
243-
Reference:
242+
You can read more about trait objects in the [Trait Objects] section of the
243+
Reference.
244244
245-
https://doc.rust-lang.org/reference.html#trait-objects
245+
[Trait Objects]: https://doc.rust-lang.org/reference/types.html#trait-objects
246246
"##,
247247

248248
E0034: r##"
@@ -874,8 +874,9 @@ lvalue expression represents a memory location and can be a variable (with
874874
optional namespacing), a dereference, an indexing expression or a field
875875
reference.
876876
877-
More details can be found here:
878-
https://doc.rust-lang.org/reference.html#lvalues-rvalues-and-temporaries
877+
More details can be found in the [Expressions] section of the Reference.
878+
879+
[Expressions]: https://doc.rust-lang.org/reference/expressions.html#lvalues-rvalues-and-temporaries
879880
880881
Now, we can go further. Here are some erroneous code examples:
881882
@@ -3467,10 +3468,10 @@ struct Foo<'a, T: 'a> {
34673468
}
34683469
```
34693470
3470-
PhantomData can also be used to express information about unused type
3471-
parameters. You can read more about it in the API documentation:
3471+
[PhantomData] can also be used to express information about unused type
3472+
parameters.
34723473
3473-
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
3474+
[PhantomData]: https://doc.rust-lang.org/std/marker/struct.PhantomData.html
34743475
"##,
34753476

34763477
E0393: r##"
@@ -4342,7 +4343,9 @@ let variable = Foo { x: 0, y: -12 };
43424343
println!("x: {}, y: {}", variable.x, variable.y);
43434344
```
43444345
4345-
For more information see The Rust Book: https://doc.rust-lang.org/book/
4346+
For more information about primitives and structs, take a look at The Book:
4347+
https://doc.rust-lang.org/book/first-edition/primitive-types.html
4348+
https://doc.rust-lang.org/book/first-edition/structs.html
43464349
"##,
43474350

43484351
E0611: r##"
@@ -4560,9 +4563,10 @@ unsafe {
45604563
}
45614564
```
45624565
4563-
To fix this error, you need to pass variables corresponding to C types as much
4564-
as possible. For better explanations, see The Rust Book:
4565-
https://doc.rust-lang.org/book/
4566+
Certain Rust types must be cast before passing them to a variadic function,
4567+
because of arcane ABI rules dictated by the C standard. To fix the error,
4568+
cast the value to the type specified by the error message (which you may need
4569+
to import from `std::os::raw`).
45664570
"##,
45674571

45684572
E0618: r##"

0 commit comments

Comments
 (0)
Please sign in to comment.