Skip to content

[Semantic Tokens] unresolvedReference when should be constParameter #9042

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

Closed
GrayJack opened this issue May 28, 2021 · 1 comment
Closed
Labels
A-ty type system / type inference / traits / method resolution S-actionable Someone could pick this issue up and work on it right now

Comments

@GrayJack
Copy link
Contributor

RA version: d5f7b2e
rustc version: 1.52.0 and 1.54.0-nightly

When using the const generic parameter in an array type the const parameter receive the unresolvedReference token.

Example

image

image

image

struct Test<const N: usize> {
    o: [u32; N],
}

fn test<const N: usize>() -> [u8; N] {
    let _b = [0; N];
    todo!()
}

fn test2<const N: usize>() -> Test<N> {
    todo!()
}

This may be related to #8655 ?

@lnicola lnicola added A-ty type system / type inference / traits / method resolution S-actionable Someone could pick this issue up and work on it right now labels Sep 11, 2021
@Veykril
Copy link
Member

Veykril commented Jun 12, 2022

This works now with a workaround to fix the array case.

@Veykril Veykril closed this as completed Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

3 participants