Skip to content

Fix #10692: Update rewrite help message #10701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ object Parsers {

def rewriteNotice(additionalOption: String = "") = {
val optionStr = if (additionalOption.isEmpty) "" else " " ++ additionalOption
i"\nThis construct can be rewritten automatically under$optionStr -rewrite."
i"\nThis construct can be rewritten automatically under$optionStr -rewrite -source 3.0-migration."
}

def syntaxVersionError(option: String, span: Span) =
Expand Down
2 changes: 1 addition & 1 deletion tests/neg-custom-args/fatal-warnings/i9266.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
3 |def test = { implicit x: Int => x + x } // error
| ^
| This syntax is no longer supported; parameter needs to be enclosed in (...)
| This construct can be rewritten automatically under -rewrite.
| This construct can be rewritten automatically under -rewrite -source 3.0-migration.
2 changes: 1 addition & 1 deletion tests/neg-custom-args/newline-braces.check
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
| This opening brace will start a new statement in Scala 3.
| It needs to be indented to the right to keep being treated as
| an argument to the previous expression.
| This construct can be rewritten automatically under -rewrite.
| This construct can be rewritten automatically under -rewrite -source 3.0-migration.