-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
r-a gets confused with nested anonymous type params when additional where bounds are involved #17173
Comments
Veykril
added
A-ty
type system / type inference / traits / method resolution
C-bug
Category: bug
labels
May 2, 2024
Test fixture that currently fails //- minicore: sized
pub trait Lookup {
type Data;
fn lookup(&self) -> Self::Data;
}
pub trait ItemTreeLoc {
type Id;
}
fn id_to_generics(id: impl Lookup<Data = impl ItemTreeLoc<Id = ()>>)
//^^ impl Lookup<Data = impl ItemTreeLoc<Id = ()>>
where
(): Sized,
{} |
Something is still wrong here #[test]
fn nested_anon_generics_and_where_bounds_17173() {
check_types(
r#"
//- minicore: sized, fn
pub trait Lookup {
type Data;
fn lookup(&self) -> Self::Data;
}
pub trait ItemTreeLoc {
type Id;
}
fn id_to_generics(id: impl Lookup<Data = impl ItemTreeLoc<Id = ()>>,
//^^ impl Lookup<Data = impl ItemTreeLoc<Id = ()>>
enabled_params: impl Fn(),
//^^^^^^^^^^^^^^ impl Fn()
)
where
(): Sized,
{}
"#,
);
} The |
This was fixed in #17176, right? |
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
May 19, 2024
Fix impl trait params not being counted properly Fixes the other thing in rust-lang/rust-analyzer#17173, this just rolls back a change from rust-lang/rust-analyzer#17175 and adds a comment as to what it does
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: