]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0203.md
Rollup merge of #92310 - ehuss:rustdoc-ice, r=estebank
[rust.git] / compiler / rustc_error_codes / src / 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 ```