summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0203.md
blob: 1edb519275f79108d538bbc3a90c87c0e80cd2f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}
```