Using #Discord as a forum is a weird experience. Even trying to view this feels overly .. crowded? And search seems overloaded with searching in channels, people - like a "omni-search" that's more likely to give something _I don't need_ versus actionable info.
That said, I'll repost my question from there here for any #Rust eagle-eyed folks.
I'm getting a case of "not general enough" when attempting to use their macro to define a command with Tauri. I've pasted the output and code in question here: https://paste.ubuntu.com/p/4KyvJ2W58r/
@jalcine I don't know enough to answer this question, but I'd start by first changing the code so the tauri::generate_handler! result is stored in a let var before being passed into the function, then doing type inference (IDE or let () = varname), just to see what it is you've really got.
I did some google poking and found other examples where people fixed an error like this by putting the value in a Box<>. And another example where an error message like this turned out to be a compiler bug D:
@jalcine I mention the first thing because I found the generate_handler! doc in question didn't seem to explicitly explain its return value.
Also, there is a second "Rust Programming Language Community" Discord I would go to if Tauri discord is confused by the question, as this other discord very good at spotting weird issues that can be rephrased to be about general Rust primitive issues rather than specific libraries. Can pass that link on if it helps.
@mcc Ah, it's asking for an inference on a type and looking even into where it's passed in, it'd ask for a function definition (so it's like building a function to call another [set of?] functions)
This is more tangled than I expected
@jalcine If it turns out the problem is something very different and the compiler error was misleading, it might actually be worth filing a compiler bug on Rust's github. They're actually really intent on improving error message when it turns out a misleading element to a message is mechanically detectable (which isn't always ofcโฆ)
@mcc I'll keep this in mind. I'm going to run a bisect to see if I can get to the point of no return.
That said, I _do_ remember upgrading Rust - if that's affecting this, that feels like compiler bug space, no?
@jalcine The code worked before and doesn't now? That's interesting if so, I don't know but I *assume* that violates the forward compat promises the Rust team makes. I think (?) backcompat breaks are only supposed to happen with new Editions.
You may already know this but I think Rustup will let you if you want to double check whether that's the case
@mcc well, I found the issue but have no idea as to _why_ it is. Going to add to main thread in a bit
@jalcine Try this URL: https://discord.com/channels/273534239310479360/1120124565591425034
If that doesn't work, try: https://discord.gg/rust-lang-community
I've got the most help in the rust-question-and-answers general channel. If you don't get an immediate answer the forum might be good for a more involved question like this. I've occasionally had luck w/ the subject channels but they're much slower moving. They react well to questions that can be phrased in Godbolt form & have some bot that lets you run a command and execute a ``` block in Godbolt