-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Un-regress conflicting destructors #28681
Conversation
Because of type inference, duplicate obligations exist and cause duplicate errors. To avoid this, only display the first error for each (predicate,span). The inclusion of the span is somewhat bikesheddy, but *is* the more conservative option (it does not remove some instability, as duplicate obligations are ignored by `duplicate_set` under some inference conditions). Fixes rust-lang#28098 cc rust-lang#21528 (is it a dupe?)
different supertraits can suffer from the same object-safety violation, leading to duplication in the error message. Avoid it. Fixes rust-lang#20692
@bors r+ |
📌 Commit 9a86713 has been approved by |
The linked issue indicates this regression is on beta. Backport? cc @rust-lang/compiler |
@rust-lang/compiler I have no opinion about backporting this to beta; I certainly don't object, but I also don't think its the end of the world if an ICE remains. (That's assuming one always hits an ICE ... if someone were to demonstrate an example where the program has two destructors and the compiler erroneously accepts it, then that would change my opinion to be strongly in favor of a backport.) |
I would not ordinarily be in favor of backporting, but if it's a regression I think we ought to. |
Fixes #28568
r? @eddyb