]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/span-preservation.stderr
60fb9755003276e2d4ae521a803f1e8be6000a43
[rust.git] / src / test / ui / proc-macro / span-preservation.stderr
1 error[E0308]: mismatched types
2   --> $DIR/span-preservation.rs:11:20
3    |
4 LL |     let x: usize = "hello";
5    |                    ^^^^^^^ expected usize, found reference
6    |
7    = note:   expected type `usize`
8            found reference `&'static str`
9
10 error[E0308]: mismatched types
11   --> $DIR/span-preservation.rs:17:29
12    |
13 LL | fn b(x: Option<isize>) -> usize {
14    |                           ----- expected `usize` because of return type
15 LL |     match x {
16 LL |         Some(x) => { return x },
17    |                             ^ expected usize, found isize
18
19 error[E0308]: mismatched types
20   --> $DIR/span-preservation.rs:33:22
21    |
22 LL |     let x = Foo { a: 10isize };
23    |                      ^^^^^^^ expected usize, found isize
24
25 error[E0560]: struct `c::Foo` has no field named `b`
26   --> $DIR/span-preservation.rs:34:26
27    |
28 LL |     let y = Foo { a: 10, b: 10isize };
29    |                          ^ `c::Foo` does not have this field
30    |
31    = note: available fields are: `a`
32
33 error[E0308]: mismatched types
34   --> $DIR/span-preservation.rs:39:5
35    |
36 LL | extern fn bar() {
37    |                 - possibly return type missing here?
38 LL |     0
39    |     ^ expected (), found integer
40    |
41    = note: expected type `()`
42               found type `{integer}`
43
44 error[E0308]: mismatched types
45   --> $DIR/span-preservation.rs:44:5
46    |
47 LL | extern "C" fn baz() {
48    |                     - possibly return type missing here?
49 LL |     0
50    |     ^ expected (), found integer
51    |
52    = note: expected unit type `()`
53                    found type `{integer}`
54
55 error[E0308]: mismatched types
56   --> $DIR/span-preservation.rs:49:5
57    |
58 LL | extern "Rust" fn rust_abi() {
59    |                             - possibly return type missing here?
60 LL |     0
61    |     ^ expected (), found integer
62    |
63    = note: expected type `()`
64               found type `{integer}`
65
66 error[E0308]: mismatched types
67   --> $DIR/span-preservation.rs:54:5
68    |
69 LL | extern "\x43" fn c_abi_escaped() {
70    |                                  - possibly return type missing here?
71 LL |     0
72    |     ^ expected (), found integer
73    |
74    = note: expected type `()`
75               found type `{integer}`
76
77 error: aborting due to 8 previous errors
78
79 Some errors have detailed explanations: E0308, E0560.
80 For more information about an error, try `rustc --explain E0308`.