W3cubDocs

/Rust

Error code E0747

Generic arguments were not provided in the same order as the corresponding generic parameters are declared.

Erroneous code example:

#![allow(unused)]
fn main() {
struct S<'a, T>(&'a T);

type X = S<(), 'static>; // error: the type argument is provided before the
                         // lifetime argument
}

The argument order should be changed to match the parameter declaration order, as in the following:

#![allow(unused)]
fn main() {
struct S<'a, T>(&'a T);

type X = S<'static, ()>; // ok
}

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0747.html