Fix syntax in E0191 explanation.
This trait needs `dyn` in modern Rust. Fixes #115042.
This commit is contained in:
@@ -7,8 +7,8 @@ trait Trait {
|
|||||||
type Bar;
|
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
|
// the trait `Trait`) must be specified
|
||||||
```
|
```
|
||||||
|
|
||||||
Trait objects need to have all associated types specified. Please verify that
|
Trait objects need to have all associated types specified. Please verify that
|
||||||
@@ -20,5 +20,5 @@ trait Trait {
|
|||||||
type Bar;
|
type Bar;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Foo = Trait<Bar=i32>; // ok!
|
type Foo = dyn Trait<Bar=i32>; // ok!
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user