Right now, Option has the following impl:
impl<T> PartialEq<Option<T>> for Option<T> where T: PartialEq<T>
This only allows comparing Option<T> to Option<T>. So, for instance, if you have Option<&OsStr>, you can’t compare that to Option<&str>, even though you can compare &OsStr and &str.
Would it make sense for Option to provide:
impl<T, U> PartialEq<Option<U>> for Option<T> where T: PartialEq<U>
This would allow more general comparisons of Option values, without having to expand them into much more verbose match blocks.
The downside: this would loosen a type constraint, and a program could potentially rely on that type constraint as the only means of inferring a type. Type parameter defaults might make it possible to avoid regressions from that, by saying that U defaults to T.