diff options
| author | bors <bors@rust-lang.org> | 2020-02-20 19:19:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-20 19:19:54 +0000 |
| commit | 2c462a2f776b899d46743b1b44eda976e846e61d (patch) | |
| tree | 3d34eb0e18fc06ddc1dc39366206357e9f34cc99 /src/librustc_error_codes/error_codes | |
| parent | bfb96048b5946e8c695790ae66ca105cb78da60b (diff) | |
| parent | c1165ce78622c632a7d6859cfacce313e7fce263 (diff) | |
Auto merge of #69325 - Centril:rollup-vce2ko2, r=Centril
Rollup of 5 pull requests Successful merges: - #68877 (On mismatched argument count point at arguments) - #69185 (Unify and improve const-prop lints) - #69305 (Tweak binding lifetime suggestion text) - #69311 (Clean up E0321 and E0322) - #69317 (Fix broken link to the rustc guide) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0321.md | 4 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0322.md | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/librustc_error_codes/error_codes/E0321.md b/src/librustc_error_codes/error_codes/E0321.md index 49cec94430b..bfcdabfe9de 100644 --- a/src/librustc_error_codes/error_codes/E0321.md +++ b/src/librustc_error_codes/error_codes/E0321.md @@ -1,5 +1,7 @@ A cross-crate opt-out trait was implemented on something which wasn't a struct -or enum type. Erroneous code example: +or enum type. + +Erroneous code example: ```compile_fail,E0321 #![feature(optin_builtin_traits)] diff --git a/src/librustc_error_codes/error_codes/E0322.md b/src/librustc_error_codes/error_codes/E0322.md index d2ee426763e..ccef8681dd6 100644 --- a/src/librustc_error_codes/error_codes/E0322.md +++ b/src/librustc_error_codes/error_codes/E0322.md @@ -1,3 +1,13 @@ +The `Sized` trait was implemented explicitly. + +Erroneous code example: + +```compile_fail,E0322 +struct Foo; + +impl Sized for Foo {} // error! +``` + The `Sized` trait is a special trait built-in to the compiler for types with a constant size known at compile-time. This trait is automatically implemented for types as needed by the compiler, and it is currently disallowed to |
