Q:

What is correct syntax for @unchecked in a fold operation

I have a fold operation something like the following:
val ops: Seq[Op] ...
(x /: ops) { case (y, MyOp(z)) =>
...
}

An Op can have many types other than MyOp but I know in this instance that the ops are all MyOps so I want to add an @unchecked annotation to removed the compiler warning. 
Where should I place the @unchecked in this example?

A:

Try 
(x /: ops)((y0, op) => 
  ((y0, op): @unchecked) match { 
    case (y, MyOp(z)) => ??? 
  }
)

https://www.scala-lang.org/files/archive/spec/2.11/11-annotations.html#scala-compiler-annotations

