-
First of all, I am pretty new to leptos, but not to Rust in general. In my experiments, I stumbled upon the same problem laid out in #3676 and I would like to understand the rationale behind relying on Am I right that On the other hand, Right now, the future passed to Would it be worthwhile to go the same way as |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
My first and best answer to questions like this is always a suggestion: Try forking the repo, removing the bound, and then following the chain of errors all the way down to see what happens. I don't say this in a condescending way, but in a very practical way: It's very likely that in the end, the compiler will show the interrelationship of the various trait bounds here in a much more helpful way than I or anyone else can do just by trying to describe it from the top.
Basically yes.
Also yes.
This is, in theory, possibly possible by creating a separate trait like
In my opinion, there is a pretty fundamental problem with the approach taken by Arguably, this is only a problem because it applies to trait implementations (i.e., the type doesn't implement the traits it says it does, on some targets, in an undocumented and confusing way) rather than trait bounds: if something says it requires I don't have particularly dogmatic beliefs about this; at present it's the least-messy in a series of messy compromises the framework has taken. I am open to better alternatives (in a future 0.9?) that cut through the Gordian knot here. Target-based compilation would certainly be one possibility, if it seems possible to do. Any interest in exploring a PR that plays with that approach? I'm happy to gives pointers, but they'd mostly be "try switching out the bounds with a |
Beta Was this translation helpful? Give feedback.
My first and best answer to questions like this is always a suggestion: Try forking the repo, removing the bound, and then following the chain of errors all the way down to see what happens. I don't say this in a condescending way, but in a very practical way: It's very likely that in the end, the compiler will show the interrelationship of the various trait bounds here in a much more helpful way than I or anyone else can do just by trying to describe it from the top.