Skip to content

[Semantic Tokens] unresolvedReference when should be constParameter #9042

Closed
@GrayJack

Description

@GrayJack

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tytype system / type inference / traits / method resolutionS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions