Skip to content

Commit 3310446

Browse files
authored
Rollup merge of #69372 - yawpitch:master, r=varkor
Updates links in various Compiler Error Index entries Currently many of the links in the online https://doc.rust-lang.org/error-index.html are not clickable, and many of them don't resolve correctly as they point to older versions of rustbyexample and the reference.
2 parents 79cd224 + c103a16 commit 3310446

29 files changed

+113
-71
lines changed

src/librustc_error_codes/error_codes/E0080.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ constant expression that had to be evaluated. Attempting to divide by 0
1414
or causing an integer overflow are two ways to induce this error.
1515

1616
Ensure that the expressions given can be evaluated as the desired integer type.
17-
See the FFI section of the Reference for more information about using a custom
18-
integer type:
1917

20-
https://doc.rust-lang.org/reference.html#ffi-attributes
18+
See the [Custom Discriminants][custom-discriminants] section of the Reference
19+
for more information about setting custom integer types on fieldless enums
20+
using the [`repr` attribute][repr-attribute].
21+
22+
[custom-discriminants]: https://doc.rust-lang.org/reference/items/enumerations.html#custom-discriminant-values-for-field-less-enumerations
23+
[repr-attribute]: https://doc.rust-lang.org/reference/type-layout.html#reprc-enums

src/librustc_error_codes/error_codes/E0133.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ fn main() {
2828
}
2929
```
3030

31-
See also https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html
31+
See the [unsafe section][unsafe-section] of the Book for more details.
32+
33+
[unsafe-section]: https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html

src/librustc_error_codes/error_codes/E0154.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ fn f() {
2727
}
2828
```
2929

30-
See the Declaration Statements section of the reference for more information
31-
about what constitutes an Item declaration and what does not:
30+
See the [Declaration Statements][declaration-statements] section of the
31+
reference for more information about what constitutes an item declaration
32+
and what does not.
3233

33-
https://doc.rust-lang.org/reference.html#statements
34+
[declaration-statements]: https://doc.rust-lang.org/reference/statements.html#declaration-statements

src/librustc_error_codes/error_codes/E0260.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ extern crate core as xyz;
2828
struct abc;
2929
```
3030

31-
See the Declaration Statements section of the reference for more information
32-
about what constitutes an Item declaration and what does not:
31+
See the [Declaration Statements][declaration-statements] section of the
32+
reference for more information about what constitutes an item declaration
33+
and what does not.
3334

34-
https://doc.rust-lang.org/reference.html#statements
35+
[declaration-statements]: https://doc.rust-lang.org/reference/statements.html#declaration-statements

src/librustc_error_codes/error_codes/E0303.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ match Some("hi".to_string()) {
3333

3434
The `op_string_ref` binding has type `&Option<&String>` in both cases.
3535

36-
See also https://github.com/rust-lang/rust/issues/14587
36+
See also [Issue 14587][issue-14587].
37+
38+
[issue-14587]: https://github.com/rust-lang/rust/issues/14587

src/librustc_error_codes/error_codes/E0364.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub use foo::X;
2626
fn main() {}
2727
```
2828

29-
See the 'Use Declarations' section of the reference for more information on
30-
this topic:
29+
See the [Use Declarations][use-declarations] section of the reference for
30+
more information on this topic.
3131

32-
https://doc.rust-lang.org/reference.html#use-declarations
32+
[use-declarations]: https://doc.rust-lang.org/reference/items/use-declarations.html

src/librustc_error_codes/error_codes/E0365.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub use foo as foo2;
2626
fn main() {}
2727
```
2828

29-
See the 'Use Declarations' section of the reference for more information
30-
on this topic:
29+
See the [Use Declarations][use-declarations] section of the reference for
30+
more information on this topic.
3131

32-
https://doc.rust-lang.org/reference.html#use-declarations
32+
[use-declarations]: https://doc.rust-lang.org/reference/items/use-declarations.html

src/librustc_error_codes/error_codes/E0382.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ With this approach, x and y share ownership of the data via the `Rc` (reference
104104
count type). `RefCell` essentially performs runtime borrow checking: ensuring
105105
that at most one writer or multiple readers can access the data at any one time.
106106

107-
If you wish to learn more about ownership in Rust, start with the chapter in the
108-
Book:
107+
If you wish to learn more about ownership in Rust, start with the
108+
[Understanding Ownership][understanding-ownership] chapter in the Book.
109109

110-
https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html
110+
[understanding-ownership]: https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html

src/librustc_error_codes/error_codes/E0387.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ fn mutable() {
5252
}
5353
```
5454

55-
You can read more about cell types in the API documentation:
55+
You can read more in the API documentation for [Cell][std-cell].
5656

57-
https://doc.rust-lang.org/std/cell/
57+
[std-cell]: https://doc.rust-lang.org/std/cell/

src/librustc_error_codes/error_codes/E0455.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ To solve this error you can use conditional compilation:
1515
extern {}
1616
```
1717

18-
See more:
19-
https://doc.rust-lang.org/reference/attributes.html#conditional-compilation
18+
Learn more in the [Conditional Compilation][conditional-compilation] section
19+
of the Reference.
20+
21+
[conditional-compilation]: https://doc.rust-lang.org/reference/attributes.html#conditional-compilation

0 commit comments

Comments
 (0)