Skip to content

min_type_alias_impl_trait doesn't report an error when impl Trait is used in a struct field #86732

Closed
@nikomatsakis

Description

@nikomatsakis

This example (playground):

#![feature(min_type_alias_impl_trait)]
type X = impl Iterator<Item = u64> + Unpin;

struct Foo(X);
impl Foo {
    fn new(z: Vec<u64>) -> Self {
        Foo(z.into_iter())
    }
}

should report an error because the use of X in that position is not permitted with min_type_alias_impl_trait. But it does not.

(Spun out from #64445)

Metadata

Metadata

Assignees

No one assigned

    Labels

    F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]`I-needs-decisionIssue: In need of a decision.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions