]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-5216.stderr
Show a note where a macro failed to match
[rust.git] / src / test / ui / issues / issue-5216.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-5216.rs:3:21
3    |
4 LL | pub static C: S = S(f);
5    |                   - ^ expected struct `Box`, found fn item
6    |                   |
7    |                   arguments to this struct are incorrect
8    |
9    = note: expected struct `Box<(dyn FnMut() + Sync + 'static)>`
10              found fn item `fn() {f}`
11 note: tuple struct defined here
12   --> $DIR/issue-5216.rs:2:8
13    |
14 LL | struct S(Box<dyn FnMut() + Sync>);
15    |        ^
16
17 error[E0308]: mismatched types
18   --> $DIR/issue-5216.rs:8:19
19    |
20 LL | pub static D: T = g;
21    |                   ^ expected struct `Box`, found fn item
22    |
23    = note: expected struct `Box<(dyn FnMut() + Sync + 'static)>`
24              found fn item `fn() {g}`
25
26 error: aborting due to 2 previous errors
27
28 For more information about this error, try `rustc --explain E0308`.