Open
Description
If this is tried in legacy rust (not rust 2018)
#[rpc(server)]
pub trait Foo {
/// RPC Metadata
type Metadata;
fn bar(&self, u64) -> Result<u64>;
}
You will end with a similar error as follows:
26 | #[rpc(server)]
| ^^^^^^^^^^^^^^
error: expected `:`
To fix it you can do:
#[rpc(server)]
pub trait Foo {
/// RPC Metadata
type Metadata;
fn bar(&self, _: u64) -> Result<u64>;
}
// or
#[rpc(server)]
pub trait Foo {
/// RPC Metadata
type Metadata;
fn bar(&self, b: u64) -> Result<u64>;
}
For further information, see https://rust-lang.github.io/rfcs/1685-deprecate-anonymous-parameters.html