]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-58956.rs
Rollup merge of #104895 - chenyukang:yukang/fix-104884-serde, r=TaKO8Ki
[rust.git] / src / test / ui / impl-trait / issues / issue-58956.rs
1 trait Lam {}
2
3 pub struct B;
4 impl Lam for B {}
5 pub struct Wrap<T>(T);
6
7 const _A: impl Lam = {
8     //~^ `impl Trait` only allowed in function and inherent method return types
9     let x: Wrap<impl Lam> = Wrap(B);
10     //~^ `impl Trait` only allowed in function and inherent method return types
11     x.0
12 };
13
14 fn main() {}