Fix syntax in E0191 explanation.
This trait needs `dyn` in modern Rust. Fixes #115042.
This commit is contained in:
@@ -7,7 +7,7 @@ trait Trait {
|
||||
type Bar;
|
||||
}
|
||||
|
||||
type Foo = Trait; // error: the value of the associated type `Bar` (from
|
||||
type Foo = dyn Trait; // error: the value of the associated type `Bar` (from
|
||||
// the trait `Trait`) must be specified
|
||||
```
|
||||
|
||||
@@ -20,5 +20,5 @@ trait Trait {
|
||||
type Bar;
|
||||
}
|
||||
|
||||
type Foo = Trait<Bar=i32>; // ok!
|
||||
type Foo = dyn Trait<Bar=i32>; // ok!
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user