In the following code:
use smithay_client_toolkit::{default_environment, init_default_environment};
default_environment!(Environment, desktop);
fn main() {
let (env, _, _) = init_default_environment!(Environment, desktop).unwrap();
let surface = env.create_surface();
}
using https://github.com/Smithay/client-toolkit/commit/4a80863e6dce2749701299f2ebcb567cec34f370, rust-analyzer ad10d0c says the type of surface is {unknown}, even though it correctly determines the signature of create_surface(), which doesn't have any generics or anything funny and which does include a return type.
Does it know the type of env? The signature might be misleading because it might be based on an index lookup (I'm not sure whether we still do that for signature help).
Yes, it does know the type of env. Also I meant that the type of the function was known to hover; I don't use signature help (don't have it set up).
I took a look; the problem is that the return type of that function is defined in code generated by a build script, so this depends on #1964.
Most helpful comment
I took a look; the problem is that the return type of that function is defined in code generated by a build script, so this depends on #1964.