scala> def f(thread: Thread) = thread.stop()
there was 1 deprecation warning; re-run with -deprecation for details
1 warning found
def f(thread: Thread): Unit

scala>:settings -deprecation foo.scala
Ignoring spurious arguments: foo.scala

scala> def f(thread: Thread) = thread.stop()
1 warning found
-- Deprecation Warning: --------------------------------------------------------
1 | def f(thread: Thread) = thread.stop()
  |                         ^^^^^^^^^^^
  |method stop in class Thread is deprecated: see corresponding Javadoc for more information.
def f(thread: Thread): Unit

scala>
