]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/ascription/issue-34255-1.stderr
Detect bare blocks with type ascription that were meant to be a `struct` literal
[rust.git] / src / test / ui / type / ascription / issue-34255-1.stderr
1 error[E0425]: cannot find value `input_cells` in this scope
2   --> $DIR/issue-34255-1.rs:7:9
3    |
4 LL |         input_cells: Vec::new()
5    |         ^^^^^^^^^^^ a field by this name exists in `Self`
6    |
7 help: you might have meant to write a `struct` literal
8    |
9 LL ~     pub fn new() -> Self { SomeStruct {
10 LL |         input_cells: Vec::new()
11 LL |
12 LL |
13 LL |
14 LL ~     }}
15    |
16
17 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
18   --> $DIR/issue-34255-1.rs:7:27
19    |
20 LL |         input_cells: Vec::new()
21    |                           ^^^^^ only `Fn` traits may use parentheses
22
23 error[E0107]: missing generics for struct `Vec`
24   --> $DIR/issue-34255-1.rs:7:22
25    |
26 LL |         input_cells: Vec::new()
27    |                      ^^^ expected at least 1 generic argument
28    |
29 note: struct defined here, with at least 1 generic parameter: `T`
30   --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
31    |
32 LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
33    |            ^^^ -
34 help: add missing generic argument
35    |
36 LL |         input_cells: Vec<T>::new()
37    |                      ~~~~~~
38
39 error: aborting due to 3 previous errors
40
41 Some errors have detailed explanations: E0107, E0214, E0425.
42 For more information about an error, try `rustc --explain E0107`.