Closed as not planned
Closed as not planned
Description
rust-analyzer version: 0.4.2133-standalone
rustc version: rustc 1.81.0 (eeb90cda1 2024-09-04)
editor or extension: VSCode
relevant settings:
"editor.semanticTokenColorCustomizations": {
"enabled": true,
"rules": {
"const": {
"bold": true,
"foreground": "#F0F080",
},
"variable": "#FFFFFF",
}
}
code snippet to reproduce:
struct Foo<const G: usize>;
impl
Foo<
{
const A: usize = 1;
let a = A;
if a > 1 as usize {
A
} else {
0
}
},
>
{
fn foo() -> usize {
const A: usize = 1;
let a = A;
if a > 1 as usize {
A
} else {
0
}
}
}
Notice how both constant and variable (a
and A
) semantic types are determined correctly in the function, but not in the const generic block + type hints are not available