> seeing "WGPUSwapChainId" tells me exactly what sort of object is returned (a reference to some object held elsewhere)
Check out RLS (the rust language server) to get intellisense like this working in your favorite editor.
Check out RLS (the rust language server) to get intellisense like this working in your favorite editor.
I think the solution is for diff viewers incl. those on the web to support something like intellisense, but obviously we are a very long way away from that.
I tend to find, personally, that this kind of thing doesn't interfere strongly with reviewing. I think this is because I have an extensive background in dynamically typed languages and ones with strong inference like Rust, so I'm more used to it, whereas people who don't come from said backgrounds prefer more explicitness. YMMV of course!
-Z unstable-options -Zunpretty=hir,typed
// source
pub fn square(num: i32) -> i32 {
num * num
}
// expanded
use ::std::prelude::v1::*;
extern crate std;
pub fn square(num: i32)
-> i32 ({ ((num as i32) * (num as i32) as i32) } as i32)
You can try on https://rust.godbolt.org/