mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
15 lines
315 B
Rust
15 lines
315 B
Rust
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() {}
|