about summary refs log tree commit diff
path: root/tests/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.rs
blob: 771b29f3c7e185c1ae6bbefde986290a1f8918dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
struct Foo<T = impl Copy>(T);
//~^ ERROR `impl Trait` is not allowed in generic parameter defaults

type Result<T, E = impl std::error::Error> = std::result::Result<T, E>;
//~^ ERROR `impl Trait` is not allowed in generic parameter defaults

// should not cause ICE
fn x() -> Foo {
    Foo(0)
}

fn main() -> Result<()> {}