Skip to content

Parameter usage is not properly propagated through trait aliases #74093

@vandenheuvel

Description

@vandenheuvel

It seems to me that both S1 and S2 should compile:

#![feature(trait_alias)] // Works struct S1<'a, T: 'a, I: Iterator<Item = &'a T> + Clone> { field: I, } trait SpecialIterator<'a, T: 'a> = Iterator<Item = &'a T> + Clone; // Doesn't work struct S2<'a, T: 'a, I: SpecialIterator<'a, T>> { field: I, }

Playground. On 1.46.0-nightly (2020-07-05 2753fab7ce3647033146).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-trait_alias`#![feature(trait_alias)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions