11error[E0308]: mismatched types
2- --> $DIR/assoc-const-missing-type.rs:11 :18
2+ --> $DIR/assoc-const-missing-type.rs:12 :18
33 |
44LL | const K<T> = ();
55 | - ^^ expected type parameter `T`, found `()`
@@ -10,13 +10,28 @@ LL | const K<T> = ();
1010 found unit type `()`
1111
1212error: missing type for `const` item
13- --> $DIR/assoc-const-missing-type.rs:11 :15
13+ --> $DIR/assoc-const-missing-type.rs:12 :15
1414 |
1515LL | const K<T> = ();
1616 | ^ help: provide a type for the associated constant: `()`
1717
18+ error[E0195]: lifetime parameters or bounds on const `Q` do not match the trait declaration
19+ --> $DIR/assoc-const-missing-type.rs:16:12
20+ |
21+ LL | const Q<'a>: &'a str;
22+ | ---- lifetimes in impl do not match this const in trait
23+ ...
24+ LL | const Q = "";
25+ | ^ lifetimes do not match const in trait
26+
27+ error: missing type for `const` item
28+ --> $DIR/assoc-const-missing-type.rs:16:12
29+ |
30+ LL | const Q = "";
31+ | ^ help: provide a type for the associated constant: `: &str`
32+
1833error[E0308]: mismatched types
19- --> $DIR/assoc-const-missing-type.rs:11 :18
34+ --> $DIR/assoc-const-missing-type.rs:12 :18
2035 |
2136LL | const K<T> = ();
2237 | - ^^ expected type parameter `T`, found `()`
@@ -27,6 +42,7 @@ LL | const K<T> = ();
2742 found unit type `()`
2843 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2944
30- error: aborting due to 3 previous errors
45+ error: aborting due to 5 previous errors
3146
32- For more information about this error, try `rustc --explain E0308`.
47+ Some errors have detailed explanations: E0195, E0308.
48+ For more information about an error, try `rustc --explain E0195`.
0 commit comments