]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0203.md
Rollup merge of #67943 - Stromberg90:patch-1, r=jonas-schievink
[rust.git] / src / librustc_error_codes / error_codes / E0203.md
1 Having multiple relaxed default bounds is unsupported.
2
3 Erroneous code example:
4
5 ```compile_fail,E0203
6 struct Bad<T: ?Sized + ?Send>{
7     inner: T
8 }
9 ```
10
11 Here the type `T` cannot have a relaxed bound for multiple default traits
12 (`Sized` and `Send`). This can be fixed by only using one relaxed bound.
13
14 ```
15 struct Good<T: ?Sized>{
16     inner: T
17 }
18 ```