mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Address review comments
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
Having multiple relaxed default bounds is unsuported.
|
||||
Having multiple relaxed default bounds is unsupported.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0203
|
||||
|
||||
trait Foo {}
|
||||
|
||||
struct S5<T>(*const T) where T: ?Foo + ?Sized;
|
||||
struct Bad<T: ?Sized + ?Send>{
|
||||
inner: T
|
||||
}
|
||||
```
|
||||
|
||||
Here the type `T` cannot have a relaxed bound for both `Foo` and `Sized`
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user