]>
Commit | Line | Data |
---|---|---|
cdc7bbd5 | 1 | struct Foo<T = impl Copy>(T); |
136023e0 | 2 | //~^ ERROR `impl Trait` not allowed outside of function and method return types |
cdc7bbd5 XL |
3 | |
4 | type Result<T, E = impl std::error::Error> = std::result::Result<T, E>; | |
136023e0 | 5 | //~^ ERROR `impl Trait` not allowed outside of function and method return types |
cdc7bbd5 XL |
6 | |
7 | // should not cause ICE | |
8 | fn x() -> Foo { | |
9 | Foo(0) | |
10 | } | |
11 | ||
12 | fn main() -> Result<()> {} |