Skip to content

bound regions affect path resolution #104767

Open
@aliemjay

Description

@aliemjay

We should emit the same error message here regardless of whether the projection type contains bound regions.

fn test<'x>() {
    use std::ops::Deref;
    None::<for<'y> fn(<&'x Option<()> as Deref>::Target::Some)>;
    //~^ ERROR expected type, found variant
    None::<for<'y> fn(<&'y Option<()> as Deref>::Target::Some)>;
    //~^ ERROR ambiguous associated type
}

I discovered this in #101947 and added a FIXME comment.

@rustbot label T-compiler C-bug A-resolve

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions