about summary refs log tree commit diff
path: root/tests/ui/impl-trait/issues/issue-58956.rs
blob: 8fb69aca9bcec77bc575c8e620fbb88c9f7339ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
trait Lam {}

pub struct B;
impl Lam for B {}
pub struct Wrap<T>(T);

const _A: impl Lam = {
    //~^ ERROR `impl Trait` is not allowed in const types
    let x: Wrap<impl Lam> = Wrap(B);
    //~^ ERROR `impl Trait` is not allowed in the type of variable bindings
    x.0
};

fn main() {}