Skip to content

Inconsistency with “at least one non-builtin trait is required for an object type” #37515

Closed
@bluss

Description

@bluss

Auto traits are alone allowed as object types in some cases and not others.

The following two lines are fine: (Using Send as an object type)

type Y = Send;

fn main() {
    let x = &1 as &Send;
}

The following line has an error:

type Z = for<'x> Send;  //~ error[E0224]: at least one non-builtin trait is required for an object type

The second error seems to speak against the first two examples.

Tested using rustc 1.14.0-nightly (3f4408347 2016-10-27)

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions