about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2023-08-21 18:45:02 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2023-08-21 18:45:51 +0700
commitfd2982c0a7bf1bc52685547849ba1d96c93d69c9 (patch)
treefa2f821c8fc786f95469269c2e1d974bbd75590b
parentc40cfcf0494ff7506e753e750adb00eeea839f9c (diff)
downloadrust-fd2982c0a7bf1bc52685547849ba1d96c93d69c9.tar.gz
rust-fd2982c0a7bf1bc52685547849ba1d96c93d69c9.zip
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.md6
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!
 ```