mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 06:43:20 +03:00
15 lines
289 B
Rust
15 lines
289 B
Rust
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() {}
|