]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/issues/issue-83929-impl-trait-in-generic-default.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / issues / issue-83929-impl-trait-in-generic-default.rs
CommitLineData
cdc7bbd5 1struct Foo<T = impl Copy>(T);
136023e0 2//~^ ERROR `impl Trait` not allowed outside of function and method return types
cdc7bbd5
XL
3
4type 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
8fn x() -> Foo {
9 Foo(0)
10}
11
12fn main() -> Result<()> {}