summary refs log tree commit diff
path: root/src/test/ui/error-codes/E0423.stderr
blob: b0ef4e1b25413c315c8de5df707a3ded89ec11ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
error: expected type, found `1`
  --> $DIR/E0423.rs:12:39
   |
LL |     if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
   |                                       ^ expecting a type here because of type ascription
   |
   = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
note: this expression expects an ascribed type after the colon
  --> $DIR/E0423.rs:12:36
   |
LL |     if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
   |                                    ^
   = help: this might be indicative of a syntax error elsewhere

error: expected expression, found `==`
  --> $DIR/E0423.rs:15:13
   |
LL |     if T {} == T {} { println!("Ok"); }
   |             ^^ expected expression

error: expected type, found `0`
  --> $DIR/E0423.rs:21:39
   |
LL |     for _ in std::ops::Range { start: 0, end: 10 } {}
   |                                       ^ expecting a type here because of type ascription
   |
   = note: type ascription is a nightly-only feature that lets you annotate an expression with a type: `<expr>: <type>`
note: this expression expects an ascribed type after the colon
  --> $DIR/E0423.rs:21:32
   |
LL |     for _ in std::ops::Range { start: 0, end: 10 } {}
   |                                ^^^^^
   = help: this might be indicative of a syntax error elsewhere

error[E0423]: expected function, found struct `Foo`
  --> $DIR/E0423.rs:4:13
   |
LL |     let f = Foo();
   |             ^^^
   |             |
   |             did you mean `Foo { /* fields */ }`?
   |             help: a function with a similar name exists: `foo`

error[E0423]: expected value, found struct `S`
  --> $DIR/E0423.rs:12:32
   |
LL |     if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
   |                                ^---------------
   |                                |
   |                                help: surround the struct literal with parenthesis: `(S { x: 1, y: 2 })`

error[E0423]: expected value, found struct `T`
  --> $DIR/E0423.rs:15:8
   |
LL |     if T {} == T {} { println!("Ok"); }
   |        ^---
   |        |
   |        help: surround the struct literal with parenthesis: `(T {})`

error[E0423]: expected value, found struct `std::ops::Range`
  --> $DIR/E0423.rs:21:14
   |
LL |     for _ in std::ops::Range { start: 0, end: 10 } {}
   |              ^^^^^^^^^^^^^^^----------------------
   |              |
   |              help: surround the struct literal with parenthesis: `(std::ops::Range { start: 0, end: 10 })`

error: aborting due to 7 previous errors

For more information about this error, try `rustc --explain E0423`.