试着像这样限制givens的范围
val x: Option[Throwable] = None
{
given CanEqual[Option[Throwable], Option[Throwable]] = CanEqual.derived
x match {
case Some(v) => v
case None => new Throwable()
}
} // after this brace CanEqual given is out-of-scope
x match {
case Some(v) => v
case None => new Throwable()
} // compile-time error: Values of types object None and Option[Throwable] cannot be compared with == or !=