diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-05 22:03:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-05 22:03:58 +0100 |
| commit | e01dc83aa806227538140247ff0f74a2beeea99e (patch) | |
| tree | 61036a8b8211baf12c0aee935e3d85c06d44fd14 | |
| parent | c79f5f064725535f7520e693e69c65c3d0f2730f (diff) | |
| parent | c745b4a1841bc5bea8dd50cad85921b36ca47242 (diff) | |
| download | rust-e01dc83aa806227538140247ff0f74a2beeea99e.tar.gz rust-e01dc83aa806227538140247ff0f74a2beeea99e.zip | |
Rollup merge of #69697 - GuillaumeGomez:explanation-e0380, r=Dylan-DPC
Add explanation for E0380 r? @Dylan-DPC
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0380.md | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/librustc_error_codes/error_codes/E0380.md b/src/librustc_error_codes/error_codes/E0380.md index fe5de569339..638f0c8ecc6 100644 --- a/src/librustc_error_codes/error_codes/E0380.md +++ b/src/librustc_error_codes/error_codes/E0380.md @@ -1,4 +1,14 @@ -Auto traits cannot have methods or associated items. -For more information see the [opt-in builtin traits RFC][RFC 19]. +An auto trait was declared with a method or an associated item. + +Erroneous code example: + +```compile_fail,E0380 +unsafe auto trait Trait { + type Output; // error! +} +``` + +Auto traits cannot have methods or associated items. For more information see +the [opt-in builtin traits RFC][RFC 19]. [RFC 19]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md |
