From fd2982c0a7bf1bc52685547849ba1d96c93d69c9 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 21 Aug 2023 18:45:02 +0700 Subject: [PATCH] Fix syntax in E0191 explanation. This trait needs `dyn` in modern Rust. Fixes #115042. --- compiler/rustc_error_codes/src/error_codes/E0191.md | 6 +++--- 1 file 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; // ok! +type Foo = dyn Trait; // ok! ```