blob: 5fe18b6e9b54a15d6ca029303d3594a20a045f1c (
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 = {
//~^ `impl Trait` not allowed outside of function and method return types
let x: Wrap<impl Lam> = Wrap(B);
//~^ `impl Trait` not allowed outside of function and method return types
x.0
};
fn main() {}
|