8000 Merge pull request scala/scala#10985 from lrytz/nowarnV · scala/scala3@ba2055e · GitHub
[go: up one dir, main page]

Skip to content

Commit ba2055e

Browse files
authored
Merge pull request scala/scala#10985 f 8000 rom lrytz/nowarnV
Show nowarn / Wconf filters for a warning with @nowarn("verbose")
2 parents fef0086 + dcfe0a0 commit ba2055e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

library/src/scala/annotation/nowarn.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,21 @@ package scala.annotation
1414

1515
/** An annotation for local warning suppression.
1616
*
17-
* The optional `value` parameter allows selectively silencing messages, see `scalac -Wconf:help`
18-
* for help. Examples:
17+
* The optional `value` parameter allows selectively silencing messages. See `-Wconf:help` for help
18+
* writing a message filter expression, or use `@nowarn("verbose")` / `@nowarn("v")` to display message
19+
* filters applicable to a specific warning.
20+
*
21+
* Examples:
1922
*
2023
* {{{
2124
* def f = {
2225
* 1: @nowarn // don't warn "a pure expression does nothing in statement position"
2326
* 2
2427
* }
2528
*
29+
* // show the warning, plus the applicable @nowarn / Wconf filters ("cat=other-pure-statement", ...)
30+
* @nowarn("v") def f = { 1; 2 }
31+
*
2632
* @nowarn def f = { 1; deprecated() } // don't warn
2733
*
2834
* @nowarn("msg=pure expression does nothing")

0 commit comments

Comments
 (0)
0