diff options
| author | bors <bors@rust-lang.org> | 2018-02-26 12:34:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-02-26 12:34:52 +0000 |
| commit | bedbad61195d2eae69b43eca49c6d3e2aee8f208 (patch) | |
| tree | 242925aa9132336b287d9bbbc2ab5f51d382369c /src/test/ui/compare-method | |
| parent | 4a70e272191862cdb7858a1b5b21cd811281d8db (diff) | |
| parent | ce6429af7af295e41c3483838ea2f099e490c78f (diff) | |
| download | rust-bedbad61195d2eae69b43eca49c6d3e2aee8f208.tar.gz rust-bedbad61195d2eae69b43eca49c6d3e2aee8f208.zip | |
Auto merge of #48337 - GuillaumeGomez:rustc-explain, r=estebank
Rustc explain
Fixes #48041.
To make the review easier, I separated tests update to code update. Also, I used this script to generate new ui tests stderr:
```python
from os import listdir
from os.path import isdir, isfile, join
PATH = "src/test/ui"
def do_something(path):
files = [join(path, f) for f in listdir(path)]
for f in files:
if isdir(f):
do_something(f)
continue
if not isfile(f) or not f.endswith(".stderr"):
continue
x = open(f, "r")
content = x.read().strip()
if "error[E" not in content:
continue
errors = dict()
for y in content.splitlines():
if y.startswith("error[E"):
errors[y[6:11]] = True
errors = sorted(errors.keys())
if len(errors) < 1:
print("weird... {}".format(f))
continue
if len(errors) > 1:
content += "\n\nYou've got a few errors: {}".format(", ".join(errors))
content += "\nIf you want more information on an error, try using \"rustc --explain {}\"".format(errors[0])
else:
content += "\n\nIf you want more information on this error, try using \"rustc --explain {}\"".format(errors[0])
content += "\n"
x = open(f, "w")
x.write(content)
do_something(PATH)
```
Diffstat (limited to 'src/test/ui/compare-method')
8 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/compare-method/proj-outlives-region.stderr b/src/test/ui/compare-method/proj-outlives-region.stderr index e6e93d14b3c..f695aa75906 100644 --- a/src/test/ui/compare-method/proj-outlives-region.stderr +++ b/src/test/ui/compare-method/proj-outlives-region.stderr @@ -9,3 +9,4 @@ error[E0276]: impl has stricter requirements than trait error: aborting due to previous error +If you want more information on this error, try using "rustc --explain E0276" diff --git a/src/test/ui/compare-method/region-extra-2.stderr b/src/test/ui/compare-method/region-extra-2.stderr index 2b8a268fdcc..59af795be57 100644 --- a/src/test/ui/compare-method/region-extra-2.stderr +++ b/src/test/ui/compare-method/region-extra-2.stderr @@ -9,3 +9,4 @@ error[E0276]: impl has stricter requirements than trait error: aborting due to previous error +If you want more information on this error, try using "rustc --explain E0276" diff --git a/src/test/ui/compare-method/region-extra.stderr b/src/test/ui/compare-method/region-extra.stderr index d89b3a921b9..8941abb6f16 100644 --- a/src/test/ui/compare-method/region-extra.stderr +++ b/src/test/ui/compare-method/region-extra.stderr @@ -9,3 +9,4 @@ error[E0276]: impl has stricter requirements than trait error: aborting due to previous error +If you want more information on this error, try using "rustc --explain E0276" diff --git a/src/test/ui/compare-method/region-unrelated.stderr b/src/test/ui/compare-method/region-unrelated.stderr index 156143cd54c..c5e7cad7cfd 100644 --- a/src/test/ui/compare-method/region-unrelated.stderr +++ b/src/test/ui/compare-method/region-unrelated.stderr @@ -9,3 +9,4 @@ error[E0276]: impl has stricter requirements than trait error: aborting due to previous error +If you want more information on this error, try using "rustc --explain E0276" diff --git a/src/test/ui/compare-method/reordered-type-param.stderr b/src/test/ui/compare-method/reordered-type-param.stderr index 4620248e2ef..9a5cb6267c3 100644 --- a/src/test/ui/compare-method/reordered-type-param.stderr +++ b/src/test/ui/compare-method/reordered-type-param.stderr @@ -12,3 +12,4 @@ error[E0053]: method `b` has an incompatible type for trait error: aborting due to previous error +If you want more information on this error, try using "rustc --explain E0053" diff --git a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr index e3a1eb9ee66..84460922b67 100644 --- a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr +++ b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr @@ -9,3 +9,4 @@ error[E0276]: impl has stricter requirements than trait error: aborting due to previous error +If you want more information on this error, try using "rustc --explain E0276" diff --git a/src/test/ui/compare-method/traits-misc-mismatch-1.stderr b/src/test/ui/compare-method/traits-misc-mismatch-1.stderr index ba5284eb653..74b529aab03 100644 --- a/src/test/ui/compare-method/traits-misc-mismatch-1.stderr +++ b/src/test/ui/compare-method/traits-misc-mismatch-1.stderr @@ -63,3 +63,4 @@ error[E0276]: impl has stricter requirements than trait error: aborting due to 7 previous errors +If you want more information on this error, try using "rustc --explain E0276" diff --git a/src/test/ui/compare-method/traits-misc-mismatch-2.stderr b/src/test/ui/compare-method/traits-misc-mismatch-2.stderr index 983d87d5b88..97f96c7a6a5 100644 --- a/src/test/ui/compare-method/traits-misc-mismatch-2.stderr +++ b/src/test/ui/compare-method/traits-misc-mismatch-2.stderr @@ -9,3 +9,4 @@ error[E0276]: impl has stricter requirements than trait error: aborting due to previous error +If you want more information on this error, try using "rustc --explain E0276" |
