Skip to content

Forbid storing an impl Trait inside types #1485

@CohenArthur

Description

@CohenArthur
struct BinOpInvalid {
    lhs: i32,
    rhs: i32,
    f: impl Fn(i32) -> i32, // { dg-error "impl Trait not allowed here" }
}

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions