Fix broken Markdown and bad links in the error index
This makes sure RFC links point to the RFC text not the pull request.
This commit is contained in:
parent
ccce2c6eb9
commit
99a069eec9
@ -1336,7 +1336,7 @@ trait SecondTrait : FirstTrait {
|
||||
|
||||
E0398: r##"
|
||||
In Rust 1.3, the default object lifetime bounds are expected to change, as
|
||||
described in RFC #1156 [1]. You are getting a warning because the compiler
|
||||
described in [RFC 1156]. You are getting a warning because the compiler
|
||||
thinks it is possible that this change will cause a compilation error in your
|
||||
code. It is possible, though unlikely, that this is a false alarm.
|
||||
|
||||
@ -1365,7 +1365,7 @@ fn foo<'a>(arg: &Box<SomeTrait+'a>) { ... }
|
||||
This explicitly states that you expect the trait object `SomeTrait` to contain
|
||||
references (with a maximum lifetime of `'a`).
|
||||
|
||||
[1]: https://github.com/rust-lang/rfcs/pull/1156
|
||||
[RFC 1156]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md
|
||||
"##,
|
||||
|
||||
E0452: r##"
|
||||
@ -1771,6 +1771,7 @@ This pattern is incorrect because, because the type of `foo` is a function
|
||||
**item** (`typeof(foo)`), which is zero-sized, and the target type (`fn()`)
|
||||
is a function pointer, which is not zero-sized.
|
||||
This pattern should be rewritten. There are a few possible ways to do this:
|
||||
|
||||
- change the original fn declaration to match the expected signature,
|
||||
and do the cast in the fn body (the prefered option)
|
||||
- cast the fn item fo a fn pointer before calling transmute, as shown here:
|
||||
|
@ -890,19 +890,23 @@ match (A, B, C) {
|
||||
E0422: r##"
|
||||
You are trying to use an identifier that is either undefined or not a struct.
|
||||
Erroneous code example:
|
||||
``` compile_fail,E0422
|
||||
|
||||
```compile_fail,E0422
|
||||
fn main () {
|
||||
let x = Foo { x: 1, y: 2 };
|
||||
}
|
||||
```
|
||||
|
||||
In this case, `Foo` is undefined, so it inherently isn't anything, and
|
||||
definitely not a struct.
|
||||
|
||||
```compile_fail
|
||||
fn main () {
|
||||
let foo = 1;
|
||||
let x = foo { x: 1, y: 2 };
|
||||
}
|
||||
```
|
||||
|
||||
In this case, `foo` is defined, but is not a struct, so Rust can't use it as
|
||||
one.
|
||||
"##,
|
||||
|
@ -790,7 +790,7 @@ Furthermore, the syntax is changing to use `in` instead of `box`. See [RFC 470]
|
||||
and [RFC 809] for more details.
|
||||
|
||||
[RFC 470]: https://github.com/rust-lang/rfcs/pull/470
|
||||
[RFC 809]: https://github.com/rust-lang/rfcs/pull/809
|
||||
[RFC 809]: https://github.com/rust-lang/rfcs/blob/master/text/0809-box-and-in-for-stdlib.md
|
||||
"##,
|
||||
|
||||
E0067: r##"
|
||||
@ -1428,7 +1428,7 @@ type X = u32; // this compiles
|
||||
```
|
||||
|
||||
Note that type parameters for enum-variant constructors go after the variant,
|
||||
not after the enum (Option::None::<u32>, not Option::<u32>::None).
|
||||
not after the enum (`Option::None::<u32>`, not `Option::<u32>::None`).
|
||||
"##,
|
||||
|
||||
E0110: r##"
|
||||
@ -1521,7 +1521,7 @@ impl Bar for u32 {
|
||||
|
||||
For information on the design of the orphan rules, see [RFC 1023].
|
||||
|
||||
[RFC 1023]: https://github.com/rust-lang/rfcs/pull/1023
|
||||
[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
|
||||
"##,
|
||||
|
||||
E0118: r##"
|
||||
@ -1911,8 +1911,9 @@ type Foo = Trait<Bar=i32>; // ok!
|
||||
|
||||
E0192: r##"
|
||||
Negative impls are only allowed for traits with default impls. For more
|
||||
information see the [opt-in builtin traits RFC](https://github.com/rust-lang/
|
||||
rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
|
||||
information see the [opt-in builtin traits RFC][RFC 19].
|
||||
|
||||
[RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
|
||||
"##,
|
||||
|
||||
E0193: r##"
|
||||
@ -2147,7 +2148,7 @@ E0202: r##"
|
||||
Inherent associated types were part of [RFC 195] but are not yet implemented.
|
||||
See [the tracking issue][iss8995] for the status of this implementation.
|
||||
|
||||
[RFC 195]: https://github.com/rust-lang/rfcs/pull/195
|
||||
[RFC 195]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
|
||||
[iss8995]: https://github.com/rust-lang/rust/issues/8995
|
||||
"##,
|
||||
|
||||
@ -2424,7 +2425,7 @@ such that `Ti` is a local type. Then no type parameter can appear in any of the
|
||||
|
||||
For information on the design of the orphan rules, see [RFC 1023].
|
||||
|
||||
[RFC 1023]: https://github.com/rust-lang/rfcs/pull/1023
|
||||
[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
|
||||
"##,
|
||||
|
||||
/*
|
||||
@ -2799,8 +2800,9 @@ verify this assertion; therefore we must tag this `impl` as unsafe.
|
||||
|
||||
E0318: r##"
|
||||
Default impls for a trait must be located in the same crate where the trait was
|
||||
defined. For more information see the [opt-in builtin traits RFC](https://github
|
||||
.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
|
||||
defined. For more information see the [opt-in builtin traits RFC][RFC 19].
|
||||
|
||||
[RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
|
||||
"##,
|
||||
|
||||
E0321: r##"
|
||||
@ -3018,10 +3020,8 @@ impl<T> Unsize<T> for MyType {}
|
||||
```
|
||||
|
||||
If you are defining your own smart pointer type and would like to enable
|
||||
conversion from a sized to an unsized type with the [DST coercion system]
|
||||
(https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md), use
|
||||
[`CoerceUnsized`](https://doc.rust-lang.org/std/ops/trait.CoerceUnsized.html)
|
||||
instead.
|
||||
conversion from a sized to an unsized type with the
|
||||
[DST coercion system][RFC 982], use [`CoerceUnsized`] instead.
|
||||
|
||||
```
|
||||
#![feature(coerce_unsized)]
|
||||
@ -3035,6 +3035,9 @@ pub struct MyType<T: ?Sized> {
|
||||
impl<T, U> CoerceUnsized<MyType<U>> for MyType<T>
|
||||
where T: CoerceUnsized<U> {}
|
||||
```
|
||||
|
||||
[RFC 982]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
|
||||
[`CoerceUnsized`]: https://doc.rust-lang.org/std/ops/trait.CoerceUnsized.html
|
||||
"##,
|
||||
|
||||
E0329: r##"
|
||||
@ -3438,8 +3441,9 @@ struct.
|
||||
|
||||
E0380: r##"
|
||||
Default impls are only allowed for traits with no methods or associated items.
|
||||
For more information see the [opt-in builtin traits RFC](https://github.com/rust
|
||||
-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
|
||||
For more information see the [opt-in builtin traits RFC][RFC 19].
|
||||
|
||||
[RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
|
||||
"##,
|
||||
|
||||
E0390: r##"
|
||||
|
Loading…
Reference in New Issue
Block a user