about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-01 04:49:29 +0100
committerGitHub <noreply@github.com>2019-12-01 04:49:29 +0100
commitd4f59564e7898adcce6eaf432e710337ba8cca4c (patch)
tree157ce2eaebebaf6410c36ed47087cd13cc57591e /src/librustc_error_codes/error_codes
parentd91e63b7a2b92a66e6dd34dd76485fd906447111 (diff)
parenta52eb05ec6407054a0549b336fa746b62e1d22c0 (diff)
downloadrust-d4f59564e7898adcce6eaf432e710337ba8cca4c.tar.gz
rust-d4f59564e7898adcce6eaf432e710337ba8cca4c.zip
Rollup merge of #66880 - aDotInTheVoid:add-E0203-long, r=GuillaumeGomez
Add long error code explanation message for E0203

Addressed some of #61137

r? @GuillaumeGomez
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0203.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0203.md b/src/librustc_error_codes/error_codes/E0203.md
new file mode 100644
index 00000000000..1edb519275f
--- /dev/null
+++ b/src/librustc_error_codes/error_codes/E0203.md
@@ -0,0 +1,18 @@
+Having multiple relaxed default bounds is unsupported.
+
+Erroneous code example:
+
+```compile_fail,E0203
+struct Bad<T: ?Sized + ?Send>{
+    inner: T
+}
+```
+
+Here the type `T` cannot have a relaxed bound for multiple default traits
+(`Sized` and `Send`). This can be fixed by only using one relaxed bound.
+
+```
+struct Good<T: ?Sized>{
+    inner: T
+}
+```