Rust Error - E0107
Cilde opened this issue · comments
RUST C ERROR CODE.
An incorrect number of generic arguments was provided.
Erroneous code example:
struct Foo { x: T }
struct Bar { x: Foo } // error: wrong number of type arguments:
// expected 1, found 0
struct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arguments:
// expected 1, found 2
fn foo<T, U>(x: T, y: U) {}
fn f() {}
fn main() {
let x: bool = true;
foo::(x); // error: wrong number of type arguments:
// expected 2, found 1
foo::<bool, i32, i32>(x, 2, 4); // error: wrong number of type arguments:
// expected 2, found 3
f::<'static>(); // error: wrong number of lifetime arguments
// expected 0, found 1
}
When using/declaring an item with generic arguments, you must provide the exact same
number:
struct Foo { x: T }
struct Bar { x: Foo } // ok!
struct Baz<S, T> { x: Foo, y: Foo } // ok!
fn foo<T, U>(x: T, y: U) {}
fn f() {}
fn main() {
let x: bool = true;
foo::<bool, u32>(x, 12); // ok!
f(); // ok!
}
Reproducing.
Follow the guide for installing, on the 3rd step for installing the WM through Cargo it errors out complaining about Rustc Error E0107
Im confused what???
Attempting to install MagmaWM, and after running the install command, it errors out with said error.
Attempting to install MagmaWM, and after running the install command, it errors out with said error.
Its not intended to be installed yet so makes sense
Ah right, was tryna install to have a mess around with it that's all.
does building work?
Yes, building works fine.
It looks like this issue is resolved. Feel free to reopen if I am wrong.