diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-21 22:16:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-21 22:16:01 +0200 |
| commit | 66726fdf56fbcd7c2723d5da8846fb7215d0e88d (patch) | |
| tree | 30e36149070a675fde575c245c78c4fadcc621d8 | |
| parent | 5a59e94513fdf21387b7b72f976eafd913f9dd4d (diff) | |
| parent | fd2982c0a7bf1bc52685547849ba1d96c93d69c9 (diff) | |
| download | rust-66726fdf56fbcd7c2723d5da8846fb7215d0e88d.tar.gz rust-66726fdf56fbcd7c2723d5da8846fb7215d0e88d.zip | |
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.
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0191.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0191.md b/compiler/rustc_error_codes/src/error_codes/E0191.md index 46b773bdc50..344ac221698 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0191.md +++ b/compiler/rustc_error_codes/src/error_codes/E0191.md @@ -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! ``` |
