Skip to content

Commit 6c4e318

Browse files
T-GroCopilotCopilot
authored
Remove always-on language feature flag EscapeDotnetFormattableStrings (#20181) (#20375)
Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d88fc08 commit 6c4e318

17 files changed

Lines changed: 1 addition & 73 deletions

‎src/Compiler/Checking/CheckFormatStrings.fs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ let parseFormatStringInternal
245245
// there are no accurate intra-string ranges available for exact error message locations within the string.
246246
// The 'm' range passed as an input is however accurate and covers the whole string.
247247
//
248-
let escapeFormatStringEnabled = g.langVersion.SupportsFeature Features.LanguageFeature.EscapeDotnetFormattableStrings
249-
250248
let fmt, fragments, delimLen =
251249
match context with
252250
| Some context when fragRanges.Length > 0 ->
@@ -265,7 +263,7 @@ let parseFormatStringInternal
265263
| _ ->
266264
// Don't muck with the fmt when there is no source code context to go get the original
267265
// source code (i.e. when compiling or background checking)
268-
(if escapeFormatStringEnabled then escapeDotnetFormatString fmt else fmt), [ (0, 1, m) ], 1
266+
escapeDotnetFormatString fmt, [ (0, 1, m) ], 1
269267

270268
let len = fmt.Length
271269

‎src/Compiler/FSComp.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,6 @@ reprStateMachineInvalidForm,"The state machine has an unexpected form"
16931693
3548,matchNotAllowedForUnionCaseWithNoData,"Pattern discard is not allowed for union case that takes no data."
16941694
3549,tcSynTypeOrInvalidInDeclaration,"SynType.Or is not permitted in this declaration"
16951695
3550,chkDuplicatedMethodParameter,"Duplicate parameter. The parameter '%s' has been used more that once in this method."
1696-
featureEscapeBracesInFormattableString,"Escapes curly braces before calling FormattableStringFactory.Create when interpolated string literal is typed as FormattableString"
16971696
3551,buildDuplicateFile,"The source file '%s' (at position %d/%d) already appeared in the compilation list (at position %d/%d). Please verify that it is included only once in the project file."
16981697
3552,chkConstructorWithArgumentsOnStaticClasses,"If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Constructor with arguments is not allowed."
16991698
3553,chkAdditionalConstructorOnStaticClasses,"If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Additional constructor is not allowed."

‎src/Compiler/Facilities/LanguageFeatures.fs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ type LanguageFeature =
4141
| MatchNotAllowedForUnionCaseWithNoData
4242
| CSharpExtensionAttributeNotRequired
4343
| ErrorForNonVirtualMembersOverrides
44-
| EscapeDotnetFormattableStrings
4544
| ArithmeticInLiterals
4645
| ErrorReportingOnStaticClasses
4746
| WarningWhenCopyAndUpdateRecordChangesAllFields
@@ -162,7 +161,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
162161
LanguageFeature.MatchNotAllowedForUnionCaseWithNoData, languageVersion80
163162
LanguageFeature.CSharpExtensionAttributeNotRequired, languageVersion80
164163
LanguageFeature.ErrorForNonVirtualMembersOverrides, languageVersion80
165-
LanguageFeature.EscapeDotnetFormattableStrings, languageVersion80
166164
LanguageFeature.ArithmeticInLiterals, languageVersion80
167165
LanguageFeature.ErrorReportingOnStaticClasses, languageVersion80
168166
LanguageFeature.WarningWhenCopyAndUpdateRecordChangesAllFields, languageVersion80
@@ -347,7 +345,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
347345
| LanguageFeature.MatchNotAllowedForUnionCaseWithNoData -> FSComp.SR.featureMatchNotAllowedForUnionCaseWithNoData ()
348346
| LanguageFeature.CSharpExtensionAttributeNotRequired -> FSComp.SR.featureCSharpExtensionAttributeNotRequired ()
349347
| LanguageFeature.ErrorForNonVirtualMembersOverrides -> FSComp.SR.featureErrorForNonVirtualMembersOverrides ()
350-
| LanguageFeature.EscapeDotnetFormattableStrings -> FSComp.SR.featureEscapeBracesInFormattableString ()
351348
| LanguageFeature.ArithmeticInLiterals -> FSComp.SR.featureArithmeticInLiterals ()
352349
| LanguageFeature.ErrorReportingOnStaticClasses -> FSComp.SR.featureErrorReportingOnStaticClasses ()
353350
| LanguageFeature.WarningWhenCopyAndUpdateRecordChangesAllFields ->

‎src/Compiler/Facilities/LanguageFeatures.fsi‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ type LanguageFeature =
3131
| MatchNotAllowedForUnionCaseWithNoData
3232
| CSharpExtensionAttributeNotRequired
3333
| ErrorForNonVirtualMembersOverrides
34-
| EscapeDotnetFormattableStrings
3534
| ArithmeticInLiterals
3635
| ErrorReportingOnStaticClasses
3736
| WarningWhenCopyAndUpdateRecordChangesAllFields

‎src/Compiler/xlf/FSComp.txt.cs.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.de.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.es.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.fr.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.it.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.ja.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)