mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 19:12:50 +00:00
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:
commit
66726fdf56
@ -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…
Reference in New Issue
Block a user