]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/unnamable-types.stderr
Rollup merge of #107632 - ameknite:issue-107622-fix, r=jyn514
[rust.git] / tests / ui / suggestions / unnamable-types.stderr
1 error: missing type for `const` item
2   --> $DIR/unnamable-types.rs:6:8
3    |
4 LL | const A = 5;
5    |        ^ help: provide a type for the constant: `: i32`
6
7 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
8   --> $DIR/unnamable-types.rs:10:11
9    |
10 LL | static B: _ = "abc";
11    |           ^
12    |           |
13    |           not allowed in type signatures
14    |           help: replace with the correct type: `&str`
15
16 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
17   --> $DIR/unnamable-types.rs:17:10
18    |
19 LL | const C: _ = || 42;
20    |          ^ not allowed in type signatures
21    |
22 note: however, the inferred type `[closure@unnamable-types.rs:17:14]` cannot be named
23   --> $DIR/unnamable-types.rs:17:14
24    |
25 LL | const C: _ = || 42;
26    |              ^^^^^
27
28 error: missing type for `const` item
29   --> $DIR/unnamable-types.rs:23:8
30    |
31 LL | const D = S { t: { let i = 0; move || -> i32 { i } } };
32    |        ^
33    |
34 note: however, the inferred type `S<[closure@unnamable-types.rs:23:31]>` cannot be named
35   --> $DIR/unnamable-types.rs:23:11
36    |
37 LL | const D = S { t: { let i = 0; move || -> i32 { i } } };
38    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
40 error: missing type for `const` item
41   --> $DIR/unnamable-types.rs:29:8
42    |
43 LL | const E = foo;
44    |        ^ help: provide a type for the constant: `: fn() -> i32`
45
46 error: missing type for `const` item
47   --> $DIR/unnamable-types.rs:32:8
48    |
49 LL | const F = S { t: foo };
50    |        ^ help: provide a type for the constant: `: S<fn() -> i32>`
51
52 error: missing type for `const` item
53   --> $DIR/unnamable-types.rs:37:8
54    |
55 LL | const G = || -> i32 { yield 0; return 1; };
56    |        ^
57    |
58 note: however, the inferred type `[generator@$DIR/unnamable-types.rs:37:11: 37:20]` cannot be named
59   --> $DIR/unnamable-types.rs:37:11
60    |
61 LL | const G = || -> i32 { yield 0; return 1; };
62    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63
64 error: aborting due to 7 previous errors
65
66 For more information about this error, try `rustc --explain E0121`.