creusot icon indicating copy to clipboard operation
creusot copied to clipboard

Remove specialized instance for `PartialEq` on `Option`

Open xldenis opened this issue 5 months ago • 2 comments

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

xldenis avatar Feb 07 '24 14:02 xldenis