diff options
| author | Ralf Jung <post@ralfj.de> | 2018-07-10 10:52:05 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-07-10 11:01:44 +0200 |
| commit | f511c5ea4ab2209b83dbab200f2bdac37351d2d2 (patch) | |
| tree | a058ff09f1e94e06af6f95bb7ca4099778040e3f /src/test/ui/error-codes | |
| parent | c30acc7187fe5ab9ca8a34411bb89bfe241a0662 (diff) | |
improve error message shown for unsafe operations: explain why undefined behavior could arise
Inspired by @gnzlbg at https://github.com/rust-lang/rust/issues/46043#issuecomment-381544673
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0133.stderr | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/ui/error-codes/E0133.stderr b/src/test/ui/error-codes/E0133.stderr index dc57a627444..9be80f8f21b 100644 --- a/src/test/ui/error-codes/E0133.stderr +++ b/src/test/ui/error-codes/E0133.stderr @@ -1,8 +1,10 @@ -error[E0133]: call to unsafe function requires unsafe function or block +error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/E0133.rs:14:5 | LL | f(); | ^^^ call to unsafe function + | + = note: consult the function's documentation for information on how to avoid undefined behavior error: aborting due to previous error |
