Fix syntax in E0191 explanation.
This trait needs `dyn` in modern Rust. Fixes #115042.
This commit is contained in:
parent
c40cfcf049
commit
fd2982c0a7
1 changed files with 3 additions and 3 deletions
|
@ -7,8 +7,8 @@ trait Trait {
|
|||
type Bar;
|
||||
}
|
||||
|
||||
type Foo = Trait; // error: the value of the associated type `Bar` (from
|
||||
// the trait `Trait`) must be specified
|
||||
type Foo = dyn Trait; // error: the value of the associated type `Bar` (from
|
||||
// the trait `Trait`) must be specified
|
||||
```
|
||||
|
||||
Trait objects need to have all associated types specified. Please verify that
|
||||
|
@ -20,5 +20,5 @@ trait Trait {
|
|||
type Bar;
|
||||
}
|
||||
|
||||
type Foo = Trait<Bar=i32>; // ok!
|
||||
type Foo = dyn Trait<Bar=i32>; // ok!
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue