Skip to content

Commit 7386288

Browse files
committed
change error URLs to footnote style
1 parent 9c0fa15 commit 7386288

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/librustc_typeck/diagnostics.rs

+12-9
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/types.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/expressions.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
@@ -3485,10 +3486,10 @@ struct Foo<'a, T: 'a> {
34853486
}
34863487
```
34873488
3488-
PhantomData can also be used to express information about unused type
3489-
parameters. You can read more about it in the API documentation:
3489+
[PhantomData] can also be used to express information about unused type
3490+
parameters.
34903491
3491-
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
3492+
[PhantomData]: https://doc.rust-lang.org/std/marker/struct.PhantomData.html
34923493
"##,
34933494

34943495
E0393: r##"
@@ -4360,7 +4361,9 @@ let variable = Foo { x: 0, y: -12 };
43604361
println!("x: {}, y: {}", variable.x, variable.y);
43614362
```
43624363
4363-
For more information see The Rust Book: https://doc.rust-lang.org/book/
4364+
For more information about primitives and structs, take a look at The Book:
4365+
https://doc.rust-lang.org/book/first-edition/primitive-types.html
4366+
https://doc.rust-lang.org/book/first-edition/structs.html
43644367
"##,
43654368

43664369
E0611: r##"

0 commit comments

Comments
 (0)