1
Fork 0

Revert the rustc_error_codes changes.

This commit is contained in:
Mukund Lakshman 2021-10-06 07:58:41 -04:00
parent 742d8be5e6
commit 1f86a8e2a0
50 changed files with 51 additions and 51 deletions

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error suggests that the expression arm corresponding to the noted pattern
will never be reached as for all possible values of the expression being

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error indicates that an empty match expression is invalid because the type
it is matching on is non-empty (there exist values of this type). In safe code

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error indicates that the bindings in a match arm would require a value to
be moved into more than one location, thus violating unique ownership. Code

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
In a pattern, all values that don't implement the `Copy` trait have to be bound
the same way. The goal here is to avoid binding simultaneously by-move and

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Constants can only be initialized by a constant value or, in a future
version of Rust, a call to a const function. This error indicates the use

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
You cannot define a struct (or enum) `Foo` that requires an instance of `Foo`
in order to make a new `Foo` value. This is because there would be no way a

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
When using the `#[simd]` attribute on a tuple struct, the components of the
tuple struct must all be of a concrete, nongeneric type so the compiler can

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Too many type arguments were supplied for a function. For example:

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
You gave too many lifetime arguments. Erroneous code example:

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Too few type arguments were supplied for a function. For example:

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
You gave too few lifetime arguments. Example:

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
You tried to provide a lifetime to a type which doesn't need it.
See `E0109` for more details.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
More than one `main` function was found.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
More than one function was declared with the `#[main]` attribute.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
There are various restrictions on transmuting between types in Rust; for example
types being transmuted must have the same size. To apply all these restrictions,

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Imports (`use` statements) are not allowed after non-item statements, such as
variable declarations and expression statements.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
An `if let` pattern attempts to match the pattern, and enters the body if the
match was successful. If the match is irrefutable (when it cannot fail to

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
A `while let` pattern attempts to match the pattern, and enters the body if the
match was successful. If the match is irrefutable (when it cannot fail to

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
`where` clauses must use generic type parameters: it does not make sense to use
them otherwise. An example causing this error:

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
An attempt to implement the `Copy` trait for an enum failed because one of the
variants does not implement `Copy`. To fix this, you must implement `Copy` for

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
You used a function or type which doesn't fit the requirements for where it was
used. Erroneous code examples:

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error indicates that not enough type parameters were found in a type or
trait.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error indicates that too many type parameters were found in a type or
trait.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Two items of the same name cannot be imported without rebinding one of the
items under a new local name.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
You can't import a type or module when the name of the item being imported is
the same as another type or submodule defined in the module.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
You tried to supply a type which doesn't implement some trait in a location
which expected that trait. This error typically occurs when working with

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Patterns used to bind names must be irrefutable. That is, they must guarantee
that a name will be extracted in all cases. Instead of pattern matching the

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Mutable borrows are not allowed in pattern guards, because matching cannot have
side effects. Side effects could alter the matched object or the environment

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Assignments are not allowed in pattern guards, because matching cannot have
side effects. Side effects could alter the matched object or the environment

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Sub-bindings, e.g. `ref x @ Some(ref y)` are now allowed under
`#![feature(bindings_after_at)]` and checked to make sure that

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
An attempt was made to access an associated constant through either a generic
type parameter or `Self`. This is not supported yet. An example causing this

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error occurs when an attempt is made to partially reinitialize a
structure that is currently uninitialized.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error occurs when an attempt is made to mutate the target of a mutable
reference stored inside an immutable container.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error occurs when an attempt is made to mutate or mutably reference data
that a closure has captured immutably.

View file

@ -1 +1 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
An attempt was made to mutate data using a non-mutable reference. This
commonly occurs when attempting to assign to a non-mutable reference of a

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
In Rust 1.3, the default object lifetime bounds are expected to change, as
described in [RFC 1156]. You are getting a warning because the compiler

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler
#### Note: this error code is no longer emitted by the compiler
You implemented a trait, overriding one or more of its associated types but did
not reimplement its default methods.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
The length of the platform-intrinsic function `simd_shuffle` wasn't specified.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
The `pub` keyword was used inside a function.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
The `pub` keyword was used inside a public enum.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
A stability attribute was used outside of the standard library.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
This error occurs when an attempt is made to move a borrowed variable into a
closure.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Closures cannot mutate immutable captured variables.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
The type-checker needed to know the type of an expression, but that type had not
yet been inferred.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
The `unwind` attribute was malformed.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
The `Default` trait was derived on an enum.

View file

@ -1,4 +1,4 @@
### Note: this error code is no longer emitted by the compiler.
#### Note: this error code is no longer emitted by the compiler.
Const parameters cannot depend on type parameters.
The following is therefore invalid:

View file

@ -126,7 +126,7 @@ impl Formatter for HTMLFormatter {
error_codes: ErrorCodes::Yes,
edition: DEFAULT_EDITION,
playground: &Some(playground),
heading_offset: HeadingOffset::H2,
heading_offset: HeadingOffset::H1,
}
.into_string()
)?

View file

@ -49,7 +49,7 @@ fn check_error_code_explanation(
} else if s.contains("compile-fail") {
invalid_compile_fail_format = true;
}
} else if s.starts_with("### Note: this error code is no longer emitted by the compiler") {
} else if s.starts_with("#### Note: this error code is no longer emitted by the compiler") {
if !found_error_code {
error_codes.get_mut(&err_code).map(|x| x.has_test = true);
found_error_code = true;
@ -64,7 +64,7 @@ fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &str) -> bool {
for line in f.lines() {
let s = line.trim();
if s.starts_with("### Note: this error code is no longer emitted by the compiler") {
if s.starts_with("#### Note: this error code is no longer emitted by the compiler") {
return true;
}
if s.starts_with("```") {