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 = {
|
2024-01-07 11:11:48 -06:00
|
|
|
//~^ `impl Trait` is not allowed in const types
|
2021-07-22 13:16:33 -05:00
|
|
|
let x: Wrap<impl Lam> = Wrap(B);
|
2024-01-07 11:11:48 -06:00
|
|
|
//~^ `impl Trait` is not allowed in the type of variable bindings
|
2021-07-22 13:16:33 -05:00
|
|
|
x.0
|
|
|
|
};
|
|
|
|
|
|
|
|
fn main() {}
|