Skip to content

Commit 66726fd

Browse files
authored
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.
2 parents 5a59e94 + fd2982c commit 66726fd

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+3
-3
lines changed

compiler/rustc_error_codes/src/error_codes/E0191.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ trait Trait {
77
type Bar;
88
}
99
10-
type Foo = Trait; // error: the value of the associated type `Bar` (from
11-
// the trait `Trait`) must be specified
10+
type Foo = dyn Trait; // error: the value of the associated type `Bar` (from
11+
// the trait `Trait`) must be specified
1212
```
1313

1414
Trait objects need to have all associated types specified. Please verify that
@@ -20,5 +20,5 @@ trait Trait {
2020
type Bar;
2121
}
2222
23-
type Foo = Trait<Bar=i32>; // ok!
23+
type Foo = dyn Trait<Bar=i32>; // ok!
2424
```

0 commit comments

Comments
 (0)