Closed jestarray closed 4 months ago
Typing world.get::<'_, &mut f32>(entity)
makes it work so we are messing up some indices here probably. Also does not happen with a fully qualified call, so this is specifically an issue with method resoluton
fn main() {
// fails
let x = S.foo::<&()>();
// works
let x = S::foo::<&()>(&S);
}
struct S;
impl S {
pub fn foo<'a, T: Trait<'a>>(&'a self) -> T::Proj {
loop {}
}
}
struct Wrap<'a, T>(T);
trait Trait<'a> {
type Proj;
}
impl<'a, T> Trait<'a> for &'a T {
type Proj = Wrap<'a, T>;
}
rust-analyzer version: rust-analyzer version: 0.3.2045-standalone [/home/a/.vscode-oss/extensions/rust-lang.rust-analyzer-0.3.2045-linux-x64/server/rust-analyzer]
rustc version: rustc 1.80.0 (051478957 2024-07-21)
editor or extension: vscode on linux(have not tested on windows yet)
code snippet to reproduce:
deps:
Latest working working version: v0.3.2020
Any version above
0.3.2020
does not show the inlayhint, typeinference, and autocomplete methods for the given type as shown above. hecs info: https://docs.rs/hecs/latest/hecs/struct.World.html#method.get https://docs.rs/hecs/latest/hecs/trait.ComponentRef.html#associatedtype.Ref