about summary refs log tree commit diff
path: root/src/libstd/sys/unix/process/process_unix.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-02-26 12:34:52 +0000
committerbors <bors@rust-lang.org>2018-02-26 12:34:52 +0000
commitbedbad61195d2eae69b43eca49c6d3e2aee8f208 (patch)
tree242925aa9132336b287d9bbbc2ab5f51d382369c /src/libstd/sys/unix/process/process_unix.rs
parent4a70e272191862cdb7858a1b5b21cd811281d8db (diff)
parentce6429af7af295e41c3483838ea2f099e490c78f (diff)
downloadrust-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/libstd/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions