Skip to content

Commit

Permalink
Update rustc --explain sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 27, 2018
1 parent bedbad6 commit a48094d
Show file tree
Hide file tree
Showing 1,039 changed files with 1,162 additions and 1,164 deletions.
10 changes: 4 additions & 6 deletions src/librustc_errors/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,16 @@ impl Drop for EmitterWriter {
if error_codes.len() > 1 {
let limit = if error_codes.len() > 9 { 9 } else { error_codes.len() };
writeln!(self.dst,
"You've got a few errors: {}{}",
"Some errors occurred: {}{}",
error_codes[..limit].join(", "),
if error_codes.len() > 9 { "..." } else { "" }
if error_codes.len() > 9 { "..." } else { "." }
).expect("failed to give tips...");
writeln!(self.dst,
"If you want more information on an error, try using \
\"rustc --explain {}\"",
"For more information about an error, try `rustc --explain {}`.",
&error_codes[0]).expect("failed to give tips...");
} else {
writeln!(self.dst,
"If you want more information on this error, try using \
\"rustc --explain {}\"",
"For more information about this error, try `rustc --explain {}`.",
&error_codes[0]).expect("failed to give tips...");
}
self.dst.flush().expect("failed to emit errors");
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui-fulldeps/lint-plugin-forbid-attrs.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0453"
For more information about this error, try `rustc --explain E0453`.
2 changes: 1 addition & 1 deletion src/test/ui-fulldeps/proc-macro/signature.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ error[E0308]: mismatched types

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
2 changes: 1 addition & 1 deletion src/test/ui/anonymous-higher-ranked-lifetime.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,4 @@ note: required by `h2`

error: aborting due to 11 previous errors

If you want more information on this error, try using "rustc --explain E0631"
For more information about this error, try `rustc --explain E0631`.
2 changes: 1 addition & 1 deletion src/test/ui/arbitrary-self-types-not-object-safe.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ error[E0038]: the trait `Foo` cannot be made into an object

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0038"
For more information about this error, try `rustc --explain E0038`.
2 changes: 1 addition & 1 deletion src/test/ui/asm-out-assign-imm.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ error[E0384]: cannot assign twice to immutable variable `x`

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0384"
For more information about this error, try `rustc --explain E0384`.
2 changes: 1 addition & 1 deletion src/test/ui/associated-const-impl-wrong-lifetime.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ note: the lifetime 'a as defined on the impl at 17:1...

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
2 changes: 1 addition & 1 deletion src/test/ui/associated-const-impl-wrong-type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ error[E0326]: implemented const `BAR` has an incompatible type for trait

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0326"
For more information about this error, try `rustc --explain E0326`.
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C`

error: aborting due to 4 previous errors

You've got a few errors: E0191, E0221
If you want more information on an error, try using "rustc --explain E0191"
Some errors occurred: E0191, E0221.
For more information about an error, try `rustc --explain E0191`.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ error[E0277]: the trait bound `(): Add<A>` is not satisfied

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0277"
For more information about this error, try `rustc --explain E0277`.
2 changes: 1 addition & 1 deletion src/test/ui/associated-types-in-ambiguous-context.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ error[E0223]: ambiguous associated type

error: aborting due to 3 previous errors

If you want more information on this error, try using "rustc --explain E0223"
For more information about this error, try `rustc --explain E0223`.
2 changes: 1 addition & 1 deletion src/test/ui/attr-usage-repr.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ error[E0517]: attribute should be applied to struct

error: aborting due to 5 previous errors

If you want more information on this error, try using "rustc --explain E0517"
For more information about this error, try `rustc --explain E0517`.
4 changes: 2 additions & 2 deletions src/test/ui/augmented-assignments.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ error[E0382]: use of moved value: `x`

error: aborting due to 2 previous errors

You've got a few errors: E0382, E0596
If you want more information on an error, try using "rustc --explain E0382"
Some errors occurred: E0382, E0596.
For more information about an error, try `rustc --explain E0382`.
2 changes: 1 addition & 1 deletion src/test/ui/binary-op-on-double-ref.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ error[E0369]: binary operation `%` cannot be applied to type `&&{integer}`

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0369"
For more information about this error, try `rustc --explain E0369`.
2 changes: 1 addition & 1 deletion src/test/ui/blind-item-item-shadow.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ help: You can use `as` to change the binding name of the import

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0255"
For more information about this error, try `rustc --explain E0255`.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ error[E0308]: mismatched types

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ error[E0308]: mismatched types

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ error[E0308]: mismatched types

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ error[E0308]: mismatched types

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
2 changes: 1 addition & 1 deletion src/test/ui/block-result/issue-11714.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ error[E0308]: mismatched types

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
2 changes: 1 addition & 1 deletion src/test/ui/block-result/issue-13428.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ error[E0308]: mismatched types

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
2 changes: 1 addition & 1 deletion src/test/ui/block-result/issue-13624.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ error[E0308]: mismatched types

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
4 changes: 2 additions & 2 deletions src/test/ui/block-result/issue-20862.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ error[E0618]: expected function, found `()`

error: aborting due to 2 previous errors

You've got a few errors: E0308, E0618
If you want more information on an error, try using "rustc --explain E0308"
Some errors occurred: E0308, E0618.
For more information about an error, try `rustc --explain E0308`.
4 changes: 2 additions & 2 deletions src/test/ui/block-result/issue-22645.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ error[E0308]: mismatched types

error: aborting due to 2 previous errors

You've got a few errors: E0277, E0308
If you want more information on an error, try using "rustc --explain E0277"
Some errors occurred: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
2 changes: 1 addition & 1 deletion src/test/ui/block-result/issue-3563.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ error[E0599]: no method named `b` found for type `&Self` in the current scope

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0599"
For more information about this error, try `rustc --explain E0599`.
2 changes: 1 addition & 1 deletion src/test/ui/block-result/issue-5500.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ error[E0308]: mismatched types

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
2 changes: 1 addition & 1 deletion src/test/ui/block-result/unexpected-return-on-unit.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ help: try adding a return type

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
2 changes: 1 addition & 1 deletion src/test/ui/bogus-tag.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ error[E0599]: no variant named `hsl` found for type `color` in the current scope

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0599"
For more information about this error, try `rustc --explain E0599`.
4 changes: 2 additions & 2 deletions src/test/ui/borrowck/borrowck-box-insensitivity.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ error[E0502]: cannot borrow `a.y` as mutable because `a.x.x` is also borrowed as

error: aborting due to 16 previous errors

You've got a few errors: E0382, E0502, E0503, E0505
If you want more information on an error, try using "rustc --explain E0382"
Some errors occurred: E0382, E0502, E0503, E0505.
For more information about an error, try `rustc --explain E0382`.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/borrowck-closures-two-mut.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)

error: aborting due to 10 previous errors

If you want more information on this error, try using "rustc --explain E0499"
For more information about this error, try `rustc --explain E0499`.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ help: to force the closure to take ownership of `books` (and any other reference

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0373"
For more information about this error, try `rustc --explain E0373`.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ help: to force the closure to take ownership of `books` (and any other reference

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0373"
For more information about this error, try `rustc --explain E0373`.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/borrowck-in-static.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0507"
For more information about this error, try `rustc --explain E0507`.
4 changes: 2 additions & 2 deletions src/test/ui/borrowck/borrowck-move-error-with-note.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ error[E0507]: cannot move out of borrowed content

error: aborting due to 3 previous errors

You've got a few errors: E0507, E0509
If you want more information on an error, try using "rustc --explain E0507"
Some errors occurred: E0507, E0509.
For more information about an error, try `rustc --explain E0507`.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/borrowck-move-out-of-vec-tail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ error[E0508]: cannot move out of type `[Foo]`, a non-copy slice

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0508"
For more information about this error, try `rustc --explain E0508`.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/borrowck-reinit.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ error[E0382]: use of moved value: `x` (Mir)

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0382"
For more information about this error, try `rustc --explain E0382`.
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time

error: aborting due to 3 previous errors

You've got a few errors: E0499, E0502
If you want more information on an error, try using "rustc --explain E0499"
Some errors occurred: E0499, E0502.
For more information about an error, try `rustc --explain E0499`.
4 changes: 2 additions & 2 deletions src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ error[E0508]: cannot move out of type `[std::boxed::Box<isize>]`, a non-copy sli

error: aborting due to 8 previous errors

You've got a few errors: E0506, E0508
If you want more information on an error, try using "rustc --explain E0506"
Some errors occurred: E0506, E0508.
For more information about an error, try `rustc --explain E0506`.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/immutable-arg.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ error[E0384]: cannot assign to immutable argument `_x` (Mir)

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0384"
For more information about this error, try `rustc --explain E0384`.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/issue-41962.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ error[E0382]: use of moved value: `maybe.0` (Mir)

error: aborting due to 5 previous errors

If you want more information on this error, try using "rustc --explain E0382"
For more information about this error, try `rustc --explain E0382`.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/mut-borrow-in-loop.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ error[E0499]: cannot borrow `*arg` as mutable more than once at a time

error: aborting due to 3 previous errors

If you want more information on this error, try using "rustc --explain E0499"
For more information about this error, try `rustc --explain E0499`.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/mut-borrow-outside-loop.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ error[E0499]: cannot borrow `inner_void` as mutable more than once at a time

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0499"
For more information about this error, try `rustc --explain E0499`.
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ error[E0276]: impl has stricter requirements than trait

error: aborting due to 4 previous errors

You've got a few errors: E0195, E0276, E0308
If you want more information on an error, try using "rustc --explain E0195"
Some errors occurred: E0195, E0276, E0308.
For more information about an error, try `rustc --explain E0195`.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0507"
For more information about this error, try `rustc --explain E0507`.
2 changes: 1 addition & 1 deletion src/test/ui/cast-as-bool.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ error[E0054]: cannot cast as `bool`

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0054"
For more information about this error, try `rustc --explain E0054`.
2 changes: 1 addition & 1 deletion src/test/ui/cast-errors-issue-43825.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ error[E0425]: cannot find value `error` in this scope

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0425"
For more information about this error, try `rustc --explain E0425`.
2 changes: 1 addition & 1 deletion src/test/ui/cast-rfc0401-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ error[E0054]: cannot cast as `bool`

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0054"
For more information about this error, try `rustc --explain E0054`.
2 changes: 1 addition & 1 deletion src/test/ui/cast-to-unsized-trait-object-suggestion.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ error[E0620]: cast to unsized type: `std::boxed::Box<{integer}>` as `std::marker

error: aborting due to 2 previous errors

If you want more information on this error, try using "rustc --explain E0620"
For more information about this error, try `rustc --explain E0620`.
2 changes: 1 addition & 1 deletion src/test/ui/casts-differing-anon.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ error[E0606]: casting `*mut impl std::fmt::Debug+?Sized` as `*mut impl std::fmt:

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0606"
For more information about this error, try `rustc --explain E0606`.
2 changes: 1 addition & 1 deletion src/test/ui/casts-issue-46365.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ error[E0412]: cannot find type `Ipsum` in this scope

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0412"
For more information about this error, try `rustc --explain E0412`.
2 changes: 1 addition & 1 deletion src/test/ui/changing-crates.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ error[E0460]: found possibly newer version of crate `a` which `b` depends on

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0460"
For more information about this error, try `rustc --explain E0460`.
2 changes: 1 addition & 1 deletion src/test/ui/check_match/issue-35609.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ error[E0004]: non-exhaustive patterns: `Some(B)`, `Some(C)`, `Some(D)` and 2 mor

error: aborting due to 8 previous errors

If you want more information on this error, try using "rustc --explain E0004"
For more information about this error, try `rustc --explain E0004`.
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ error: borrowed data cannot be stored outside of its closure

error: aborting due to 5 previous errors

If you want more information on this error, try using "rustc --explain E0308"
For more information about this error, try `rustc --explain E0308`.
2 changes: 1 addition & 1 deletion src/test/ui/closure_context/issue-26046-fn-mut.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closur

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0525"
For more information about this error, try `rustc --explain E0525`.
2 changes: 1 addition & 1 deletion src/test/ui/closure_context/issue-26046-fn-once.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ error[E0525]: expected a closure that implements the `Fn` trait, but this closur

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0525"
For more information about this error, try `rustc --explain E0525`.
2 changes: 1 addition & 1 deletion src/test/ui/closure_context/issue-42065.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ note: closure cannot be invoked more than once because it moves the variable `di

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0382"
For more information about this error, try `rustc --explain E0382`.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ error[E0592]: duplicate definitions with name `f`

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0592"
For more information about this error, try `rustc --explain E0592`.
2 changes: 1 addition & 1 deletion src/test/ui/codemap_tests/empty_span.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`,

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0321"
For more information about this error, try `rustc --explain E0321`.
2 changes: 1 addition & 1 deletion src/test/ui/codemap_tests/huge_multispan_highlight.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0596"
For more information about this error, try `rustc --explain E0596`.
2 changes: 1 addition & 1 deletion src/test/ui/codemap_tests/issue-11715.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time

error: aborting due to previous error

If you want more information on this error, try using "rustc --explain E0499"
For more information about this error, try `rustc --explain E0499`.
Loading

0 comments on commit a48094d

Please sign in to comment.