rust/tests/ui/generics/generic-non-trailing-defaults.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
279 B
Rust
Raw Normal View History

struct Heap;
struct Vec<A = Heap, T>(A, T);
2021-03-01 05:50:09 -06:00
//~^ ERROR generic parameters with a default must be trailing
struct Foo<A, B = Vec<C>, C>(A, B, C);
2021-03-01 05:50:09 -06:00
//~^ ERROR generic parameters with a default must be trailing
2021-04-18 06:57:22 -05:00
//~| ERROR generic parameters with a default cannot use
fn main() {}