error[E0053]: method `test` has an incompatible type for trait
  --> $DIR/type_reference_in_impl_runtime_apis_call.rs:19:17
   |
13 |         fn test(data: u64);
   |                       --- type in trait
...
19 |         fn test(data: &u64) {
   |                       ^^^^
   |                       |
   |                       expected `u64`, found `&u64`
   |                       help: change the parameter type to match the trait: `u64`
   |
   = note: expected fn pointer `fn(u64)`
              found fn pointer `fn(&u64)`

error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for trait
  --> $DIR/type_reference_in_impl_runtime_apis_call.rs:17:1
   |
11 | / sp_api::decl_runtime_apis! {
12 | |     pub trait Api {
13 | |         fn test(data: u64);
14 | |     }
15 | | }
   | |_- type in trait
16 |
17 |   sp_api::impl_runtime_apis! {
   |   -^^^^^^^^^^^^^^^^^^^^^^^^^
   |   |
   |  _expected `u64`, found `&u64`
   | |
18 | |     impl self::Api<Block> for Runtime {
19 | |         fn test(data: &u64) {
20 | |             unimplemented!()
...  |
34 | |     }
35 | | }
   | |_- help: change the parameter type to match the trait: `std::option::Option<u64>`
   |
   = note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> Result<_, _>`
              found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<&u64>, Vec<_>) -> Result<_, _>`
   = note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
  --> $DIR/type_reference_in_impl_runtime_apis_call.rs:17:1
   |
17 | / sp_api::impl_runtime_apis! {
18 | |     impl self::Api<Block> for Runtime {
19 | |         fn test(data: &u64) {
20 | |             unimplemented!()
...  |
34 | |     }
35 | | }
   | |_^ expected `u64`, found `&u64`
   |
   = note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
  --> $DIR/type_reference_in_impl_runtime_apis_call.rs:19:11
   |
19 |         fn test(data: &u64) {
   |                 ^^^^^^^ expected `u64`, found `&u64`
   |
help: consider removing the borrow
   |
19 -         fn test(data: &u64) {
19 +         fn test(data: &u64) {
   |
