blob: 68cfcd9ba4f9e03c72e9f5e4acee8b5db6bda814 (
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` only allowed in function and inherent method return types
let x: Wrap<impl Lam> = Wrap(B);
//~^ `impl Trait` only allowed in function and inherent method return types
x.0
};
fn main() {}
|