error: missing type for `const` item --> $DIR/unnamable-types.rs:6:7 | LL | const A = 5; | ^ help: provide a type for the constant: `A: i32` error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables --> $DIR/unnamable-types.rs:10:11 | LL | static B: _ = "abc"; | ^ | | | not allowed in type signatures | help: replace with the correct type: `&str` error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants --> $DIR/unnamable-types.rs:17:10 | LL | const C: _ = || 42; | ^ not allowed in type signatures | note: however, the inferred type `[closure@$DIR/unnamable-types.rs:17:14: 17:16]` cannot be named --> $DIR/unnamable-types.rs:17:14 | LL | const C: _ = || 42; | ^^^^^ error: missing type for `const` item --> $DIR/unnamable-types.rs:23:7 | LL | const D = S { t: { let i = 0; move || -> i32 { i } } }; | ^ | note: however, the inferred type `S<[closure@$DIR/unnamable-types.rs:23:31: 23:45]>` cannot be named --> $DIR/unnamable-types.rs:23:11 | LL | const D = S { t: { let i = 0; move || -> i32 { i } } }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: missing type for `const` item --> $DIR/unnamable-types.rs:29:7 | LL | const E = foo; | ^ help: provide a type for the constant: `E: fn() -> i32` error: missing type for `const` item --> $DIR/unnamable-types.rs:32:7 | LL | const F = S { t: foo }; | ^ help: provide a type for the constant: `F: S i32>` error: missing type for `const` item --> $DIR/unnamable-types.rs:37:7 | LL | const G = || -> i32 { yield 0; return 1; }; | ^ | note: however, the inferred type `[generator@$DIR/unnamable-types.rs:37:11: 37:20]` cannot be named --> $DIR/unnamable-types.rs:37:11 | LL | const G = || -> i32 { yield 0; return 1; }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0121`.