File tree 4 files changed +12
-1
lines changed
compiler/src/dotty/tools/dotc/typer
4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,10 @@ trait Migrations:
132
132
if tp.companion == ImplicitMethodType && pt.applyKind != ApplyKind .Using && pt.args.nonEmpty then
133
133
val rewriteMsg = Message .rewriteNotice(" This code" , mversion.patchFrom)
134
134
report.errorOrMigrationWarning(
135
- em " Implicit parameters should be provided with a `using` clause. $rewriteMsg" ,
135
+ em """ Implicit parameters should be provided with a `using` clause. $rewriteMsg
136
+ |To disable the warning, please use the following option:
137
+ | "-Wconf:msg=Implicit parameters should be provided with a `using` clause:s"
138
+ | """ ,
136
139
pt.args.head.srcPos, mversion)
137
140
if mversion.needsPatch then
138
141
patch(Span (pt.args.head.span.start), " using " )
Original file line number Diff line number Diff line change 3
3
| ^
4
4
| Implicit parameters should be provided with a `using` clause.
5
5
| This code can be rewritten automatically under -rewrite -source 3.7-migration.
6
+ | To disable the warning, please use the following option:
7
+ | "-Wconf:msg=Implicit parameters should be provided with a `using` clause:s"
Original file line number Diff line number Diff line change
1
+ //> using options " -Wconf:msg=Implicit parameters should be provided with a `using` clause:s"
2
+
3
+ def foo (implicit x : Int ) = x
4
+ val _ = foo(1 ) // warn
Original file line number Diff line number Diff line change 3
3
| ^
4
4
| Implicit parameters should be provided with a `using` clause.
5
5
| This code can be rewritten automatically under -rewrite -source 3.7-migration.
6
+ | To disable the warning, please use the following option:
7
+ | "-Wconf:msg=Implicit parameters should be provided with a `using` clause:s"
You can’t perform that action at this time.
0 commit comments