summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0191.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0191.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0191.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0191.md b/compiler/rustc_error_codes/src/error_codes/E0191.md
new file mode 100644
index 000000000..46b773bdc
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0191.md
@@ -0,0 +1,24 @@
+An associated type wasn't specified for a trait object.
+
+Erroneous code example:
+
+```compile_fail,E0191
+trait Trait {
+ type Bar;
+}
+
+type Foo = 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
+all associated types of the trait were specified and the correct trait was used.
+Example:
+
+```
+trait Trait {
+ type Bar;
+}
+
+type Foo = Trait<Bar=i32>; // ok!
+```