Rollup merge of #115054 - waywardmonkeys:fix-syntax-in-e0191, r=compiler-errors

Fix syntax in E0191 explanation.

This trait needs `dyn` in modern Rust.

Fixes #115042.
This commit is contained in:
Matthias Krüger 2023-08-21 22:16:01 +02:00 committed by GitHub
commit 66726fdf56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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