]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/normalize-fn-sig.stderr
Rollup merge of #106860 - anden3:doc-double-spaces, r=Dylan-DPC
[rust.git] / tests / ui / mismatched_types / normalize-fn-sig.stderr
1 error[E0308]: mismatched types
2   --> $DIR/normalize-fn-sig.rs:14:22
3    |
4 LL |     needs_i32_ref_fn(foo::<()>);
5    |     ---------------- ^^^^^^^^^ expected `&i32`, found `i32`
6    |     |
7    |     arguments to this function are incorrect
8    |
9    = note: expected fn pointer `fn(&'static i32, i32)`
10                  found fn item `fn(i32, &'static i32) {foo::<()>}`
11 note: function defined here
12   --> $DIR/normalize-fn-sig.rs:11:4
13    |
14 LL | fn needs_i32_ref_fn(_: fn(&'static i32, i32)) {}
15    |    ^^^^^^^^^^^^^^^^ ------------------------
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0308`.