Version 2.17.0-265.0.dev

Merge commit '7bfa7fcea509356d63b8f1b612b2b1fbb67cab5a' into 'dev'
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index a0e3573..830127a 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -3462,27 +3462,29 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String string2)>
+const Template<Message Function(String string, String string2)>
     templateExperimentDisabledInvalidLanguageVersion =
-    const Template<Message Function(String string2)>(
+    const Template<Message Function(String string, String string2)>(
         problemMessageTemplate:
-            r"""This requires the null safety language feature, which requires language version of #string2 or higher.""",
+            r"""This requires the '#string' language feature, which requires language version of #string2 or higher.""",
         withArguments: _withArgumentsExperimentDisabledInvalidLanguageVersion);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String string2)>
+const Code<Message Function(String string, String string2)>
     codeExperimentDisabledInvalidLanguageVersion =
-    const Code<Message Function(String string2)>(
+    const Code<Message Function(String string, String string2)>(
         "ExperimentDisabledInvalidLanguageVersion",
         analyzerCodes: <String>["ParserErrorCode.EXPERIMENT_NOT_ENABLED"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsExperimentDisabledInvalidLanguageVersion(String string2) {
+Message _withArgumentsExperimentDisabledInvalidLanguageVersion(
+    String string, String string2) {
+  if (string.isEmpty) throw 'No string provided';
   if (string2.isEmpty) throw 'No string provided';
   return new Message(codeExperimentDisabledInvalidLanguageVersion,
       problemMessage:
-          """This requires the null safety language feature, which requires language version of ${string2} or higher.""",
-      arguments: {'string2': string2});
+          """This requires the '${string}' language feature, which requires language version of ${string2} or higher.""",
+      arguments: {'string': string, 'string2': string2});
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3518,6 +3520,123 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        String
+            string)> templateExperimentNotEnabledOffByDefault = const Template<
+        Message Function(String string)>(
+    problemMessageTemplate:
+        r"""This requires the experimental '#string' language feature to be enabled.""",
+    correctionMessageTemplate:
+        r"""Try passing the '--enable-experiment=#string' command line option.""",
+    withArguments: _withArgumentsExperimentNotEnabledOffByDefault);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string)>
+    codeExperimentNotEnabledOffByDefault =
+    const Code<Message Function(String string)>(
+        "ExperimentNotEnabledOffByDefault",
+        analyzerCodes: <String>["ParserErrorCode.EXPERIMENT_NOT_ENABLED"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsExperimentNotEnabledOffByDefault(String string) {
+  if (string.isEmpty) throw 'No string provided';
+  return new Message(codeExperimentNotEnabledOffByDefault,
+      problemMessage:
+          """This requires the experimental '${string}' language feature to be enabled.""",
+      correctionMessage: """Try passing the '--enable-experiment=${string}' command line option.""",
+      arguments: {'string': string});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        String
+            string)> templateExperimentOptOutComment = const Template<
+        Message Function(String string)>(
+    problemMessageTemplate:
+        r"""This is the annotation that opts out this library from the '#string' language feature.""",
+    withArguments: _withArgumentsExperimentOptOutComment);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string)> codeExperimentOptOutComment =
+    const Code<Message Function(String string)>("ExperimentOptOutComment",
+        severity: Severity.context);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsExperimentOptOutComment(String string) {
+  if (string.isEmpty) throw 'No string provided';
+  return new Message(codeExperimentOptOutComment,
+      problemMessage:
+          """This is the annotation that opts out this library from the '${string}' language feature.""",
+      arguments: {'string': string});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        String string,
+        String
+            string2)> templateExperimentOptOutExplicit = const Template<
+        Message Function(String string, String string2)>(
+    problemMessageTemplate:
+        r"""The '#string' language feature is disabled for this library.""",
+    correctionMessageTemplate:
+        r"""Try removing the `@dart=` annotation or setting the language version to #string2 or higher.""",
+    withArguments: _withArgumentsExperimentOptOutExplicit);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string, String string2)>
+    codeExperimentOptOutExplicit =
+    const Code<Message Function(String string, String string2)>(
+  "ExperimentOptOutExplicit",
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsExperimentOptOutExplicit(String string, String string2) {
+  if (string.isEmpty) throw 'No string provided';
+  if (string2.isEmpty) throw 'No string provided';
+  return new Message(codeExperimentOptOutExplicit,
+      problemMessage:
+          """The '${string}' language feature is disabled for this library.""",
+      correctionMessage:
+          """Try removing the `@dart=` annotation or setting the language version to ${string2} or higher.""",
+      arguments: {'string': string, 'string2': string2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        String string,
+        String
+            string2)> templateExperimentOptOutImplicit = const Template<
+        Message Function(String string, String string2)>(
+    problemMessageTemplate:
+        r"""The '#string' language feature is disabled for this library.""",
+    correctionMessageTemplate:
+        r"""Try removing the package language version or setting the language version to #string2 or higher.""",
+    withArguments: _withArgumentsExperimentOptOutImplicit);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string, String string2)>
+    codeExperimentOptOutImplicit =
+    const Code<Message Function(String string, String string2)>(
+  "ExperimentOptOutImplicit",
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsExperimentOptOutImplicit(String string, String string2) {
+  if (string.isEmpty) throw 'No string provided';
+  if (string2.isEmpty) throw 'No string provided';
+  return new Message(codeExperimentOptOutImplicit,
+      problemMessage:
+          """The '${string}' language feature is disabled for this library.""",
+      correctionMessage:
+          """Try removing the package language version or setting the language version to ${string2} or higher.""",
+      arguments: {'string': string, 'string2': string2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeExplicitExtensionArgumentMismatch =
     messageExplicitExtensionArgumentMismatch;
 
@@ -8114,72 +8233,6 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Null> codeNonNullableOptOutComment = messageNonNullableOptOutComment;
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const MessageCode messageNonNullableOptOutComment = const MessageCode(
-    "NonNullableOptOutComment",
-    severity: Severity.context,
-    problemMessage:
-        r"""This is the annotation that opts out this library from null safety features.""");
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
-    Message Function(
-        String
-            string)> templateNonNullableOptOutExplicit = const Template<
-        Message Function(String string)>(
-    problemMessageTemplate:
-        r"""Null safety features are disabled for this library.""",
-    correctionMessageTemplate:
-        r"""Try removing the `@dart=` annotation or setting the language version to #string or higher.""",
-    withArguments: _withArgumentsNonNullableOptOutExplicit);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String string)> codeNonNullableOptOutExplicit =
-    const Code<Message Function(String string)>(
-  "NonNullableOptOutExplicit",
-);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsNonNullableOptOutExplicit(String string) {
-  if (string.isEmpty) throw 'No string provided';
-  return new Message(codeNonNullableOptOutExplicit,
-      problemMessage: """Null safety features are disabled for this library.""",
-      correctionMessage:
-          """Try removing the `@dart=` annotation or setting the language version to ${string} or higher.""",
-      arguments: {'string': string});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
-    Message Function(
-        String
-            string)> templateNonNullableOptOutImplicit = const Template<
-        Message Function(String string)>(
-    problemMessageTemplate:
-        r"""Null safety features are disabled for this library.""",
-    correctionMessageTemplate:
-        r"""Try removing the package language version or setting the language version to #string or higher.""",
-    withArguments: _withArgumentsNonNullableOptOutImplicit);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String string)> codeNonNullableOptOutImplicit =
-    const Code<Message Function(String string)>(
-  "NonNullableOptOutImplicit",
-);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsNonNullableOptOutImplicit(String string) {
-  if (string.isEmpty) throw 'No string provided';
-  return new Message(codeNonNullableOptOutImplicit,
-      problemMessage: """Null safety features are disabled for this library.""",
-      correctionMessage:
-          """Try removing the package language version or setting the language version to ${string} or higher.""",
-      arguments: {'string': string});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeNonPartOfDirectiveInPart = messageNonPartOfDirectiveInPart;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -8396,6 +8449,96 @@
         r"""Try moving the '?..' operator to be the first cascade operator in the sequence.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(String string2)>
+    templateNullSafetyDisabledInvalidLanguageVersion =
+    const Template<Message Function(String string2)>(
+        problemMessageTemplate:
+            r"""This requires the null safety language feature, which requires language version of #string2 or higher.""",
+        withArguments: _withArgumentsNullSafetyDisabledInvalidLanguageVersion);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string2)>
+    codeNullSafetyDisabledInvalidLanguageVersion =
+    const Code<Message Function(String string2)>(
+        "NullSafetyDisabledInvalidLanguageVersion",
+        analyzerCodes: <String>["ParserErrorCode.EXPERIMENT_NOT_ENABLED"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsNullSafetyDisabledInvalidLanguageVersion(String string2) {
+  if (string2.isEmpty) throw 'No string provided';
+  return new Message(codeNullSafetyDisabledInvalidLanguageVersion,
+      problemMessage:
+          """This requires the null safety language feature, which requires language version of ${string2} or higher.""",
+      arguments: {'string2': string2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeNullSafetyOptOutComment = messageNullSafetyOptOutComment;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageNullSafetyOptOutComment = const MessageCode(
+    "NullSafetyOptOutComment",
+    severity: Severity.context,
+    problemMessage:
+        r"""This is the annotation that opts out this library from null safety features.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        String
+            string)> templateNullSafetyOptOutExplicit = const Template<
+        Message Function(String string)>(
+    problemMessageTemplate:
+        r"""Null safety features are disabled for this library.""",
+    correctionMessageTemplate:
+        r"""Try removing the `@dart=` annotation or setting the language version to #string or higher.""",
+    withArguments: _withArgumentsNullSafetyOptOutExplicit);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string)> codeNullSafetyOptOutExplicit =
+    const Code<Message Function(String string)>(
+  "NullSafetyOptOutExplicit",
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsNullSafetyOptOutExplicit(String string) {
+  if (string.isEmpty) throw 'No string provided';
+  return new Message(codeNullSafetyOptOutExplicit,
+      problemMessage: """Null safety features are disabled for this library.""",
+      correctionMessage:
+          """Try removing the `@dart=` annotation or setting the language version to ${string} or higher.""",
+      arguments: {'string': string});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        String
+            string)> templateNullSafetyOptOutImplicit = const Template<
+        Message Function(String string)>(
+    problemMessageTemplate:
+        r"""Null safety features are disabled for this library.""",
+    correctionMessageTemplate:
+        r"""Try removing the package language version or setting the language version to #string or higher.""",
+    withArguments: _withArgumentsNullSafetyOptOutImplicit);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string)> codeNullSafetyOptOutImplicit =
+    const Code<Message Function(String string)>(
+  "NullSafetyOptOutImplicit",
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsNullSafetyOptOutImplicit(String string) {
+  if (string.isEmpty) throw 'No string provided';
+  return new Message(codeNullSafetyOptOutImplicit,
+      problemMessage: """Null safety features are disabled for this library.""",
+      correctionMessage:
+          """Try removing the package language version or setting the language version to ${string} or higher.""",
+      arguments: {'string': string});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(String name)> templateNullableInterfaceError =
     const Template<Message Function(String name)>(
         problemMessageTemplate:
diff --git a/pkg/front_end/lib/src/api_prototype/experimental_flags.dart b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
index 340761c..2d2a630 100644
--- a/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
+++ b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
@@ -4,8 +4,6 @@
 
 import 'package:kernel/kernel.dart' show Version;
 
-import '../fasta/fasta_codes.dart';
-
 part 'experimental_flags_generated.dart';
 
 /// The set of experiments enabled for SDK and packages.
@@ -262,11 +260,4 @@
   LibraryFeature(ExperimentalFlag flag, this.isSupported, this.enabledVersion,
       this.isEnabled)
       : super(flag);
-
-  // TODO(johnniwinther): We should emit a different message when the
-  // experiment is not released yet. The current message indicates that
-  // changing the sdk version can solve the problem.
-  /// Returns a [Message] for reporting that this feature is not enabled.
-  Message get notEnabledMessage => templateExperimentNotEnabled.withArguments(
-      flag.name, enabledVersion.toText());
 }
diff --git a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
index 6855fda..1c68cb6 100644
--- a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
@@ -269,11 +269,13 @@
     if (_declaration!.isExtension &&
         library is SourceLibraryBuilder &&
         !library.libraryFeatures.extensionTypes.isEnabled) {
-      Message message =
-          library.libraryFeatures.extensionTypes.notEnabledMessage;
       int typeNameLength = nameLength;
       int typeNameOffset = nameOffset;
-      library.addProblem(message, typeNameOffset, typeNameLength, fileUri);
+      Message message = library.reportFeatureNotEnabled(
+          library.libraryFeatures.extensionTypes,
+          fileUri!,
+          typeNameOffset,
+          typeNameLength);
       _declaration = buildInvalidTypeDeclarationBuilder(
           message.withLocation(fileUri!, typeNameOffset, typeNameLength));
     } else if (_declaration!.isTypeVariable) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index b9b2813..af89434 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -7198,8 +7198,11 @@
           ..fileOffset = openAngleBracket.charOffset);
       }
     } else {
-      addProblem(libraryFeatures.constructorTearoffs.notEnabledMessage,
-          openAngleBracket.charOffset, noLength);
+      libraryBuilder.reportFeatureNotEnabled(
+          libraryFeatures.constructorTearoffs,
+          uri,
+          openAngleBracket.charOffset,
+          noLength);
     }
   }
 
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 3793ca5..17173a4 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -3076,8 +3076,8 @@
           // For entries that consist of their name only, all of the elements
           // of the constructor reference should be null.
           if (typeArguments != null || suffix != null) {
-            addProblem(libraryFeatures.enhancedEnums.notEnabledMessage,
-                charOffset, noLength);
+            libraryBuilder.reportFeatureNotEnabled(
+                libraryFeatures.enhancedEnums, uri, charOffset, noLength);
           }
           push(NullValue.ConstructorReference);
         }
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 177d445..56607a6 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -317,6 +317,50 @@
       _libraryFeatures ??= new LibraryFeatures(loader.target.globalFeatures,
           _packageUri ?? importUri, languageVersion.version);
 
+  /// Reports that [feature] is not enabled, using [charOffset] and
+  /// [length] for the location of the message.
+  ///
+  /// Return the primary message.
+  Message reportFeatureNotEnabled(
+      LibraryFeature feature, Uri fileUri, int charOffset, int length) {
+    assert(!feature.isEnabled);
+    Message message;
+    if (feature.isSupported) {
+      if (languageVersion.isExplicit) {
+        message = templateExperimentOptOutExplicit.withArguments(
+            feature.flag.name, feature.enabledVersion.toText());
+        addProblem(message, charOffset, length, fileUri,
+            context: <LocatedMessage>[
+              templateExperimentOptOutComment
+                  .withArguments(feature.flag.name)
+                  .withLocation(languageVersion.fileUri!,
+                      languageVersion.charOffset, languageVersion.charCount)
+            ]);
+      } else {
+        message = templateExperimentOptOutImplicit.withArguments(
+            feature.flag.name, feature.enabledVersion.toText());
+        addProblem(message, charOffset, length, fileUri);
+      }
+    } else {
+      if (feature.flag.isEnabledByDefault) {
+        if (languageVersion.version < feature.enabledVersion) {
+          message =
+              templateExperimentDisabledInvalidLanguageVersion.withArguments(
+                  feature.flag.name, feature.enabledVersion.toText());
+          addProblem(message, charOffset, length, fileUri);
+        } else {
+          message = templateExperimentDisabled.withArguments(feature.flag.name);
+          addProblem(message, charOffset, length, fileUri);
+        }
+      } else {
+        message = templateExperimentNotEnabledOffByDefault
+            .withArguments(feature.flag.name);
+        addProblem(message, charOffset, length, fileUri);
+      }
+    }
+    return message;
+  }
+
   void _updateLibraryNNBDSettings() {
     library.isNonNullableByDefault = isNonNullableByDefault;
     switch (loader.nnbdMode) {
diff --git a/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart b/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
index be0fc08..30f281c 100644
--- a/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
+++ b/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
@@ -81,19 +81,19 @@
     if (libraryFeatures.nonNullable.isSupported) {
       if (libraryBuilder.languageVersion.isExplicit) {
         addProblem(
-            templateNonNullableOptOutExplicit.withArguments(
+            templateNullSafetyOptOutExplicit.withArguments(
                 libraryFeatures.nonNullable.enabledVersion.toText()),
             token.charOffset,
             token.charCount,
             context: <LocatedMessage>[
-              messageNonNullableOptOutComment.withLocation(
+              messageNullSafetyOptOutComment.withLocation(
                   libraryBuilder.languageVersion.fileUri!,
                   libraryBuilder.languageVersion.charOffset,
                   libraryBuilder.languageVersion.charCount)
             ]);
       } else {
         addProblem(
-            templateNonNullableOptOutImplicit.withArguments(
+            templateNullSafetyOptOutImplicit.withArguments(
                 libraryFeatures.nonNullable.enabledVersion.toText()),
             token.charOffset,
             token.charCount);
@@ -102,7 +102,7 @@
       if (libraryBuilder.languageVersion.version <
           libraryFeatures.nonNullable.enabledVersion) {
         addProblem(
-            templateExperimentDisabledInvalidLanguageVersion.withArguments(
+            templateNullSafetyDisabledInvalidLanguageVersion.withArguments(
                 libraryFeatures.nonNullable.enabledVersion.toText()),
             token.offset,
             noLength);
@@ -119,7 +119,7 @@
   /// Return `true` if the [feature] is not enabled.
   bool reportIfNotEnabled(LibraryFeature feature, int charOffset, int length) {
     if (!feature.isEnabled) {
-      addProblem(feature.notEnabledMessage, charOffset, length);
+      libraryBuilder.reportFeatureNotEnabled(feature, uri, charOffset, length);
       return true;
     }
     return false;
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 078af67..3d82ad2 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -278,6 +278,11 @@
 ExperimentNotEnabled/example: Fail
 ExperimentNotEnabledNoFlag/example: Fail
 ExperimentNotEnabledNoFlagInvalidLanguageVersion/example: Fail
+ExperimentNotEnabledOffByDefault/example: Fail
+ExperimentOptOutExplicit/analyzerCode: Fail
+ExperimentOptOutExplicit/example: Fail
+ExperimentOptOutImplicit/analyzerCode: Fail
+ExperimentOptOutImplicit/example: Fail
 ExplicitExtensionArgumentMismatch/analyzerCode: Fail
 ExplicitExtensionArgumentMismatch/example: Fail
 ExplicitExtensionAsExpression/analyzerCode: Fail
@@ -678,6 +683,11 @@
 NotBinaryOperator/analyzerCode: Fail
 NotConstantExpression/example: Fail
 NullAwareCascadeOutOfOrder/example: Fail
+NullSafetyDisabledInvalidLanguageVersion/example: Fail
+NullSafetyOptOutExplicit/analyzerCode: Fail
+NullSafetyOptOutExplicit/example: Fail
+NullSafetyOptOutImplicit/analyzerCode: Fail
+NullSafetyOptOutImplicit/example: Fail
 NullableExpressionCallError/analyzerCode: Fail
 NullableExpressionCallError/example: Fail
 NullableExpressionCallWarning/analyzerCode: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index c2b37b6..2e1aa57 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -286,15 +286,24 @@
   correctionMessage: "Try updating your pubspec.yaml to set the minimum SDK constraint to #string2 or higher, and running 'pub get'."
   analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
 
+ExperimentNotEnabledOffByDefault:
+  problemMessage: "This requires the experimental '#string' language feature to be enabled."
+  correctionMessage: "Try passing the '--enable-experiment=#string' command line option."
+  analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
+
 ExperimentDisabled:
   problemMessage: "This requires the '#string' language feature to be enabled."
   correctionMessage: "The feature is on by default but is currently disabled, maybe because the '--enable-experiment=no-#string' command line option is passed."
   analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
 
-ExperimentDisabledInvalidLanguageVersion:
+NullSafetyDisabledInvalidLanguageVersion:
   problemMessage: "This requires the null safety language feature, which requires language version of #string2 or higher."
   analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
 
+ExperimentDisabledInvalidLanguageVersion:
+  problemMessage: "This requires the '#string' language feature, which requires language version of #string2 or higher."
+  analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
+
 EmptyNamedParameterList:
   problemMessage: "Named parameter lists cannot be empty."
   correctionMessage: "Try adding a named parameter to the list."
@@ -5096,18 +5105,30 @@
 FieldNonNullableNotInitializedByConstructorError:
   problemMessage: "This constructor should initialize field '#name' because its type '#type' doesn't allow null."
 
-NonNullableOptOutExplicit:
+NullSafetyOptOutExplicit:
   problemMessage: "Null safety features are disabled for this library."
   correctionMessage: "Try removing the `@dart=` annotation or setting the language version to #string or higher."
 
-NonNullableOptOutImplicit:
+ExperimentOptOutExplicit:
+  problemMessage: "The '#string' language feature is disabled for this library."
+  correctionMessage: "Try removing the `@dart=` annotation or setting the language version to #string2 or higher."
+
+NullSafetyOptOutImplicit:
   problemMessage: "Null safety features are disabled for this library."
   correctionMessage: "Try removing the package language version or setting the language version to #string or higher."
 
-NonNullableOptOutComment:
+NullSafetyOptOutComment:
   problemMessage: "This is the annotation that opts out this library from null safety features."
   severity: CONTEXT
 
+ExperimentOptOutImplicit:
+  problemMessage: "The '#string' language feature is disabled for this library."
+  correctionMessage: "Try removing the package language version or setting the language version to #string2 or higher."
+
+ExperimentOptOutComment:
+  problemMessage: "This is the annotation that opts out this library from the '#string' language feature."
+  severity: CONTEXT
+
 AwaitInLateLocalInitializer:
   problemMessage: "`await` expressions are not supported in late local initializers."
 
diff --git a/pkg/front_end/test/extensions/data/use_as_type.dart b/pkg/front_end/test/extensions/data/use_as_type.dart
index 791e6cc..824d8f1 100644
--- a/pkg/front_end/test/extensions/data/use_as_type.dart
+++ b/pkg/front_end/test/extensions/data/use_as_type.dart
@@ -34,19 +34,19 @@
 extension B2<T> on B1<T> {}
 
 main() {
-  /*error: errors=[This requires the 'extension-types' language feature to be enabled.]*/
+  /*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/
   A2 var1;
-  /*error: errors=[This requires the 'extension-types' language feature to be enabled.]*/
+  /*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/
   B2<A1> var2;
-  B1</*error: errors=[This requires the 'extension-types' language feature to be enabled.]*/A2> var3;
+  B1</*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/A2> var3;
 }
 
-/*error: errors=[This requires the 'extension-types' language feature to be enabled.]*/
+/*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/
 A2 method1() => null;
 
 // TODO(johnniwinther): We should report an error on the number of type
 // arguments here.
-/*error: errors=[This requires the 'extension-types' language feature to be enabled.]*/
+/*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/
 B2<A1> method2() => null;
 
-B1</*error: errors=[This requires the 'extension-types' language feature to be enabled.]*/A2> method3() => null;
+B1</*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/A2> method3() => null;
diff --git a/pkg/front_end/testcases/general/constants/issue46925.dart.weak.expect b/pkg/front_end/testcases/general/constants/issue46925.dart.weak.expect
index 86587cd..0954a14 100644
--- a/pkg/front_end/testcases/general/constants/issue46925.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/issue46925.dart.weak.expect
@@ -2,47 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:14:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:14:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v1 = MyClass<String>.new;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v1 = MyClass<String>.new;
 //                              ^^^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: Member not found: 'new'.
 //   const v1 = MyClass<String>.new;
 //                              ^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:15:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:15:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v2 = MyClass<int>.constr;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:15:27: Error: Member not found: 'constr'.
 //   const v2 = MyClass<int>.constr;
 //                           ^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:16:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:16:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v3 = MyClass<int>.new;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v3 = MyClass<int>.new;
 //                           ^^^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: Member not found: 'new'.
 //   const v3 = MyClass<int>.new;
 //                           ^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:17:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:17:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v4 = MyClass<String>.constr;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:17:30: Error: Member not found: 'constr'.
 //   const v4 = MyClass<String>.constr;
diff --git a/pkg/front_end/testcases/general/constants/issue46925.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/issue46925.dart.weak.modular.expect
index 86587cd..0954a14 100644
--- a/pkg/front_end/testcases/general/constants/issue46925.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/issue46925.dart.weak.modular.expect
@@ -2,47 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:14:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:14:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v1 = MyClass<String>.new;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v1 = MyClass<String>.new;
 //                              ^^^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: Member not found: 'new'.
 //   const v1 = MyClass<String>.new;
 //                              ^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:15:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:15:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v2 = MyClass<int>.constr;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:15:27: Error: Member not found: 'constr'.
 //   const v2 = MyClass<int>.constr;
 //                           ^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:16:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:16:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v3 = MyClass<int>.new;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v3 = MyClass<int>.new;
 //                           ^^^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: Member not found: 'new'.
 //   const v3 = MyClass<int>.new;
 //                           ^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:17:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:17:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v4 = MyClass<String>.constr;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:17:30: Error: Member not found: 'constr'.
 //   const v4 = MyClass<String>.constr;
diff --git a/pkg/front_end/testcases/general/constants/issue46925.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/issue46925.dart.weak.transformed.expect
index 86587cd..0954a14 100644
--- a/pkg/front_end/testcases/general/constants/issue46925.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/issue46925.dart.weak.transformed.expect
@@ -2,47 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:14:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:14:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v1 = MyClass<String>.new;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v1 = MyClass<String>.new;
 //                              ^^^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:14:30: Error: Member not found: 'new'.
 //   const v1 = MyClass<String>.new;
 //                              ^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:15:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:15:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v2 = MyClass<int>.constr;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:15:27: Error: Member not found: 'constr'.
 //   const v2 = MyClass<int>.constr;
 //                           ^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:16:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:16:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v3 = MyClass<int>.new;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v3 = MyClass<int>.new;
 //                           ^^^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:16:27: Error: Member not found: 'new'.
 //   const v3 = MyClass<int>.new;
 //                           ^^^
 //
-// pkg/front_end/testcases/general/constants/issue46925.dart:17:21: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/constants/issue46925.dart:17:21: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const v4 = MyClass<String>.constr;
 //                     ^
+// pkg/front_end/testcases/general/constants/issue46925.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/constants/issue46925.dart:17:30: Error: Member not found: 'constr'.
 //   const v4 = MyClass<String>.constr;
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect
index 05dcdaa..8e9198b 100644
--- a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:15:12: Error: A comparison expression can't be an operand of another comparison expression.
 // Try putting parentheses around one of the comparisons.
@@ -34,33 +37,45 @@
 //   Class<int><int>();
 //                    ^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
 //   Class<int>.named;
 //              ^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>;
 //                   ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:19:14: Error: Member not found: 'named'.
 //   Class<int>.named<int>;
 //              ^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>();
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:20:14: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -94,10 +109,13 @@
 //   Class<int><int>.named<int>;
 //                  ^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:24: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:24: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int><int>.named<int>;
 //                        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
 // Try putting parentheses around one of the comparisons.
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.modular.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.modular.expect
index 05dcdaa..8e9198b 100644
--- a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.modular.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:15:12: Error: A comparison expression can't be an operand of another comparison expression.
 // Try putting parentheses around one of the comparisons.
@@ -34,33 +37,45 @@
 //   Class<int><int>();
 //                    ^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
 //   Class<int>.named;
 //              ^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>;
 //                   ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:19:14: Error: Member not found: 'named'.
 //   Class<int>.named<int>;
 //              ^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>();
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:20:14: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -94,10 +109,13 @@
 //   Class<int><int>.named<int>;
 //                  ^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:24: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:24: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int><int>.named<int>;
 //                        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
 // Try putting parentheses around one of the comparisons.
diff --git a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect
index 0717dcf..db4e4b7 100644
--- a/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/duplicate_instantiation.dart.weak.transformed.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:13:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:15:12: Error: A comparison expression can't be an operand of another comparison expression.
 // Try putting parentheses around one of the comparisons.
@@ -34,33 +37,45 @@
 //   Class<int><int>();
 //                    ^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:17:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:17:14: Error: Member not found: 'named'.
 //   Class<int>.named;
 //              ^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>;
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:19:19: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>;
 //                   ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:19:14: Error: Member not found: 'named'.
 //   Class<int>.named<int>;
 //              ^^^^^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:20:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int>.named<int>();
 //        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:20:14: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -94,10 +109,13 @@
 //   Class<int><int>.named<int>;
 //                  ^
 //
-// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:24: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:23:24: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   Class<int><int>.named<int>;
 //                        ^
+// pkg/front_end/testcases/general/duplicate_instantiation.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/duplicate_instantiation.dart:24:12: Error: A comparison expression can't be an operand of another comparison expression.
 // Try putting parentheses around one of the comparisons.
diff --git a/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.expect b/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.expect
index 4c629c8..792b410 100644
--- a/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.expect
+++ b/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.expect
@@ -2,19 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   A() : super();
 //   ^
+// pkg/front_end/testcases/general/enum_super_constructor.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: Generative enum constructors must be marked as 'const'.
 //   A() : super();
 //   ^
 //
-// pkg/front_end/testcases/general/enum_super_constructor.dart:14:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/enum_super_constructor.dart:14:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   const B() : super();
 //   ^
+// pkg/front_end/testcases/general/enum_super_constructor.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers.
 //   const B() : super();
diff --git a/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.modular.expect b/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.modular.expect
index 4c629c8..792b410 100644
--- a/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.modular.expect
@@ -2,19 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   A() : super();
 //   ^
+// pkg/front_end/testcases/general/enum_super_constructor.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: Generative enum constructors must be marked as 'const'.
 //   A() : super();
 //   ^
 //
-// pkg/front_end/testcases/general/enum_super_constructor.dart:14:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/enum_super_constructor.dart:14:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   const B() : super();
 //   ^
+// pkg/front_end/testcases/general/enum_super_constructor.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers.
 //   const B() : super();
diff --git a/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.outline.expect b/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.outline.expect
index ce1a0f0..2c1f516 100644
--- a/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.outline.expect
@@ -2,19 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   A() : super();
 //   ^
+// pkg/front_end/testcases/general/enum_super_constructor.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: Generative enum constructors must be marked as 'const'.
 //   A() : super();
 //   ^
 //
-// pkg/front_end/testcases/general/enum_super_constructor.dart:14:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/enum_super_constructor.dart:14:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   const B() : super();
 //   ^
+// pkg/front_end/testcases/general/enum_super_constructor.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers.
 //   const B() : super();
diff --git a/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.transformed.expect b/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.transformed.expect
index 4c629c8..792b410 100644
--- a/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/enum_super_constructor.dart.weak.transformed.expect
@@ -2,19 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   A() : super();
 //   ^
+// pkg/front_end/testcases/general/enum_super_constructor.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/enum_super_constructor.dart:9:3: Error: Generative enum constructors must be marked as 'const'.
 //   A() : super();
 //   ^
 //
-// pkg/front_end/testcases/general/enum_super_constructor.dart:14:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/enum_super_constructor.dart:14:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   const B() : super();
 //   ^
+// pkg/front_end/testcases/general/enum_super_constructor.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers.
 //   const B() : super();
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.expect
index 2777d14..309a3aa 100644
--- a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.expect
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.expect
@@ -2,8 +2,8 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the 'extension-types' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the experimental 'extension-types' language feature to be enabled.
+// Try passing the '--enable-experiment=extension-types' command line option.
 // test(E e) {} // Error.
 //      ^
 //
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.modular.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.modular.expect
index 2777d14..309a3aa 100644
--- a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.modular.expect
@@ -2,8 +2,8 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the 'extension-types' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the experimental 'extension-types' language feature to be enabled.
+// Try passing the '--enable-experiment=extension-types' command line option.
 // test(E e) {} // Error.
 //      ^
 //
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.outline.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.outline.expect
index 05bcb32..13024a4 100644
--- a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.outline.expect
@@ -2,8 +2,8 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the 'extension-types' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the experimental 'extension-types' language feature to be enabled.
+// Try passing the '--enable-experiment=extension-types' command line option.
 // test(E e) {} // Error.
 //      ^
 //
diff --git a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.transformed.expect b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.transformed.expect
index 2777d14..309a3aa 100644
--- a/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart.weak.transformed.expect
@@ -2,8 +2,8 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the 'extension-types' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/extension_type_when_experiment_not_enabled.dart:11:6: Error: This requires the experimental 'extension-types' language feature to be enabled.
+// Try passing the '--enable-experiment=extension-types' command line option.
 // test(E e) {} // Error.
 //      ^
 //
diff --git a/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.expect b/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.expect
index 1fcab84f..aa67aa6 100644
--- a/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.expect
+++ b/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.expect
@@ -2,8 +2,8 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart:9:11: Error: This requires the 'extension-types' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart:9:11: Error: This requires the experimental 'extension-types' language feature to be enabled.
+// Try passing the '--enable-experiment=extension-types' command line option.
 // extension type E on A {} // Error because of 'type'.
 //           ^^^^
 //
diff --git a/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.modular.expect b/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.modular.expect
index 1fcab84f..aa67aa6 100644
--- a/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.modular.expect
@@ -2,8 +2,8 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart:9:11: Error: This requires the 'extension-types' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart:9:11: Error: This requires the experimental 'extension-types' language feature to be enabled.
+// Try passing the '--enable-experiment=extension-types' command line option.
 // extension type E on A {} // Error because of 'type'.
 //           ^^^^
 //
diff --git a/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.outline.expect b/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.outline.expect
index 9141057..74e110e 100644
--- a/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.outline.expect
@@ -2,8 +2,8 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart:9:11: Error: This requires the 'extension-types' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart:9:11: Error: This requires the experimental 'extension-types' language feature to be enabled.
+// Try passing the '--enable-experiment=extension-types' command line option.
 // extension type E on A {} // Error because of 'type'.
 //           ^^^^
 //
diff --git a/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.transformed.expect b/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.transformed.expect
index 1fcab84f..aa67aa6 100644
--- a/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart.weak.transformed.expect
@@ -2,8 +2,8 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart:9:11: Error: This requires the 'extension-types' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/extension_types_feature_not_enabled.dart:9:11: Error: This requires the experimental 'extension-types' language feature to be enabled.
+// Try passing the '--enable-experiment=extension-types' command line option.
 // extension type E on A {} // Error because of 'type'.
 //           ^^^^
 //
diff --git a/pkg/front_end/testcases/general/issue46719.dart.weak.expect b/pkg/front_end/testcases/general/issue46719.dart.weak.expect
index 449b259..3fb8261 100644
--- a/pkg/front_end/testcases/general/issue46719.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue46719.dart.weak.expect
@@ -26,24 +26,33 @@
 //   self.m<String>.applyAndPrint(['three']);
 //                  ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:33:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:33:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   self.A.n<int>.applyAndPrint([2]);
 //           ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:34:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:34:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   self.A.n<String>.applyAndPrint(['three']);
 //           ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/issue46719.dart:35:5: Error: Member not found: 'named'.
 //   A.named.toString();
 //     ^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:36:4: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:36:4: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   A<int>.named.toString();
 //    ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/issue46719.dart:36:10: Error: Member not found: 'named'.
 //   A<int>.named.toString();
diff --git a/pkg/front_end/testcases/general/issue46719.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue46719.dart.weak.modular.expect
index 449b259..3fb8261 100644
--- a/pkg/front_end/testcases/general/issue46719.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/issue46719.dart.weak.modular.expect
@@ -26,24 +26,33 @@
 //   self.m<String>.applyAndPrint(['three']);
 //                  ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:33:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:33:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   self.A.n<int>.applyAndPrint([2]);
 //           ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:34:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:34:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   self.A.n<String>.applyAndPrint(['three']);
 //           ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/issue46719.dart:35:5: Error: Member not found: 'named'.
 //   A.named.toString();
 //     ^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:36:4: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:36:4: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   A<int>.named.toString();
 //    ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/issue46719.dart:36:10: Error: Member not found: 'named'.
 //   A<int>.named.toString();
diff --git a/pkg/front_end/testcases/general/issue46719.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue46719.dart.weak.transformed.expect
index 68480b5..f46b021 100644
--- a/pkg/front_end/testcases/general/issue46719.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue46719.dart.weak.transformed.expect
@@ -26,24 +26,33 @@
 //   self.m<String>.applyAndPrint(['three']);
 //                  ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:33:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:33:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   self.A.n<int>.applyAndPrint([2]);
 //           ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:34:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:34:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   self.A.n<String>.applyAndPrint(['three']);
 //           ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/issue46719.dart:35:5: Error: Member not found: 'named'.
 //   A.named.toString();
 //     ^^^^^
 //
-// pkg/front_end/testcases/general/issue46719.dart:36:4: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue46719.dart:36:4: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   A<int>.named.toString();
 //    ^
+// pkg/front_end/testcases/general/issue46719.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/issue46719.dart:36:10: Error: Member not found: 'named'.
 //   A<int>.named.toString();
diff --git a/pkg/front_end/testcases/general/issue48487.dart.weak.expect b/pkg/front_end/testcases/general/issue48487.dart.weak.expect
index 565652d..9b35946 100644
--- a/pkg/front_end/testcases/general/issue48487.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue48487.dart.weak.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/issue48487.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue48487.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   void test() {
 //   ^
+// pkg/front_end/testcases/general/issue48487.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue48487.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue48487.dart.weak.modular.expect
index 565652d..9b35946 100644
--- a/pkg/front_end/testcases/general/issue48487.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/issue48487.dart.weak.modular.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/issue48487.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue48487.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   void test() {
 //   ^
+// pkg/front_end/testcases/general/issue48487.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue48487.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue48487.dart.weak.outline.expect
index cbcf888..56e3e53 100644
--- a/pkg/front_end/testcases/general/issue48487.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue48487.dart.weak.outline.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/issue48487.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue48487.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   void test() {
 //   ^
+// pkg/front_end/testcases/general/issue48487.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue48487.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue48487.dart.weak.transformed.expect
index 565652d..9b35946 100644
--- a/pkg/front_end/testcases/general/issue48487.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue48487.dart.weak.transformed.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/issue48487.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue48487.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   void test() {
 //   ^
+// pkg/front_end/testcases/general/issue48487.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue48487b.dart.weak.expect b/pkg/front_end/testcases/general/issue48487b.dart.weak.expect
index 050d4dd..444b382 100644
--- a/pkg/front_end/testcases/general/issue48487b.dart.weak.expect
+++ b/pkg/front_end/testcases/general/issue48487b.dart.weak.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/issue48487b.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue48487b.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   const T.named();
 //   ^
+// pkg/front_end/testcases/general/issue48487b.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue48487b.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue48487b.dart.weak.modular.expect
index 050d4dd..444b382 100644
--- a/pkg/front_end/testcases/general/issue48487b.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/issue48487b.dart.weak.modular.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/issue48487b.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue48487b.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   const T.named();
 //   ^
+// pkg/front_end/testcases/general/issue48487b.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue48487b.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue48487b.dart.weak.outline.expect
index ef043fd..5c0a1c4 100644
--- a/pkg/front_end/testcases/general/issue48487b.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/issue48487b.dart.weak.outline.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/issue48487b.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue48487b.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   const T.named();
 //   ^
+// pkg/front_end/testcases/general/issue48487b.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue48487b.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue48487b.dart.weak.transformed.expect
index 050d4dd..444b382 100644
--- a/pkg/front_end/testcases/general/issue48487b.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue48487b.dart.weak.transformed.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/issue48487b.dart:9:3: Error: This requires the 'enhanced-enums' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/issue48487b.dart:9:3: Error: The 'enhanced-enums' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   const T.named();
 //   ^
+// pkg/front_end/testcases/general/issue48487b.dart:5:1: Context: This is the annotation that opts out this library from the 'enhanced-enums' language feature.
+// // @dart=2.16
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/macro_class.dart.weak.expect b/pkg/front_end/testcases/general/macro_class.dart.weak.expect
index 11f0500..59758e9 100644
--- a/pkg/front_end/testcases/general/macro_class.dart.weak.expect
+++ b/pkg/front_end/testcases/general/macro_class.dart.weak.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/macro_class.dart:8:1: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:8:1: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // macro class Class1 {}
 // ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:9:10: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:9:10: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // abstract macro class Class2 {}
 //          ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:10:7: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:10:7: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // macro class Class3 = Super with Mixin;
 //       ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:11:16: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:11:16: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // abstract macro class Class4 = Super with Mixin;
 //                ^^^^^
 //
diff --git a/pkg/front_end/testcases/general/macro_class.dart.weak.modular.expect b/pkg/front_end/testcases/general/macro_class.dart.weak.modular.expect
index 11f0500..59758e9 100644
--- a/pkg/front_end/testcases/general/macro_class.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/macro_class.dart.weak.modular.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/macro_class.dart:8:1: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:8:1: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // macro class Class1 {}
 // ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:9:10: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:9:10: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // abstract macro class Class2 {}
 //          ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:10:7: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:10:7: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // macro class Class3 = Super with Mixin;
 //       ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:11:16: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:11:16: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // abstract macro class Class4 = Super with Mixin;
 //                ^^^^^
 //
diff --git a/pkg/front_end/testcases/general/macro_class.dart.weak.outline.expect b/pkg/front_end/testcases/general/macro_class.dart.weak.outline.expect
index 96f69a5..f9bd2c2 100644
--- a/pkg/front_end/testcases/general/macro_class.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/macro_class.dart.weak.outline.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/macro_class.dart:8:1: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:8:1: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // macro class Class1 {}
 // ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:9:10: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:9:10: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // abstract macro class Class2 {}
 //          ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:10:7: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:10:7: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // macro class Class3 = Super with Mixin;
 //       ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:11:16: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:11:16: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // abstract macro class Class4 = Super with Mixin;
 //                ^^^^^
 //
diff --git a/pkg/front_end/testcases/general/macro_class.dart.weak.transformed.expect b/pkg/front_end/testcases/general/macro_class.dart.weak.transformed.expect
index 248efad..f8d864b 100644
--- a/pkg/front_end/testcases/general/macro_class.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/macro_class.dart.weak.transformed.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/macro_class.dart:8:1: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:8:1: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // macro class Class1 {}
 // ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:9:10: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:9:10: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // abstract macro class Class2 {}
 //          ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:10:7: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:10:7: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // macro class Class3 = Super with Mixin;
 //       ^^^^^
 //
-// pkg/front_end/testcases/general/macro_class.dart:11:16: Error: This requires the 'macros' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/macro_class.dart:11:16: Error: This requires the experimental 'macros' language feature to be enabled.
+// Try passing the '--enable-experiment=macros' command line option.
 // abstract macro class Class4 = Super with Mixin;
 //                ^^^^^
 //
diff --git a/pkg/front_end/testcases/general/new_as_selector.dart.weak.expect b/pkg/front_end/testcases/general/new_as_selector.dart.weak.expect
index 01083e9..45d5195 100644
--- a/pkg/front_end/testcases/general/new_as_selector.dart.weak.expect
+++ b/pkg/front_end/testcases/general/new_as_selector.dart.weak.expect
@@ -12,211 +12,322 @@
 //   int new = 42; // error
 //       ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:19:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:19:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C() : super.new(); // error
 //               ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:20:20: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:20:20: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.named() : this.new(); // error
 //                    ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:31:16: Error: 'new' can't be used as an identifier because it's a keyword.
 // Try renaming this to be an identifier that isn't a keyword.
 //   external int new; // error
 //                ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:23:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:23:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new; // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:24:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:24:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new(); // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:25:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:25:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new<int>(); // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:26:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:26:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new = 87; // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:39:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:39:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:40:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:40:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:41:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:41:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new = 87; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:43:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:43:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   c.new; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:44:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:44:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   c.new = 87; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:46:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:46:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new; // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:47:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:47:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new(); // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:48:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:48:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new<int>(); // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:49:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:49:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:50:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:50:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:51:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:51:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:52:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:52:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:53:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:53:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:54:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:54:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:55:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:55:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new; // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:56:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:56:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new(); // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:57:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:57:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new<int>(); // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:58:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:58:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:59:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:59:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:60:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:60:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new<int>(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:61:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:61:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new; // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:62:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:62:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new(); // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:63:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:63:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new<int>(); // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:64:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:64:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:65:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:65:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:66:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:66:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:67:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:67:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new; // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:67:3: Error: Undefined name 'unresolved'.
 //   unresolved.new; // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:68:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:68:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new(); // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:68:3: Error: Undefined name 'unresolved'.
 //   unresolved.new(); // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:69:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:69:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new<int>(); // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:69:3: Error: Undefined name 'unresolved'.
 //   unresolved.new<int>(); // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.new; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: Member not found: 'new'.
 //   C.new; // error
 //     ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:71:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:71:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.new(); // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/new_as_selector.dart.weak.modular.expect b/pkg/front_end/testcases/general/new_as_selector.dart.weak.modular.expect
index 01083e9..45d5195 100644
--- a/pkg/front_end/testcases/general/new_as_selector.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/new_as_selector.dart.weak.modular.expect
@@ -12,211 +12,322 @@
 //   int new = 42; // error
 //       ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:19:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:19:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C() : super.new(); // error
 //               ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:20:20: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:20:20: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.named() : this.new(); // error
 //                    ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:31:16: Error: 'new' can't be used as an identifier because it's a keyword.
 // Try renaming this to be an identifier that isn't a keyword.
 //   external int new; // error
 //                ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:23:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:23:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new; // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:24:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:24:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new(); // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:25:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:25:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new<int>(); // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:26:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:26:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new = 87; // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:39:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:39:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:40:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:40:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:41:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:41:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new = 87; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:43:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:43:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   c.new; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:44:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:44:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   c.new = 87; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:46:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:46:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new; // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:47:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:47:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new(); // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:48:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:48:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new<int>(); // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:49:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:49:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:50:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:50:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:51:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:51:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:52:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:52:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:53:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:53:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:54:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:54:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:55:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:55:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new; // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:56:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:56:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new(); // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:57:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:57:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new<int>(); // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:58:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:58:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:59:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:59:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:60:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:60:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new<int>(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:61:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:61:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new; // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:62:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:62:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new(); // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:63:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:63:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new<int>(); // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:64:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:64:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:65:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:65:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:66:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:66:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:67:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:67:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new; // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:67:3: Error: Undefined name 'unresolved'.
 //   unresolved.new; // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:68:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:68:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new(); // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:68:3: Error: Undefined name 'unresolved'.
 //   unresolved.new(); // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:69:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:69:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new<int>(); // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:69:3: Error: Undefined name 'unresolved'.
 //   unresolved.new<int>(); // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.new; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: Member not found: 'new'.
 //   C.new; // error
 //     ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:71:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:71:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.new(); // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/new_as_selector.dart.weak.outline.expect b/pkg/front_end/testcases/general/new_as_selector.dart.weak.outline.expect
index 6772b34..2524607 100644
--- a/pkg/front_end/testcases/general/new_as_selector.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/new_as_selector.dart.weak.outline.expect
@@ -12,15 +12,21 @@
 //   int new = 42; // error
 //       ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:19:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:19:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C() : super.new(); // error
 //               ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:20:20: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:20:20: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.named() : this.new(); // error
 //                    ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:31:16: Error: 'new' can't be used as an identifier because it's a keyword.
 // Try renaming this to be an identifier that isn't a keyword.
diff --git a/pkg/front_end/testcases/general/new_as_selector.dart.weak.transformed.expect b/pkg/front_end/testcases/general/new_as_selector.dart.weak.transformed.expect
index 0ecdf2a..b831757 100644
--- a/pkg/front_end/testcases/general/new_as_selector.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/new_as_selector.dart.weak.transformed.expect
@@ -12,211 +12,322 @@
 //   int new = 42; // error
 //       ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:19:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:19:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C() : super.new(); // error
 //               ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:20:20: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:20:20: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.named() : this.new(); // error
 //                    ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:31:16: Error: 'new' can't be used as an identifier because it's a keyword.
 // Try renaming this to be an identifier that isn't a keyword.
 //   external int new; // error
 //                ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:23:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:23:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new; // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:24:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:24:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new(); // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:25:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:25:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new<int>(); // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:26:10: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:26:10: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //     this.new = 87; // error
 //          ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:39:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:39:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:40:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:40:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:41:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:41:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   new C().new = 87; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:43:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:43:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   c.new; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:44:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:44:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   c.new = 87; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:46:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:46:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new; // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:47:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:47:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new(); // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:48:7: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:48:7: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo.new<int>(); // error
 //       ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:49:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:49:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:50:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:50:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:51:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:51:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo?.new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:52:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:52:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:53:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:53:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:54:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:54:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   foo..new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:55:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:55:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new; // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:56:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:56:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new(); // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:57:9: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:57:9: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   (foo).new<int>(); // error
 //         ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:58:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:58:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new; // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:59:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:59:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:60:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:60:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix1.new<int>(); // error
 //           ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:61:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:61:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new; // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:62:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:62:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new(); // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:63:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:63:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   prefix2.c.new<int>(); // error
 //             ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:64:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:64:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new; // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:65:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:65:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:66:8: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:66:8: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   E(0).new<int>(); // error
 //        ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:67:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:67:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new; // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:67:3: Error: Undefined name 'unresolved'.
 //   unresolved.new; // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:68:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:68:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new(); // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:68:3: Error: Undefined name 'unresolved'.
 //   unresolved.new(); // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:69:14: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:69:14: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   unresolved.new<int>(); // error
 //              ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:69:3: Error: Undefined name 'unresolved'.
 //   unresolved.new<int>(); // error
 //   ^^^^^^^^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.new; // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/general/new_as_selector.dart:70:5: Error: Member not found: 'new'.
 //   C.new; // error
 //     ^^^
 //
-// pkg/front_end/testcases/general/new_as_selector.dart:71:5: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/general/new_as_selector.dart:71:5: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   C.new(); // error
 //     ^^^
+// pkg/front_end/testcases/general/new_as_selector.dart:5:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.14
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
index 14f27fa..cc03693 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // var v = (f<dynamic>)/*@typeArgs=int**/(/*@returnType=int**/() {
 //           ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.modular.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.modular.expect
index 14f27fa..cc03693 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.modular.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // var v = (f<dynamic>)/*@typeArgs=int**/(/*@returnType=int**/() {
 //           ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.outline.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.outline.expect
index 2fae640..a1a2465 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.outline.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // var v = (f<dynamic>)/*@typeArgs=int**/(/*@returnType=int**/() {
 //           ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
index ede8dae..de03af4 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.weak.transformed.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // var v = (f<dynamic>)/*@typeArgs=int**/(/*@returnType=int**/() {
 //           ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
index 1d604ce..9bf3b40 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // var v = (f<int>)/*@typeArgs=int**/(/*@returnType=int**/() {
 //           ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.modular.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.modular.expect
index 1d604ce..9bf3b40 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.modular.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // var v = (f<int>)/*@typeArgs=int**/(/*@returnType=int**/() {
 //           ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.outline.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.outline.expect
index 3275c50..229b708 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.outline.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // var v = (f<int>)/*@typeArgs=int**/(/*@returnType=int**/() {
 //           ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
index 621f372..d7ccceb 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.weak.transformed.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:11: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:11: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // var v = (f<int>)/*@typeArgs=int**/(/*@returnType=int**/() {
 //           ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_31188.dart.weak.expect b/pkg/front_end/testcases/regress/issue_31188.dart.weak.expect
index bc17959..6917875 100644
--- a/pkg/front_end/testcases/regress/issue_31188.dart.weak.expect
+++ b/pkg/front_end/testcases/regress/issue_31188.dart.weak.expect
@@ -22,10 +22,13 @@
 // type T = Map<A, B>
 //                 ^
 //
-// pkg/front_end/testcases/regress/issue_31188.dart:7:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_31188.dart:7:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // type T = Map<A, B>
 //             ^
+// pkg/front_end/testcases/regress/issue_31188.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_31188.dart.weak.modular.expect b/pkg/front_end/testcases/regress/issue_31188.dart.weak.modular.expect
index bc17959..6917875 100644
--- a/pkg/front_end/testcases/regress/issue_31188.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/regress/issue_31188.dart.weak.modular.expect
@@ -22,10 +22,13 @@
 // type T = Map<A, B>
 //                 ^
 //
-// pkg/front_end/testcases/regress/issue_31188.dart:7:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_31188.dart:7:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // type T = Map<A, B>
 //             ^
+// pkg/front_end/testcases/regress/issue_31188.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_31188.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_31188.dart.weak.transformed.expect
index bc17959..6917875 100644
--- a/pkg/front_end/testcases/regress/issue_31188.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_31188.dart.weak.transformed.expect
@@ -22,10 +22,13 @@
 // type T = Map<A, B>
 //                 ^
 //
-// pkg/front_end/testcases/regress/issue_31188.dart:7:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_31188.dart:7:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 // type T = Map<A, B>
 //             ^
+// pkg/front_end/testcases/regress/issue_31188.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect b/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
index cb1b2fd..a31d72a 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.weak.expect
@@ -12,10 +12,13 @@
 //   var c2 = new C.bar<int>();
 //                  ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:20:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:20:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   var c3 = C<String>.bar<int>();
 //             ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:20:22: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -37,10 +40,13 @@
 //   const d2 = const D.foo<int>();
 //                      ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:29:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:29:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const d3 = D<String>.foo<int>();
 //               ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:29:24: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -62,10 +68,13 @@
 //   var e2 = new p.E.bar<int>();
 //                    ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:38:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:38:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   var e3 = p.E<String>.bar<int>();
 //               ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:38:24: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -87,10 +96,13 @@
 //   const f2 = const p.F.foo<int>();
 //                        ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:47:17: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:47:17: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const f3 = p.F<String>.foo<int>();
 //                 ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:47:26: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.weak.modular.expect b/pkg/front_end/testcases/regress/issue_34403.dart.weak.modular.expect
index cb1b2fd..a31d72a 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.weak.modular.expect
@@ -12,10 +12,13 @@
 //   var c2 = new C.bar<int>();
 //                  ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:20:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:20:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   var c3 = C<String>.bar<int>();
 //             ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:20:22: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -37,10 +40,13 @@
 //   const d2 = const D.foo<int>();
 //                      ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:29:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:29:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const d3 = D<String>.foo<int>();
 //               ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:29:24: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -62,10 +68,13 @@
 //   var e2 = new p.E.bar<int>();
 //                    ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:38:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:38:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   var e3 = p.E<String>.bar<int>();
 //               ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:38:24: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -87,10 +96,13 @@
 //   const f2 = const p.F.foo<int>();
 //                        ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:47:17: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:47:17: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const f3 = p.F<String>.foo<int>();
 //                 ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:47:26: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
index cb1b2fd..a31d72a 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.weak.transformed.expect
@@ -12,10 +12,13 @@
 //   var c2 = new C.bar<int>();
 //                  ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:20:13: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:20:13: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   var c3 = C<String>.bar<int>();
 //             ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:20:22: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -37,10 +40,13 @@
 //   const d2 = const D.foo<int>();
 //                      ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:29:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:29:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const d3 = D<String>.foo<int>();
 //               ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:29:24: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -62,10 +68,13 @@
 //   var e2 = new p.E.bar<int>();
 //                    ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:38:15: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:38:15: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   var e3 = p.E<String>.bar<int>();
 //               ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:38:24: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
@@ -87,10 +96,13 @@
 //   const f2 = const p.F.foo<int>();
 //                        ^^^
 //
-// pkg/front_end/testcases/regress/issue_34403.dart:47:17: Error: This requires the 'constructor-tearoffs' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
+// pkg/front_end/testcases/regress/issue_34403.dart:47:17: Error: The 'constructor-tearoffs' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.15 or higher.
 //   const f3 = p.F<String>.foo<int>();
 //                 ^
+// pkg/front_end/testcases/regress/issue_34403.dart:4:1: Context: This is the annotation that opts out this library from the 'constructor-tearoffs' language feature.
+// // @dart=2.9
+// ^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/regress/issue_34403.dart:47:26: Error: A constructor invocation can't have type arguments after the constructor name.
 // Try removing the type arguments or placing them after the class name.
diff --git a/pkg/front_end/testcases/super_parameters/opt_out.dart.strong.expect b/pkg/front_end/testcases/super_parameters/opt_out.dart.strong.expect
index ba9102f..01b7cb5 100644
--- a/pkg/front_end/testcases/super_parameters/opt_out.dart.strong.expect
+++ b/pkg/front_end/testcases/super_parameters/opt_out.dart.strong.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: This requires the 'super-parameters' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: The 'super-parameters' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   B(super.field);
 //     ^^^^^
+// pkg/front_end/testcases/super_parameters/opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'super-parameters' language feature.
+// // @dart=2.15
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/super_parameters/opt_out.dart:14:3: Error: The superclass, 'A', has no unnamed constructor that takes no arguments.
 //   B(super.field);
diff --git a/pkg/front_end/testcases/super_parameters/opt_out.dart.strong.transformed.expect b/pkg/front_end/testcases/super_parameters/opt_out.dart.strong.transformed.expect
index ba9102f..01b7cb5 100644
--- a/pkg/front_end/testcases/super_parameters/opt_out.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/super_parameters/opt_out.dart.strong.transformed.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: This requires the 'super-parameters' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: The 'super-parameters' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   B(super.field);
 //     ^^^^^
+// pkg/front_end/testcases/super_parameters/opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'super-parameters' language feature.
+// // @dart=2.15
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/super_parameters/opt_out.dart:14:3: Error: The superclass, 'A', has no unnamed constructor that takes no arguments.
 //   B(super.field);
diff --git a/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.expect b/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.expect
index ba9102f..01b7cb5 100644
--- a/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.expect
+++ b/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: This requires the 'super-parameters' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: The 'super-parameters' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   B(super.field);
 //     ^^^^^
+// pkg/front_end/testcases/super_parameters/opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'super-parameters' language feature.
+// // @dart=2.15
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/super_parameters/opt_out.dart:14:3: Error: The superclass, 'A', has no unnamed constructor that takes no arguments.
 //   B(super.field);
diff --git a/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.modular.expect b/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.modular.expect
index ba9102f..01b7cb5 100644
--- a/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.modular.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: This requires the 'super-parameters' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: The 'super-parameters' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   B(super.field);
 //     ^^^^^
+// pkg/front_end/testcases/super_parameters/opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'super-parameters' language feature.
+// // @dart=2.15
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/super_parameters/opt_out.dart:14:3: Error: The superclass, 'A', has no unnamed constructor that takes no arguments.
 //   B(super.field);
diff --git a/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.outline.expect b/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.outline.expect
index 7990170..5ee0fad 100644
--- a/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.outline.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: This requires the 'super-parameters' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: The 'super-parameters' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   B(super.field);
 //     ^^^^^
+// pkg/front_end/testcases/super_parameters/opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'super-parameters' language feature.
+// // @dart=2.15
+// ^^^^^^^^^^^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.transformed.expect
index ba9102f..01b7cb5 100644
--- a/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/super_parameters/opt_out.dart.weak.transformed.expect
@@ -2,10 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: This requires the 'super-parameters' language feature to be enabled.
-// Try updating your pubspec.yaml to set the minimum SDK constraint to 2.17 or higher, and running 'pub get'.
+// pkg/front_end/testcases/super_parameters/opt_out.dart:14:5: Error: The 'super-parameters' language feature is disabled for this library.
+// Try removing the `@dart=` annotation or setting the language version to 2.17 or higher.
 //   B(super.field);
 //     ^^^^^
+// pkg/front_end/testcases/super_parameters/opt_out.dart:5:1: Context: This is the annotation that opts out this library from the 'super-parameters' language feature.
+// // @dart=2.15
+// ^^^^^^^^^^^^^
 //
 // pkg/front_end/testcases/super_parameters/opt_out.dart:14:3: Error: The superclass, 'A', has no unnamed constructor that takes no arguments.
 //   B(super.field);
diff --git a/tests/language_2/constructor/reference_test.dart b/tests/language_2/constructor/reference_test.dart
index 738d450..72d1b40 100644
--- a/tests/language_2/constructor/reference_test.dart
+++ b/tests/language_2/constructor/reference_test.dart
@@ -91,7 +91,7 @@
   Foo<int>.bar.baz();
   // ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
-  // [cfe] This requires the 'constructor-tearoffs' language feature to be enabled.
+  // [cfe] The 'constructor-tearoffs' language feature is disabled for this library.
   //       ^
   // [cfe] Member not found: 'bar'.
   //           ^^^
diff --git a/tools/VERSION b/tools/VERSION
index 52b8d5b..40589b0 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 17
 PATCH 0
-PRERELEASE 264
+PRERELEASE 265
 PRERELEASE_PATCH 0
\ No newline at end of file