Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bound regions affect path resolution #104767

Open
aliemjay opened this issue Nov 23, 2022 · 0 comments
Open

bound regions affect path resolution #104767

aliemjay opened this issue Nov 23, 2022 · 0 comments
Labels
A-resolve Area: Path resolution C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@aliemjay
Copy link
Member

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

@rustbot rustbot added A-resolve Area: Path resolution C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Path resolution C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants