2021-07-22 13:16:33 -05:00
|
|
|
trait Lam {}
|
|
|
|
|
|
|
|
pub struct B;
|
|
|
|
impl Lam for B {}
|
|
|
|
pub struct Wrap<T>(T);
|
|
|
|
|
|
|
|
const _A: impl Lam = {
|
2022-02-17 21:18:42 -06:00
|
|
|
//~^ `impl Trait` only allowed in function and inherent method return types
|
2021-07-22 13:16:33 -05:00
|
|
|
let x: Wrap<impl Lam> = Wrap(B);
|
2022-02-17 21:18:42 -06:00
|
|
|
//~^ `impl Trait` only allowed in function and inherent method return types
|
2021-07-22 13:16:33 -05:00
|
|
|
x.0
|
|
|
|
};
|
|
|
|
|
|
|
|
fn main() {}
|