]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/span-preservation.stderr
Update tests for excess semicolon lint
[rust.git] / src / test / ui / proc-macro / span-preservation.stderr
1 error[E0308]: mismatched types
2    |
3    = note: expected type `()`
4               found type `{integer}`
5
6 error[E0308]: mismatched types
7   --> $DIR/span-preservation.rs:12:20
8    |
9 LL |     let x: usize = "hello";
10    |                    ^^^^^^^ expected usize, found reference
11    |
12    = note: expected type `usize`
13               found type `&'static str`
14
15 error[E0308]: mismatched types
16   --> $DIR/span-preservation.rs:18:29
17    |
18 LL | fn b(x: Option<isize>) -> usize {
19    |                           ----- expected `usize` because of return type
20 LL |     match x {
21 LL |         Some(x) => { return x },
22    |                             ^ expected usize, found isize
23
24 error[E0308]: mismatched types
25   --> $DIR/span-preservation.rs:34:22
26    |
27 LL |     let x = Foo { a: 10isize };
28    |                      ^^^^^^^ expected usize, found isize
29
30 error[E0560]: struct `c::Foo` has no field named `b`
31   --> $DIR/span-preservation.rs:35:26
32    |
33 LL |     let y = Foo { a: 10, b: 10isize };
34    |                          ^ `c::Foo` does not have this field
35    |
36    = note: available fields are: `a`
37
38 error[E0308]: mismatched types
39   --> $DIR/span-preservation.rs:48:5
40    |
41 LL | extern "C" fn baz() {
42    |                     - possibly return type missing here?
43 LL |     0
44    |     ^ expected (), found integer
45    |
46    = note: expected type `()`
47               found type `{integer}`
48
49 error: aborting due to 6 previous errors
50
51 Some errors have detailed explanations: E0308, E0560.
52 For more information about an error, try `rustc --explain E0308`.