1
1
error[E0308]: mismatched types
2
- --> $DIR/assoc-const-missing-type.rs:11 :18
2
+ --> $DIR/assoc-const-missing-type.rs:12 :18
3
3
|
4
4
LL | const K<T> = ();
5
5
| - ^^ expected type parameter `T`, found `()`
@@ -10,13 +10,28 @@ LL | const K<T> = ();
10
10
found unit type `()`
11
11
12
12
error: missing type for `const` item
13
- --> $DIR/assoc-const-missing-type.rs:11 :15
13
+ --> $DIR/assoc-const-missing-type.rs:12 :15
14
14
|
15
15
LL | const K<T> = ();
16
16
| ^ help: provide a type for the associated constant: `()`
17
17
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
+
18
33
error[E0308]: mismatched types
19
- --> $DIR/assoc-const-missing-type.rs:11 :18
34
+ --> $DIR/assoc-const-missing-type.rs:12 :18
20
35
|
21
36
LL | const K<T> = ();
22
37
| - ^^ expected type parameter `T`, found `()`
@@ -27,6 +42,7 @@ LL | const K<T> = ();
27
42
found unit type `()`
28
43
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
29
44
30
- error: aborting due to 3 previous errors
45
+ error: aborting due to 5 previous errors
31
46
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