Skip to content

Commit 99a069e

Browse files
committed
Fix broken Markdown and bad links in the error index
This makes sure RFC links point to the RFC text not the pull request.
1 parent ccce2c6 commit 99a069e

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

src/librustc/diagnostics.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ trait SecondTrait : FirstTrait {
13361336

13371337
E0398: r##"
13381338
In Rust 1.3, the default object lifetime bounds are expected to change, as
1339-
described in RFC #1156 [1]. You are getting a warning because the compiler
1339+
described in [RFC 1156]. You are getting a warning because the compiler
13401340
thinks it is possible that this change will cause a compilation error in your
13411341
code. It is possible, though unlikely, that this is a false alarm.
13421342
@@ -1365,7 +1365,7 @@ fn foo<'a>(arg: &Box<SomeTrait+'a>) { ... }
13651365
This explicitly states that you expect the trait object `SomeTrait` to contain
13661366
references (with a maximum lifetime of `'a`).
13671367
1368-
[1]: https://github.com/rust-lang/rfcs/pull/1156
1368+
[RFC 1156]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md
13691369
"##,
13701370

13711371
E0452: r##"
@@ -1771,6 +1771,7 @@ This pattern is incorrect because, because the type of `foo` is a function
17711771
**item** (`typeof(foo)`), which is zero-sized, and the target type (`fn()`)
17721772
is a function pointer, which is not zero-sized.
17731773
This pattern should be rewritten. There are a few possible ways to do this:
1774+
17741775
- change the original fn declaration to match the expected signature,
17751776
and do the cast in the fn body (the prefered option)
17761777
- cast the fn item fo a fn pointer before calling transmute, as shown here:

src/librustc_resolve/diagnostics.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -890,19 +890,23 @@ match (A, B, C) {
890890
E0422: r##"
891891
You are trying to use an identifier that is either undefined or not a struct.
892892
Erroneous code example:
893-
``` compile_fail,E0422
893+
894+
```compile_fail,E0422
894895
fn main () {
895896
let x = Foo { x: 1, y: 2 };
896897
}
897898
```
899+
898900
In this case, `Foo` is undefined, so it inherently isn't anything, and
899901
definitely not a struct.
902+
900903
```compile_fail
901904
fn main () {
902905
let foo = 1;
903906
let x = foo { x: 1, y: 2 };
904907
}
905908
```
909+
906910
In this case, `foo` is defined, but is not a struct, so Rust can't use it as
907911
one.
908912
"##,

src/librustc_typeck/diagnostics.rs

+19-15
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ Furthermore, the syntax is changing to use `in` instead of `box`. See [RFC 470]
790790
and [RFC 809] for more details.
791791
792792
[RFC 470]: https://github.com/rust-lang/rfcs/pull/470
793-
[RFC 809]: https://github.com/rust-lang/rfcs/pull/809
793+
[RFC 809]: https://github.com/rust-lang/rfcs/blob/master/text/0809-box-and-in-for-stdlib.md
794794
"##,
795795

796796
E0067: r##"
@@ -1428,7 +1428,7 @@ type X = u32; // this compiles
14281428
```
14291429
14301430
Note that type parameters for enum-variant constructors go after the variant,
1431-
not after the enum (Option::None::<u32>, not Option::<u32>::None).
1431+
not after the enum (`Option::None::<u32>`, not `Option::<u32>::None`).
14321432
"##,
14331433

14341434
E0110: r##"
@@ -1521,7 +1521,7 @@ impl Bar for u32 {
15211521
15221522
For information on the design of the orphan rules, see [RFC 1023].
15231523
1524-
[RFC 1023]: https://github.com/rust-lang/rfcs/pull/1023
1524+
[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
15251525
"##,
15261526

15271527
E0118: r##"
@@ -1911,8 +1911,9 @@ type Foo = Trait<Bar=i32>; // ok!
19111911

19121912
E0192: r##"
19131913
Negative impls are only allowed for traits with default impls. For more
1914-
information see the [opt-in builtin traits RFC](https://github.com/rust-lang/
1915-
rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
1914+
information see the [opt-in builtin traits RFC][RFC 19].
1915+
1916+
[RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
19161917
"##,
19171918

19181919
E0193: r##"
@@ -2147,7 +2148,7 @@ E0202: r##"
21472148
Inherent associated types were part of [RFC 195] but are not yet implemented.
21482149
See [the tracking issue][iss8995] for the status of this implementation.
21492150
2150-
[RFC 195]: https://github.com/rust-lang/rfcs/pull/195
2151+
[RFC 195]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
21512152
[iss8995]: https://github.com/rust-lang/rust/issues/8995
21522153
"##,
21532154

@@ -2424,7 +2425,7 @@ such that `Ti` is a local type. Then no type parameter can appear in any of the
24242425
24252426
For information on the design of the orphan rules, see [RFC 1023].
24262427
2427-
[RFC 1023]: https://github.com/rust-lang/rfcs/pull/1023
2428+
[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
24282429
"##,
24292430

24302431
/*
@@ -2799,8 +2800,9 @@ verify this assertion; therefore we must tag this `impl` as unsafe.
27992800

28002801
E0318: r##"
28012802
Default impls for a trait must be located in the same crate where the trait was
2802-
defined. For more information see the [opt-in builtin traits RFC](https://github
2803-
.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
2803+
defined. For more information see the [opt-in builtin traits RFC][RFC 19].
2804+
2805+
[RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
28042806
"##,
28052807

28062808
E0321: r##"
@@ -3018,10 +3020,8 @@ impl<T> Unsize<T> for MyType {}
30183020
```
30193021
30203022
If you are defining your own smart pointer type and would like to enable
3021-
conversion from a sized to an unsized type with the [DST coercion system]
3022-
(https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md), use
3023-
[`CoerceUnsized`](https://doc.rust-lang.org/std/ops/trait.CoerceUnsized.html)
3024-
instead.
3023+
conversion from a sized to an unsized type with the
3024+
[DST coercion system][RFC 982], use [`CoerceUnsized`] instead.
30253025
30263026
```
30273027
#![feature(coerce_unsized)]
@@ -3035,6 +3035,9 @@ pub struct MyType<T: ?Sized> {
30353035
impl<T, U> CoerceUnsized<MyType<U>> for MyType<T>
30363036
where T: CoerceUnsized<U> {}
30373037
```
3038+
3039+
[RFC 982]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
3040+
[`CoerceUnsized`]: https://doc.rust-lang.org/std/ops/trait.CoerceUnsized.html
30383041
"##,
30393042

30403043
E0329: r##"
@@ -3438,8 +3441,9 @@ struct.
34383441

34393442
E0380: r##"
34403443
Default impls are only allowed for traits with no methods or associated items.
3441-
For more information see the [opt-in builtin traits RFC](https://github.com/rust
3442-
-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
3444+
For more information see the [opt-in builtin traits RFC][RFC 19].
3445+
3446+
[RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
34433447
"##,
34443448

34453449
E0390: r##"

0 commit comments

Comments
 (0)