creusot
creusot copied to clipboard
Remove specialized instance for `PartialEq` on `Option`
Due to increased strictness in the checks performed by rustc
in trait resolution, we had to specialize the extern_spec
for Option
. Otherwise, we would have an issue where the ParamEnv
would contain a constraint of the form:
T : DeepModel<DeepModelTy = T::DeepModelTy>
which causes rustc to get very unhappy with us.
This appears due to the manner we extend the ParamEnv
for functions with "inherited extern contracts" where we instantiate and concatenate their parameter environments. If during ParamEnv
construction we throw away trivial constraints, (aka this one), we should be good.
ref: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Unexpected.20trait.20resolution.20failure