summary refs log tree commit diff
path: root/src/test/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.rs
blob: d9d2e3929b10c2cd3778b12f1527a6dbe814e09e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
struct Foo<T = impl Copy>(T);
//~^ ERROR `impl Trait` not allowed outside of function and inherent method return types

type Result<T, E = impl std::error::Error> = std::result::Result<T, E>;
//~^ ERROR `impl Trait` not allowed outside of function and inherent method return types

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

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