about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2021-01-31 16:36:54 +0100
committerGitHub <noreply@github.com>2021-01-31 16:36:54 +0100
commit36af32a74068895575b84d9ded975ce9cd81bc87 (patch)
tree19a8fa8ed562c4f3537712589efc82f3b0fb6b88
parent86c01ddc22287e32dcd2bde522af0de97e65434a (diff)
parentfabb332c1a6ad11fa6c7f18810915e809011199e (diff)
downloadrust-36af32a74068895575b84d9ded975ce9cd81bc87.tar.gz
rust-36af32a74068895575b84d9ded975ce9cd81bc87.zip
Rollup merge of #81572 - pierwill:edit-error-codes-1, r=jonas-schievink
Edit multiple error code Markdown files

Makes small edits to several error code files. Fixes some missing punctuation. Changes some wording, grammar, and formatting for clarity and readability.

Adds a link to the rustup book in E0658.
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0013.md2
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0038.md2
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0107.md2
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0116.md2
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0277.md4
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0309.md2
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0597.md4
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0658.md4
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0754.md4
9 files changed, 14 insertions, 12 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0013.md b/compiler/rustc_error_codes/src/error_codes/E0013.md
index 8de177590ec..5605302772f 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0013.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0013.md
@@ -8,7 +8,7 @@ static X: i32 = 42;
 const Y: i32 = X;
 ```
 
-In this example, `Y` cannot refer to `X` here. To fix this, the value can be
+In this example, `Y` cannot refer to `X`. To fix this, the value can be
 extracted as a const and then used:
 
 ```
diff --git a/compiler/rustc_error_codes/src/error_codes/E0038.md b/compiler/rustc_error_codes/src/error_codes/E0038.md
index b2cc2a2273a..019d54b6202 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0038.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0038.md
@@ -287,5 +287,5 @@ the method `get_a()` would return an object of unknown type when called on the
 function. `Self` type parameters let us make object safe traits no longer safe,
 so they are forbidden when specifying supertraits.
 
-There's no easy fix for this, generally code will need to be refactored so that
+There's no easy fix for this. Generally, code will need to be refactored so that
 you no longer need to derive from `Super<Self>`.
diff --git a/compiler/rustc_error_codes/src/error_codes/E0107.md b/compiler/rustc_error_codes/src/error_codes/E0107.md
index 4d22b17fe10..4e37695a529 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0107.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0107.md
@@ -1,4 +1,4 @@
-An incorrect number of generic arguments were provided.
+An incorrect number of generic arguments was provided.
 
 Erroneous code example:
 
diff --git a/compiler/rustc_error_codes/src/error_codes/E0116.md b/compiler/rustc_error_codes/src/error_codes/E0116.md
index ca849c2a128..653be602989 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0116.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0116.md
@@ -10,7 +10,7 @@ You can only define an inherent implementation for a type in the same crate
 where the type was defined. For example, an `impl` block as above is not allowed
 since `Vec` is defined in the standard library.
 
-To fix this problem, you can do either of these things:
+To fix this problem, you can either:
 
  - define a trait that has the desired associated functions/types/constants and
    implement the trait for the type in question
diff --git a/compiler/rustc_error_codes/src/error_codes/E0277.md b/compiler/rustc_error_codes/src/error_codes/E0277.md
index 2e2cd5e01fb..9f6db6ed7a2 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0277.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0277.md
@@ -59,9 +59,9 @@ fn main() {
 }
 ```
 
-Note that the error here is in the definition of the generic function: Although
+Note that the error here is in the definition of the generic function. Although
 we only call it with a parameter that does implement `Debug`, the compiler
-still rejects the function: It must work with all possible input types. In
+still rejects the function. It must work with all possible input types. In
 order to make this example compile, we need to restrict the generic type we're
 accepting:
 
diff --git a/compiler/rustc_error_codes/src/error_codes/E0309.md b/compiler/rustc_error_codes/src/error_codes/E0309.md
index e719ee590ab..c36a56b00ce 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0309.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0309.md
@@ -25,7 +25,7 @@ where
 
 The type definition contains some field whose type requires an outlives
 annotation. Outlives annotations (e.g., `T: 'a`) are used to guarantee that all
-the data in T is valid for at least the lifetime `'a`. This scenario most
+the data in `T` is valid for at least the lifetime `'a`. This scenario most
 commonly arises when the type contains an associated type reference like
 `<T as SomeTrait<'a>>::Output`, as shown in the previous code.
 
diff --git a/compiler/rustc_error_codes/src/error_codes/E0597.md b/compiler/rustc_error_codes/src/error_codes/E0597.md
index 3340768fa82..f6e0b62e1b6 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0597.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0597.md
@@ -1,4 +1,4 @@
-This error occurs because a value was dropped while it was still borrowed
+This error occurs because a value was dropped while it was still borrowed.
 
 Erroneous code example:
 
@@ -15,7 +15,7 @@ let mut x = Foo { x: None };
 println!("{:?}", x.x);
 ```
 
-In here, `y` is dropped at the end of the inner scope, but it is borrowed by
+Here, `y` is dropped at the end of the inner scope, but it is borrowed by
 `x` until the `println`. To fix the previous example, just remove the scope
 so that `y` isn't dropped until after the println
 
diff --git a/compiler/rustc_error_codes/src/error_codes/E0658.md b/compiler/rustc_error_codes/src/error_codes/E0658.md
index d821b9027f1..24245a38ae0 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0658.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0658.md
@@ -11,7 +11,7 @@ enum Foo {
 
 If you're using a stable or a beta version of rustc, you won't be able to use
 any unstable features. In order to do so, please switch to a nightly version of
-rustc (by using rustup).
+rustc (by using [rustup]).
 
 If you're using a nightly version of rustc, just add the corresponding feature
 to be able to use it:
@@ -24,3 +24,5 @@ enum Foo {
     Bar(u64),
 }
 ```
+
+[rustup]: https://rust-lang.github.io/rustup/concepts/channels.html
diff --git a/compiler/rustc_error_codes/src/error_codes/E0754.md b/compiler/rustc_error_codes/src/error_codes/E0754.md
index 57620bcd65c..9f4b19cfda6 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0754.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0754.md
@@ -1,4 +1,4 @@
-An non-ascii identifier was used in an invalid context.
+A non-ASCII identifier was used in an invalid context.
 
 Erroneous code examples:
 
@@ -13,7 +13,7 @@ fn řųśť() {} // error!
 fn main() {}
 ```
 
-Non-ascii can be used as module names if it is inlined or if a `#[path]`
+Non-ASCII can be used as module names if it is inlined or if a `#[path]`
 attribute is specified. For example:
 
 ```