When your refactoring causes so many errors that your "compile time" is limited by lock contention on stderr printing all the compiler errors
-
-
Replying to @sgrif
You just gave me a half baked idea. If `rustc` encounters >N parse errors, it should just stop and avoid trying to continue to the type checker.
2 replies 0 retweets 0 likes -
Replying to @ekuber
In general I wish rustc would stop earlier. We have `impl<T: Expression> AsExpression<T::SqlType> for T` in Diesel. If Rust encounters a case where `AsExpression<SomeType>` isn't implemented, it assumes that the blanket impl applies, and spits out 4 more errors 1/2
1 reply 0 retweets 0 likes -
Because it's now assumed that `<T as AsExpression<SomeType>>::Output` is `T`, and there are other bounds required. So now we have 4 errors about traits not being implemented when there should be one, and none of them mention `SomeType` which is the only relevant piece of info.
1 reply 0 retweets 1 like -
Replying to @sgrif
That sounds like a very reasonable thing to change. I wonder if there's an open issue along those lines... Also I'm wondering how it could be changed without it ever being incorrect.
1 reply 0 retweets 0 likes -
Replying to @ekuber
I've got an RFC I'm writing to provide an attribute which can be placed on impls to tell rustc "Please do not recommend this impl". Explicit annotation is the only fix in this case I think. My desired behavior in *this* case is "Follow the impl chain to N-1 places"
1 reply 0 retweets 1 like -
This would also help in cases where you want Rust to recommend another impl, but it doesn't because there are two "possible" cases that could apply (even though one never does)
1 reply 0 retweets 1 like -
There's a few cases like that in Diesel right now, and they're the difference between "<3 page long type>: ExecuteDsl is not satisfied" and "String: FromSql<Integer> is not satisfied"
1 reply 0 retweets 0 likes -
Replying to @sgrif
It does sound like an annotation with "similar" behavior to `rustc_on_unimplemented` would be enough for your case, but it'd be nice if rustc had better behavior for this case by default (I want to minimize how many hints library writers need to add for us to do the right thing).
1 reply 0 retweets 0 likes
Heh. The "motivation" section of this RFC specifically talks about how the current behavior causes the "rustc_on_unimplemented" attribute to be shown in places that it shouldn't, where it is specifically harmful
-
-
Replying to @sgrif
There's some work around matching in that attribute to avoid that problem: https://github.com/rust-lang/rust/issues/44755 …
1 reply 0 retweets 0 likes -
(Unless I'm misunderstanding the problem)
1 reply 0 retweets 0 likes - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.