@@ -90,7 +90,7 @@ On Scala 2.13.15+, canonical patterns (vars with the same names as the
90
90
attributes) do not trigger unused warnings, so the input above will not
91
91
be rewritten. See https://github.com/scala/bug/issues/13035 .
92
92
93
- ### Remove unused function parameters (Scala 2 only)
93
+ ### Remove unused function parameters
94
94
95
95
``` scala
96
96
// before
@@ -103,6 +103,8 @@ object Main {
103
103
}
104
104
```
105
105
106
+ On Scala 3, this is only supported for 3.7.0+.
107
+
106
108
## Formatting
107
109
108
110
> This rule does a best-effort at preserving original formatting. In some cases,
@@ -176,8 +178,7 @@ $ scala3 -W
176
178
- nowarn,
177
179
- all,
178
180
- imports :
179
- Warn if an import selector is not referenced.
180
- NOTE : overrided by -Wunused:strict-no-implicit-warn,
181
+ Warn if an import selector is not referenced.,
181
182
- privates :
182
183
Warn if a private member is unused,
183
184
- locals :
@@ -188,13 +189,13 @@ $ scala3 -W
188
189
Warn if an implicit parameter is unused,
189
190
- params :
190
191
Enable -Wunused:explicits,implicits,
192
+ - patvars :
193
+ Warn if a variable bound in a pattern is unused,
191
194
- linted :
192
195
Enable -Wunused:imports,privates,locals,implicits,
193
196
- strict-no-implicit-warn :
194
197
Same as -Wunused:import, only for imports of explicit named members.
195
- NOTE : This overrides -Wunused:imports and NOT set by -Wunused:all,
198
+ NOTE : This overrides -Wunused:imports and NOT set by -Wunused:all,
196
199
- unsafe-warn-patvars :
197
- (UNSAFE) Warn if a variable bound in a pattern is unused.
198
- This warning can generate false positive, as warning cannot be
199
- suppressed yet.
200
+ Deprecated alias for `patvars`
200
201
```
0 commit comments