Fix syntax in E0191 explanation.

This trait needs `dyn` in modern Rust.

Fixes #115042.
This commit is contained in:
Bruce Mitchener
2023-08-21 18:45:02 +07:00
parent c40cfcf049
commit fd2982c0a7

View File

@@ -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!
```