Просмотр исходного кода

Introduce Diagnostics::ContextScope and remove diagnoser callbacks in type completion (#6761)

Introduces `Context` and `SoftContext` messages, which can be introduced
through a `ContextBuilder`:
- The `Context` messages come before the diagnostic in the output.
- The first `Context` message steals the diagnostic level from the main
diagnostic, and turns the main diagnostic into a Note attached to the
context.
- A `SoftContext` message works similarly, but if it's preceeded by a
`Context` or `SoftContext` message, then it is dropped. This can be used
as a default/backup scope when nothing more interesting is provided up
the stack, such as in `TryEvalBlockForSpecific`.

The `ContextBuilder` is provided to a callback through
`Diagnostics::ContextScope`, an RAII type `AnnotationScope` but for
context messages.

This allows a high level operation to provide a context message like
"failed to identify facet type {0}" which will then be used as the error
if a diagnostic is produced during identification, with the latter
diagnostic attached as a note to explain why the contextual operation
failed.

In particular, this allows monomorphization errors (such as an array
bound being negative) to be attached to a higher lever operation instead
of being top-level diagnostics themselves, with the monomorphization
site being a note. This inverts the source code locations that appear in
the diagnostic, so that the top-level diagnostic points to the "user
code" which causes the monomorphization.

This is presented as an alternative strategy to #6753, which plumbed
diagnoser callbacks around to achieve the same goals.

We replace the diagnoser callbacks in type completion and operators with
ContextScope callbacks instead, which now provide better diagnostics for
monomorphization errors. Other callers to MakeSpecific do not yet have
ContextScopes introduced in order to turn monomorphization errors into
more interesting diagnostics.
Dana Jansens 2 месяцев назад
Родитель
Сommit
fbc8d59d32
100 измененных файлов с 774 добавлено и 818 удалено
  1. 74 76
      toolchain/check/convert.cpp
  2. 1 12
      toolchain/check/cpp/import.cpp
  3. 1 1
      toolchain/check/cpp/import.h
  4. 4 4
      toolchain/check/cpp/operators.cpp
  5. 18 15
      toolchain/check/decl_name_stack.cpp
  6. 4 4
      toolchain/check/diagnostic_helpers.h
  7. 4 3
      toolchain/check/eval.cpp
  8. 16 12
      toolchain/check/eval_inst.cpp
  9. 21 19
      toolchain/check/function.cpp
  10. 35 31
      toolchain/check/handle_binding_pattern.cpp
  11. 26 22
      toolchain/check/handle_class.cpp
  12. 21 16
      toolchain/check/handle_require.cpp
  13. 33 26
      toolchain/check/impl.cpp
  14. 14 6
      toolchain/check/impl_lookup.cpp
  15. 1 1
      toolchain/check/import_ref.cpp
  16. 7 6
      toolchain/check/literal.cpp
  17. 43 39
      toolchain/check/member_access.cpp
  18. 10 4
      toolchain/check/member_access.h
  19. 10 11
      toolchain/check/name_lookup.cpp
  20. 10 7
      toolchain/check/operator.cpp
  21. 23 12
      toolchain/check/operator.h
  22. 1 1
      toolchain/check/testdata/array/basics.carbon
  23. 1 1
      toolchain/check/testdata/array/bound_values.carbon
  24. 3 3
      toolchain/check/testdata/array/element_mismatches.carbon
  25. 3 3
      toolchain/check/testdata/as/adapter_conversion.carbon
  26. 2 2
      toolchain/check/testdata/as/basics.carbon
  27. 2 2
      toolchain/check/testdata/as/const.carbon
  28. 7 7
      toolchain/check/testdata/as/maybe_unformed.carbon
  29. 6 6
      toolchain/check/testdata/as/partial.carbon
  30. 1 1
      toolchain/check/testdata/as/unsafe_as.carbon
  31. 1 1
      toolchain/check/testdata/builtins/int/convert.carbon
  32. 8 8
      toolchain/check/testdata/class/adapter/adapt_copy.carbon
  33. 1 1
      toolchain/check/testdata/class/adapter/convert_incomplete.carbon
  34. 2 2
      toolchain/check/testdata/class/adapter/extend_adapt.carbon
  35. 2 2
      toolchain/check/testdata/class/adapter/fail_adapt_bad_decl.carbon
  36. 4 4
      toolchain/check/testdata/class/adapter/init_adapt.carbon
  37. 2 2
      toolchain/check/testdata/class/derived_to_base.carbon
  38. 0 66
      toolchain/check/testdata/class/fail_abstract.carbon
  39. 5 5
      toolchain/check/testdata/class/fail_base_bad_type.carbon
  40. 1 1
      toolchain/check/testdata/class/fail_compound_type_mismatch.carbon
  41. 2 2
      toolchain/check/testdata/class/fail_derived_to_base.carbon
  42. 1 1
      toolchain/check/testdata/class/fail_init_as_inplace.carbon
  43. 2 2
      toolchain/check/testdata/class/fail_self.carbon
  44. 2 2
      toolchain/check/testdata/class/generic/adapt.carbon
  45. 1 1
      toolchain/check/testdata/class/generic/call.carbon
  46. 32 32
      toolchain/check/testdata/class/generic/complete_in_conversion.carbon
  47. 1 1
      toolchain/check/testdata/class/generic/import.carbon
  48. 3 3
      toolchain/check/testdata/class/generic/stringify.carbon
  49. 1 1
      toolchain/check/testdata/class/partial.carbon
  50. 1 1
      toolchain/check/testdata/class/self.carbon
  51. 6 6
      toolchain/check/testdata/const/basics.carbon
  52. 2 2
      toolchain/check/testdata/deduce/array.carbon
  53. 2 2
      toolchain/check/testdata/deduce/binding_pattern.carbon
  54. 2 2
      toolchain/check/testdata/eval/symbolic.carbon
  55. 4 4
      toolchain/check/testdata/facet/access.carbon
  56. 6 6
      toolchain/check/testdata/facet/period_self.carbon
  57. 4 4
      toolchain/check/testdata/facet/require_satisified.carbon
  58. 2 2
      toolchain/check/testdata/facet/tuple_and_struct_type_literal.carbon
  59. 2 2
      toolchain/check/testdata/facet/tuple_and_struct_type_value.carbon
  60. 1 1
      toolchain/check/testdata/for/pattern.carbon
  61. 1 1
      toolchain/check/testdata/function/call/fail_param_type.carbon
  62. 1 1
      toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon
  63. 1 1
      toolchain/check/testdata/function/generic/fail_type_param_mismatch.carbon
  64. 29 29
      toolchain/check/testdata/function/generic/resolve_used.carbon
  65. 24 24
      toolchain/check/testdata/generic/complete_type.carbon
  66. 20 32
      toolchain/check/testdata/generic/extend_type_completion.carbon
  67. 2 2
      toolchain/check/testdata/generic/fail_generic_copy.carbon
  68. 10 22
      toolchain/check/testdata/generic/identify_specific_facet_type.carbon
  69. 21 21
      toolchain/check/testdata/generic/template/convert.carbon
  70. 55 55
      toolchain/check/testdata/generic/template/member_access.carbon
  71. 1 1
      toolchain/check/testdata/generic/template/unimplemented.carbon
  72. 16 19
      toolchain/check/testdata/impl/assoc_const_self.carbon
  73. 2 2
      toolchain/check/testdata/impl/compound.carbon
  74. 6 6
      toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon
  75. 1 1
      toolchain/check/testdata/impl/fail_impl_bad_interface.carbon
  76. 1 1
      toolchain/check/testdata/impl/fail_impl_bad_type.carbon
  77. 1 1
      toolchain/check/testdata/impl/fail_self_type_mismatch.carbon
  78. 4 4
      toolchain/check/testdata/impl/impl_thunk.carbon
  79. 2 2
      toolchain/check/testdata/impl/import_compound.carbon
  80. 2 2
      toolchain/check/testdata/impl/lookup/fail_function_types.carbon
  81. 1 1
      toolchain/check/testdata/impl/lookup/import_error.carbon
  82. 2 2
      toolchain/check/testdata/impl/lookup/specialization.carbon
  83. 1 1
      toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon
  84. 3 3
      toolchain/check/testdata/impl/use_assoc_entity.carbon
  85. 2 2
      toolchain/check/testdata/impl/using_invalid_interface.carbon
  86. 1 1
      toolchain/check/testdata/index/fail_array_non_int_indexing.carbon
  87. 4 4
      toolchain/check/testdata/interface/compound_member_access.carbon
  88. 1 1
      toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon
  89. 1 1
      toolchain/check/testdata/interface/fail_member_lookup.carbon
  90. 1 1
      toolchain/check/testdata/interface/fail_type_as_facet.carbon
  91. 1 1
      toolchain/check/testdata/interface/require.carbon
  92. 1 1
      toolchain/check/testdata/interop/cpp/builtins.llp64.carbon
  93. 1 1
      toolchain/check/testdata/interop/cpp/builtins.lp64.carbon
  94. 19 19
      toolchain/check/testdata/interop/cpp/class/base.carbon
  95. 1 1
      toolchain/check/testdata/interop/cpp/class/non_aggregate_init.carbon
  96. 20 20
      toolchain/check/testdata/interop/cpp/class/template.carbon
  97. 5 5
      toolchain/check/testdata/interop/cpp/enum/convert.carbon
  98. 2 2
      toolchain/check/testdata/interop/cpp/enum/unscoped.carbon
  99. 1 1
      toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon
  100. 1 1
      toolchain/check/testdata/interop/cpp/function/operators.carbon

+ 74 - 76
toolchain/check/convert.cpp

@@ -25,6 +25,7 @@
 #include "toolchain/check/pattern_match.h"
 #include "toolchain/check/type.h"
 #include "toolchain/check/type_completion.h"
+#include "toolchain/diagnostics/emitter.h"
 #include "toolchain/diagnostics/format_providers.h"
 #include "toolchain/sem_ir/copy_on_write_block.h"
 #include "toolchain/sem_ir/expr_info.h"
@@ -1394,13 +1395,10 @@ static auto PerformCopy(Context& context, SemIR::InstId expr_id,
 
   auto copy_id = BuildUnaryOperator(
       context, SemIR::LocId(expr_id), {.interface_name = CoreIdentifier::Copy},
-      expr_id, [&] {
-        if (!target.diagnose) {
-          return context.emitter().BuildSuppressed();
-        }
-        CARBON_DIAGNOSTIC(CopyOfUncopyableType, Error,
+      expr_id, target.diagnose, [&](auto& builder) {
+        CARBON_DIAGNOSTIC(CopyOfUncopyableType, Context,
                           "cannot copy value of type {0}", TypeOfInstId);
-        return context.emitter().Build(expr_id, CopyOfUncopyableType, expr_id);
+        builder.Context(expr_id, CopyOfUncopyableType, expr_id);
       });
   return copy_id;
 }
@@ -1737,47 +1735,49 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id,
     context.emitter().Emit(expr_id, RefTagNoRefParam);
   }
 
-  // We can only perform initialization for complete, non-abstract types. Note
-  // that `RequireConcreteType` returns true for facet types, since their
+  // We can only perform initialization for complete, non-abstract types.
+  //
+  // TODO: Don't require a concrete type when `!target.is_initializer()`. We
+  // want to allow constructing a value of an abstract class type, but right now
+  // if we proceed into Convert with an abstract target type, we crash.
+  //
+  // Note that we allow conversion to incomplete to facet types, since their
   // representation is fixed. This allows us to support using the `Self` of an
   // interface inside its definition.
-  //
-  // TODO: If `!target.is_initializer()` then we don't want to require the type
-  // to be concrete, only complete. But if we continue into Convert with an
-  // abstract type, we crash elsewhere.
-  if (!RequireConcreteType(
-          context, target.type_id, loc_id,
-          [&] {
-            CARBON_CHECK(!target.is_initializer(),
-                         "Initialization of incomplete types is expected to be "
-                         "caught elsewhere.");
-            if (!target.diagnose) {
-              return context.emitter().BuildSuppressed();
-            }
-            CARBON_DIAGNOSTIC(IncompleteTypeInValueConversion, Error,
-                              "forming value of incomplete type {0}",
-                              SemIR::TypeId);
-            CARBON_DIAGNOSTIC(IncompleteTypeInConversion, Error,
-                              "invalid use of incomplete type {0}",
-                              SemIR::TypeId);
-            return context.emitter().Build(
-                loc_id,
-                target.kind == ConversionTarget::Value
-                    ? IncompleteTypeInValueConversion
-                    : IncompleteTypeInConversion,
-                target.type_id);
-          },
-          [&] {
-            if (!target.diagnose) {
-              return context.emitter().BuildSuppressed();
-            }
-            CARBON_DIAGNOSTIC(AbstractTypeInInit, Error,
-                              "initialization of abstract type {0}",
-                              SemIR::TypeId);
-            return context.emitter().Build(loc_id, AbstractTypeInInit,
-                                           target.type_id);
-          })) {
-    return SemIR::ErrorInst::InstId;
+  if (!context.types().IsFacetType(target.type_id)) {
+    if (target.diagnose) {
+      if (!RequireConcreteType(
+              context, target.type_id, loc_id,
+              [&](auto& builder) {
+                CARBON_CHECK(
+                    !target.is_initializer(),
+                    "Initialization of incomplete types is expected to be "
+                    "caught elsewhere.");
+                CARBON_DIAGNOSTIC(IncompleteTypeInValueConversion, Context,
+                                  "forming value of incomplete type {0}",
+                                  SemIR::TypeId);
+                CARBON_DIAGNOSTIC(IncompleteTypeInConversion, Context,
+                                  "invalid use of incomplete type {0}",
+                                  SemIR::TypeId);
+                builder.Context(loc_id,
+                                target.kind == ConversionTarget::Value
+                                    ? IncompleteTypeInValueConversion
+                                    : IncompleteTypeInConversion,
+                                target.type_id);
+              },
+              [&](auto& builder) {
+                CARBON_DIAGNOSTIC(AbstractTypeInInit, Context,
+                                  "initialization of abstract type {0}",
+                                  SemIR::TypeId);
+                builder.Context(loc_id, AbstractTypeInInit, target.type_id);
+              })) {
+        return SemIR::ErrorInst::InstId;
+      }
+    } else {
+      if (!TryIsConcreteType(context, target.type_id, loc_id)) {
+        return SemIR::ErrorInst::InstId;
+      }
+    }
   }
 
   // Clear storage_id in cases where it's clearly meaningless, to avoid misuse
@@ -1835,37 +1835,35 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id,
         .interface_args_ref = interface_args,
         .op_name = CoreIdentifier::Convert,
     };
-    expr_id = BuildUnaryOperator(context, loc_id, op, expr_id, [&] {
-      if (!target.diagnose) {
-        return context.emitter().BuildSuppressed();
-      }
-      int target_kind_for_diag =
-          target.kind == ConversionTarget::ExplicitAs         ? 1
-          : target.kind == ConversionTarget::ExplicitUnsafeAs ? 2
-                                                              : 0;
-      if (target.type_id == SemIR::TypeType::TypeId ||
-          sem_ir.types().Is<SemIR::FacetType>(target.type_id)) {
-        CARBON_DIAGNOSTIC(
-            ConversionFailureNonTypeToFacet, Error,
-            "cannot{0:=0: implicitly|:} convert non-type value of type {1} "
-            "{2:to|into type implementing} {3}"
-            "{0:=1: with `as`|=2: with `unsafe as`|:}",
-            Diagnostics::IntAsSelect, TypeOfInstId, Diagnostics::BoolAsSelect,
-            SemIR::TypeId);
-        return context.emitter().Build(
-            loc_id, ConversionFailureNonTypeToFacet, target_kind_for_diag,
-            expr_id, target.type_id == SemIR::TypeType::TypeId, target.type_id);
-      } else {
-        CARBON_DIAGNOSTIC(
-            ConversionFailure, Error,
-            "cannot{0:=0: implicitly|:} convert expression of type "
-            "{1} to {2}{0:=1: with `as`|=2: with `unsafe as`|:}",
-            Diagnostics::IntAsSelect, TypeOfInstId, SemIR::TypeId);
-        return context.emitter().Build(loc_id, ConversionFailure,
-                                       target_kind_for_diag, expr_id,
-                                       target.type_id);
-      }
-    });
+    expr_id = BuildUnaryOperator(
+        context, loc_id, op, expr_id, target.diagnose, [&](auto& builder) {
+          int target_kind_for_diag =
+              target.kind == ConversionTarget::ExplicitAs         ? 1
+              : target.kind == ConversionTarget::ExplicitUnsafeAs ? 2
+                                                                  : 0;
+          if (target.type_id == SemIR::TypeType::TypeId ||
+              sem_ir.types().Is<SemIR::FacetType>(target.type_id)) {
+            CARBON_DIAGNOSTIC(
+                ConversionFailureNonTypeToFacet, Context,
+                "cannot{0:=0: implicitly|:} convert non-type value of type {1} "
+                "{2:to|into type implementing} {3}"
+                "{0:=1: with `as`|=2: with `unsafe as`|:}",
+                Diagnostics::IntAsSelect, TypeOfInstId,
+                Diagnostics::BoolAsSelect, SemIR::TypeId);
+            builder.Context(loc_id, ConversionFailureNonTypeToFacet,
+                            target_kind_for_diag, expr_id,
+                            target.type_id == SemIR::TypeType::TypeId,
+                            target.type_id);
+          } else {
+            CARBON_DIAGNOSTIC(
+                ConversionFailure, Context,
+                "cannot{0:=0: implicitly|:} convert expression of type "
+                "{1} to {2}{0:=1: with `as`|=2: with `unsafe as`|:}",
+                Diagnostics::IntAsSelect, TypeOfInstId, SemIR::TypeId);
+            builder.Context(loc_id, ConversionFailure, target_kind_for_diag,
+                            expr_id, target.type_id);
+          }
+        });
 
     // Pull a value directly out of the initializer if possible and wanted.
     if (expr_id != SemIR::ErrorInst::InstId &&

+ 1 - 12
toolchain/check/cpp/import.cpp

@@ -2277,7 +2277,7 @@ auto ImportNameFromCpp(Context& context, SemIR::LocId loc_id,
                                  MapCppAccess(lookup->begin().getPair()));
 }
 
-auto ImportClassDefinitionForClangDecl(Context& context, SemIR::LocId loc_id,
+auto ImportClassDefinitionForClangDecl(Context& context,
                                        SemIR::ClassId class_id,
                                        SemIR::ClangDeclId clang_decl_id)
     -> bool {
@@ -2289,18 +2289,7 @@ auto ImportClassDefinitionForClangDecl(Context& context, SemIR::LocId loc_id,
   auto class_inst_id = context.types().GetAsTypeInstId(
       context.classes().Get(class_id).first_owning_decl_id);
 
-  // TODO: Map loc_id into a clang location and use it for diagnostics if
-  // instantiation fails, instead of annotating the diagnostic with another
-  // location.
   clang::SourceLocation loc = clang_decl->getLocation();
-  Diagnostics::AnnotationScope annotate_diagnostics(
-      &context.emitter(), [&](auto& builder) {
-        CARBON_DIAGNOSTIC(InCppTypeCompletion, Note,
-                          "while completing C++ type {0}", SemIR::TypeId);
-        builder.Note(loc_id, InCppTypeCompletion,
-                     context.classes().Get(class_id).self_type_id);
-      });
-
   // Ask Clang whether the type is complete. This triggers template
   // instantiation if necessary.
   clang::DiagnosticErrorTrap trap(cpp_file->diagnostics());

+ 1 - 1
toolchain/check/cpp/import.h

@@ -71,7 +71,7 @@ auto ImportNameFromCpp(Context& context, SemIR::LocId loc_id,
 // declaration, such as a class or enum, attempt to import a corresponding class
 // definition. Returns true if nothing went wrong (whether or not a definition
 // could be imported), false if a diagnostic was produced.
-auto ImportClassDefinitionForClangDecl(Context& context, SemIR::LocId loc_id,
+auto ImportClassDefinitionForClangDecl(Context& context,
                                        SemIR::ClassId class_id,
                                        SemIR::ClangDeclId clang_decl_id)
     -> bool;

+ 4 - 4
toolchain/check/cpp/operators.cpp

@@ -476,13 +476,13 @@ auto LookupCppOperator(Context& context, SemIR::LocId loc_id, Operator op,
   // Make sure all operands are complete before lookup.
   for (SemIR::InstId arg_id : arg_ids) {
     SemIR::TypeId arg_type_id = context.insts().Get(arg_id).type_id();
-    if (!RequireCompleteType(context, arg_type_id, loc_id, [&] {
+    if (!RequireCompleteType(context, arg_type_id, loc_id, [&](auto& builder) {
           CARBON_DIAGNOSTIC(
-              IncompleteOperandTypeInCppOperatorLookup, Error,
+              IncompleteOperandTypeInCppOperatorLookup, Context,
               "looking up a C++ operator with incomplete operand type {0}",
               SemIR::TypeId);
-          return context.emitter().Build(
-              loc_id, IncompleteOperandTypeInCppOperatorLookup, arg_type_id);
+          builder.Context(loc_id, IncompleteOperandTypeInCppOperatorLookup,
+                          arg_type_id);
         })) {
       return SemIR::ErrorInst::InstId;
     }

+ 18 - 15
toolchain/check/decl_name_stack.cpp

@@ -379,14 +379,15 @@ static auto DiagnoseQualifiedDeclInIncompleteClassScope(Context& context,
                                                         SemIR::LocId loc_id,
                                                         SemIR::ClassId class_id)
     -> void {
-  CARBON_DIAGNOSTIC(QualifiedDeclInIncompleteClassScope, Error,
-                    "cannot declare a member of incomplete class {0}",
-                    SemIR::TypeId);
-  auto builder =
-      context.emitter().Build(loc_id, QualifiedDeclInIncompleteClassScope,
-                              context.classes().Get(class_id).self_type_id);
-  NoteIncompleteClass(context, class_id, builder);
-  builder.Emit();
+  Diagnostics::ContextScope diagnostic_context(
+      &context.emitter(), [&](auto& builder) {
+        CARBON_DIAGNOSTIC(QualifiedDeclInIncompleteClassScope, Context,
+                          "cannot declare a member of incomplete class {0}",
+                          SemIR::TypeId);
+        builder.Context(loc_id, QualifiedDeclInIncompleteClassScope,
+                        context.classes().Get(class_id).self_type_id);
+      });
+  DiagnoseIncompleteClass(context, class_id);
 }
 
 // Diagnose that a qualified declaration name specifies an undefined interface
@@ -394,13 +395,15 @@ static auto DiagnoseQualifiedDeclInIncompleteClassScope(Context& context,
 static auto DiagnoseQualifiedDeclInUndefinedInterfaceScope(
     Context& context, SemIR::LocId loc_id, SemIR::InterfaceId interface_id,
     SemIR::InstId interface_inst_id) -> void {
-  CARBON_DIAGNOSTIC(QualifiedDeclInUndefinedInterfaceScope, Error,
-                    "cannot declare a member of undefined interface {0}",
-                    InstIdAsType);
-  auto builder = context.emitter().Build(
-      loc_id, QualifiedDeclInUndefinedInterfaceScope, interface_inst_id);
-  NoteIncompleteInterface(context, interface_id, builder);
-  builder.Emit();
+  Diagnostics::ContextScope diagnostic_context(
+      &context.emitter(), [&](auto& builder) {
+        CARBON_DIAGNOSTIC(QualifiedDeclInUndefinedInterfaceScope, Context,
+                          "cannot declare a member of undefined interface {0}",
+                          InstIdAsType);
+        builder.Context(loc_id, QualifiedDeclInUndefinedInterfaceScope,
+                        interface_inst_id);
+      });
+  DiagnoseIncompleteInterface(context, interface_id);
 }
 
 // Diagnose that a qualified declaration name specifies a different package as

+ 4 - 4
toolchain/check/diagnostic_helpers.h

@@ -48,11 +48,11 @@ class LocIdForDiagnostics {
 using DiagnosticEmitterBase = Diagnostics::Emitter<LocIdForDiagnostics>;
 
 using DiagnosticBuilder = DiagnosticEmitterBase::Builder;
+using DiagnosticContextBuilder = DiagnosticEmitterBase::ContextBuilder;
 
-// A function that forms a diagnostic for some kind of problem. The
-// DiagnosticBuilder is returned rather than emitted so that the caller
-// can add contextual notes as appropriate.
-using MakeDiagnosticBuilderFn = llvm::function_ref<auto()->DiagnosticBuilder>;
+// A function that adds a Context message for a diagnostic.
+using DiagnosticContextFn =
+    llvm::function_ref<auto(DiagnosticContextBuilder&)->void>;
 
 // An expression with a constant value, for rendering in a diagnostic. The
 // diagnostic rendering will include enclosing "`"s.

+ 4 - 3
toolchain/check/eval.cpp

@@ -2552,11 +2552,12 @@ auto TryEvalBlockForSpecific(Context& context, SemIR::LocId loc_id,
                                .values = result,
                            });
 
-  Diagnostics::AnnotationScope annotate_diagnostics(
+  Diagnostics::ContextScope diagnostic_context(
       &context.emitter(), [&](auto& builder) {
-        CARBON_DIAGNOSTIC(ResolvingSpecificHere, Note, "in {0} used here",
+        CARBON_DIAGNOSTIC(ResolvingSpecificHere, SoftContext,
+                          "unable to monomorphize specific {0}",
                           SemIR::SpecificId);
-        builder.Note(loc_id, ResolvingSpecificHere, specific_id);
+        builder.Context(loc_id, ResolvingSpecificHere, specific_id);
       });
 
   for (auto [i, inst_id] : llvm::enumerate(eval_block)) {

+ 16 - 12
toolchain/check/eval_inst.cpp

@@ -547,18 +547,22 @@ auto EvalConstantInst(Context& context, SemIR::InstId inst_id,
   auto complete_type_id =
       context.types().GetTypeIdForTypeInstId(inst.complete_type_inst_id);
   if (complete_type_id.is_concrete()) {
-    if (!TryToCompleteType(
-            context, complete_type_id, SemIR::LocId(inst_id), [&] {
-              CARBON_DIAGNOSTIC(IncompleteTypeInMonomorphization, Error,
-                                "{0} evaluates to incomplete type {1}",
-                                InstIdAsType, InstIdAsType);
-              return context.emitter().Build(
-                  inst_id, IncompleteTypeInMonomorphization,
-                  context.insts()
-                      .GetAs<SemIR::RequireCompleteType>(inst_id)
-                      .complete_type_inst_id,
-                  inst.complete_type_inst_id);
-            })) {
+    Diagnostics::ContextScope diagnostic_context(
+        &context.emitter(), [&](auto& builder) {
+          CARBON_DIAGNOSTIC(IncompleteTypeInMonomorphization, Context,
+                            "{0} evaluates to incomplete type {1}",
+                            InstIdAsType, InstIdAsType);
+          builder.Context(inst_id, IncompleteTypeInMonomorphization,
+                          context.insts()
+                              .GetAs<SemIR::RequireCompleteType>(inst_id)
+                              .complete_type_inst_id,
+                          inst.complete_type_inst_id);
+        });
+    // We use TryToCompleteType() instead of RequireCompleteType() because we
+    // are currently evaluating a RequireCompleteType instruction, and calling
+    // RequireCompleteType() would insert another copy of the same instruction.
+    if (!TryToCompleteType(context, complete_type_id, SemIR::LocId(inst_id),
+                           true)) {
       return ConstantEvalResult::Error;
     }
     return ConstantEvalResult::NewSamePhase(SemIR::CompleteTypeWitness{

+ 21 - 19
toolchain/check/function.cpp

@@ -326,24 +326,24 @@ auto CheckFunctionReturnPatternType(Context& context, SemIR::LocId loc_id,
                             context.sem_ir(), specific_id, return_pattern_id));
   auto init_repr = SemIR::InitRepr::ForType(context.sem_ir(), arg_type_id);
   if (!init_repr.is_valid()) {
-    auto diagnose_incomplete_return_type = [&] {
-      CARBON_DIAGNOSTIC(IncompleteTypeInFunctionReturnType, Error,
-                        "function returns incomplete type {0}", SemIR::TypeId);
-      return context.emitter().Build(loc_id, IncompleteTypeInFunctionReturnType,
-                                     arg_type_id);
-    };
-    auto diagnose_abstract_return_type = [&] {
-      CARBON_DIAGNOSTIC(AbstractTypeInFunctionReturnType, Error,
-                        "function returns abstract type {0}", SemIR::TypeId);
-      return context.emitter().Build(loc_id, AbstractTypeInFunctionReturnType,
-                                     arg_type_id);
-    };
-
-    // TODO: Consider suppressing the diagnostic if we've already diagnosed a
+    // TODO: Consider suppressing the diagnostics if we've already diagnosed a
     // definition or call to this function.
     if (!RequireConcreteType(
             context, arg_type_id, SemIR::LocId(return_pattern_id),
-            diagnose_incomplete_return_type, diagnose_abstract_return_type)) {
+            [&](auto& builder) {
+              CARBON_DIAGNOSTIC(IncompleteTypeInFunctionReturnType, Context,
+                                "function returns incomplete type {0}",
+                                SemIR::TypeId);
+              builder.Context(loc_id, IncompleteTypeInFunctionReturnType,
+                              arg_type_id);
+            },
+            [&](auto& builder) {
+              CARBON_DIAGNOSTIC(AbstractTypeInFunctionReturnType, Context,
+                                "function returns abstract type {0}",
+                                SemIR::TypeId);
+              builder.Context(loc_id, AbstractTypeInFunctionReturnType,
+                              arg_type_id);
+            })) {
       return SemIR::ErrorInst::TypeId;
     }
   }
@@ -374,13 +374,13 @@ auto CheckFunctionDefinitionSignature(Context& context,
     // The parameter types need to be complete.
     RequireCompleteType(
         context, context.insts().GetAs<SemIR::AnyParam>(param_ref_id).type_id,
-        SemIR::LocId(param_ref_id), [&] {
+        SemIR::LocId(param_ref_id), [&](auto& builder) {
           CARBON_DIAGNOSTIC(
-              IncompleteTypeInFunctionParam, Error,
+              IncompleteTypeInFunctionParam, Context,
               "parameter has incomplete type {0} in function definition",
               TypeOfInstId);
-          return context.emitter().Build(
-              param_ref_id, IncompleteTypeInFunctionParam, param_ref_id);
+          builder.Context(param_ref_id, IncompleteTypeInFunctionParam,
+                          param_ref_id);
         });
   }
 
@@ -396,6 +396,8 @@ auto CheckFunctionDefinitionSignature(Context& context,
     // `CheckFunctionReturnPatternType` should have diagnosed incomplete types,
     // so don't `RequireCompleteType` on the return type.
     if (return_call_param.has_value()) {
+      // TODO: If the types are already checked for completeness then this does
+      // nothing?
       TryToCompleteType(
           context,
           context.insts().GetAs<SemIR::AnyParam>(return_call_param).type_id,

+ 35 - 31
toolchain/check/handle_binding_pattern.cpp

@@ -163,13 +163,12 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
     return binding.pattern_id;
   };
 
-  auto abstract_diagnoser = [&] {
-    CARBON_DIAGNOSTIC(AbstractTypeInVarPattern, Error,
+  auto abstract_diagnostic_context = [&](auto& builder) {
+    CARBON_DIAGNOSTIC(AbstractTypeInVarPattern, Context,
                       "binding pattern has abstract type {0} in `var` "
                       "pattern",
                       SemIR::TypeId);
-    return context.emitter().Build(type_node, AbstractTypeInVarPattern,
-                                   cast_type_id);
+    builder.Context(type_node, AbstractTypeInVarPattern, cast_type_id);
   };
 
   // A `self` binding can only appear in an implicit parameter list.
@@ -219,11 +218,10 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
           auto& class_info = context.classes().Get(class_type.class_id);
           if (class_info.inheritance_kind ==
               SemIR::Class::InheritanceKind::Abstract) {
-            auto builder = abstract_diagnoser();
-            auto direct_use = true;
-            NoteAbstractClass(context, class_type.class_id, direct_use,
-                              builder);
-            builder.Emit();
+            Diagnostics::ContextScope scope(&context.emitter(),
+                                            abstract_diagnostic_context);
+            DiagnoseAbstractClass(context, class_type.class_id,
+                                  /*direct_use=*/true);
             cast_type_id = SemIR::ErrorInst::TypeId;
           }
         }
@@ -256,21 +254,27 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
     }
 
     case FullPatternStack::Kind::NameBindingDecl: {
-      auto incomplete_diagnoser = [&] {
-        CARBON_DIAGNOSTIC(IncompleteTypeInBindingDecl, Error,
+      auto incomplete_diagnostic_context = [&](auto& builder) {
+        CARBON_DIAGNOSTIC(IncompleteTypeInBindingDecl, Context,
                           "binding pattern has incomplete type {0} in name "
                           "binding declaration",
                           InstIdAsType);
-        return context.emitter().Build(type_node, IncompleteTypeInBindingDecl,
-                                       cast_type_inst_id);
+        builder.Context(type_node, IncompleteTypeInBindingDecl,
+                        cast_type_inst_id);
       };
       if (node_kind == Parse::NodeKind::VarBindingPattern) {
-        cast_type_id = AsConcreteType(context, cast_type_id, type_node,
-                                      incomplete_diagnoser, abstract_diagnoser);
+        if (!RequireConcreteType(context, cast_type_id, type_node,
+                                 incomplete_diagnostic_context,
+                                 abstract_diagnostic_context)) {
+          cast_type_id = SemIR::ErrorInst::TypeId;
+        }
       } else {
-        cast_type_id = AsCompleteType(context, cast_type_id, type_node,
-                                      incomplete_diagnoser);
+        if (!RequireCompleteType(context, cast_type_id, type_node,
+                                 incomplete_diagnostic_context)) {
+          cast_type_id = SemIR::ErrorInst::TypeId;
+        }
       }
+
       auto binding_pattern_id = make_binding_pattern();
       if (node_kind == Parse::NodeKind::VarBindingPattern) {
         CARBON_CHECK(!is_generic);
@@ -404,20 +408,20 @@ auto HandleParseNode(Context& context, Parse::FieldNameAndTypeId node_id)
   auto parent_class_decl =
       context.scope_stack().TryGetCurrentScopeAs<SemIR::ClassDecl>();
   CARBON_CHECK(parent_class_decl);
-  cast_type_id = AsConcreteType(
-      context, cast_type_id, type_node,
-      [&] {
-        CARBON_DIAGNOSTIC(IncompleteTypeInFieldDecl, Error,
-                          "field has incomplete type {0}", SemIR::TypeId);
-        return context.emitter().Build(type_node, IncompleteTypeInFieldDecl,
-                                       cast_type_id);
-      },
-      [&] {
-        CARBON_DIAGNOSTIC(AbstractTypeInFieldDecl, Error,
-                          "field has abstract type {0}", SemIR::TypeId);
-        return context.emitter().Build(type_node, AbstractTypeInFieldDecl,
-                                       cast_type_id);
-      });
+  if (!RequireConcreteType(
+          context, cast_type_id, type_node,
+          [&](auto& builder) {
+            CARBON_DIAGNOSTIC(IncompleteTypeInFieldDecl, Context,
+                              "field has incomplete type {0}", SemIR::TypeId);
+            builder.Context(type_node, IncompleteTypeInFieldDecl, cast_type_id);
+          },
+          [&](auto& builder) {
+            CARBON_DIAGNOSTIC(AbstractTypeInFieldDecl, Context,
+                              "field has abstract type {0}", SemIR::TypeId);
+            builder.Context(type_node, AbstractTypeInFieldDecl, cast_type_id);
+          })) {
+    cast_type_id = SemIR::ErrorInst::TypeId;
+  }
   if (cast_type_id == SemIR::ErrorInst::TypeId) {
     cast_type_inst_id = SemIR::ErrorInst::TypeInstId;
   }

+ 26 - 22
toolchain/check/handle_class.cpp

@@ -24,6 +24,7 @@
 #include "toolchain/check/name_lookup.h"
 #include "toolchain/check/type.h"
 #include "toolchain/check/type_completion.h"
+#include "toolchain/diagnostics/emitter.h"
 #include "toolchain/parse/node_ids.h"
 #include "toolchain/sem_ir/function.h"
 #include "toolchain/sem_ir/ids.h"
@@ -377,21 +378,24 @@ auto HandleParseNode(Context& context, Parse::AdaptDeclId node_id) -> bool {
 
   auto [adapted_type_inst_id, adapted_type_id] =
       ExprAsType(context, node_id, adapted_type_expr_id);
-  adapted_type_id = AsConcreteType(
-      context, adapted_type_id, node_id,
-      [&] {
-        CARBON_DIAGNOSTIC(IncompleteTypeInAdaptDecl, Error,
-                          "adapted type {0} is an incomplete type",
-                          InstIdAsType);
-        return context.emitter().Build(node_id, IncompleteTypeInAdaptDecl,
-                                       adapted_type_inst_id);
-      },
-      [&] {
-        CARBON_DIAGNOSTIC(AbstractTypeInAdaptDecl, Error,
-                          "adapted type {0} is an abstract type", InstIdAsType);
-        return context.emitter().Build(node_id, AbstractTypeInAdaptDecl,
-                                       adapted_type_inst_id);
-      });
+  if (!RequireConcreteType(
+          context, adapted_type_id, node_id,
+          [&](auto& builder) {
+            CARBON_DIAGNOSTIC(IncompleteTypeInAdaptDecl, Context,
+                              "adapted type {0} is an incomplete type",
+                              InstIdAsType);
+            builder.Context(node_id, IncompleteTypeInAdaptDecl,
+                            adapted_type_inst_id);
+          },
+          [&](auto& builder) {
+            CARBON_DIAGNOSTIC(AbstractTypeInAdaptDecl, Context,
+                              "adapted type {0} is an abstract type",
+                              InstIdAsType);
+            builder.Context(node_id, AbstractTypeInAdaptDecl,
+                            adapted_type_inst_id);
+          })) {
+    adapted_type_id = SemIR::ErrorInst::TypeId;
+  }
   if (adapted_type_id == SemIR::ErrorInst::TypeId) {
     adapted_type_inst_id = SemIR::ErrorInst::TypeInstId;
   }
@@ -449,16 +453,16 @@ static auto CheckBaseType(Context& context, Parse::NodeId node_id,
                           SemIR::InstId base_expr_id) -> BaseInfo {
   auto [base_type_inst_id, base_type_id] =
       ExprAsType(context, node_id, base_expr_id);
-  base_type_id = AsCompleteType(context, base_type_id, node_id, [&] {
-    CARBON_DIAGNOSTIC(IncompleteTypeInBaseDecl, Error,
-                      "base {0} is an incomplete type", InstIdAsType);
-    return context.emitter().Build(node_id, IncompleteTypeInBaseDecl,
-                                   base_type_inst_id);
-  });
-
   if (base_type_id == SemIR::ErrorInst::TypeId) {
     return BaseInfo::Error;
   }
+  if (!RequireCompleteType(context, base_type_id, node_id, [&](auto& builder) {
+        CARBON_DIAGNOSTIC(IncompleteTypeInBaseDecl, Context,
+                          "base {0} is an incomplete type", InstIdAsType);
+        builder.Context(node_id, IncompleteTypeInBaseDecl, base_type_inst_id);
+      })) {
+    return BaseInfo::Error;
+  }
 
   auto class_type = context.types().TryGetAs<SemIR::ClassType>(base_type_id);
 

+ 21 - 16
toolchain/check/handle_require.cpp

@@ -209,17 +209,21 @@ static auto ValidateRequire(Context& context, SemIR::LocId loc_id,
     return std::nullopt;
   }
 
-  auto identified_facet_type_id = RequireIdentifiedFacetType(
-      context, SemIR::LocId(constraint_inst_id), self_constant_value_id,
-      *constraint_facet_type, [&] {
-        CARBON_DIAGNOSTIC(
-            RequireImplsUnidentifiedFacetType, Error,
-            "facet type {0} cannot be identified in `require` declaration",
-            InstIdAsType);
-        return context.emitter().Build(constraint_inst_id,
-                                       RequireImplsUnidentifiedFacetType,
-                                       constraint_inst_id);
-      });
+  auto identified_facet_type_id = SemIR::IdentifiedFacetTypeId::None;
+  {
+    Diagnostics::ContextScope diagnostic_context(
+        &context.emitter(), [&](auto& builder) {
+          CARBON_DIAGNOSTIC(
+              RequireImplsUnidentifiedFacetType, Context,
+              "facet type {0} cannot be identified in `require` declaration",
+              InstIdAsType);
+          builder.Context(constraint_inst_id, RequireImplsUnidentifiedFacetType,
+                          constraint_inst_id);
+        });
+    identified_facet_type_id = RequireIdentifiedFacetType(
+        context, SemIR::LocId(constraint_inst_id), self_constant_value_id,
+        *constraint_facet_type);
+  }
   if (!identified_facet_type_id.has_value()) {
     // The constraint can't be used. A diagnostic was emitted by
     // RequireIdentifiedFacetType().
@@ -299,13 +303,14 @@ auto HandleParseNode(Context& context, Parse::RequireDeclId node_id) -> bool {
   // monomorphization errors that result.
   if (extend) {
     if (!RequireCompleteType(
-            context, constraint_type_id, SemIR::LocId(constraint_inst_id), [&] {
-              CARBON_DIAGNOSTIC(RequireImplsIncompleteFacetType, Error,
+            context, constraint_type_id, SemIR::LocId(constraint_inst_id),
+            [&](auto& builder) {
+              CARBON_DIAGNOSTIC(RequireImplsIncompleteFacetType, Context,
                                 "`extend require` of incomplete facet type {0}",
                                 InstIdAsType);
-              return context.emitter().Build(constraint_inst_id,
-                                             RequireImplsIncompleteFacetType,
-                                             constraint_inst_id);
+              builder.Context(constraint_inst_id,
+                              RequireImplsIncompleteFacetType,
+                              constraint_inst_id);
             })) {
       return true;
     }

+ 33 - 26
toolchain/check/impl.cpp

@@ -221,13 +221,12 @@ static auto ApplyExtendImplAs(Context& context, SemIR::LocId loc_id,
 
   if (!RequireCompleteType(
           context, context.types().GetTypeIdForTypeInstId(impl.constraint_id),
-          SemIR::LocId(impl.constraint_id), [&] {
-            CARBON_DIAGNOSTIC(ExtendImplAsIncomplete, Error,
+          SemIR::LocId(impl.constraint_id), [&](auto& builder) {
+            CARBON_DIAGNOSTIC(ExtendImplAsIncomplete, Context,
                               "`extend impl as` incomplete facet type {0}",
                               InstIdAsType);
-            return context.emitter().Build(impl.latest_decl_id(),
-                                           ExtendImplAsIncomplete,
-                                           impl.constraint_id);
+            builder.Context(impl.latest_decl_id(), ExtendImplAsIncomplete,
+                            impl.constraint_id);
           })) {
     parent_scope.set_has_error();
     return false;
@@ -513,18 +512,21 @@ auto ImplWitnessStartDefinition(Context& context, SemIR::Impl& impl) -> void {
     return;
   }
 
-  if (!RequireCompleteType(
-          context, context.types().GetTypeIdForTypeInstId(impl.constraint_id),
-          SemIR::LocId(impl.constraint_id), [&] {
-            CARBON_DIAGNOSTIC(ImplAsIncompleteFacetTypeDefinition, Error,
-                              "definition of impl as incomplete facet type {0}",
-                              InstIdAsType);
-            return context.emitter().Build(SemIR::LocId(impl.latest_decl_id()),
-                                           ImplAsIncompleteFacetTypeDefinition,
-                                           impl.constraint_id);
-          })) {
-    FillImplWitnessWithErrors(context, impl);
-    return;
+  {
+    if (!RequireCompleteType(
+            context, context.types().GetTypeIdForTypeInstId(impl.constraint_id),
+            SemIR::LocId(impl.constraint_id), [&](auto& builder) {
+              CARBON_DIAGNOSTIC(
+                  ImplAsIncompleteFacetTypeDefinition, Context,
+                  "definition of impl as incomplete facet type {0}",
+                  InstIdAsType);
+              builder.Context(SemIR::LocId(impl.latest_decl_id()),
+                              ImplAsIncompleteFacetTypeDefinition,
+                              impl.constraint_id);
+            })) {
+      FillImplWitnessWithErrors(context, impl);
+      return;
+    }
   }
 
   const auto& interface = context.interfaces().Get(impl.interface.interface_id);
@@ -793,15 +795,20 @@ auto CheckConstraintIsInterface(Context& context, SemIR::InstId impl_decl_id,
     return SemIR::SpecificInterface::None;
   }
 
-  auto identified_id = RequireIdentifiedFacetType(
-      context, SemIR::LocId(constraint_id),
-      context.constant_values().Get(self_id), *facet_type, [&] {
-        CARBON_DIAGNOSTIC(ImplOfUnidentifiedFacetType, Error,
-                          "facet type {0} cannot be identified in `impl as`",
-                          InstIdAsType);
-        return context.emitter().Build(
-            impl_decl_id, ImplOfUnidentifiedFacetType, constraint_id);
-      });
+  auto identified_id = SemIR::IdentifiedFacetTypeId::None;
+  {
+    Diagnostics::ContextScope diagnostic_context(
+        &context.emitter(), [&](auto& builder) {
+          CARBON_DIAGNOSTIC(ImplOfUnidentifiedFacetType, Context,
+                            "facet type {0} cannot be identified in `impl as`",
+                            InstIdAsType);
+          builder.Context(impl_decl_id, ImplOfUnidentifiedFacetType,
+                          constraint_id);
+        });
+    identified_id = RequireIdentifiedFacetType(
+        context, SemIR::LocId(constraint_id),
+        context.constant_values().Get(self_id), *facet_type);
+  }
   if (!identified_id.has_value()) {
     return SemIR::SpecificInterface::None;
   }

+ 14 - 6
toolchain/check/impl_lookup.cpp

@@ -217,13 +217,16 @@ static auto GetRequiredImplsFromConstraint(
       context.insts().GetAs<SemIR::FacetType>(facet_type_inst_id);
   const auto& facet_type_info =
       context.facet_types().Get(facet_type_inst.facet_type_id);
-  auto identified_id = RequireIdentifiedFacetType(
-      context, loc_id, query_self_const_id, facet_type_inst, [&] {
-        CARBON_DIAGNOSTIC(ImplLookupInUnidentifiedFacetType, Error,
+
+  Diagnostics::ContextScope diagnostic_context(
+      &context.emitter(), [&](auto& builder) {
+        CARBON_DIAGNOSTIC(ImplLookupInUnidentifiedFacetType, Context,
                           "facet type {0} can not be identified", InstIdAsType);
-        return context.emitter().Build(
-            loc_id, ImplLookupInUnidentifiedFacetType, facet_type_inst_id);
+        builder.Context(loc_id, ImplLookupInUnidentifiedFacetType,
+                        facet_type_inst_id);
       });
+  auto identified_id = RequireIdentifiedFacetType(
+      context, loc_id, query_self_const_id, facet_type_inst);
   if (!identified_id.has_value()) {
     return std::nullopt;
   }
@@ -344,12 +347,17 @@ static auto LookupImplWitnessInSelfFacetValue(
   auto self_facet_value_const_id =
       context.constant_values().Get(self_facet_value_inst_id);
 
+  // TODO: Add a diagnostic context for when identification fails, instead of
+  // CHECKing, such as for the type of Self inside a named constraint
+  // definition.
+  static_cast<void>(loc_id);
+
   // The position of the interface in `required_impls()` is also the
   // position of the witness for that interface in `FacetValue`. The
   // `FacetValue` witnesses are the output of an impl lookup, which finds and
   // returns witnesses in the same order.
   auto identified_id = RequireIdentifiedFacetType(
-      context, loc_id, self_facet_value_const_id, *facet_type, nullptr);
+      context, loc_id, self_facet_value_const_id, *facet_type);
   // This should not be possible as FacetValue is constructed by a conversion
   // to a facet type, which performs impl lookup for that facet type, and
   // lookup only succeeds for identified facet types.

+ 1 - 1
toolchain/check/import_ref.cpp

@@ -2658,7 +2658,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
     auto unattached_self_const_id =
         resolver.local_constant_values().GetUnattachedConstant(self_const_id);
     RequireIdentifiedFacetType(resolver.local_context(), SemIR::LocId::None,
-                               unattached_self_const_id, *facet_type, nullptr);
+                               unattached_self_const_id, *facet_type);
   }
   if (import_impl.is_complete()) {
     ImportImplDefinition(resolver, import_impl, new_impl);

+ 7 - 6
toolchain/check/literal.cpp

@@ -123,12 +123,13 @@ static auto GetStringLiteralRepr(Context& context, SemIR::LocId loc_id,
 auto MakeStringLiteral(Context& context, Parse::StringLiteralId node_id,
                        StringLiteralValueId value_id) -> SemIR::InstId {
   auto str_type = MakeStringType(context, node_id);
-  if (!RequireCompleteType(context, str_type.type_id, node_id, [&] {
-        CARBON_DIAGNOSTIC(StringLiteralTypeIncomplete, Error,
-                          "type {0} is incomplete", InstIdAsType);
-        return context.emitter().Build(node_id, StringLiteralTypeIncomplete,
-                                       str_type.inst_id);
-      })) {
+  if (!RequireCompleteType(
+          context, str_type.type_id, node_id, [&](auto& builder) {
+            CARBON_DIAGNOSTIC(StringLiteralTypeIncomplete, Context,
+                              "type {0} is incomplete", InstIdAsType);
+            builder.Context(node_id, StringLiteralTypeIncomplete,
+                            str_type.inst_id);
+          })) {
     return SemIR::ErrorInst::InstId;
   }
 

+ 43 - 39
toolchain/check/member_access.cpp

@@ -234,7 +234,9 @@ static auto GetWitnessFromSingleImplLookupResult(
 static auto PerformImplLookup(
     Context& context, SemIR::LocId loc_id, SemIR::ConstantId type_const_id,
     SemIR::AssociatedEntityType assoc_type, SemIR::InstId member_id,
-    MakeDiagnosticBuilderFn missing_impl_diagnoser = nullptr) -> SemIR::InstId {
+    bool diagnose = true,
+    DiagnosticContextFn missing_impl_diagnostic_context = nullptr)
+    -> SemIR::InstId {
   auto self_type_id = context.types().GetTypeIdForTypeConstantId(type_const_id);
   // TODO: Avoid forming and then immediately decomposing a `FacetType` here.
   auto interface_type_id =
@@ -243,23 +245,25 @@ static auto PerformImplLookup(
   auto lookup_result = LookupImplWitness(context, loc_id, type_const_id,
                                          interface_type_id.AsConstantId());
   if (!lookup_result.has_value()) {
-    if (missing_impl_diagnoser) {
-      // TODO: Pass in the expression whose type we are printing.
-      CARBON_DIAGNOSTIC(MissingImplInMemberAccessNote, Note,
-                        "type {1} does not implement interface {0}",
-                        SemIR::TypeId, SemIR::TypeId);
-      missing_impl_diagnoser()
-          .Note(loc_id, MissingImplInMemberAccessNote, interface_type_id,
-                self_type_id)
-          .Emit();
-    } else {
-      // TODO: Pass in the expression whose type we are printing.
-      CARBON_DIAGNOSTIC(MissingImplInMemberAccess, Error,
-                        "cannot access member of interface {0} in type {1} "
-                        "that does not implement that interface",
-                        SemIR::TypeId, SemIR::TypeId);
-      context.emitter().Emit(loc_id, MissingImplInMemberAccess,
-                             interface_type_id, self_type_id);
+    if (diagnose) {
+      if (missing_impl_diagnostic_context) {
+        Diagnostics::ContextScope scope(&context.emitter(),
+                                        missing_impl_diagnostic_context);
+        // TODO: Pass in the expression whose type we are printing.
+        CARBON_DIAGNOSTIC(MissingImplInMemberAccessInContext, Error,
+                          "type {1} does not implement interface {0}",
+                          SemIR::TypeId, SemIR::TypeId);
+        context.emitter().Emit(loc_id, MissingImplInMemberAccessInContext,
+                               interface_type_id, self_type_id);
+      } else {
+        // TODO: Pass in the expression whose type we are printing.
+        CARBON_DIAGNOSTIC(MissingImplInMemberAccess, Error,
+                          "cannot access member of interface {0} in type {1} "
+                          "that does not implement that interface",
+                          SemIR::TypeId, SemIR::TypeId);
+        context.emitter().Emit(loc_id, MissingImplInMemberAccess,
+                               interface_type_id, self_type_id);
+      }
     }
     return SemIR::ErrorInst::InstId;
   }
@@ -511,17 +515,17 @@ static auto PerformActionHelper(Context& context, SemIR::LocId loc_id,
       // here to provide a better diagnostic than what we get when looking for
       // scopes directly on the facet type.
       if (!RequireCompleteType(
-              context, base_type_id, SemIR::LocId(base_id), [&] {
+              context, base_type_id, SemIR::LocId(base_id), [&](auto& builder) {
                 CARBON_DIAGNOSTIC(
-                    IncompleteTypeInMemberAccessOfFacet, Error,
+                    IncompleteTypeInMemberAccessOfFacet, Context,
                     "member access into facet of incomplete type {0}",
                     SemIR::TypeId);
-                return context.emitter().Build(
-                    base_id, IncompleteTypeInMemberAccessOfFacet, base_type_id);
+                builder.Context(base_id, IncompleteTypeInMemberAccessOfFacet,
+                                base_type_id);
               })) {
         // If the scope is invalid in AppendLookupScopesForConstant we still
-        // return true and proceed with lookup, just ignoring that scope. Match
-        // behaviour here for when this moves into
+        // return true and proceed with lookup, just ignoring that scope.
+        // Match behaviour here for when this moves into
         // AppendLookupScopesForConstant.
         base_type_id = SemIR::ErrorInst::TypeId;
       }
@@ -553,13 +557,14 @@ static auto PerformActionHelper(Context& context, SemIR::LocId loc_id,
   //
   // TODO: ConvertToValueOrRefExpr could take context about the operation being
   // done to give a better error than "invalid use of" an incomplete type?
-  if (!RequireCompleteType(context, base_type_id, SemIR::LocId(base_id), [&] {
-        CARBON_DIAGNOSTIC(IncompleteTypeInMemberAccess, Error,
-                          "member access into object of incomplete type {0}",
-                          TypeOfInstId);
-        return context.emitter().Build(base_id, IncompleteTypeInMemberAccess,
-                                       base_id);
-      })) {
+  if (!RequireCompleteType(
+          context, base_type_id, SemIR::LocId(base_id), [&](auto& builder) {
+            CARBON_DIAGNOSTIC(
+                IncompleteTypeInMemberAccess, Context,
+                "member access into object of incomplete type {0}",
+                TypeOfInstId);
+            builder.Context(base_id, IncompleteTypeInMemberAccess, base_id);
+          })) {
     return SemIR::ErrorInst::InstId;
   }
 
@@ -731,11 +736,10 @@ auto GetAssociatedValue(Context& context, SemIR::LocId loc_id,
                                 specific_interface);
 }
 
-auto PerformCompoundMemberAccess(Context& context, SemIR::LocId loc_id,
-                                 SemIR::InstId base_id,
-                                 SemIR::InstId member_expr_id,
-                                 MakeDiagnosticBuilderFn missing_impl_diagnoser)
-    -> SemIR::InstId {
+auto PerformCompoundMemberAccess(
+    Context& context, SemIR::LocId loc_id, SemIR::InstId base_id,
+    SemIR::InstId member_expr_id, bool diagnose,
+    DiagnosticContextFn missing_impl_diagnostic_context) -> SemIR::InstId {
   auto base_type_id = context.insts().Get(base_id).type_id();
   auto base_type_const_id = context.types().GetConstantId(base_type_id);
 
@@ -768,9 +772,9 @@ auto PerformCompoundMemberAccess(Context& context, SemIR::LocId loc_id,
     if (IsInstanceType(context, decl_type_id)) {
       // Step 2a: For instance methods, lookup the impl of the interface for
       // this type and get the method.
-      member_id =
-          PerformImplLookup(context, loc_id, base_type_const_id, *assoc_type,
-                            member_id, missing_impl_diagnoser);
+      member_id = PerformImplLookup(context, loc_id, base_type_const_id,
+                                    *assoc_type, member_id, diagnose,
+                                    missing_impl_diagnostic_context);
       // Next we will perform instance binding.
     } else {
       // Step 2b: For non-instance methods and associated constants, we access

+ 10 - 4
toolchain/check/member_access.h

@@ -27,12 +27,18 @@ auto PerformMemberAccess(Context& context, SemIR::LocId loc_id,
 
 // Creates SemIR to perform a compound member access with base expression
 // `base_id` and member name expression `member_expr_id`. Returns the result of
-// the access. If specified, `missing_impl_diagnoser()` is used to build an
-// error diagnostic when impl binding fails due to a missing `impl`.
+// the access. If specified, `missing_impl_diagnostic_context()` is used to
+// provide context for the error diagnostic when impl binding fails due to a
+// missing `impl`.
+//
+// On failure, an ErrorInst is returned and a diagnostic is produced unless
+// `diagnose` is false. It is incorrect to specify `diagnose` as false if the
+// resulting ErrorInst may appear in the produced SemIR.
 auto PerformCompoundMemberAccess(
     Context& context, SemIR::LocId loc_id, SemIR::InstId base_id,
-    SemIR::InstId member_expr_id,
-    MakeDiagnosticBuilderFn missing_impl_diagnoser = nullptr) -> SemIR::InstId;
+    SemIR::InstId member_expr_id, bool diagnose = true,
+    DiagnosticContextFn missing_impl_diagnostic_context = nullptr)
+    -> SemIR::InstId;
 
 // Finds the value of an associated entity (given by assoc_entity_inst_id, a
 // member of the interface given by interface_type_id) associated with a type or

+ 10 - 11
toolchain/check/name_lookup.cpp

@@ -362,12 +362,12 @@ auto AppendLookupScopesForConstant(Context& context, SemIR::LocId loc_id,
     // are not complete.
     RequireCompleteType(
         context, context.types().GetTypeIdForTypeConstantId(lookup_const_id),
-        loc_id, [&] {
-          CARBON_DIAGNOSTIC(QualifiedExprInIncompleteClassScope, Error,
+        loc_id, [&](auto& builder) {
+          CARBON_DIAGNOSTIC(QualifiedExprInIncompleteClassScope, Context,
                             "member access into incomplete class {0}",
                             InstIdAsType);
-          return context.emitter().Build(
-              loc_id, QualifiedExprInIncompleteClassScope, lookup_inst_id);
+          builder.Context(loc_id, QualifiedExprInIncompleteClassScope,
+                          lookup_inst_id);
         });
     auto& class_info = context.classes().Get(class_ty->class_id);
     scopes->push_back(LookupScope{.name_scope_id = class_info.scope_id,
@@ -382,13 +382,12 @@ auto AppendLookupScopesForConstant(Context& context, SemIR::LocId loc_id,
     if (RequireCompleteType(
             context,
             context.types().GetTypeIdForTypeConstantId(lookup_const_id), loc_id,
-            [&] {
-              CARBON_DIAGNOSTIC(QualifiedExprInIncompleteFacetTypeScope, Error,
-                                "member access into incomplete facet type {0}",
-                                InstIdAsType);
-              return context.emitter().Build(
-                  loc_id, QualifiedExprInIncompleteFacetTypeScope,
-                  lookup_inst_id);
+            [&](auto& builder) {
+              CARBON_DIAGNOSTIC(
+                  QualifiedExprInIncompleteFacetTypeScope, Context,
+                  "member access into incomplete facet type {0}", InstIdAsType);
+              builder.Context(loc_id, QualifiedExprInIncompleteFacetTypeScope,
+                              lookup_inst_id);
             })) {
       auto facet_type_info =
           context.facet_types().Get(facet_type->facet_type_id);

+ 10 - 7
toolchain/check/operator.cpp

@@ -62,8 +62,8 @@ static auto HasCppClassType(Context& context, SemIR::InstId inst_id) -> bool {
 }
 
 auto BuildUnaryOperator(Context& context, SemIR::LocId loc_id, Operator op,
-                        SemIR::InstId operand_id,
-                        MakeDiagnosticBuilderFn missing_impl_diagnoser)
+                        SemIR::InstId operand_id, bool diagnose,
+                        DiagnosticContextFn missing_impl_diagnostic_context)
     -> SemIR::InstId {
   if (operand_id == SemIR::ErrorInst::InstId) {
     // Exit early for errors, which prevent forming an `Op` function.
@@ -96,8 +96,9 @@ auto BuildUnaryOperator(Context& context, SemIR::LocId loc_id, Operator op,
   }
 
   // Form `operand.(Op)`.
-  auto bound_op_id = PerformCompoundMemberAccess(
-      context, loc_id, operand_id, op_fn_id, missing_impl_diagnoser);
+  auto bound_op_id =
+      PerformCompoundMemberAccess(context, loc_id, operand_id, op_fn_id,
+                                  diagnose, missing_impl_diagnostic_context);
   if (bound_op_id == SemIR::ErrorInst::InstId) {
     return SemIR::ErrorInst::InstId;
   }
@@ -109,7 +110,8 @@ auto BuildUnaryOperator(Context& context, SemIR::LocId loc_id, Operator op,
 
 auto BuildBinaryOperator(Context& context, SemIR::LocId loc_id, Operator op,
                          SemIR::InstId lhs_id, SemIR::InstId rhs_id,
-                         MakeDiagnosticBuilderFn missing_impl_diagnoser)
+                         bool diagnose,
+                         DiagnosticContextFn missing_impl_diagnostic_context)
     -> SemIR::InstId {
   if (lhs_id == SemIR::ErrorInst::InstId) {
     // Exit early for errors, which prevent forming an `Op` function.
@@ -147,8 +149,9 @@ auto BuildBinaryOperator(Context& context, SemIR::LocId loc_id, Operator op,
   }
 
   // Form `lhs.(Op)`.
-  auto bound_op_id = PerformCompoundMemberAccess(
-      context, loc_id, lhs_id, op_fn_id, missing_impl_diagnoser);
+  auto bound_op_id =
+      PerformCompoundMemberAccess(context, loc_id, lhs_id, op_fn_id, diagnose,
+                                  missing_impl_diagnostic_context);
   if (bound_op_id == SemIR::ErrorInst::InstId) {
     return SemIR::ErrorInst::InstId;
   }

+ 23 - 12
toolchain/check/operator.h

@@ -19,22 +19,33 @@ struct Operator {
 };
 
 // Checks and builds SemIR for a unary operator expression. For example,
-// `*operand` or `operand*`. If specified, `missing_impl_diagnoser` is used to
-// build a custom error diagnostic for the case where impl lookup for the
-// operator fails.
-auto BuildUnaryOperator(
-    Context& context, SemIR::LocId loc_id, Operator op,
-    SemIR::InstId operand_id,
-    MakeDiagnosticBuilderFn missing_impl_diagnoser = nullptr) -> SemIR::InstId;
+// `*operand` or `operand*`.
+//
+// On failure, an ErrorInst is returned and a diagnostic is produced unless
+// `diagnose` is false. It is incorrect to specify `diagnose` as false if the
+// resulting ErrorInst may appear in the produced SemIR.
+//
+// If specified, `missing_impl_diagnostic_context` is used to provide context
+// for the diagnostic if the impl lookup for the operator fails.
+auto BuildUnaryOperator(Context& context, SemIR::LocId loc_id, Operator op,
+                        SemIR::InstId operand_id, bool diagnose = true,
+                        DiagnosticContextFn missing_impl_diagnostic_context =
+                            nullptr) -> SemIR::InstId;
 
 // Checks and builds SemIR for a binary operator expression. For example,
-// `lhs_id * rhs_id`. If specified, `missing_impl_diagnoser` is used to build a
-// custom error diagnostic for the case where impl lookup for the operator
-// fails.
+// `lhs_id * rhs_id`.
+//
+// // On failure, an ErrorInst is returned and a diagnostic is produced unless
+// `diagnose` is false. It is incorrect to specify `diagnose` as false if the
+// resulting ErrorInst may appear in the produced SemIR.
+//
+// If specified, `missing_impl_diagnostic_context` is used to provide context
+// for the diagnostic if the impl lookup for the operator fails.
 auto BuildBinaryOperator(
     Context& context, SemIR::LocId loc_id, Operator op, SemIR::InstId lhs_id,
-    SemIR::InstId rhs_id,
-    MakeDiagnosticBuilderFn missing_impl_diagnoser = nullptr) -> SemIR::InstId;
+    SemIR::InstId rhs_id, bool diagnose = true,
+    DiagnosticContextFn missing_impl_diagnostic_context = nullptr)
+    -> SemIR::InstId;
 
 }  // namespace Carbon::Check
 

+ 1 - 1
toolchain/check/testdata/array/basics.carbon

@@ -99,7 +99,7 @@ library "[[@TEST_NAME]]";
 // CHECK:STDERR: fail_invalid_element.carbon:[[@LINE+7]]:14: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
 // CHECK:STDERR: var a: array(1, 1);
 // CHECK:STDERR:              ^
-// CHECK:STDERR: fail_invalid_element.carbon:[[@LINE+4]]:14: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_invalid_element.carbon:[[@LINE+4]]:14: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var a: array(1, 1);
 // CHECK:STDERR:              ^
 // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/array/bound_values.carbon

@@ -59,7 +59,7 @@ library "[[@TEST_NAME]]";
 // CHECK:STDERR: fail_invalid_type_with_overflow.carbon:[[@LINE+7]]:14: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
 // CHECK:STDERR: var b: array(1, 39999999999999999993);
 // CHECK:STDERR:              ^
-// CHECK:STDERR: fail_invalid_type_with_overflow.carbon:[[@LINE+4]]:14: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_invalid_type_with_overflow.carbon:[[@LINE+4]]:14: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var b: array(1, 39999999999999999993);
 // CHECK:STDERR:              ^
 // CHECK:STDERR:

+ 3 - 3
toolchain/check/testdata/array/element_mismatches.carbon

@@ -19,7 +19,7 @@ class C {}
 // CHECK:STDERR: fail_arg_wrong_type.carbon:[[@LINE+7]]:22: error: cannot implicitly convert expression of type `()` to `C` [ConversionFailure]
 // CHECK:STDERR: var a: array(C, 3) = ({}, (), true);
 // CHECK:STDERR:                      ^~~~~~~~~~~~~~
-// CHECK:STDERR: fail_arg_wrong_type.carbon:[[@LINE+4]]:22: note: type `()` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_arg_wrong_type.carbon:[[@LINE+4]]:22: note: type `()` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var a: array(C, 3) = ({}, (), true);
 // CHECK:STDERR:                      ^~~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -36,7 +36,7 @@ var a: (D, C, D);
 // CHECK:STDERR: fail_var_wrong_type.carbon:[[@LINE+7]]:22: error: cannot implicitly convert expression of type `D` to `C` [ConversionFailure]
 // CHECK:STDERR: var b: array(C, 3) = a;
 // CHECK:STDERR:                      ^
-// CHECK:STDERR: fail_var_wrong_type.carbon:[[@LINE+4]]:22: note: type `D` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_var_wrong_type.carbon:[[@LINE+4]]:22: note: type `D` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var b: array(C, 3) = a;
 // CHECK:STDERR:                      ^
 // CHECK:STDERR:
@@ -46,7 +46,7 @@ var c: (C, D, D);
 // CHECK:STDERR: fail_var_wrong_type.carbon:[[@LINE+7]]:22: error: cannot copy value of type `C` [CopyOfUncopyableType]
 // CHECK:STDERR: var d: array(C, 3) = c;
 // CHECK:STDERR:                      ^
-// CHECK:STDERR: fail_var_wrong_type.carbon:[[@LINE+4]]:22: note: type `C` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_var_wrong_type.carbon:[[@LINE+4]]:22: note: type `C` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var d: array(C, 3) = c;
 // CHECK:STDERR:                      ^
 // CHECK:STDERR:

+ 3 - 3
toolchain/check/testdata/as/adapter_conversion.carbon

@@ -103,7 +103,7 @@ class B {
 // CHECK:STDERR: fail_init_class_variable.carbon:[[@LINE+7]]:17: error: cannot copy value of type `B` [CopyOfUncopyableType]
 // CHECK:STDERR: var b_init: B = ({.x = 1, .y = 2} as A) as B;
 // CHECK:STDERR:                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// CHECK:STDERR: fail_init_class_variable.carbon:[[@LINE+4]]:17: note: type `B` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_init_class_variable.carbon:[[@LINE+4]]:17: note: type `B` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var b_init: B = ({.x = 1, .y = 2} as A) as B;
 // CHECK:STDERR:                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -148,7 +148,7 @@ fn F(a: A) {
   // CHECK:STDERR: fail_init_tuple_variable.carbon:[[@LINE+10]]:3: error: cannot copy value of type `Noncopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   var unused a_init: A = (a as ({}, Noncopyable)) as A;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_init_tuple_variable.carbon:[[@LINE+7]]:3: note: type `Noncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_init_tuple_variable.carbon:[[@LINE+7]]:3: note: type `Noncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused a_init: A = (a as ({}, Noncopyable)) as A;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR: fail_init_tuple_variable.carbon:[[@LINE+4]]:26: note: in copy of `A` [InCopy]
@@ -176,7 +176,7 @@ class B {
 // CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+7]]:12: error: cannot convert expression of type `{.x: ()}` to `B` with `as` [ConversionFailure]
 // CHECK:STDERR: var b: B = {.x = ()} as B;
 // CHECK:STDERR:            ^~~~~~~~~~~~~~
-// CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+4]]:12: note: type `{.x: ()}` does not implement interface `Core.As(B)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+4]]:12: note: type `{.x: ()}` does not implement interface `Core.As(B)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var b: B = {.x = ()} as B;
 // CHECK:STDERR:            ^~~~~~~~~~~~~~
 // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/as/basics.carbon

@@ -109,7 +109,7 @@ library "[[@TEST_NAME]]";
 // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+7]]:13: error: cannot convert expression of type `Core.IntLiteral` to `{}` with `as` [ConversionFailure]
 // CHECK:STDERR: let a: {} = 1 as {};
 // CHECK:STDERR:             ^~~~~~~
-// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+4]]:13: note: type `Core.IntLiteral` does not implement interface `Core.As({})` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+4]]:13: note: type `Core.IntLiteral` does not implement interface `Core.As({})` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: let a: {} = 1 as {};
 // CHECK:STDERR:             ^~~~~~~
 // CHECK:STDERR:
@@ -122,7 +122,7 @@ library "[[@TEST_NAME]]";
 // CHECK:STDERR: fail_not_type.carbon:[[@LINE+7]]:32: error: cannot implicitly convert non-type value of type `{.x: ()}` to `type` [ConversionFailureNonTypeToFacet]
 // CHECK:STDERR: let n: {.x: ()} = {.x = ()} as {.x = ()};
 // CHECK:STDERR:                                ^~~~~~~~~
-// CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:32: note: type `{.x: ()}` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:32: note: type `{.x: ()}` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: let n: {.x: ()} = {.x = ()} as {.x = ()};
 // CHECK:STDERR:                                ^~~~~~~~~
 // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/as/const.carbon

@@ -61,7 +61,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_const.carbon:[[@LINE+7]]:24: error: cannot convert expression of type `const X` to `X` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused a: X* = &(reference as X);
   // CHECK:STDERR:                        ^~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_const.carbon:[[@LINE+4]]:24: note: type `const X` does not implement interface `Core.As(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_const.carbon:[[@LINE+4]]:24: note: type `const X` does not implement interface `Core.As(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: X* = &(reference as X);
   // CHECK:STDERR:                        ^~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -69,7 +69,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_const.carbon:[[@LINE+7]]:22: error: cannot convert expression of type `const X*` to `X*` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused b: X* = ptr as X*;
   // CHECK:STDERR:                      ^~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_const.carbon:[[@LINE+4]]:22: note: type `const X*` does not implement interface `Core.As(X*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_const.carbon:[[@LINE+4]]:22: note: type `const X*` does not implement interface `Core.As(X*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused b: X* = ptr as X*;
   // CHECK:STDERR:                      ^~~~~~~~~
   // CHECK:STDERR:

+ 7 - 7
toolchain/check/testdata/as/maybe_unformed.carbon

@@ -42,7 +42,7 @@ fn Use() {
   // CHECK:STDERR: fail_todo_add_unformed_nonref.carbon:[[@LINE+7]]:41: error: cannot convert expression of type `X` to `Core.MaybeUnformed(X)` with `as` [ConversionFailure]
   // CHECK:STDERR:   var unused i: Core.MaybeUnformed(X) = Init() as Core.MaybeUnformed(X);
   // CHECK:STDERR:                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_todo_add_unformed_nonref.carbon:[[@LINE+4]]:41: note: type `X` does not implement interface `Core.As(Core.MaybeUnformed(X))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_add_unformed_nonref.carbon:[[@LINE+4]]:41: note: type `X` does not implement interface `Core.As(Core.MaybeUnformed(X))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused i: Core.MaybeUnformed(X) = Init() as Core.MaybeUnformed(X);
   // CHECK:STDERR:                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -50,7 +50,7 @@ fn Use() {
   // CHECK:STDERR: fail_todo_add_unformed_nonref.carbon:[[@LINE+7]]:41: error: cannot convert expression of type `X` to `Core.MaybeUnformed(X)` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused v: Core.MaybeUnformed(X) = value as Core.MaybeUnformed(X);
   // CHECK:STDERR:                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_todo_add_unformed_nonref.carbon:[[@LINE+4]]:41: note: type `X` does not implement interface `Core.As(Core.MaybeUnformed(X))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_add_unformed_nonref.carbon:[[@LINE+4]]:41: note: type `X` does not implement interface `Core.As(Core.MaybeUnformed(X))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused v: Core.MaybeUnformed(X) = value as Core.MaybeUnformed(X);
   // CHECK:STDERR:                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -73,7 +73,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+7]]:21: error: cannot convert expression of type `Core.MaybeUnformed(X)` to `X` with `as` [ConversionFailure]
   // CHECK:STDERR:   var unused i: X = Init() as X;
   // CHECK:STDERR:                     ^~~~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:21: note: type `Core.MaybeUnformed(X)` does not implement interface `Core.As(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:21: note: type `Core.MaybeUnformed(X)` does not implement interface `Core.As(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused i: X = Init() as X;
   // CHECK:STDERR:                     ^~~~~~~~~~~
   // CHECK:STDERR:
@@ -83,7 +83,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+7]]:21: error: cannot convert expression of type `Core.MaybeUnformed(X)` to `X` with `unsafe as` [ConversionFailure]
   // CHECK:STDERR:   var unused j: X = Init() unsafe as X;
   // CHECK:STDERR:                     ^~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:21: note: type `Core.MaybeUnformed(X)` does not implement interface `Core.UnsafeAs(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:21: note: type `Core.MaybeUnformed(X)` does not implement interface `Core.UnsafeAs(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused j: X = Init() unsafe as X;
   // CHECK:STDERR:                     ^~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -91,7 +91,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+7]]:21: error: cannot convert expression of type `Core.MaybeUnformed(X)` to `X` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused v: X = value as X;
   // CHECK:STDERR:                     ^~~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:21: note: type `Core.MaybeUnformed(X)` does not implement interface `Core.As(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:21: note: type `Core.MaybeUnformed(X)` does not implement interface `Core.As(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused v: X = value as X;
   // CHECK:STDERR:                     ^~~~~~~~~~
   // CHECK:STDERR:
@@ -99,7 +99,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+7]]:24: error: cannot convert expression of type `Core.MaybeUnformed(X)` to `X` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused a: X* = &(reference as X);
   // CHECK:STDERR:                        ^~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:24: note: type `Core.MaybeUnformed(X)` does not implement interface `Core.As(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:24: note: type `Core.MaybeUnformed(X)` does not implement interface `Core.As(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: X* = &(reference as X);
   // CHECK:STDERR:                        ^~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -107,7 +107,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+7]]:22: error: cannot convert expression of type `Core.MaybeUnformed(X)*` to `X*` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused b: X* = ptr as X*;
   // CHECK:STDERR:                      ^~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:22: note: type `Core.MaybeUnformed(X)*` does not implement interface `Core.As(X*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_unformed.carbon:[[@LINE+4]]:22: note: type `Core.MaybeUnformed(X)*` does not implement interface `Core.As(X*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused b: X* = ptr as X*;
   // CHECK:STDERR:                      ^~~~~~~~~
   // CHECK:STDERR:

+ 6 - 6
toolchain/check/testdata/as/partial.carbon

@@ -45,7 +45,7 @@ fn Use() {
   // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `partial X` to `X` [ConversionFailure]
   // CHECK:STDERR:   var unused i: X = Init();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+4]]:3: note: type `partial X` does not implement interface `Core.ImplicitAs(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+4]]:3: note: type `partial X` does not implement interface `Core.ImplicitAs(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused i: X = Init();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -53,7 +53,7 @@ fn Use() {
   // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+7]]:21: error: cannot convert expression of type `partial X` to `X` with `as` [ConversionFailure]
   // CHECK:STDERR:   var unused j: X = Init() as X;
   // CHECK:STDERR:                     ^~~~~~~~~~~
-  // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+4]]:21: note: type `partial X` does not implement interface `Core.As(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+4]]:21: note: type `partial X` does not implement interface `Core.As(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused j: X = Init() as X;
   // CHECK:STDERR:                     ^~~~~~~~~~~
   // CHECK:STDERR:
@@ -61,7 +61,7 @@ fn Use() {
   // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+7]]:21: error: cannot convert expression of type `partial X` to `X` with `unsafe as` [ConversionFailure]
   // CHECK:STDERR:   var unused k: X = Init() unsafe as X;
   // CHECK:STDERR:                     ^~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+4]]:21: note: type `partial X` does not implement interface `Core.UnsafeAs(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_remove_partial_in_init.carbon:[[@LINE+4]]:21: note: type `partial X` does not implement interface `Core.UnsafeAs(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused k: X = Init() unsafe as X;
   // CHECK:STDERR:                     ^~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -85,7 +85,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+7]]:21: error: cannot convert expression of type `partial X` to `X` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused v: X = value as X;
   // CHECK:STDERR:                     ^~~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+4]]:21: note: type `partial X` does not implement interface `Core.As(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+4]]:21: note: type `partial X` does not implement interface `Core.As(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused v: X = value as X;
   // CHECK:STDERR:                     ^~~~~~~~~~
   // CHECK:STDERR:
@@ -93,7 +93,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+7]]:24: error: cannot convert expression of type `partial X` to `X` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused a: X* = &(reference as X);
   // CHECK:STDERR:                        ^~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+4]]:24: note: type `partial X` does not implement interface `Core.As(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+4]]:24: note: type `partial X` does not implement interface `Core.As(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: X* = &(reference as X);
   // CHECK:STDERR:                        ^~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -101,7 +101,7 @@ fn Use() {
   // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+7]]:22: error: cannot convert expression of type `partial X*` to `X*` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused b: X* = ptr as X*;
   // CHECK:STDERR:                      ^~~~~~~~~
-  // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+4]]:22: note: type `partial X*` does not implement interface `Core.As(X*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_cannot_remove_partial.carbon:[[@LINE+4]]:22: note: type `partial X*` does not implement interface `Core.As(X*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused b: X* = ptr as X*;
   // CHECK:STDERR:                      ^~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/as/unsafe_as.carbon

@@ -21,7 +21,7 @@ fn Convert(a: A) -> B {
   // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+7]]:10: error: cannot convert expression of type `A` to `B` with `unsafe as` [ConversionFailure]
   // CHECK:STDERR:   return a unsafe as B;
   // CHECK:STDERR:          ^~~~~~~~~~~~~
-  // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+4]]:10: note: type `A` does not implement interface `Core.UnsafeAs(B)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+4]]:10: note: type `A` does not implement interface `Core.UnsafeAs(B)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return a unsafe as B;
   // CHECK:STDERR:          ^~~~~~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/builtins/int/convert.carbon

@@ -79,7 +79,7 @@ fn F() {
   // CHECK:STDERR: fail_self_test.carbon:[[@LINE+7]]:3: error: cannot convert expression of type `Expect(0)` to `Expect(1)` with `as` [ConversionFailure]
   // CHECK:STDERR:   Test(Int32ToInt32(0)) as Expect(1 as i32);
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_self_test.carbon:[[@LINE+4]]:3: note: type `Expect(0)` does not implement interface `Core.As(Expect(1))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_self_test.carbon:[[@LINE+4]]:3: note: type `Expect(0)` does not implement interface `Core.As(Expect(1))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   Test(Int32ToInt32(0)) as Expect(1 as i32);
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 8 - 8
toolchain/check/testdata/class/adapter/adapt_copy.carbon

@@ -27,7 +27,7 @@ fn F(c: AdaptCopyable) -> AdaptCopyable {
   // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+7]]:26: error: cannot copy value of type `AdaptCopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   var d: AdaptCopyable = c;
   // CHECK:STDERR:                          ^
-  // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+4]]:26: note: type `AdaptCopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+4]]:26: note: type `AdaptCopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var d: AdaptCopyable = c;
   // CHECK:STDERR:                          ^
   // CHECK:STDERR:
@@ -35,7 +35,7 @@ fn F(c: AdaptCopyable) -> AdaptCopyable {
   // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+7]]:10: error: cannot copy value of type `AdaptCopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   return d;
   // CHECK:STDERR:          ^
-  // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+4]]:10: note: type `AdaptCopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+4]]:10: note: type `AdaptCopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return d;
   // CHECK:STDERR:          ^
   // CHECK:STDERR:
@@ -46,7 +46,7 @@ fn InTuple(c: (AdaptCopyable, u32)) -> (AdaptCopyable, u32) {
   // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+7]]:33: error: cannot copy value of type `AdaptCopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   var d: (AdaptCopyable, u32) = c;
   // CHECK:STDERR:                                 ^
-  // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+4]]:33: note: type `AdaptCopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+4]]:33: note: type `AdaptCopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var d: (AdaptCopyable, u32) = c;
   // CHECK:STDERR:                                 ^
   // CHECK:STDERR:
@@ -54,7 +54,7 @@ fn InTuple(c: (AdaptCopyable, u32)) -> (AdaptCopyable, u32) {
   // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+7]]:10: error: cannot copy value of type `AdaptCopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   return d;
   // CHECK:STDERR:          ^
-  // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+4]]:10: note: type `AdaptCopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_adapt_copyable.carbon:[[@LINE+4]]:10: note: type `AdaptCopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return d;
   // CHECK:STDERR:          ^
   // CHECK:STDERR:
@@ -95,7 +95,7 @@ fn G(a: AdaptNoncopyable) -> AdaptNoncopyable {
   // CHECK:STDERR: fail_adapt_not_copyable.carbon:[[@LINE+7]]:29: error: cannot copy value of type `AdaptNoncopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   var b: AdaptNoncopyable = a;
   // CHECK:STDERR:                             ^
-  // CHECK:STDERR: fail_adapt_not_copyable.carbon:[[@LINE+4]]:29: note: type `AdaptNoncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_adapt_not_copyable.carbon:[[@LINE+4]]:29: note: type `AdaptNoncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var b: AdaptNoncopyable = a;
   // CHECK:STDERR:                             ^
   // CHECK:STDERR:
@@ -103,7 +103,7 @@ fn G(a: AdaptNoncopyable) -> AdaptNoncopyable {
   // CHECK:STDERR: fail_adapt_not_copyable.carbon:[[@LINE+7]]:10: error: cannot copy value of type `AdaptNoncopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   return b;
   // CHECK:STDERR:          ^
-  // CHECK:STDERR: fail_adapt_not_copyable.carbon:[[@LINE+4]]:10: note: type `AdaptNoncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_adapt_not_copyable.carbon:[[@LINE+4]]:10: note: type `AdaptNoncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return b;
   // CHECK:STDERR:          ^
   // CHECK:STDERR:
@@ -126,7 +126,7 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect {
   // CHECK:STDERR: fail_adapt_not_copyable_indirect.carbon:[[@LINE+10]]:3: error: cannot copy value of type `Noncopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   var b: AdaptNoncopyableIndirect = a;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_adapt_not_copyable_indirect.carbon:[[@LINE+7]]:3: note: type `Noncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_adapt_not_copyable_indirect.carbon:[[@LINE+7]]:3: note: type `Noncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var b: AdaptNoncopyableIndirect = a;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR: fail_adapt_not_copyable_indirect.carbon:[[@LINE+4]]:37: note: in copy of `AdaptNoncopyableIndirect` [InCopy]
@@ -137,7 +137,7 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect {
   // CHECK:STDERR: fail_adapt_not_copyable_indirect.carbon:[[@LINE+10]]:3: error: cannot copy value of type `Noncopyable` [CopyOfUncopyableType]
   // CHECK:STDERR:   return b;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_adapt_not_copyable_indirect.carbon:[[@LINE+7]]:3: note: type `Noncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_adapt_not_copyable_indirect.carbon:[[@LINE+7]]:3: note: type `Noncopyable` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return b;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR: fail_adapt_not_copyable_indirect.carbon:[[@LINE+4]]:10: note: in copy of `AdaptNoncopyableIndirect` [InCopy]

+ 1 - 1
toolchain/check/testdata/class/adapter/convert_incomplete.carbon

@@ -55,7 +55,7 @@ fn F(p: Adapter(X)*) {
   // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:22: error: cannot convert expression of type `Adapter(X)` to `X*` with `as` [ConversionFailure]
   // CHECK:STDERR:   let unused x: X* = *p as X*;
   // CHECK:STDERR:                      ^~~~~~~~
-  // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:22: note: type `Adapter(X)` does not implement interface `Core.As(X*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:22: note: type `Adapter(X)` does not implement interface `Core.As(X*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused x: X* = *p as X*;
   // CHECK:STDERR:                      ^~~~~~~~
   // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/class/adapter/extend_adapt.carbon

@@ -55,7 +55,7 @@ fn F(a: SomeClassAdapter) {
   // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+10]]:3: error: cannot implicitly convert expression of type `SomeClassAdapter` to `SomeClass` [ConversionFailure]
   // CHECK:STDERR:   a.F();
   // CHECK:STDERR:   ^
-  // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+7]]:3: note: type `SomeClassAdapter` does not implement interface `Core.ImplicitAs(SomeClass)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+7]]:3: note: type `SomeClassAdapter` does not implement interface `Core.ImplicitAs(SomeClass)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   a.F();
   // CHECK:STDERR:   ^
   // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE-14]]:8: note: initializing function parameter [InCallToFunctionParam]
@@ -82,7 +82,7 @@ fn F(a: SomeClassAdapter) -> i32 {
   // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+7]]:10: error: cannot implicitly convert expression of type `SomeClassAdapter` to `SomeClass` [ConversionFailure]
   // CHECK:STDERR:   return a.b;
   // CHECK:STDERR:          ^~~
-  // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+4]]:10: note: type `SomeClassAdapter` does not implement interface `Core.ImplicitAs(SomeClass)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+4]]:10: note: type `SomeClassAdapter` does not implement interface `Core.ImplicitAs(SomeClass)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return a.b;
   // CHECK:STDERR:          ^~~
   // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/class/adapter/fail_adapt_bad_decl.carbon

@@ -18,7 +18,7 @@ class Bad {
   // CHECK:STDERR: fail_not_type.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   adapt 100;
   // CHECK:STDERR:   ^~~~~~~~~~
-  // CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   adapt 100;
   // CHECK:STDERR:   ^~~~~~~~~~
   // CHECK:STDERR:
@@ -39,7 +39,7 @@ class Bad {
   // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   extend adapt 100;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   extend adapt 100;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 4 - 4
toolchain/check/testdata/class/adapter/init_adapt.carbon

@@ -59,7 +59,7 @@ let a: C = {.a = 1, .b = 2};
 // CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:17: error: cannot implicitly convert expression of type `C` to `AdaptC` [ConversionFailure]
 // CHECK:STDERR: let b: AdaptC = a;
 // CHECK:STDERR:                 ^
-// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:17: note: type `C` does not implement interface `Core.ImplicitAs(AdaptC)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:17: note: type `C` does not implement interface `Core.ImplicitAs(AdaptC)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: let b: AdaptC = a;
 // CHECK:STDERR:                 ^
 // CHECK:STDERR:
@@ -68,7 +68,7 @@ let b: AdaptC = a;
 // CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:12: error: cannot implicitly convert expression of type `AdaptC` to `C` [ConversionFailure]
 // CHECK:STDERR: let c: C = b;
 // CHECK:STDERR:            ^
-// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:12: note: type `AdaptC` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:12: note: type `AdaptC` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: let c: C = b;
 // CHECK:STDERR:            ^
 // CHECK:STDERR:
@@ -81,7 +81,7 @@ fn MakeAdaptC() -> AdaptC;
 // CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error: cannot implicitly convert expression of type `C` to `AdaptC` [ConversionFailure]
 // CHECK:STDERR: var d: AdaptC = MakeC();
 // CHECK:STDERR: ^~~~~~~~~~~~~
-// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note: type `C` does not implement interface `Core.ImplicitAs(AdaptC)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note: type `C` does not implement interface `Core.ImplicitAs(AdaptC)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var d: AdaptC = MakeC();
 // CHECK:STDERR: ^~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -90,7 +90,7 @@ var d: AdaptC = MakeC();
 // CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error: cannot implicitly convert expression of type `AdaptC` to `C` [ConversionFailure]
 // CHECK:STDERR: var e: C = MakeAdaptC();
 // CHECK:STDERR: ^~~~~~~~
-// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note: type `AdaptC` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note: type `AdaptC` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var e: C = MakeAdaptC();
 // CHECK:STDERR: ^~~~~~~~
 // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/class/derived_to_base.carbon

@@ -89,7 +89,7 @@ fn PassNonConstB(p: B) {
   // CHECK:STDERR: fail_todo_qualified_non_ptr.carbon:[[@LINE+10]]:14: error: cannot implicitly convert expression of type `B` to `const A` [ConversionFailure]
   // CHECK:STDERR:   TakeConstA(p);
   // CHECK:STDERR:              ^
-  // CHECK:STDERR: fail_todo_qualified_non_ptr.carbon:[[@LINE+7]]:14: note: type `B` does not implement interface `Core.ImplicitAs(const A)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_qualified_non_ptr.carbon:[[@LINE+7]]:14: note: type `B` does not implement interface `Core.ImplicitAs(const A)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   TakeConstA(p);
   // CHECK:STDERR:              ^
   // CHECK:STDERR: fail_todo_qualified_non_ptr.carbon:[[@LINE-10]]:15: note: initializing function parameter [InCallToFunctionParam]
@@ -105,7 +105,7 @@ fn PassConstB(p: const B) {
   // CHECK:STDERR: fail_todo_qualified_non_ptr.carbon:[[@LINE+10]]:14: error: cannot implicitly convert expression of type `const B` to `const A` [ConversionFailure]
   // CHECK:STDERR:   TakeConstA(p);
   // CHECK:STDERR:              ^
-  // CHECK:STDERR: fail_todo_qualified_non_ptr.carbon:[[@LINE+7]]:14: note: type `const B` does not implement interface `Core.ImplicitAs(const A)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_qualified_non_ptr.carbon:[[@LINE+7]]:14: note: type `const B` does not implement interface `Core.ImplicitAs(const A)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   TakeConstA(p);
   // CHECK:STDERR:              ^
   // CHECK:STDERR: fail_todo_qualified_non_ptr.carbon:[[@LINE-26]]:15: note: initializing function parameter [InCallToFunctionParam]

+ 0 - 66
toolchain/check/testdata/class/fail_abstract.carbon

@@ -190,23 +190,6 @@ fn Access(d: Derived) -> {} {
   return d.base.a;
 }
 
-// --- fail_abstract_let_temporary_struct_literal.carbon
-library "[[@TEST_NAME]]";
-
-abstract class Abstract {
-}
-
-fn F() {
-  // CHECK:STDERR: fail_abstract_let_temporary_struct_literal.carbon:[[@LINE+7]]:28: error: initialization of abstract type `Abstract` [AbstractTypeInInit]
-  // CHECK:STDERR:   let unused l: Abstract = {};
-  // CHECK:STDERR:                            ^~
-  // CHECK:STDERR: fail_abstract_let_temporary_struct_literal.carbon:[[@LINE-7]]:1: note: class was declared abstract here [ClassAbstractHere]
-  // CHECK:STDERR: abstract class Abstract {
-  // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR:
-  let unused l: Abstract = {};
-}
-
 // --- fail_todo_abstract_let_temporary.carbon
 library "[[@TEST_NAME]]";
 
@@ -831,55 +814,6 @@ fn CallReturnAbstract() {
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: --- fail_abstract_let_temporary_struct_literal.carbon
-// CHECK:STDOUT:
-// CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %Abstract: type = class_type @Abstract [concrete]
-// CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
-// CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
-// CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
-// CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
-// CHECK:STDOUT:   %pattern_type: type = pattern_type %Abstract [concrete]
-// CHECK:STDOUT:   %empty_struct: %empty_struct_type = struct_value () [concrete]
-// CHECK:STDOUT: }
-// CHECK:STDOUT:
-// CHECK:STDOUT: imports {
-// CHECK:STDOUT:   %Core: <namespace> = namespace file.%Core.import, [concrete] {
-// CHECK:STDOUT:     import Core//prelude
-// CHECK:STDOUT:     import Core//prelude/...
-// CHECK:STDOUT:   }
-// CHECK:STDOUT: }
-// CHECK:STDOUT:
-// CHECK:STDOUT: file {
-// CHECK:STDOUT:   package: <namespace> = namespace [concrete] {
-// CHECK:STDOUT:     .Core = imports.%Core
-// CHECK:STDOUT:     .Abstract = %Abstract.decl
-// CHECK:STDOUT:     .F = %F.decl
-// CHECK:STDOUT:   }
-// CHECK:STDOUT:   %Core.import = import Core
-// CHECK:STDOUT:   %Abstract.decl: type = class_decl @Abstract [concrete = constants.%Abstract] {} {}
-// CHECK:STDOUT:   %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
-// CHECK:STDOUT: }
-// CHECK:STDOUT:
-// CHECK:STDOUT: class @Abstract {
-// CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
-// CHECK:STDOUT:   complete_type_witness = %complete_type
-// CHECK:STDOUT:
-// CHECK:STDOUT: !members:
-// CHECK:STDOUT:   .Self = constants.%Abstract
-// CHECK:STDOUT: }
-// CHECK:STDOUT:
-// CHECK:STDOUT: fn @F() {
-// CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   name_binding_decl {
-// CHECK:STDOUT:     %l.patt: %pattern_type = value_binding_pattern l [concrete]
-// CHECK:STDOUT:   }
-// CHECK:STDOUT:   %.loc14: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
-// CHECK:STDOUT:   %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [concrete = constants.%Abstract]
-// CHECK:STDOUT:   %l: %Abstract = value_binding l, <error> [concrete = <error>]
-// CHECK:STDOUT:   return
-// CHECK:STDOUT: }
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_todo_abstract_let_temporary.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {

+ 5 - 5
toolchain/check/testdata/class/fail_base_bad_type.carbon

@@ -33,7 +33,7 @@ class DeriveFromNonType {
   // CHECK:STDERR: fail_derive_from_non_type.carbon:[[@LINE+7]]:16: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   extend base: 32;
   // CHECK:STDERR:                ^~
-  // CHECK:STDERR: fail_derive_from_non_type.carbon:[[@LINE+4]]:16: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_derive_from_non_type.carbon:[[@LINE+4]]:16: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   extend base: 32;
   // CHECK:STDERR:                ^~
   // CHECK:STDERR:
@@ -59,7 +59,7 @@ class DeriveFromi32 {
 // CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+7]]:53: error: cannot implicitly convert expression of type `DeriveFromi32*` to `i32*` [ConversionFailure]
 // CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; }
 // CHECK:STDERR:                                                     ^~~~~~~~~
-// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+4]]:53: note: type `DeriveFromi32*` does not implement interface `Core.ImplicitAs(i32*)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+4]]:53: note: type `DeriveFromi32*` does not implement interface `Core.ImplicitAs(i32*)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; }
 // CHECK:STDERR:                                                     ^~~~~~~~~
 // CHECK:STDERR:
@@ -88,7 +88,7 @@ class DeriveFromTuple {
 // CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+7]]:61: error: cannot implicitly convert expression of type `DeriveFromTuple*` to `(Base,)*` [ConversionFailure]
 // CHECK:STDERR: fn ConvertToBadBaseTuple(p: DeriveFromTuple*) -> (Base,)* { return p; }
 // CHECK:STDERR:                                                             ^~~~~~~~~
-// CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+4]]:61: note: type `DeriveFromTuple*` does not implement interface `Core.ImplicitAs((Base,)*)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+4]]:61: note: type `DeriveFromTuple*` does not implement interface `Core.ImplicitAs((Base,)*)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: fn ConvertToBadBaseTuple(p: DeriveFromTuple*) -> (Base,)* { return p; }
 // CHECK:STDERR:                                                             ^~~~~~~~~
 // CHECK:STDERR:
@@ -113,7 +113,7 @@ class DeriveFromStruct {
 // CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+7]]:74: error: cannot implicitly convert expression of type `DeriveFromStruct*` to `{.a: i32, .b: i32}*` [ConversionFailure]
 // CHECK:STDERR: fn ConvertToBadBaseStruct(p: DeriveFromStruct*) -> {.a: i32, .b: i32}* { return p; }
 // CHECK:STDERR:                                                                          ^~~~~~~~~
-// CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+4]]:74: note: type `DeriveFromStruct*` does not implement interface `Core.ImplicitAs({.a: i32, .b: i32}*)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+4]]:74: note: type `DeriveFromStruct*` does not implement interface `Core.ImplicitAs({.a: i32, .b: i32}*)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: fn ConvertToBadBaseStruct(p: DeriveFromStruct*) -> {.a: i32, .b: i32}* { return p; }
 // CHECK:STDERR:                                                                          ^~~~~~~~~
 // CHECK:STDERR:
@@ -146,7 +146,7 @@ class DeriveFromIncomplete {
 // CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+7]]:74: error: cannot implicitly convert expression of type `DeriveFromIncomplete*` to `Incomplete*` [ConversionFailure]
 // CHECK:STDERR: fn ConvertToBadBaseIncomplete(p: DeriveFromIncomplete*) -> Incomplete* { return p; }
 // CHECK:STDERR:                                                                          ^~~~~~~~~
-// CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+4]]:74: note: type `DeriveFromIncomplete*` does not implement interface `Core.ImplicitAs(Incomplete*)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+4]]:74: note: type `DeriveFromIncomplete*` does not implement interface `Core.ImplicitAs(Incomplete*)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: fn ConvertToBadBaseIncomplete(p: DeriveFromIncomplete*) -> Incomplete* { return p; }
 // CHECK:STDERR:                                                                          ^~~~~~~~~
 // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/class/fail_compound_type_mismatch.carbon

@@ -22,7 +22,7 @@ fn AccessBInA(a: A) -> i32 {
   // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+7]]:10: error: cannot implicitly convert expression of type `A` to `B` [ConversionFailure]
   // CHECK:STDERR:   return a.(B.b);
   // CHECK:STDERR:          ^~~~~~~
-  // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+4]]:10: note: type `A` does not implement interface `Core.ImplicitAs(B)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+4]]:10: note: type `A` does not implement interface `Core.ImplicitAs(B)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return a.(B.b);
   // CHECK:STDERR:          ^~~~~~~
   // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/class/fail_derived_to_base.carbon

@@ -26,7 +26,7 @@ class B2 {
 // CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+7]]:38: error: cannot implicitly convert expression of type `B2*` to `A1*` [ConversionFailure]
 // CHECK:STDERR: fn ConvertUnrelated(p: B2*) -> A1* { return p; }
 // CHECK:STDERR:                                      ^~~~~~~~~
-// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:38: note: type `B2*` does not implement interface `Core.ImplicitAs(A1*)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:38: note: type `B2*` does not implement interface `Core.ImplicitAs(A1*)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: fn ConvertUnrelated(p: B2*) -> A1* { return p; }
 // CHECK:STDERR:                                      ^~~~~~~~~
 // CHECK:STDERR:
@@ -37,7 +37,7 @@ class Incomplete;
 // CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+7]]:47: error: cannot implicitly convert expression of type `Incomplete*` to `A2*` [ConversionFailure]
 // CHECK:STDERR: fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; }
 // CHECK:STDERR:                                               ^~~~~~~~~
-// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:47: note: type `Incomplete*` does not implement interface `Core.ImplicitAs(A2*)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:47: note: type `Incomplete*` does not implement interface `Core.ImplicitAs(A2*)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; }
 // CHECK:STDERR:                                               ^~~~~~~~~
 // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/class/fail_init_as_inplace.carbon

@@ -24,7 +24,7 @@ fn F() {
   // CHECK:STDERR: fail_init_as_inplace.carbon:[[@LINE+7]]:18: error: cannot copy value of type `Class` [CopyOfUncopyableType]
   // CHECK:STDERR:   var c: Class = {.a = 1, .b = 2} as Class;
   // CHECK:STDERR:                  ^~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_init_as_inplace.carbon:[[@LINE+4]]:18: note: type `Class` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_init_as_inplace.carbon:[[@LINE+4]]:18: note: type `Class` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var c: Class = {.a = 1, .b = 2} as Class;
   // CHECK:STDERR:                  ^~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/class/fail_self.carbon

@@ -36,7 +36,7 @@ fn Class.G() -> Self {
   // CHECK:STDERR: fail_self.carbon:[[@LINE+7]]:10: error: cannot copy value of type `Class` [CopyOfUncopyableType]
   // CHECK:STDERR:   return self;
   // CHECK:STDERR:          ^~~~
-  // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:10: note: type `Class` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:10: note: type `Class` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return self;
   // CHECK:STDERR:          ^~~~
   // CHECK:STDERR:
@@ -51,7 +51,7 @@ fn CallWrongSelf(ws: WrongSelf) {
   // CHECK:STDERR: fail_self.carbon:[[@LINE+10]]:3: error: cannot implicitly convert expression of type `WrongSelf` to `Class` [ConversionFailure]
   // CHECK:STDERR:   ws.F();
   // CHECK:STDERR:   ^~
-  // CHECK:STDERR: fail_self.carbon:[[@LINE+7]]:3: note: type `WrongSelf` does not implement interface `Core.ImplicitAs(Class)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_self.carbon:[[@LINE+7]]:3: note: type `WrongSelf` does not implement interface `Core.ImplicitAs(Class)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   ws.F();
   // CHECK:STDERR:   ^~
   // CHECK:STDERR: fail_self.carbon:[[@LINE-10]]:8: note: initializing function parameter [InCallToFunctionParam]

+ 2 - 2
toolchain/check/testdata/class/generic/adapt.carbon

@@ -55,7 +55,7 @@ fn Access(a: Adapter) -> i32 {
   // CHECK:STDERR: fail_todo_extend_adapt_specific_type.carbon:[[@LINE+7]]:10: error: cannot implicitly convert expression of type `Adapter` to `C(i32)` [ConversionFailure]
   // CHECK:STDERR:   return a.x;
   // CHECK:STDERR:          ^~~
-  // CHECK:STDERR: fail_todo_extend_adapt_specific_type.carbon:[[@LINE+4]]:10: note: type `Adapter` does not implement interface `Core.ImplicitAs(C(i32))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_extend_adapt_specific_type.carbon:[[@LINE+4]]:10: note: type `Adapter` does not implement interface `Core.ImplicitAs(C(i32))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return a.x;
   // CHECK:STDERR:          ^~~
   // CHECK:STDERR:
@@ -88,7 +88,7 @@ fn ImportedAccess(a: Adapter) -> i32 {
   // CHECK:STDERR: fail_todo_import_extend_adapt_specific_type.carbon:[[@LINE+7]]:10: error: cannot implicitly convert expression of type `Adapter` to `C(i32)` [ConversionFailure]
   // CHECK:STDERR:   return a.x;
   // CHECK:STDERR:          ^~~
-  // CHECK:STDERR: fail_todo_import_extend_adapt_specific_type.carbon:[[@LINE+4]]:10: note: type `Adapter` does not implement interface `Core.ImplicitAs(C(i32))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_import_extend_adapt_specific_type.carbon:[[@LINE+4]]:10: note: type `Adapter` does not implement interface `Core.ImplicitAs(C(i32))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return a.x;
   // CHECK:STDERR:          ^~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/class/generic/call.carbon

@@ -62,7 +62,7 @@ class Class(T:! type, N:! i32) {}
 // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+10]]:8: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
 // CHECK:STDERR: var a: Class(5, i32*);
 // CHECK:STDERR:        ^~~~~~~~~~~~~~
-// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+7]]:8: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+7]]:8: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var a: Class(5, i32*);
 // CHECK:STDERR:        ^~~~~~~~~~~~~~
 // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:13: note: initializing generic parameter `T` declared here [InitializingGenericParam]

+ 32 - 32
toolchain/check/testdata/class/generic/complete_in_conversion.carbon

@@ -21,16 +21,16 @@ base class B {}
 class A(N:! i32) {
   extend base: B;
 
-  // CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+3]]:10: error: integer type width of 0 is not positive [IntWidthNotPositive]
-  // CHECK:STDERR:   var n: Int(N);
-  // CHECK:STDERR:          ^~~~~~
   var n: Int(N);
 }
 
 fn F(a: A(0)*) {
-  // CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:22: note: in `A(0)` used here [ResolvingSpecificHere]
+  // CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+7]]:22: error: unable to monomorphize specific `A(0)` [ResolvingSpecificHere]
   // CHECK:STDERR:   let unused b: B* = a;
   // CHECK:STDERR:                      ^
+  // CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE-7]]:10: note: integer type width of 0 is not positive [IntWidthNotPositive]
+  // CHECK:STDERR:   var n: Int(N);
+  // CHECK:STDERR:          ^~~~~~
   // CHECK:STDERR:
   let unused b: B* = a;
 }
@@ -169,18 +169,18 @@ fn F(a: A(0)*) {
 // CHECK:STDOUT:     %a.param_patt: %pattern_type.f32 = value_param_pattern %a.patt, call_param0 [concrete]
 // CHECK:STDOUT:   } {
 // CHECK:STDOUT:     %a.param: %ptr.0e2 = value_param call_param0
-// CHECK:STDOUT:     %.loc15_13: type = splice_block %ptr.loc15 [concrete = constants.%ptr.0e2] {
+// CHECK:STDOUT:     %.loc12_13: type = splice_block %ptr.loc12 [concrete = constants.%ptr.0e2] {
 // CHECK:STDOUT:       %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A.generic]
 // CHECK:STDOUT:       %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
 // CHECK:STDOUT:       %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
-// CHECK:STDOUT:       %bound_method.loc15_12.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
+// CHECK:STDOUT:       %bound_method.loc12_12.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
 // CHECK:STDOUT:       %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
-// CHECK:STDOUT:       %bound_method.loc15_12.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e]
-// CHECK:STDOUT:       %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc15_12.2(%int_0) [concrete = constants.%int_0.6a9]
-// CHECK:STDOUT:       %.loc15_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.6a9]
-// CHECK:STDOUT:       %.loc15_12.2: %i32 = converted %int_0, %.loc15_12.1 [concrete = constants.%int_0.6a9]
+// CHECK:STDOUT:       %bound_method.loc12_12.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e]
+// CHECK:STDOUT:       %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc12_12.2(%int_0) [concrete = constants.%int_0.6a9]
+// CHECK:STDOUT:       %.loc12_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.6a9]
+// CHECK:STDOUT:       %.loc12_12.2: %i32 = converted %int_0, %.loc12_12.1 [concrete = constants.%int_0.6a9]
 // CHECK:STDOUT:       %A: type = class_type @A, @A(constants.%int_0.6a9) [concrete = constants.%A.dc6]
-// CHECK:STDOUT:       %ptr.loc15: type = ptr_type %A [concrete = constants.%ptr.0e2]
+// CHECK:STDOUT:       %ptr.loc12: type = ptr_type %A [concrete = constants.%ptr.0e2]
 // CHECK:STDOUT:     }
 // CHECK:STDOUT:     %a: %ptr.0e2 = value_binding a, %a.param
 // CHECK:STDOUT:   }
@@ -203,13 +203,13 @@ fn F(a: A(0)*) {
 // CHECK:STDOUT:   %A: type = class_type @A, @A(%N.loc6_9.1) [symbolic = %A (constants.%A.54d)]
 // CHECK:STDOUT:   %A.elem.loc7: type = unbound_element_type %A, constants.%B [symbolic = %A.elem.loc7 (constants.%A.elem.ade)]
 // CHECK:STDOUT:   %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %N.loc6_9.1, constants.%Int.as.ImplicitAs.impl.Convert.dd4 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound.d32)]
-// CHECK:STDOUT:   %bound_method.loc12_14.3: <bound method> = bound_method %N.loc6_9.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc12_14.3 (constants.%bound_method.d76)]
-// CHECK:STDOUT:   %Int.as.ImplicitAs.impl.Convert.call.loc12_14.2: init Core.IntLiteral = call %bound_method.loc12_14.3(%N.loc6_9.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc12_14.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
-// CHECK:STDOUT:   %iN.builtin: type = int_type signed, %Int.as.ImplicitAs.impl.Convert.call.loc12_14.2 [symbolic = %iN.builtin (constants.%iN.builtin.f1b)]
+// CHECK:STDOUT:   %bound_method.loc9_14.3: <bound method> = bound_method %N.loc6_9.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc9_14.3 (constants.%bound_method.d76)]
+// CHECK:STDOUT:   %Int.as.ImplicitAs.impl.Convert.call.loc9_14.2: init Core.IntLiteral = call %bound_method.loc9_14.3(%N.loc6_9.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc9_14.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
+// CHECK:STDOUT:   %iN.builtin: type = int_type signed, %Int.as.ImplicitAs.impl.Convert.call.loc9_14.2 [symbolic = %iN.builtin (constants.%iN.builtin.f1b)]
 // CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %iN.builtin [symbolic = %require_complete (constants.%require_complete.c9d)]
-// CHECK:STDOUT:   %A.elem.loc12: type = unbound_element_type %A, %iN.builtin [symbolic = %A.elem.loc12 (constants.%A.elem.a53)]
+// CHECK:STDOUT:   %A.elem.loc9: type = unbound_element_type %A, %iN.builtin [symbolic = %A.elem.loc9 (constants.%A.elem.a53)]
 // CHECK:STDOUT:   %struct_type.base.n: type = struct_type {.base: %B, .n: @A.%iN.builtin (%iN.builtin.f1b)} [symbolic = %struct_type.base.n (constants.%struct_type.base.n)]
-// CHECK:STDOUT:   %complete_type.loc13_1.2: <witness> = complete_type_witness %struct_type.base.n [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.8c7)]
+// CHECK:STDOUT:   %complete_type.loc10_1.2: <witness> = complete_type_witness %struct_type.base.n [symbolic = %complete_type.loc10_1.2 (constants.%complete_type.8c7)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   class {
 // CHECK:STDOUT:     %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
@@ -217,18 +217,18 @@ fn F(a: A(0)*) {
 // CHECK:STDOUT:     %Int.ref: %Int.type.b3e = name_ref Int, file.%Int.decl [concrete = constants.%Int.d6d]
 // CHECK:STDOUT:     %N.ref: %i32 = name_ref N, %N.loc6_9.2 [symbolic = %N.loc6_9.1 (constants.%N.5de)]
 // CHECK:STDOUT:     %impl.elem0: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4]
-// CHECK:STDOUT:     %bound_method.loc12_14.1: <bound method> = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound.d32)]
+// CHECK:STDOUT:     %bound_method.loc9_14.1: <bound method> = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound.d32)]
 // CHECK:STDOUT:     %specific_fn: <specific function> = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
-// CHECK:STDOUT:     %bound_method.loc12_14.2: <bound method> = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc12_14.3 (constants.%bound_method.d76)]
-// CHECK:STDOUT:     %Int.as.ImplicitAs.impl.Convert.call.loc12_14.1: init Core.IntLiteral = call %bound_method.loc12_14.2(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc12_14.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
-// CHECK:STDOUT:     %.loc12_14.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc12_14.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc12_14.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
-// CHECK:STDOUT:     %.loc12_14.2: Core.IntLiteral = converted %N.ref, %.loc12_14.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc12_14.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
-// CHECK:STDOUT:     %Int.call: init type = call %Int.ref(%.loc12_14.2) [symbolic = %iN.builtin (constants.%iN.builtin.f1b)]
-// CHECK:STDOUT:     %.loc12_15.1: type = value_of_initializer %Int.call [symbolic = %iN.builtin (constants.%iN.builtin.f1b)]
-// CHECK:STDOUT:     %.loc12_15.2: type = converted %Int.call, %.loc12_15.1 [symbolic = %iN.builtin (constants.%iN.builtin.f1b)]
-// CHECK:STDOUT:     %.loc12_8: @A.%A.elem.loc12 (%A.elem.a53) = field_decl n, element1 [concrete]
-// CHECK:STDOUT:     %complete_type.loc13_1.1: <witness> = complete_type_witness constants.%struct_type.base.n [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.8c7)]
-// CHECK:STDOUT:     complete_type_witness = %complete_type.loc13_1.1
+// CHECK:STDOUT:     %bound_method.loc9_14.2: <bound method> = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc9_14.3 (constants.%bound_method.d76)]
+// CHECK:STDOUT:     %Int.as.ImplicitAs.impl.Convert.call.loc9_14.1: init Core.IntLiteral = call %bound_method.loc9_14.2(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc9_14.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
+// CHECK:STDOUT:     %.loc9_14.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc9_14.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc9_14.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
+// CHECK:STDOUT:     %.loc9_14.2: Core.IntLiteral = converted %N.ref, %.loc9_14.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc9_14.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
+// CHECK:STDOUT:     %Int.call: init type = call %Int.ref(%.loc9_14.2) [symbolic = %iN.builtin (constants.%iN.builtin.f1b)]
+// CHECK:STDOUT:     %.loc9_15.1: type = value_of_initializer %Int.call [symbolic = %iN.builtin (constants.%iN.builtin.f1b)]
+// CHECK:STDOUT:     %.loc9_15.2: type = converted %Int.call, %.loc9_15.1 [symbolic = %iN.builtin (constants.%iN.builtin.f1b)]
+// CHECK:STDOUT:     %.loc9_8: @A.%A.elem.loc9 (%A.elem.a53) = field_decl n, element1 [concrete]
+// CHECK:STDOUT:     %complete_type.loc10_1.1: <witness> = complete_type_witness constants.%struct_type.base.n [symbolic = %complete_type.loc10_1.2 (constants.%complete_type.8c7)]
+// CHECK:STDOUT:     complete_type_witness = %complete_type.loc10_1.1
 // CHECK:STDOUT:
 // CHECK:STDOUT:   !members:
 // CHECK:STDOUT:     .Self = constants.%A.54d
@@ -236,7 +236,7 @@ fn F(a: A(0)*) {
 // CHECK:STDOUT:     .base = %.loc7
 // CHECK:STDOUT:     .Int = <poisoned>
 // CHECK:STDOUT:     .N = <poisoned>
-// CHECK:STDOUT:     .n = %.loc12_8
+// CHECK:STDOUT:     .n = %.loc9_8
 // CHECK:STDOUT:     extend %B.ref
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
@@ -272,12 +272,12 @@ fn F(a: A(0)*) {
 // CHECK:STDOUT:   %A => constants.%A.dc6
 // CHECK:STDOUT:   %A.elem.loc7 => constants.%A.elem.665
 // CHECK:STDOUT:   %Int.as.ImplicitAs.impl.Convert.bound => constants.%Int.as.ImplicitAs.impl.Convert.bound.564
-// CHECK:STDOUT:   %bound_method.loc12_14.3 => constants.%bound_method.77d
-// CHECK:STDOUT:   %Int.as.ImplicitAs.impl.Convert.call.loc12_14.2 => constants.%int_0.5c6
+// CHECK:STDOUT:   %bound_method.loc9_14.3 => constants.%bound_method.77d
+// CHECK:STDOUT:   %Int.as.ImplicitAs.impl.Convert.call.loc9_14.2 => constants.%int_0.5c6
 // CHECK:STDOUT:   %iN.builtin => <error>
 // CHECK:STDOUT:   %require_complete => <error>
-// CHECK:STDOUT:   %A.elem.loc12 => <error>
+// CHECK:STDOUT:   %A.elem.loc9 => <error>
 // CHECK:STDOUT:   %struct_type.base.n => <error>
-// CHECK:STDOUT:   %complete_type.loc13_1.2 => <error>
+// CHECK:STDOUT:   %complete_type.loc10_1.2 => <error>
 // CHECK:STDOUT: }
 // CHECK:STDOUT:

+ 1 - 1
toolchain/check/testdata/class/generic/import.carbon

@@ -62,7 +62,7 @@ fn Use() {
   // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `CompleteClass(i32)` to `CompleteClass(i32*)` [ConversionFailure]
   // CHECK:STDERR:   var unused v: CompleteClass(i32*) = F();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+4]]:3: note: type `CompleteClass(i32)` does not implement interface `Core.ImplicitAs(CompleteClass(i32*))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+4]]:3: note: type `CompleteClass(i32)` does not implement interface `Core.ImplicitAs(CompleteClass(i32*))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused v: CompleteClass(i32*) = F();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 3 - 3
toolchain/check/testdata/class/generic/stringify.carbon

@@ -23,7 +23,7 @@ var v: NoParams;
 // CHECK:STDERR: fail_empty_params.carbon:[[@LINE+7]]:1: error: cannot implicitly convert expression of type `NoParams` to `EmptyParams()` [ConversionFailure]
 // CHECK:STDERR: var w: EmptyParams() = v;
 // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
-// CHECK:STDERR: fail_empty_params.carbon:[[@LINE+4]]:1: note: type `NoParams` does not implement interface `Core.ImplicitAs(EmptyParams())` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_empty_params.carbon:[[@LINE+4]]:1: note: type `NoParams` does not implement interface `Core.ImplicitAs(EmptyParams())` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var w: EmptyParams() = v;
 // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -44,7 +44,7 @@ var v: Outer({}*);
 // CHECK:STDERR: fail_nested.carbon:[[@LINE+7]]:1: error: cannot implicitly convert expression of type `Outer({}*)` to `Inner({.a: i32}*)` [ConversionFailure]
 // CHECK:STDERR: var w: Outer({}*).Inner({.a: i32}*) = v;
 // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// CHECK:STDERR: fail_nested.carbon:[[@LINE+4]]:1: note: type `Outer({}*)` does not implement interface `Core.ImplicitAs(Inner({.a: i32}*))` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_nested.carbon:[[@LINE+4]]:1: note: type `Outer({}*)` does not implement interface `Core.ImplicitAs(Inner({.a: i32}*))` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var w: Outer({}*).Inner({.a: i32}*) = v;
 // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -59,7 +59,7 @@ class C(N:! i32) {}
 // CHECK:STDERR: fail_int_value.carbon:[[@LINE+7]]:1: error: cannot implicitly convert expression of type `()` to `C(123)` [ConversionFailure]
 // CHECK:STDERR: var v: C(123) = ();
 // CHECK:STDERR: ^~~~~~~~~~~~~
-// CHECK:STDERR: fail_int_value.carbon:[[@LINE+4]]:1: note: type `()` does not implement interface `Core.ImplicitAs(C(123))` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_int_value.carbon:[[@LINE+4]]:1: note: type `()` does not implement interface `Core.ImplicitAs(C(123))` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var v: C(123) = ();
 // CHECK:STDERR: ^~~~~~~~~~~~~
 // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/class/partial.carbon

@@ -130,7 +130,7 @@ fn G(p: partial C*) -> C* {
   // CHECK:STDERR: fail_convert_to_nonpartial.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `partial C*` to `C*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_convert_to_nonpartial.carbon:[[@LINE+4]]:3: note: type `partial C*` does not implement interface `Core.ImplicitAs(C*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_convert_to_nonpartial.carbon:[[@LINE+4]]:3: note: type `partial C*` does not implement interface `Core.ImplicitAs(C*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/class/self.carbon

@@ -39,7 +39,7 @@ class Class {
   // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+7]]:25: error: cannot implicitly convert non-type value of type `Class` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   fn F[self: Self]() -> self;
   // CHECK:STDERR:                         ^~~~
-  // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+4]]:25: note: type `Class` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+4]]:25: note: type `Class` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn F[self: Self]() -> self;
   // CHECK:STDERR:                         ^~~~
   // CHECK:STDERR:

+ 6 - 6
toolchain/check/testdata/const/basics.carbon

@@ -54,7 +54,7 @@ fn G(p: const (const C)**) -> C** {
   // CHECK:STDERR: fail_collapse_in_error.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `const C**` to `C**` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_collapse_in_error.carbon:[[@LINE+4]]:3: note: type `const C**` does not implement interface `Core.ImplicitAs(C**)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_collapse_in_error.carbon:[[@LINE+4]]:3: note: type `const C**` does not implement interface `Core.ImplicitAs(C**)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -94,7 +94,7 @@ class X {}
 // CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+7]]:40: error: cannot copy value of type `X` [CopyOfUncopyableType]
 // CHECK:STDERR: var init_non_const_from_non_const: X = {} as X;
 // CHECK:STDERR:                                        ^~~~~~~
-// CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+4]]:40: note: type `X` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+4]]:40: note: type `X` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var init_non_const_from_non_const: X = {} as X;
 // CHECK:STDERR:                                        ^~~~~~~
 // CHECK:STDERR:
@@ -102,7 +102,7 @@ var init_non_const_from_non_const: X = {} as X;
 // CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+7]]:1: error: cannot copy value of type `X` [CopyOfUncopyableType]
 // CHECK:STDERR: var init_non_const_from_const: X = ({} as X) as const X;
 // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+4]]:1: note: type `X` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+4]]:1: note: type `X` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var init_non_const_from_const: X = ({} as X) as const X;
 // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -110,7 +110,7 @@ var init_non_const_from_const: X = ({} as X) as const X;
 // CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+7]]:1: error: cannot copy value of type `const X` [CopyOfUncopyableType]
 // CHECK:STDERR: var init_const_from_non_const: const X = {} as X;
 // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+4]]:1: note: type `const X` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+4]]:1: note: type `const X` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var init_const_from_non_const: const X = {} as X;
 // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -118,7 +118,7 @@ var init_const_from_non_const: const X = {} as X;
 // CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+7]]:38: error: cannot copy value of type `const X` [CopyOfUncopyableType]
 // CHECK:STDERR: var init_const_from_const: const X = ({} as X) as const X;
 // CHECK:STDERR:                                      ^~~~~~~~~~~~~~~~~~~~
-// CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+4]]:38: note: type `const X` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_todo_add_or_remove_while_initializing.carbon:[[@LINE+4]]:38: note: type `const X` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var init_const_from_const: const X = ({} as X) as const X;
 // CHECK:STDERR:                                      ^~~~~~~~~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -146,7 +146,7 @@ fn PassConstReferenceToReference(p: const X*) {
   // CHECK:STDERR: fail_remove_while_forming_reference.carbon:[[@LINE+10]]:3: error: cannot implicitly convert expression of type `const X` to `X` [ConversionFailure]
   // CHECK:STDERR:   p->(X.TakeSelf)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_remove_while_forming_reference.carbon:[[@LINE+7]]:3: note: type `const X` does not implement interface `Core.ImplicitAs(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_remove_while_forming_reference.carbon:[[@LINE+7]]:3: note: type `const X` does not implement interface `Core.ImplicitAs(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   p->(X.TakeSelf)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~
   // CHECK:STDERR: fail_remove_while_forming_reference.carbon:[[@LINE-10]]:15: note: initializing function parameter [InCallToFunctionParam]

+ 2 - 2
toolchain/check/testdata/deduce/array.carbon

@@ -65,7 +65,7 @@ fn G() -> C {
   // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE+10]]:12: error: cannot implicitly convert expression of type `array(C, 3)` to `array(C, 2)` [ConversionFailure]
   // CHECK:STDERR:   return F(a);
   // CHECK:STDERR:            ^
-  // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE+7]]:12: note: type `array(C, 3)` does not implement interface `Core.ImplicitAs(array(C, 2))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE+7]]:12: note: type `array(C, 3)` does not implement interface `Core.ImplicitAs(array(C, 2))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return F(a);
   // CHECK:STDERR:            ^
   // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE-11]]:16: note: initializing function parameter [InCallToFunctionParam]
@@ -90,7 +90,7 @@ fn G() -> i32 {
   // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+10]]:12: error: cannot implicitly convert expression of type `array(D, 3)` to `array(C, 3)` [ConversionFailure]
   // CHECK:STDERR:   return F(a);
   // CHECK:STDERR:            ^
-  // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:12: note: type `array(D, 3)` does not implement interface `Core.ImplicitAs(array(C, 3))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:12: note: type `array(D, 3)` does not implement interface `Core.ImplicitAs(array(C, 3))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return F(a);
   // CHECK:STDERR:            ^
   // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE-11]]:36: note: initializing function parameter [InCallToFunctionParam]

+ 2 - 2
toolchain/check/testdata/deduce/binding_pattern.carbon

@@ -24,7 +24,7 @@ fn F(unused U:! type, V:! type) {
   // CHECK:STDERR: fail_incompatible_deduce.carbon:[[@LINE+10]]:15: error: cannot implicitly convert expression of type `{}` to `V` [ConversionFailure]
   // CHECK:STDERR:   C(V).Create({});
   // CHECK:STDERR:               ^~
-  // CHECK:STDERR: fail_incompatible_deduce.carbon:[[@LINE+7]]:15: note: type `{}` does not implement interface `Core.ImplicitAs(V)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_incompatible_deduce.carbon:[[@LINE+7]]:15: note: type `{}` does not implement interface `Core.ImplicitAs(V)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   C(V).Create({});
   // CHECK:STDERR:               ^~
   // CHECK:STDERR: fail_incompatible_deduce.carbon:[[@LINE-10]]:20: note: initializing function parameter [InCallToFunctionParam]
@@ -47,7 +47,7 @@ fn F(unused U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) {
   // CHECK:STDERR: fail_todo_compatible_deduce.carbon:[[@LINE+10]]:15: error: cannot implicitly convert expression of type `{}` to `V` [ConversionFailure]
   // CHECK:STDERR:   C(V).Create({});
   // CHECK:STDERR:               ^~
-  // CHECK:STDERR: fail_todo_compatible_deduce.carbon:[[@LINE+7]]:15: note: type `{}` does not implement interface `Core.ImplicitAs(V)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_compatible_deduce.carbon:[[@LINE+7]]:15: note: type `{}` does not implement interface `Core.ImplicitAs(V)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   C(V).Create({});
   // CHECK:STDERR:               ^~
   // CHECK:STDERR: fail_todo_compatible_deduce.carbon:[[@LINE-11]]:20: note: initializing function parameter [InCallToFunctionParam]

+ 2 - 2
toolchain/check/testdata/eval/symbolic.carbon

@@ -29,7 +29,6 @@ fn H() {
 
 
 // --- fail_symbolic_call_to_eval_fn_invalid_instantiation.carbon
-// CHECK:STDERR: fail_symbolic_call_to_eval_fn_invalid_instantiation.carbon: error: cannot initialize tuple of 0 elements from tuple with 2 elements [TupleInitElementCountMismatch]
 // TODO: Provide a location for the error message.
 
 library "[[@TEST_NAME]]";
@@ -44,9 +43,10 @@ fn G(B:! bool) {
 }
 
 fn H() {
-  // CHECK:STDERR: fail_symbolic_call_to_eval_fn_invalid_instantiation.carbon:[[@LINE+4]]:3: note: in `G(true)` used here [ResolvingSpecificHere]
+  // CHECK:STDERR: fail_symbolic_call_to_eval_fn_invalid_instantiation.carbon:[[@LINE+5]]:3: error: unable to monomorphize specific `G(true)` [ResolvingSpecificHere]
   // CHECK:STDERR:   G(true);
   // CHECK:STDERR:   ^
+  // CHECK:STDERR: fail_symbolic_call_to_eval_fn_invalid_instantiation.carbon: note: cannot initialize tuple of 0 elements from tuple with 2 elements [TupleInitElementCountMismatch]
   // CHECK:STDERR:
   G(true);
 }

+ 4 - 4
toolchain/check/testdata/facet/access.carbon

@@ -214,7 +214,7 @@ fn F(U:! I where .X = .Self) {
   // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+7]]:14: error: cannot implicitly convert expression of type `.Self` to `U` [ConversionFailure]
   // CHECK:STDERR:   let u: U = U.(I.G)();
   // CHECK:STDERR:              ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+4]]:14: note: type `.Self` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+4]]:14: note: type `.Self` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let u: U = U.(I.G)();
   // CHECK:STDERR:              ^~~~~~~~~
   // CHECK:STDERR:
@@ -226,7 +226,7 @@ fn F(U:! I where .X = .Self) {
   // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `U` into type implementing `I` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   u.(I.G)();
   // CHECK:STDERR:   ^~~~~~~
-  // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+4]]:3: note: type `U` does not implement interface `Core.ImplicitAs(I)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+4]]:3: note: type `U` does not implement interface `Core.ImplicitAs(I)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   u.(I.G)();
   // CHECK:STDERR:   ^~~~~~~
   // CHECK:STDERR:
@@ -238,7 +238,7 @@ fn F(U:! I where .X = .Self) {
   // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `.Self` into type implementing `I` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   U.(I.G)().(I.G)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+4]]:3: note: type `.Self` does not implement interface `Core.ImplicitAs(I)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_compound_access_through_call.carbon:[[@LINE+4]]:3: note: type `.Self` does not implement interface `Core.ImplicitAs(I)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   U.(I.G)().(I.G)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -262,7 +262,7 @@ fn F(U:! I where .X = .Self, v: U) {
   // CHECK:STDERR: fail_todo_compound_access_through_call_with_self_param.carbon:[[@LINE+7]]:15: error: cannot implicitly convert expression of type `.Self*` to `U*` [ConversionFailure]
   // CHECK:STDERR:   let u: U* = v.(I.G)();
   // CHECK:STDERR:               ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_compound_access_through_call_with_self_param.carbon:[[@LINE+4]]:15: note: type `.Self*` does not implement interface `Core.ImplicitAs(U*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_compound_access_through_call_with_self_param.carbon:[[@LINE+4]]:15: note: type `.Self*` does not implement interface `Core.ImplicitAs(U*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let u: U* = v.(I.G)();
   // CHECK:STDERR:               ^~~~~~~~~
   // CHECK:STDERR:

+ 6 - 6
toolchain/check/testdata/facet/period_self.carbon

@@ -47,7 +47,7 @@ interface I(T:! .Self) {
   // CHECK:STDERR: fail_period_self_as_type.carbon:[[@LINE+7]]:13: error: cannot implicitly convert non-type value of type `.Self` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   fn G() -> T;
   // CHECK:STDERR:             ^
-  // CHECK:STDERR: fail_period_self_as_type.carbon:[[@LINE+4]]:13: note: type `.Self` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_period_self_as_type.carbon:[[@LINE+4]]:13: note: type `.Self` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn G() -> T;
   // CHECK:STDERR:             ^
   // CHECK:STDERR:
@@ -185,7 +185,7 @@ fn G(U:! I(.Self) where .Self impls J(.Self)) {
   // CHECK:STDERR: fail_todo_return_of_period_self_impls_interface.carbon:[[@LINE+7]]:14: error: cannot implicitly convert expression of type `.Self` to `U` [ConversionFailure]
   // CHECK:STDERR:   let u: U = U.I1();
   // CHECK:STDERR:              ^~~~~~
-  // CHECK:STDERR: fail_todo_return_of_period_self_impls_interface.carbon:[[@LINE+4]]:14: note: type `.Self` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_return_of_period_self_impls_interface.carbon:[[@LINE+4]]:14: note: type `.Self` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let u: U = U.I1();
   // CHECK:STDERR:              ^~~~~~
   // CHECK:STDERR:
@@ -221,7 +221,7 @@ fn F(U:! I(.Self)) {
   // CHECK:STDERR: fail_todo_return_of_type_period_self_has_type_u.carbon:[[@LINE+7]]:21: error: cannot implicitly convert expression of type `.Self` to `U` [ConversionFailure]
   // CHECK:STDERR:   let unused a: U = U.G();
   // CHECK:STDERR:                     ^~~~~
-  // CHECK:STDERR: fail_todo_return_of_type_period_self_has_type_u.carbon:[[@LINE+4]]:21: note: type `.Self` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_return_of_type_period_self_has_type_u.carbon:[[@LINE+4]]:21: note: type `.Self` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: U = U.G();
   // CHECK:STDERR:                     ^~~~~
   // CHECK:STDERR:
@@ -240,7 +240,7 @@ fn F(U:! I where .X = .Self) {
   // CHECK:STDERR: fail_todo_return_of_type_period_self_assoc_const_has_type_u.carbon:[[@LINE+7]]:21: error: cannot implicitly convert expression of type `.Self` to `U` [ConversionFailure]
   // CHECK:STDERR:   let unused a: U = U.G();
   // CHECK:STDERR:                     ^~~~~
-  // CHECK:STDERR: fail_todo_return_of_type_period_self_assoc_const_has_type_u.carbon:[[@LINE+4]]:21: note: type `.Self` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_return_of_type_period_self_assoc_const_has_type_u.carbon:[[@LINE+4]]:21: note: type `.Self` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: U = U.G();
   // CHECK:STDERR:                     ^~~~~
   // CHECK:STDERR:
@@ -264,7 +264,7 @@ fn F(T:! I(.Self) where .A = ((I(.Self) where .B = {}) where .A = {}) and .B = {
   // CHECK:STDERR: fail_todo_nested_period_self.carbon:[[@LINE+7]]:21: error: cannot implicitly convert expression of type `.Self` to `T` [ConversionFailure]
   // CHECK:STDERR:   let unused t: T = T.G();
   // CHECK:STDERR:                     ^~~~~
-  // CHECK:STDERR: fail_todo_nested_period_self.carbon:[[@LINE+4]]:21: note: type `.Self` does not implement interface `Core.ImplicitAs(T)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_nested_period_self.carbon:[[@LINE+4]]:21: note: type `.Self` does not implement interface `Core.ImplicitAs(T)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused t: T = T.G();
   // CHECK:STDERR:                     ^~~~~
   // CHECK:STDERR:
@@ -273,7 +273,7 @@ fn F(T:! I(.Self) where .A = ((I(.Self) where .B = {}) where .A = {}) and .B = {
   // CHECK:STDERR: fail_todo_nested_period_self.carbon:[[@LINE+7]]:21: error: cannot implicitly convert expression of type `.Self` to `T` [ConversionFailure]
   // CHECK:STDERR:   let unused u: T = U.G();
   // CHECK:STDERR:                     ^~~~~
-  // CHECK:STDERR: fail_todo_nested_period_self.carbon:[[@LINE+4]]:21: note: type `.Self` does not implement interface `Core.ImplicitAs(T)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_nested_period_self.carbon:[[@LINE+4]]:21: note: type `.Self` does not implement interface `Core.ImplicitAs(T)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused u: T = U.G();
   // CHECK:STDERR:                     ^~~~~
   // CHECK:STDERR:

+ 4 - 4
toolchain/check/testdata/facet/require_satisified.carbon

@@ -223,9 +223,6 @@ class W(T:! type) {
 }
 
 interface A(N:! Core.IntLiteral()) {
-  // CHECK:STDERR: fail_impl_requires_itself_cycle_with_monomorphization_error.carbon:[[@LINE+3]]:26: error: array bound of -1 is negative [ArrayBoundNegative]
-  // CHECK:STDERR:   fn AA() -> W(array((), N));
-  // CHECK:STDERR:                          ^
   fn AA() -> W(array((), N));
 }
 interface B(N:! Core.IntLiteral()) {
@@ -250,9 +247,12 @@ impl forall [N:! Core.IntLiteral(), T:! C(N)] T as B(N) {
 }
 
 fn F(T:! C(-1)) {
-  // CHECK:STDERR: fail_impl_requires_itself_cycle_with_monomorphization_error.carbon:[[@LINE+4]]:3: note: in `AA()` used here [ResolvingSpecificHere]
+  // CHECK:STDERR: fail_impl_requires_itself_cycle_with_monomorphization_error.carbon:[[@LINE+7]]:3: error: unable to monomorphize specific `AA()` [ResolvingSpecificHere]
   // CHECK:STDERR:   T.(A(-1).AA)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~
+  // CHECK:STDERR: fail_impl_requires_itself_cycle_with_monomorphization_error.carbon:[[@LINE-27]]:26: note: array bound of -1 is negative [ArrayBoundNegative]
+  // CHECK:STDERR:   fn AA() -> W(array((), N));
+  // CHECK:STDERR:                          ^
   // CHECK:STDERR:
   T.(A(-1).AA)();
 }

+ 2 - 2
toolchain/check/testdata/facet/tuple_and_struct_type_literal.carbon

@@ -129,7 +129,7 @@ fn F() {
   // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `{.a: ()}` into type implementing `Z` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   InterfaceParam({.a = ()});
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+7]]:3: note: type `{.a: ()}` does not implement interface `Core.ImplicitAs(Z)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+7]]:3: note: type `{.a: ()}` does not implement interface `Core.ImplicitAs(Z)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   InterfaceParam({.a = ()});
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE-10]]:26: note: initializing generic parameter `U` declared here [InitializingGenericParam]
@@ -140,7 +140,7 @@ fn F() {
   // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `{.a: ()}` into type implementing `N` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   ConstraintParam({.a = ()});
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+7]]:3: note: type `{.a: ()}` does not implement interface `Core.ImplicitAs(N)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE+7]]:3: note: type `{.a: ()}` does not implement interface `Core.ImplicitAs(N)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   ConstraintParam({.a = ()});
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR: fail_struct_literal_with_field_to_facet_type_parameter.carbon:[[@LINE-20]]:27: note: initializing generic parameter `U` declared here [InitializingGenericParam]

+ 2 - 2
toolchain/check/testdata/facet/tuple_and_struct_type_value.carbon

@@ -78,7 +78,7 @@ fn F(T:! {.a: type}) {
   // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `{.a: type}` into type implementing `Z` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   InterfaceParam(T);
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+7]]:3: note: type `{.a: type}` does not implement interface `Core.ImplicitAs(Z)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+7]]:3: note: type `{.a: type}` does not implement interface `Core.ImplicitAs(Z)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   InterfaceParam(T);
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
   // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE-10]]:26: note: initializing generic parameter `U` declared here [InitializingGenericParam]
@@ -89,7 +89,7 @@ fn F(T:! {.a: type}) {
   // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `{.a: type}` into type implementing `N` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   ConstraintParam(T);
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+7]]:3: note: type `{.a: type}` does not implement interface `Core.ImplicitAs(N)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE+7]]:3: note: type `{.a: type}` does not implement interface `Core.ImplicitAs(N)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   ConstraintParam(T);
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~
   // CHECK:STDERR: fail_struct_value_with_field_to_facet_value.carbon:[[@LINE-20]]:27: note: initializing generic parameter `U` declared here [InitializingGenericParam]

+ 1 - 1
toolchain/check/testdata/for/pattern.carbon

@@ -109,7 +109,7 @@ fn Run() {
   // CHECK:STDERR: fail_bad_pattern.carbon:[[@LINE+7]]:7: error: cannot implicitly convert expression of type `C` to `X` [ConversionFailure]
   // CHECK:STDERR:   for (unused x: X in EmptyRange(C).Make()) {
   // CHECK:STDERR:       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_bad_pattern.carbon:[[@LINE+4]]:7: note: type `C` does not implement interface `Core.ImplicitAs(X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_bad_pattern.carbon:[[@LINE+4]]:7: note: type `C` does not implement interface `Core.ImplicitAs(X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   for (unused x: X in EmptyRange(C).Make()) {
   // CHECK:STDERR:       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/function/call/fail_param_type.carbon

@@ -18,7 +18,7 @@ fn F() {
   // CHECK:STDERR: fail_param_type.carbon:[[@LINE+10]]:5: error: cannot implicitly convert expression of type `Core.FloatLiteral` to `i32` [ConversionFailure]
   // CHECK:STDERR:   G(1.0);
   // CHECK:STDERR:     ^~~
-  // CHECK:STDERR: fail_param_type.carbon:[[@LINE+7]]:5: note: type `Core.FloatLiteral` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_param_type.carbon:[[@LINE+7]]:5: note: type `Core.FloatLiteral` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   G(1.0);
   // CHECK:STDERR:     ^~~
   // CHECK:STDERR: fail_param_type.carbon:[[@LINE-9]]:13: note: initializing function parameter [InCallToFunctionParam]

+ 1 - 1
toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon

@@ -18,7 +18,7 @@ fn Run() {
   // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `f64` to `i32` [ConversionFailure]
   // CHECK:STDERR:   var unused x: i32 = Foo();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+4]]:3: note: type `f64` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+4]]:3: note: type `f64` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused x: i32 = Foo();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/function/generic/fail_type_param_mismatch.carbon

@@ -15,7 +15,7 @@ fn F(T:! type, U:! type) {
   // CHECK:STDERR: fail_type_param_mismatch.carbon:[[@LINE+7]]:21: error: cannot implicitly convert expression of type `T` to `U` [ConversionFailure]
   // CHECK:STDERR:   let unused n: U = *p;
   // CHECK:STDERR:                     ^~
-  // CHECK:STDERR: fail_type_param_mismatch.carbon:[[@LINE+4]]:21: note: type `T` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_type_param_mismatch.carbon:[[@LINE+4]]:21: note: type `T` does not implement interface `Core.ImplicitAs(U)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused n: U = *p;
   // CHECK:STDERR:                     ^~
   // CHECK:STDERR:

+ 29 - 29
toolchain/check/testdata/function/generic/resolve_used.carbon

@@ -21,19 +21,19 @@ fn ErrorIfNIsZero(N:! Core.IntLiteral()) {
   // ensuring we produce an error when doing so. Notionally this error is
   // produced as a result of instantiating the `Core.Int` template, although
   // that's not how we currently model `Core.Int`.
-  // CHECK:STDERR: min_prelude/parts/int.carbon:11:9: error: integer type width of 0 is not positive [IntWidthNotPositive]
-  // CHECK:STDERR:   adapt MakeInt(N);
-  // CHECK:STDERR:         ^~~~~~~~~~
-  // CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+3]]:17: note: in `i0` used here [ResolvingSpecificHere]
-  // CHECK:STDERR:   var unused v: Core.Int(N);
-  // CHECK:STDERR:                 ^~~~~~~~~~~
   var unused v: Core.Int(N);
 }
 
 fn CallNegative() {
-  // CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+4]]:3: note: in `ErrorIfNIsZero(0)` used here [ResolvingSpecificHere]
+  // CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+10]]:3: error: unable to monomorphize specific `ErrorIfNIsZero(0)` [ResolvingSpecificHere]
   // CHECK:STDERR:   ErrorIfNIsZero(0);
   // CHECK:STDERR:   ^~~~~~~~~~~~~~
+  // CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE-7]]:17: note: `Core.Int(N)` evaluates to incomplete type `i0` [IncompleteTypeInMonomorphization]
+  // CHECK:STDERR:   var unused v: Core.Int(N);
+  // CHECK:STDERR:                 ^~~~~~~~~~~
+  // CHECK:STDERR: min_prelude/parts/int.carbon:11:9: note: integer type width of 0 is not positive [IntWidthNotPositive]
+  // CHECK:STDERR:   adapt MakeInt(N);
+  // CHECK:STDERR:         ^~~~~~~~~~
   // CHECK:STDERR:
   ErrorIfNIsZero(0);
 }
@@ -117,15 +117,15 @@ fn CallNegative() {
 // CHECK:STDOUT:   %N.loc4_19.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_19.1 (constants.%N)]
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %Int.loc15_27.2: type = class_type @Int, @Int(%N.loc4_19.1) [symbolic = %Int.loc15_27.2 (constants.%Int)]
-// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %Int.loc15_27.2 [symbolic = %require_complete (constants.%require_complete.901)]
-// CHECK:STDOUT:   %pattern_type: type = pattern_type %Int.loc15_27.2 [symbolic = %pattern_type (constants.%pattern_type.764)]
-// CHECK:STDOUT:   %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc15_27.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
-// CHECK:STDOUT:   %Destroy.facet: %Destroy.type = facet_value %Int.loc15_27.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.1c0)]
+// CHECK:STDOUT:   %Int.loc9_27.2: type = class_type @Int, @Int(%N.loc4_19.1) [symbolic = %Int.loc9_27.2 (constants.%Int)]
+// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %Int.loc9_27.2 [symbolic = %require_complete (constants.%require_complete.901)]
+// CHECK:STDOUT:   %pattern_type: type = pattern_type %Int.loc9_27.2 [symbolic = %pattern_type (constants.%pattern_type.764)]
+// CHECK:STDOUT:   %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %Int.loc9_27.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
+// CHECK:STDOUT:   %Destroy.facet: %Destroy.type = facet_value %Int.loc9_27.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.1c0)]
 // CHECK:STDOUT:   %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.297)]
-// CHECK:STDOUT:   %.loc15_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc15_3 (constants.%.e63)]
-// CHECK:STDOUT:   %impl.elem0.loc15_3.2: @ErrorIfNIsZero.%.loc15_3 (%.e63) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)]
-// CHECK:STDOUT:   %specific_impl_fn.loc15_3.2: <specific function> = specific_impl_function %impl.elem0.loc15_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)]
+// CHECK:STDOUT:   %.loc9_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc9_3 (constants.%.e63)]
+// CHECK:STDOUT:   %impl.elem0.loc9_3.2: @ErrorIfNIsZero.%.loc9_3 (%.e63) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_3.2 (constants.%impl.elem0)]
+// CHECK:STDOUT:   %specific_impl_fn.loc9_3.2: <specific function> = specific_impl_function %impl.elem0.loc9_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc9_3.2 (constants.%specific_impl_fn)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn() {
 // CHECK:STDOUT:   !entry:
@@ -133,19 +133,19 @@ fn CallNegative() {
 // CHECK:STDOUT:       %v.patt: @ErrorIfNIsZero.%pattern_type (%pattern_type.764) = ref_binding_pattern v [concrete]
 // CHECK:STDOUT:       %v.var_patt: @ErrorIfNIsZero.%pattern_type (%pattern_type.764) = var_pattern %v.patt [concrete]
 // CHECK:STDOUT:     }
-// CHECK:STDOUT:     %v.var: ref @ErrorIfNIsZero.%Int.loc15_27.2 (%Int) = var %v.var_patt
-// CHECK:STDOUT:     %.loc15_27: type = splice_block %Int.loc15_27.1 [symbolic = %Int.loc15_27.2 (constants.%Int)] {
-// CHECK:STDOUT:       %Core.ref.loc15: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
+// CHECK:STDOUT:     %v.var: ref @ErrorIfNIsZero.%Int.loc9_27.2 (%Int) = var %v.var_patt
+// CHECK:STDOUT:     %.loc9_27: type = splice_block %Int.loc9_27.1 [symbolic = %Int.loc9_27.2 (constants.%Int)] {
+// CHECK:STDOUT:       %Core.ref.loc9: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
 // CHECK:STDOUT:       %Int.ref: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic]
 // CHECK:STDOUT:       %N.ref: Core.IntLiteral = name_ref N, %N.loc4_19.2 [symbolic = %N.loc4_19.1 (constants.%N)]
-// CHECK:STDOUT:       %Int.loc15_27.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc15_27.2 (constants.%Int)]
+// CHECK:STDOUT:       %Int.loc9_27.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_27.2 (constants.%Int)]
 // CHECK:STDOUT:     }
-// CHECK:STDOUT:     %v: ref @ErrorIfNIsZero.%Int.loc15_27.2 (%Int) = ref_binding v, %v.var
-// CHECK:STDOUT:     %impl.elem0.loc15_3.1: @ErrorIfNIsZero.%.loc15_3 (%.e63) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)]
-// CHECK:STDOUT:     %bound_method.loc15_3.1: <bound method> = bound_method %v.var, %impl.elem0.loc15_3.1
-// CHECK:STDOUT:     %specific_impl_fn.loc15_3.1: <specific function> = specific_impl_function %impl.elem0.loc15_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)]
-// CHECK:STDOUT:     %bound_method.loc15_3.2: <bound method> = bound_method %v.var, %specific_impl_fn.loc15_3.1
-// CHECK:STDOUT:     %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc15_3.2(%v.var)
+// CHECK:STDOUT:     %v: ref @ErrorIfNIsZero.%Int.loc9_27.2 (%Int) = ref_binding v, %v.var
+// CHECK:STDOUT:     %impl.elem0.loc9_3.1: @ErrorIfNIsZero.%.loc9_3 (%.e63) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_3.2 (constants.%impl.elem0)]
+// CHECK:STDOUT:     %bound_method.loc9_3.1: <bound method> = bound_method %v.var, %impl.elem0.loc9_3.1
+// CHECK:STDOUT:     %specific_impl_fn.loc9_3.1: <specific function> = specific_impl_function %impl.elem0.loc9_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc9_3.2 (constants.%specific_impl_fn)]
+// CHECK:STDOUT:     %bound_method.loc9_3.2: <bound method> = bound_method %v.var, %specific_impl_fn.loc9_3.1
+// CHECK:STDOUT:     %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc9_3.2(%v.var)
 // CHECK:STDOUT:     return
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
@@ -169,14 +169,14 @@ fn CallNegative() {
 // CHECK:STDOUT:   %N.loc4_19.1 => constants.%int_0
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %Int.loc15_27.2 => constants.%i0
+// CHECK:STDOUT:   %Int.loc9_27.2 => constants.%i0
 // CHECK:STDOUT:   %require_complete => constants.%complete_type.d94
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.47b
 // CHECK:STDOUT:   %Destroy.lookup_impl_witness => constants.%custom_witness.809
 // CHECK:STDOUT:   %Destroy.facet => constants.%Destroy.facet.7e1
 // CHECK:STDOUT:   %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.e5a
-// CHECK:STDOUT:   %.loc15_3 => constants.%.011
-// CHECK:STDOUT:   %impl.elem0.loc15_3.2 => constants.%DestroyOp
-// CHECK:STDOUT:   %specific_impl_fn.loc15_3.2 => constants.%DestroyOp
+// CHECK:STDOUT:   %.loc9_3 => constants.%.011
+// CHECK:STDOUT:   %impl.elem0.loc9_3.2 => constants.%DestroyOp
+// CHECK:STDOUT:   %specific_impl_fn.loc9_3.2 => constants.%DestroyOp
 // CHECK:STDOUT: }
 // CHECK:STDOUT:

+ 24 - 24
toolchain/check/testdata/generic/complete_type.carbon

@@ -19,18 +19,18 @@ library "[[@TEST_NAME]]";
 class B;
 
 class A(T:! type) {
-  // CHECK:STDERR: fail_incomplete_in_class.carbon:[[@LINE+6]]:10: error: `T` evaluates to incomplete type `B` [IncompleteTypeInMonomorphization]
-  // CHECK:STDERR:   var v: T;
-  // CHECK:STDERR:          ^
-  // CHECK:STDERR: fail_incomplete_in_class.carbon:[[@LINE-6]]:1: note: class was forward declared here [ClassForwardDeclaredHere]
-  // CHECK:STDERR: class B;
-  // CHECK:STDERR: ^~~~~~~~
   var v: T;
 }
 
-// CHECK:STDERR: fail_incomplete_in_class.carbon:[[@LINE+11]]:13: note: in `A(B)` used here [ResolvingSpecificHere]
+// CHECK:STDERR: fail_incomplete_in_class.carbon:[[@LINE+17]]:13: error: parameter has incomplete type `A(B)` in function definition [IncompleteTypeInFunctionParam]
 // CHECK:STDERR: fn F(unused x: A(B)) {}
 // CHECK:STDERR:             ^~~~~~~
+// CHECK:STDERR: fail_incomplete_in_class.carbon:[[@LINE-6]]:10: note: `T` evaluates to incomplete type `B` [IncompleteTypeInMonomorphization]
+// CHECK:STDERR:   var v: T;
+// CHECK:STDERR:          ^
+// CHECK:STDERR: fail_incomplete_in_class.carbon:[[@LINE-12]]:1: note: class was forward declared here [ClassForwardDeclaredHere]
+// CHECK:STDERR: class B;
+// CHECK:STDERR: ^~~~~~~~
 // CHECK:STDERR:
 // CHECK:STDERR: fail_incomplete_in_class.carbon:[[@LINE+7]]:13: error: parameter has incomplete type `A(B)` in function definition [IncompleteTypeInFunctionParam]
 // CHECK:STDERR: fn F(unused x: A(B)) {}
@@ -67,18 +67,18 @@ class B;
 
 fn F(T:! type) {
   var v: T*;
-  // CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE+6]]:3: error: `T` evaluates to incomplete type `B` [IncompleteTypeInMonomorphization]
-  // CHECK:STDERR:   *v;
-  // CHECK:STDERR:   ^~
-  // CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE-7]]:1: note: class was forward declared here [ClassForwardDeclaredHere]
-  // CHECK:STDERR: class B;
-  // CHECK:STDERR: ^~~~~~~~
   *v;
 }
 
-// CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE+4]]:10: note: in `F(B)` used here [ResolvingSpecificHere]
+// CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE+10]]:10: error: unable to monomorphize specific `F(B)` [ResolvingSpecificHere]
 // CHECK:STDERR: fn G() { F(B); }
 // CHECK:STDERR:          ^
+// CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE-6]]:3: note: `T` evaluates to incomplete type `B` [IncompleteTypeInMonomorphization]
+// CHECK:STDERR:   *v;
+// CHECK:STDERR:   ^~
+// CHECK:STDERR: fail_incomplete_in_function_at_eof.carbon:[[@LINE-13]]:1: note: class was forward declared here [ClassForwardDeclaredHere]
+// CHECK:STDERR: class B;
+// CHECK:STDERR: ^~~~~~~~
 // CHECK:STDERR:
 fn G() { F(B); }
 
@@ -161,18 +161,18 @@ fn G() { F(B); }
 // CHECK:STDOUT:   %A: type = class_type @A, @A(%T.loc6_9.1) [symbolic = %A (constants.%A.95c)]
 // CHECK:STDOUT:   %A.elem: type = unbound_element_type %A, %T.loc6_9.1 [symbolic = %A.elem (constants.%A.elem.8a2)]
 // CHECK:STDOUT:   %struct_type.v: type = struct_type {.v: @A.%T.loc6_9.1 (%T)} [symbolic = %struct_type.v (constants.%struct_type.v.a4d)]
-// CHECK:STDOUT:   %complete_type.loc14_1.2: <witness> = complete_type_witness %struct_type.v [symbolic = %complete_type.loc14_1.2 (constants.%complete_type.136)]
+// CHECK:STDOUT:   %complete_type.loc8_1.2: <witness> = complete_type_witness %struct_type.v [symbolic = %complete_type.loc8_1.2 (constants.%complete_type.136)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   class {
 // CHECK:STDOUT:     %T.ref: type = name_ref T, %T.loc6_9.2 [symbolic = %T.loc6_9.1 (constants.%T)]
-// CHECK:STDOUT:     %.loc13: @A.%A.elem (%A.elem.8a2) = field_decl v, element0 [concrete]
-// CHECK:STDOUT:     %complete_type.loc14_1.1: <witness> = complete_type_witness constants.%struct_type.v.a4d [symbolic = %complete_type.loc14_1.2 (constants.%complete_type.136)]
-// CHECK:STDOUT:     complete_type_witness = %complete_type.loc14_1.1
+// CHECK:STDOUT:     %.loc7: @A.%A.elem (%A.elem.8a2) = field_decl v, element0 [concrete]
+// CHECK:STDOUT:     %complete_type.loc8_1.1: <witness> = complete_type_witness constants.%struct_type.v.a4d [symbolic = %complete_type.loc8_1.2 (constants.%complete_type.136)]
+// CHECK:STDOUT:     complete_type_witness = %complete_type.loc8_1.1
 // CHECK:STDOUT:
 // CHECK:STDOUT:   !members:
 // CHECK:STDOUT:     .Self = constants.%A.95c
 // CHECK:STDOUT:     .T = <poisoned>
-// CHECK:STDOUT:     .v = %.loc13
+// CHECK:STDOUT:     .v = %.loc7
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -193,7 +193,7 @@ fn G() { F(B); }
 // CHECK:STDOUT:   %A => constants.%A.764
 // CHECK:STDOUT:   %A.elem => constants.%A.elem.46a
 // CHECK:STDOUT:   %struct_type.v => constants.%struct_type.v.b74
-// CHECK:STDOUT:   %complete_type.loc14_1.2 => constants.%complete_type.aac
+// CHECK:STDOUT:   %complete_type.loc8_1.2 => constants.%complete_type.aac
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: --- incomplete_in_function.carbon
@@ -412,7 +412,7 @@ fn G() { F(B); }
 // CHECK:STDOUT:   %ptr.loc7_11.2: type = ptr_type %T.loc6_6.1 [symbolic = %ptr.loc7_11.2 (constants.%ptr.e8f)]
 // CHECK:STDOUT:   %require_complete.loc7: <witness> = require_complete_type %ptr.loc7_11.2 [symbolic = %require_complete.loc7 (constants.%require_complete.ef1)]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %ptr.loc7_11.2 [symbolic = %pattern_type (constants.%pattern_type.4f4)]
-// CHECK:STDOUT:   %require_complete.loc14: <witness> = require_complete_type %T.loc6_6.1 [symbolic = %require_complete.loc14 (constants.%require_complete.944)]
+// CHECK:STDOUT:   %require_complete.loc8: <witness> = require_complete_type %T.loc6_6.1 [symbolic = %require_complete.loc8 (constants.%require_complete.944)]
 // CHECK:STDOUT:   %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc7_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)]
 // CHECK:STDOUT:   %Destroy.facet: %Destroy.type = facet_value %ptr.loc7_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.617)]
 // CHECK:STDOUT:   %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.bb2)]
@@ -433,8 +433,8 @@ fn G() { F(B); }
 // CHECK:STDOUT:     }
 // CHECK:STDOUT:     %v: ref @F.%ptr.loc7_11.2 (%ptr.e8f) = ref_binding v, %v.var
 // CHECK:STDOUT:     %v.ref: ref @F.%ptr.loc7_11.2 (%ptr.e8f) = name_ref v, %v
-// CHECK:STDOUT:     %.loc14_4: @F.%ptr.loc7_11.2 (%ptr.e8f) = acquire_value %v.ref
-// CHECK:STDOUT:     %.loc14_3: ref @F.%T.loc6_6.1 (%T) = deref %.loc14_4
+// CHECK:STDOUT:     %.loc8_4: @F.%ptr.loc7_11.2 (%ptr.e8f) = acquire_value %v.ref
+// CHECK:STDOUT:     %.loc8_3: ref @F.%T.loc6_6.1 (%T) = deref %.loc8_4
 // CHECK:STDOUT:     %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.c3f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)]
 // CHECK:STDOUT:     %bound_method.loc7_3.1: <bound method> = bound_method %v.var, %impl.elem0.loc7_3.1
 // CHECK:STDOUT:     %specific_impl_fn.loc7_3.1: <specific function> = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.617) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)]
@@ -466,7 +466,7 @@ fn G() { F(B); }
 // CHECK:STDOUT:   %ptr.loc7_11.2 => constants.%ptr.27c
 // CHECK:STDOUT:   %require_complete.loc7 => constants.%complete_type
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.191
-// CHECK:STDOUT:   %require_complete.loc14 => <error>
+// CHECK:STDOUT:   %require_complete.loc8 => <error>
 // CHECK:STDOUT:   %Destroy.lookup_impl_witness => constants.%custom_witness.809
 // CHECK:STDOUT:   %Destroy.facet => constants.%Destroy.facet.4ad
 // CHECK:STDOUT:   %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.936

+ 20 - 32
toolchain/check/testdata/generic/extend_type_completion.carbon

@@ -28,16 +28,16 @@ library "[[@TEST_NAME]]";
 interface K(T:! type) {}
 
 class C(N:! i32) {
-  // CHECK:STDERR: fail_class_extend_impl_does_need_complete_interface.carbon:[[@LINE+3]]:18: error: array bound of -1 is negative [ArrayBoundNegative]
-  // CHECK:STDERR:   extend impl as K(array(i32, N)) {}
-  // CHECK:STDERR:                  ^~~~~~~~~~~~~~~~
   extend impl as K(array(i32, N)) {}
 }
 
 // C extends K so the type of K is completed, but is invalid.
-// CHECK:STDERR: fail_class_extend_impl_does_need_complete_interface.carbon:[[@LINE+4]]:8: note: in `C(-1)` used here [ResolvingSpecificHere]
+// CHECK:STDERR: fail_class_extend_impl_does_need_complete_interface.carbon:[[@LINE+7]]:8: error: binding pattern has incomplete type `C(-1)` in name binding declaration [IncompleteTypeInBindingDecl]
 // CHECK:STDERR: var v: C(-1);
 // CHECK:STDERR:        ^~~~~
+// CHECK:STDERR: fail_class_extend_impl_does_need_complete_interface.carbon:[[@LINE-7]]:18: note: array bound of -1 is negative [ArrayBoundNegative]
+// CHECK:STDERR:   extend impl as K(array(i32, N)) {}
+// CHECK:STDERR:                  ^~~~~~~~~~~~~~~~
 // CHECK:STDERR:
 var v: C(-1);
 
@@ -57,18 +57,9 @@ library "[[@TEST_NAME]]";
 
 interface K(T:! type) {}
 interface J(N:! i32) {
-  // CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+3]]:24: error: array bound of -1 is negative [ArrayBoundNegative]
-  // CHECK:STDERR:   extend require impls K(array(i32, N));
-  // CHECK:STDERR:                        ^~~~~~~~~~~~~~~~
   extend require impls K(array(i32, N));
 }
 interface I(N:! i32) {
-  // CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+6]]:24: note: in `J(-1)` used here [ResolvingSpecificHere]
-  // CHECK:STDERR:   extend require impls J(N);
-  // CHECK:STDERR:                        ^~~~
-  // CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+3]]:24: note: checking for complete facet type `J(-1)` here [RequiringCompleteFacetTypeHere]
-  // CHECK:STDERR:   extend require impls J(N);
-  // CHECK:STDERR:                        ^~~~
   extend require impls J(N);
 }
 
@@ -78,12 +69,15 @@ interface I(N:! i32) {
 // need a location for the type in context.bind_name_map() to use as the
 // location to Convert().
 //
-// CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+7]]:1: note: in `I(-1)` used here [ResolvingSpecificHere]
+// CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+10]]:8: error: binding pattern has incomplete type `I(-1)` in name binding declaration [IncompleteTypeInBindingDecl]
 // CHECK:STDERR: var v: I(-1);
-// CHECK:STDERR: ^~~~~~~~~~~~
-// CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+4]]:1: note: checking for complete facet type `I(-1)` here [RequiringCompleteFacetTypeHere]
-// CHECK:STDERR: var v: I(-1);
-// CHECK:STDERR: ^~~~~~~~~~~~
+// CHECK:STDERR:        ^~~~~
+// CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE-12]]:24: note: `J(N)` evaluates to incomplete type `J(-1)` [IncompleteTypeInMonomorphization]
+// CHECK:STDERR:   extend require impls J(N);
+// CHECK:STDERR:                        ^~~~
+// CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE-18]]:24: note: array bound of -1 is negative [ArrayBoundNegative]
+// CHECK:STDERR:   extend require impls K(array(i32, N));
+// CHECK:STDERR:                        ^~~~~~~~~~~~~~~~
 // CHECK:STDERR:
 var v: I(-1);
 
@@ -103,28 +97,22 @@ library "[[@TEST_NAME]]";
 
 interface K(T:! type) {}
 constraint J(N:! i32) {
-  // CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+3]]:24: error: array bound of -1 is negative [ArrayBoundNegative]
-  // CHECK:STDERR:   extend require impls K(array(i32, N));
-  // CHECK:STDERR:                        ^~~~~~~~~~~~~~~~
   extend require impls K(array(i32, N));
 }
 constraint I(N:! i32) {
-  // CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+6]]:24: note: in `J(-1)` used here [ResolvingSpecificHere]
-  // CHECK:STDERR:   extend require impls J(N);
-  // CHECK:STDERR:                        ^~~~
-  // CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+3]]:24: note: checking for complete facet type `J(-1)` here [RequiringCompleteFacetTypeHere]
-  // CHECK:STDERR:   extend require impls J(N);
-  // CHECK:STDERR:                        ^~~~
   extend require impls J(N);
 }
 
 // I extends J extends K so the type of K is completed, but is invalid.
-// CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+7]]:1: note: in `I(-1)` used here [ResolvingSpecificHere]
+// CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+10]]:8: error: binding pattern has incomplete type `I(-1)` in name binding declaration [IncompleteTypeInBindingDecl]
 // CHECK:STDERR: var v: I(-1);
-// CHECK:STDERR: ^~~~~~~~~~~~
-// CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+4]]:1: note: checking for complete facet type `I(-1)` here [RequiringCompleteFacetTypeHere]
-// CHECK:STDERR: var v: I(-1);
-// CHECK:STDERR: ^~~~~~~~~~~~
+// CHECK:STDERR:        ^~~~~
+// CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE-7]]:24: note: `J(N)` evaluates to incomplete type `J(-1)` [IncompleteTypeInMonomorphization]
+// CHECK:STDERR:   extend require impls J(N);
+// CHECK:STDERR:                        ^~~~
+// CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE-13]]:24: note: array bound of -1 is negative [ArrayBoundNegative]
+// CHECK:STDERR:   extend require impls K(array(i32, N));
+// CHECK:STDERR:                        ^~~~~~~~~~~~~~~~
 // CHECK:STDERR:
 var v: I(-1);
 

+ 2 - 2
toolchain/check/testdata/generic/fail_generic_copy.carbon

@@ -18,7 +18,7 @@ fn F[T:! type](x: T) -> T {
   // CHECK:STDERR: fail_return.carbon:[[@LINE+7]]:10: error: cannot copy value of type `T` [CopyOfUncopyableType]
   // CHECK:STDERR:   return x;
   // CHECK:STDERR:          ^
-  // CHECK:STDERR: fail_return.carbon:[[@LINE+4]]:10: note: type `T` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_return.carbon:[[@LINE+4]]:10: note: type `T` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return x;
   // CHECK:STDERR:          ^
   // CHECK:STDERR:
@@ -33,7 +33,7 @@ fn F[T:! Core.Destroy](x: T) {
   // CHECK:STDERR: fail_var.carbon:[[@LINE+7]]:21: error: cannot copy value of type `T` [CopyOfUncopyableType]
   // CHECK:STDERR:   var unused y: T = x;
   // CHECK:STDERR:                     ^
-  // CHECK:STDERR: fail_var.carbon:[[@LINE+4]]:21: note: type `T` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_var.carbon:[[@LINE+4]]:21: note: type `T` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused y: T = x;
   // CHECK:STDERR:                     ^
   // CHECK:STDERR:

+ 10 - 22
toolchain/check/testdata/generic/identify_specific_facet_type.carbon

@@ -18,21 +18,15 @@ library "[[@TEST_NAME]]";
 
 interface K(T:! type) {}
 constraint J(N:! i32) {
-  // CHECK:STDERR: fail_error_in_identifying_require_facet_type.carbon:[[@LINE+6]]:30: error: array bound of -1 is negative [ArrayBoundNegative]
-  // CHECK:STDERR:   require impls K(array(i32, N));
-  // CHECK:STDERR:                              ^
-  // CHECK:STDERR: fail_error_in_identifying_require_facet_type.carbon:[[@LINE+3]]:3: note: in `require` used here [ResolvingSpecificHere]
-  // CHECK:STDERR:   require impls K(array(i32, N));
-  // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   require impls K(array(i32, N));
 }
 
-// TODO: This should be be a "facet type cannot be identified" diagnostic, but
-// we need to plumb that diagnoser through the construction of the specific.
-//
-// CHECK:STDERR: fail_error_in_identifying_require_facet_type.carbon:[[@LINE+4]]:12: note: identifying facet type `J(-1)` here [IdentifyingFacetTypeHere]
+// CHECK:STDERR: fail_error_in_identifying_require_facet_type.carbon:[[@LINE+7]]:1: error: facet type `J(-1)` cannot be identified in `impl as` [ImplOfUnidentifiedFacetType]
 // CHECK:STDERR: impl {} as J(-1) {}
-// CHECK:STDERR:            ^~~~~
+// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
+// CHECK:STDERR: fail_error_in_identifying_require_facet_type.carbon:[[@LINE-6]]:30: note: array bound of -1 is negative [ArrayBoundNegative]
+// CHECK:STDERR:   require impls K(array(i32, N));
+// CHECK:STDERR:                              ^
 // CHECK:STDERR:
 impl {} as J(-1) {}
 
@@ -44,20 +38,14 @@ library "[[@TEST_NAME]]";
 
 interface K(T:! type) {}
 constraint J(N:! i32) {
-  // CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+3]]:24: error: array bound of -1 is negative [ArrayBoundNegative]
-  // CHECK:STDERR:   extend require impls K(array(i32, N));
-  // CHECK:STDERR:                        ^~~~~~~~~~~~~~~~
   extend require impls K(array(i32, N));
 }
 
-// TODO: This should be be a "facet type cannot be identified" diagnostic, but
-// we need to plumb that diagnoser through the construction of the specific.
-//
-// CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+7]]:12: note: in `J(-1)` used here [ResolvingSpecificHere]
-// CHECK:STDERR: impl {} as J(-1) {}
-// CHECK:STDERR:            ^~~~~
-// CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+4]]:12: note: checking for complete facet type `J(-1)` here [RequiringCompleteFacetTypeHere]
+// CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+7]]:1: error: facet type `J(-1)` cannot be identified in `impl as` [ImplOfUnidentifiedFacetType]
 // CHECK:STDERR: impl {} as J(-1) {}
-// CHECK:STDERR:            ^~~~~
+// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
+// CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE-6]]:24: note: array bound of -1 is negative [ArrayBoundNegative]
+// CHECK:STDERR:   extend require impls K(array(i32, N));
+// CHECK:STDERR:                        ^~~~~~~~~~~~~~~~
 // CHECK:STDERR:
 impl {} as J(-1) {}

+ 21 - 21
toolchain/check/testdata/generic/template/convert.carbon

@@ -41,12 +41,6 @@ fn Test2(c: C) -> i32 {
 library "[[@TEST_NAME]]";
 
 fn F[template T:! type](x: T) -> i32 {
-  // CHECK:STDERR: fail_cannot_convert.carbon:[[@LINE+6]]:16: error: cannot implicitly convert expression of type `D` to `i32` [ConversionFailure]
-  // CHECK:STDERR:   let n: i32 = x;
-  // CHECK:STDERR:                ^
-  // CHECK:STDERR: fail_cannot_convert.carbon:[[@LINE+3]]:16: note: type `D` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
-  // CHECK:STDERR:   let n: i32 = x;
-  // CHECK:STDERR:                ^
   let n: i32 = x;
   return n;
 }
@@ -54,9 +48,15 @@ fn F[template T:! type](x: T) -> i32 {
 class D {}
 
 fn Test(d: D) -> i32 {
-  // CHECK:STDERR: fail_cannot_convert.carbon:[[@LINE+4]]:10: note: in `F(D)` used here [ResolvingSpecificHere]
+  // CHECK:STDERR: fail_cannot_convert.carbon:[[@LINE+10]]:10: error: unable to monomorphize specific `F(D)` [ResolvingSpecificHere]
   // CHECK:STDERR:   return F(d);
   // CHECK:STDERR:          ^
+  // CHECK:STDERR: fail_cannot_convert.carbon:[[@LINE-10]]:16: note: cannot implicitly convert expression of type `D` to `i32` [ConversionFailure]
+  // CHECK:STDERR:   let n: i32 = x;
+  // CHECK:STDERR:                ^
+  // CHECK:STDERR: fail_cannot_convert.carbon:[[@LINE-13]]:16: note: type `D` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
+  // CHECK:STDERR:   let n: i32 = x;
+  // CHECK:STDERR:                ^
   // CHECK:STDERR:
   return F(d);
 }
@@ -439,7 +439,7 @@ fn Test(d: D) -> i32 {
 // CHECK:STDOUT:   } {
 // CHECK:STDOUT:     %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
 // CHECK:STDOUT:     %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
-// CHECK:STDOUT:     %.loc17: Core.Form = init_form %i32, call_param1 [concrete = constants.%.e54]
+// CHECK:STDOUT:     %.loc11: Core.Form = init_form %i32, call_param1 [concrete = constants.%.e54]
 // CHECK:STDOUT:     %d.param: %D = value_param call_param0
 // CHECK:STDOUT:     %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
 // CHECK:STDOUT:     %d: %D = value_binding d, %d.param
@@ -462,8 +462,8 @@ fn Test(d: D) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %T.loc4_15.1 [template = %require_complete (constants.%require_complete.944)]
-// CHECK:STDOUT:   %.loc11_16.3: <instruction> = refine_type_action %x.ref, %T.loc4_15.1 [template]
-// CHECK:STDOUT:   %.loc11_16.4: <instruction> = convert_to_value_action %.loc11_16.1, constants.%i32 [template]
+// CHECK:STDOUT:   %.loc5_16.3: <instruction> = refine_type_action %x.ref, %T.loc4_15.1 [template]
+// CHECK:STDOUT:   %.loc5_16.4: <instruction> = convert_to_value_action %.loc5_16.1, constants.%i32 [template]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn(%x.param: @F.%T.loc4_15.1 (%T.67db0b.1)) -> out %return.param: %i32 {
 // CHECK:STDOUT:   !entry:
@@ -471,19 +471,19 @@ fn Test(d: D) -> i32 {
 // CHECK:STDOUT:       %n.patt: %pattern_type.7ce = value_binding_pattern n [concrete]
 // CHECK:STDOUT:     }
 // CHECK:STDOUT:     %x.ref: @F.%T.loc4_15.1 (%T.67db0b.1) = name_ref x, %x
-// CHECK:STDOUT:     %.loc11_10: type = splice_block %i32.loc11 [concrete = constants.%i32] {
-// CHECK:STDOUT:       %int_32.loc11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
-// CHECK:STDOUT:       %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
+// CHECK:STDOUT:     %.loc5_10: type = splice_block %i32.loc5 [concrete = constants.%i32] {
+// CHECK:STDOUT:       %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
+// CHECK:STDOUT:       %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
 // CHECK:STDOUT:     }
-// CHECK:STDOUT:     %.loc11_16.1: @F.%T.loc4_15.1 (%T.67db0b.1) = splice_inst %.loc11_16.3
-// CHECK:STDOUT:     %.loc11_16.2: %i32 = splice_inst %.loc11_16.4
-// CHECK:STDOUT:     %n: %i32 = value_binding n, %.loc11_16.2
+// CHECK:STDOUT:     %.loc5_16.1: @F.%T.loc4_15.1 (%T.67db0b.1) = splice_inst %.loc5_16.3
+// CHECK:STDOUT:     %.loc5_16.2: %i32 = splice_inst %.loc5_16.4
+// CHECK:STDOUT:     %n: %i32 = value_binding n, %.loc5_16.2
 // CHECK:STDOUT:     %n.ref: %i32 = name_ref n, %n
 // CHECK:STDOUT:     %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664]
-// CHECK:STDOUT:     %bound_method.loc12_10.1: <bound method> = bound_method %n.ref, %impl.elem0
+// CHECK:STDOUT:     %bound_method.loc6_10.1: <bound method> = bound_method %n.ref, %impl.elem0
 // CHECK:STDOUT:     %specific_fn: <specific function> = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
-// CHECK:STDOUT:     %bound_method.loc12_10.2: <bound method> = bound_method %n.ref, %specific_fn
-// CHECK:STDOUT:     %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc12_10.2(%n.ref)
+// CHECK:STDOUT:     %bound_method.loc6_10.2: <bound method> = bound_method %n.ref, %specific_fn
+// CHECK:STDOUT:     %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_10.2(%n.ref)
 // CHECK:STDOUT:     return %Int.as.Copy.impl.Op.call
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
@@ -508,7 +508,7 @@ fn Test(d: D) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT:   %require_complete => constants.%complete_type.357
-// CHECK:STDOUT:   %.loc11_16.3 => constants.%inst.as_compatible
-// CHECK:STDOUT:   %.loc11_16.4 => constants.%inst.splice_block
+// CHECK:STDOUT:   %.loc5_16.3 => constants.%inst.as_compatible
+// CHECK:STDOUT:   %.loc5_16.4 => constants.%inst.splice_block
 // CHECK:STDOUT: }
 // CHECK:STDOUT:

+ 55 - 55
toolchain/check/testdata/generic/template/member_access.carbon

@@ -38,9 +38,6 @@ fn Test2(x: {.m: i32, .n: i32}) {
 library "[[@TEST_NAME]]";
 
 fn F[template T:! type](x: T) -> i32 {
-  // CHECK:STDERR: fail_no_such_member.carbon:[[@LINE+3]]:16: error: member name `n` not found in `D` [MemberNameNotFoundInInstScope]
-  // CHECK:STDERR:   let n: i32 = x.n;
-  // CHECK:STDERR:                ^~~
   let n: i32 = x.n;
   return n;
 }
@@ -50,9 +47,12 @@ class D {
 }
 
 fn Test(d: D) {
-  // CHECK:STDERR: fail_no_such_member.carbon:[[@LINE+4]]:3: note: in `F(D)` used here [ResolvingSpecificHere]
+  // CHECK:STDERR: fail_no_such_member.carbon:[[@LINE+7]]:3: error: unable to monomorphize specific `F(D)` [ResolvingSpecificHere]
   // CHECK:STDERR:   F(d);
   // CHECK:STDERR:   ^
+  // CHECK:STDERR: fail_no_such_member.carbon:[[@LINE-12]]:16: note: member name `n` not found in `D` [MemberNameNotFoundInInstScope]
+  // CHECK:STDERR:   let n: i32 = x.n;
+  // CHECK:STDERR:                ^~~
   // CHECK:STDERR:
   F(d);
 }
@@ -62,12 +62,6 @@ fn Test(d: D) {
 library "[[@TEST_NAME]]";
 
 fn F[template T:! type](x: T) -> i32 {
-  // CHECK:STDERR: fail_member_wrong_type.carbon:[[@LINE+6]]:16: error: cannot implicitly convert expression of type `F` to `i32` [ConversionFailure]
-  // CHECK:STDERR:   let n: i32 = x.n;
-  // CHECK:STDERR:                ^~~
-  // CHECK:STDERR: fail_member_wrong_type.carbon:[[@LINE+3]]:16: note: type `F` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
-  // CHECK:STDERR:   let n: i32 = x.n;
-  // CHECK:STDERR:                ^~~
   let n: i32 = x.n;
   return n;
 }
@@ -78,9 +72,15 @@ class E {
 }
 
 fn Test(e: E) {
-  // CHECK:STDERR: fail_member_wrong_type.carbon:[[@LINE+4]]:3: note: in `F(E)` used here [ResolvingSpecificHere]
+  // CHECK:STDERR: fail_member_wrong_type.carbon:[[@LINE+10]]:3: error: unable to monomorphize specific `F(E)` [ResolvingSpecificHere]
   // CHECK:STDERR:   F(e);
   // CHECK:STDERR:   ^
+  // CHECK:STDERR: fail_member_wrong_type.carbon:[[@LINE-13]]:16: note: cannot implicitly convert expression of type `F` to `i32` [ConversionFailure]
+  // CHECK:STDERR:   let n: i32 = x.n;
+  // CHECK:STDERR:                ^~~
+  // CHECK:STDERR: fail_member_wrong_type.carbon:[[@LINE-16]]:16: note: type `F` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
+  // CHECK:STDERR:   let n: i32 = x.n;
+  // CHECK:STDERR:                ^~~
   // CHECK:STDERR:
   F(e);
 }
@@ -410,13 +410,13 @@ fn Test(e: E) {
 // CHECK:STDOUT: class @D {
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
-// CHECK:STDOUT:   %.loc13: %D.elem = field_decl m, element0 [concrete]
+// CHECK:STDOUT:   %.loc10: %D.elem = field_decl m, element0 [concrete]
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness constants.%struct_type.m [concrete = constants.%complete_type.218]
 // CHECK:STDOUT:   complete_type_witness = %complete_type
 // CHECK:STDOUT:
 // CHECK:STDOUT: !members:
 // CHECK:STDOUT:   .Self = constants.%D
-// CHECK:STDOUT:   .m = %.loc13
+// CHECK:STDOUT:   .m = %.loc10
 // CHECK:STDOUT:   .n = <poisoned>
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -426,10 +426,10 @@ fn Test(e: E) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %T.loc4_15.1 [template = %require_complete (constants.%require_complete.944)]
-// CHECK:STDOUT:   %.loc8_17.4: <instruction> = refine_type_action %x.ref, %T.loc4_15.1 [template]
-// CHECK:STDOUT:   %.loc8_17.5: <instruction> = access_member_action %.loc8_17.1, n [template]
-// CHECK:STDOUT:   %.loc8_17.6: type = type_of_inst %.loc8_17.5 [template]
-// CHECK:STDOUT:   %.loc8_17.7: <instruction> = convert_to_value_action %.loc8_17.2, constants.%i32 [template]
+// CHECK:STDOUT:   %.loc5_17.4: <instruction> = refine_type_action %x.ref, %T.loc4_15.1 [template]
+// CHECK:STDOUT:   %.loc5_17.5: <instruction> = access_member_action %.loc5_17.1, n [template]
+// CHECK:STDOUT:   %.loc5_17.6: type = type_of_inst %.loc5_17.5 [template]
+// CHECK:STDOUT:   %.loc5_17.7: <instruction> = convert_to_value_action %.loc5_17.2, constants.%i32 [template]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn(%x.param: @F.%T.loc4_15.1 (%T.67db0b.1)) -> out %return.param: %i32 {
 // CHECK:STDOUT:   !entry:
@@ -437,20 +437,20 @@ fn Test(e: E) {
 // CHECK:STDOUT:       %n.patt: %pattern_type.7ce = value_binding_pattern n [concrete]
 // CHECK:STDOUT:     }
 // CHECK:STDOUT:     %x.ref: @F.%T.loc4_15.1 (%T.67db0b.1) = name_ref x, %x
-// CHECK:STDOUT:     %.loc8_17.1: @F.%T.loc4_15.1 (%T.67db0b.1) = splice_inst %.loc8_17.4
-// CHECK:STDOUT:     %.loc8_17.2: @F.%.loc8_17.6 (@F.%.loc8_17.6) = splice_inst %.loc8_17.5
-// CHECK:STDOUT:     %.loc8_10: type = splice_block %i32.loc8 [concrete = constants.%i32] {
-// CHECK:STDOUT:       %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
-// CHECK:STDOUT:       %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
+// CHECK:STDOUT:     %.loc5_17.1: @F.%T.loc4_15.1 (%T.67db0b.1) = splice_inst %.loc5_17.4
+// CHECK:STDOUT:     %.loc5_17.2: @F.%.loc5_17.6 (@F.%.loc5_17.6) = splice_inst %.loc5_17.5
+// CHECK:STDOUT:     %.loc5_10: type = splice_block %i32.loc5 [concrete = constants.%i32] {
+// CHECK:STDOUT:       %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
+// CHECK:STDOUT:       %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
 // CHECK:STDOUT:     }
-// CHECK:STDOUT:     %.loc8_17.3: %i32 = splice_inst %.loc8_17.7
-// CHECK:STDOUT:     %n: %i32 = value_binding n, %.loc8_17.3
+// CHECK:STDOUT:     %.loc5_17.3: %i32 = splice_inst %.loc5_17.7
+// CHECK:STDOUT:     %n: %i32 = value_binding n, %.loc5_17.3
 // CHECK:STDOUT:     %n.ref: %i32 = name_ref n, %n
 // CHECK:STDOUT:     %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664]
-// CHECK:STDOUT:     %bound_method.loc9_10.1: <bound method> = bound_method %n.ref, %impl.elem0
+// CHECK:STDOUT:     %bound_method.loc6_10.1: <bound method> = bound_method %n.ref, %impl.elem0
 // CHECK:STDOUT:     %specific_fn: <specific function> = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
-// CHECK:STDOUT:     %bound_method.loc9_10.2: <bound method> = bound_method %n.ref, %specific_fn
-// CHECK:STDOUT:     %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc9_10.2(%n.ref)
+// CHECK:STDOUT:     %bound_method.loc6_10.2: <bound method> = bound_method %n.ref, %specific_fn
+// CHECK:STDOUT:     %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_10.2(%n.ref)
 // CHECK:STDOUT:     return %Int.as.Copy.impl.Op.call
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
@@ -475,10 +475,10 @@ fn Test(e: E) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT:   %require_complete => constants.%complete_type.218
-// CHECK:STDOUT:   %.loc8_17.4 => constants.%inst.as_compatible
-// CHECK:STDOUT:   %.loc8_17.5 => constants.%inst.name_ref
-// CHECK:STDOUT:   %.loc8_17.6 => <error>
-// CHECK:STDOUT:   %.loc8_17.7 => constants.%inst.splice_block
+// CHECK:STDOUT:   %.loc5_17.4 => constants.%inst.as_compatible
+// CHECK:STDOUT:   %.loc5_17.5 => constants.%inst.name_ref
+// CHECK:STDOUT:   %.loc5_17.6 => <error>
+// CHECK:STDOUT:   %.loc5_17.7 => constants.%inst.splice_block
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_member_wrong_type.carbon
@@ -510,7 +510,7 @@ fn Test(e: E) {
 // CHECK:STDOUT:   %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete]
 // CHECK:STDOUT:   %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete]
 // CHECK:STDOUT:   %E: type = class_type @E [concrete]
-// CHECK:STDOUT:   %F.c40: type = class_type @F.loc16 [concrete]
+// CHECK:STDOUT:   %F.c40: type = class_type @F.loc10 [concrete]
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %E.elem: type = unbound_element_type %E, %F.c40 [concrete]
@@ -525,7 +525,7 @@ fn Test(e: E) {
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %inst.splice_block.518: <instruction> = inst_value [concrete] {
 // CHECK:STDOUT:     %.619: %F.c40 = splice_block %.cde {
-// CHECK:STDOUT:       %n.ref: %E.elem = name_ref n, @E.%.loc17 [concrete = @E.%.loc17]
+// CHECK:STDOUT:       %n.ref: %E.elem = name_ref n, @E.%.loc11 [concrete = @E.%.loc11]
 // CHECK:STDOUT:       %.4af: ref %F.c40 = class_element_access %.988, element0
 // CHECK:STDOUT:       %.cde: %F.c40 = acquire_value %.4af
 // CHECK:STDOUT:     }
@@ -592,19 +592,19 @@ fn Test(e: E) {
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: class @E {
-// CHECK:STDOUT:   %F.decl: type = class_decl @F.loc16 [concrete = constants.%F.c40] {} {}
+// CHECK:STDOUT:   %F.decl: type = class_decl @F.loc10 [concrete = constants.%F.c40] {} {}
 // CHECK:STDOUT:   %F.ref: type = name_ref F, %F.decl [concrete = constants.%F.c40]
-// CHECK:STDOUT:   %.loc17: %E.elem = field_decl n, element0 [concrete]
+// CHECK:STDOUT:   %.loc11: %E.elem = field_decl n, element0 [concrete]
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness constants.%struct_type.n.cae [concrete = constants.%complete_type.7a8]
 // CHECK:STDOUT:   complete_type_witness = %complete_type
 // CHECK:STDOUT:
 // CHECK:STDOUT: !members:
 // CHECK:STDOUT:   .Self = constants.%E
 // CHECK:STDOUT:   .F = %F.decl
-// CHECK:STDOUT:   .n = %.loc17
+// CHECK:STDOUT:   .n = %.loc11
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: class @F.loc16 {
+// CHECK:STDOUT: class @F.loc10 {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
 // CHECK:STDOUT:   complete_type_witness = %complete_type
 // CHECK:STDOUT:
@@ -618,10 +618,10 @@ fn Test(e: E) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %T.loc4_15.1 [template = %require_complete (constants.%require_complete.944)]
-// CHECK:STDOUT:   %.loc11_17.4: <instruction> = refine_type_action %x.ref, %T.loc4_15.1 [template]
-// CHECK:STDOUT:   %.loc11_17.5: <instruction> = access_member_action %.loc11_17.1, n [template]
-// CHECK:STDOUT:   %.loc11_17.6: type = type_of_inst %.loc11_17.5 [template]
-// CHECK:STDOUT:   %.loc11_17.7: <instruction> = convert_to_value_action %.loc11_17.2, constants.%i32 [template]
+// CHECK:STDOUT:   %.loc5_17.4: <instruction> = refine_type_action %x.ref, %T.loc4_15.1 [template]
+// CHECK:STDOUT:   %.loc5_17.5: <instruction> = access_member_action %.loc5_17.1, n [template]
+// CHECK:STDOUT:   %.loc5_17.6: type = type_of_inst %.loc5_17.5 [template]
+// CHECK:STDOUT:   %.loc5_17.7: <instruction> = convert_to_value_action %.loc5_17.2, constants.%i32 [template]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn(%x.param: @F.loc4.%T.loc4_15.1 (%T.67db0b.1)) -> out %return.param: %i32 {
 // CHECK:STDOUT:   !entry:
@@ -629,20 +629,20 @@ fn Test(e: E) {
 // CHECK:STDOUT:       %n.patt: %pattern_type.7ce = value_binding_pattern n [concrete]
 // CHECK:STDOUT:     }
 // CHECK:STDOUT:     %x.ref: @F.loc4.%T.loc4_15.1 (%T.67db0b.1) = name_ref x, %x
-// CHECK:STDOUT:     %.loc11_17.1: @F.loc4.%T.loc4_15.1 (%T.67db0b.1) = splice_inst %.loc11_17.4
-// CHECK:STDOUT:     %.loc11_17.2: @F.loc4.%.loc11_17.6 (@F.loc4.%.loc11_17.6) = splice_inst %.loc11_17.5
-// CHECK:STDOUT:     %.loc11_10: type = splice_block %i32.loc11 [concrete = constants.%i32] {
-// CHECK:STDOUT:       %int_32.loc11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
-// CHECK:STDOUT:       %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
+// CHECK:STDOUT:     %.loc5_17.1: @F.loc4.%T.loc4_15.1 (%T.67db0b.1) = splice_inst %.loc5_17.4
+// CHECK:STDOUT:     %.loc5_17.2: @F.loc4.%.loc5_17.6 (@F.loc4.%.loc5_17.6) = splice_inst %.loc5_17.5
+// CHECK:STDOUT:     %.loc5_10: type = splice_block %i32.loc5 [concrete = constants.%i32] {
+// CHECK:STDOUT:       %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
+// CHECK:STDOUT:       %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
 // CHECK:STDOUT:     }
-// CHECK:STDOUT:     %.loc11_17.3: %i32 = splice_inst %.loc11_17.7
-// CHECK:STDOUT:     %n: %i32 = value_binding n, %.loc11_17.3
+// CHECK:STDOUT:     %.loc5_17.3: %i32 = splice_inst %.loc5_17.7
+// CHECK:STDOUT:     %n: %i32 = value_binding n, %.loc5_17.3
 // CHECK:STDOUT:     %n.ref: %i32 = name_ref n, %n
 // CHECK:STDOUT:     %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664]
-// CHECK:STDOUT:     %bound_method.loc12_10.1: <bound method> = bound_method %n.ref, %impl.elem0
+// CHECK:STDOUT:     %bound_method.loc6_10.1: <bound method> = bound_method %n.ref, %impl.elem0
 // CHECK:STDOUT:     %specific_fn: <specific function> = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
-// CHECK:STDOUT:     %bound_method.loc12_10.2: <bound method> = bound_method %n.ref, %specific_fn
-// CHECK:STDOUT:     %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc12_10.2(%n.ref)
+// CHECK:STDOUT:     %bound_method.loc6_10.2: <bound method> = bound_method %n.ref, %specific_fn
+// CHECK:STDOUT:     %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_10.2(%n.ref)
 // CHECK:STDOUT:     return %Int.as.Copy.impl.Op.call
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
@@ -667,9 +667,9 @@ fn Test(e: E) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT:   %require_complete => constants.%complete_type.7a8
-// CHECK:STDOUT:   %.loc11_17.4 => constants.%inst.as_compatible
-// CHECK:STDOUT:   %.loc11_17.5 => constants.%inst.splice_block.518
-// CHECK:STDOUT:   %.loc11_17.6 => constants.%F.c40
-// CHECK:STDOUT:   %.loc11_17.7 => constants.%inst.splice_block.34e
+// CHECK:STDOUT:   %.loc5_17.4 => constants.%inst.as_compatible
+// CHECK:STDOUT:   %.loc5_17.5 => constants.%inst.splice_block.518
+// CHECK:STDOUT:   %.loc5_17.6 => constants.%F.c40
+// CHECK:STDOUT:   %.loc5_17.7 => constants.%inst.splice_block.34e
 // CHECK:STDOUT: }
 // CHECK:STDOUT:

+ 1 - 1
toolchain/check/testdata/generic/template/unimplemented.carbon

@@ -63,7 +63,7 @@ fn F[template T:! Core.Destroy](x: T) {
   // CHECK:STDERR: fail_todo_unimplemented_convert.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `T` to `i32` [ConversionFailure]
   // CHECK:STDERR:   var unused w: i32 = x;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_todo_unimplemented_convert.carbon:[[@LINE+4]]:3: note: type `T` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_unimplemented_convert.carbon:[[@LINE+4]]:3: note: type `T` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused w: i32 = x;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 16 - 19
toolchain/check/testdata/impl/assoc_const_self.carbon

@@ -35,7 +35,7 @@ interface I {
 // CHECK:STDERR: fail_assoc_const_mismatch.carbon:[[@LINE+7]]:12: error: cannot implicitly convert expression of type `Core.IntLiteral` to `{}` [ConversionFailure]
 // CHECK:STDERR: impl {} as I where .V = 0 {}
 // CHECK:STDERR:            ^~~~~~~~~~~~~~
-// CHECK:STDERR: fail_assoc_const_mismatch.carbon:[[@LINE+4]]:12: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs({})` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_assoc_const_mismatch.carbon:[[@LINE+4]]:12: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs({})` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: impl {} as I where .V = 0 {}
 // CHECK:STDERR:            ^~~~~~~~~~~~~~
 // CHECK:STDERR:
@@ -66,18 +66,15 @@ impl C as I where .V = () {}
 library "[[@TEST_NAME]]";
 
 interface I(N:! Core.IntLiteral()) {
-  // CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+3]]:17: error: array bound of -1 is negative [ArrayBoundNegative]
-  // CHECK:STDERR:   let V:! array(Self, N);
-  // CHECK:STDERR:                 ^~~~
   let V:! array(Self, N);
 }
 
-// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+7]]:24: note: in `I(-1)` used here [ResolvingSpecificHere]
-// CHECK:STDERR: impl {} as I(-1) where .V = () {}
-// CHECK:STDERR:                        ^~
-// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+4]]:24: note: checking for complete facet type `I(-1)` here [RequiringCompleteFacetTypeHere]
+// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+7]]:24: error: member access into facet of incomplete type `I(-1)` [IncompleteTypeInMemberAccessOfFacet]
 // CHECK:STDERR: impl {} as I(-1) where .V = () {}
 // CHECK:STDERR:                        ^~
+// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE-6]]:17: note: array bound of -1 is negative [ArrayBoundNegative]
+// CHECK:STDERR:   let V:! array(Self, N);
+// CHECK:STDERR:                 ^~~~
 // CHECK:STDERR:
 impl {} as I(-1) where .V = () {}
 
@@ -649,23 +646,23 @@ fn CallF() {
 // CHECK:STDOUT:     %N.loc4_13.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_13.1 (constants.%N)]
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   impl_decl @empty_struct_type.as.<error>.impl [concrete] {} {
-// CHECK:STDOUT:     %.loc18_7.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
-// CHECK:STDOUT:     %.loc18_7.2: type = converted %.loc18_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
+// CHECK:STDOUT:     %.loc15_7.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
+// CHECK:STDOUT:     %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
 // CHECK:STDOUT:     %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
 // CHECK:STDOUT:     %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
 // CHECK:STDOUT:     %impl.elem1: %.b42 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op]
 // CHECK:STDOUT:     %bound_method: <bound method> = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound]
 // CHECK:STDOUT:     %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method(%int_1) [concrete = constants.%int_-1]
-// CHECK:STDOUT:     %.loc18_16.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.Negate.impl.Op.call [concrete = constants.%int_-1]
-// CHECK:STDOUT:     %.loc18_16.2: Core.IntLiteral = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc18_16.1 [concrete = constants.%int_-1]
+// CHECK:STDOUT:     %.loc15_16.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.Negate.impl.Op.call [concrete = constants.%int_-1]
+// CHECK:STDOUT:     %.loc15_16.2: Core.IntLiteral = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc15_16.1 [concrete = constants.%int_-1]
 // CHECK:STDOUT:     %I.type: type = facet_type <@I, @I(constants.%int_-1)> [concrete = constants.%I.type.54b]
 // CHECK:STDOUT:     %.Self: %I.type.54b = symbolic_binding .Self [symbolic_self = constants.%.Self.6e0]
 // CHECK:STDOUT:     %.Self.ref: %I.type.54b = name_ref .Self, %.Self [symbolic_self = constants.%.Self.6e0]
 // CHECK:STDOUT:     %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
-// CHECK:STDOUT:     %.loc18_24: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
+// CHECK:STDOUT:     %.loc15_24: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
 // CHECK:STDOUT:     %V.ref: <error> = name_ref V, <error> [concrete = <error>]
-// CHECK:STDOUT:     %.loc18_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
-// CHECK:STDOUT:     %.loc18_18: type = where_expr %.Self [concrete = <error>] {
+// CHECK:STDOUT:     %.loc15_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
+// CHECK:STDOUT:     %.loc15_18: type = where_expr %.Self [concrete = <error>] {
 // CHECK:STDOUT:       requirement_base_facet_type constants.%I.type.54b
 // CHECK:STDOUT:       requirement_rewrite %V.ref, <error>
 // CHECK:STDOUT:     }
@@ -699,7 +696,7 @@ fn CallF() {
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: impl @empty_struct_type.as.<error>.impl: %.loc18_7.2 as %.loc18_18 {
+// CHECK:STDOUT: impl @empty_struct_type.as.<error>.impl: %.loc15_7.2 as %.loc15_18 {
 // CHECK:STDOUT: !members:
 // CHECK:STDOUT:   witness = <error>
 // CHECK:STDOUT: }
@@ -720,9 +717,9 @@ fn CallF() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%int_-1, constants.%Self.cad) {
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %N.loc8 => constants.%int_-1
-// CHECK:STDOUT:   %I.type.loc8 => constants.%I.type.54b
-// CHECK:STDOUT:   %Self.loc8 => constants.%Self.cad
+// CHECK:STDOUT:   %N.loc5 => constants.%int_-1
+// CHECK:STDOUT:   %I.type.loc5 => constants.%I.type.54b
+// CHECK:STDOUT:   %Self.loc5 => constants.%Self.cad
 // CHECK:STDOUT:   %Self.binding.as_type => constants.%Self.binding.as_type.6f3
 // CHECK:STDOUT:   %array_type => <error>
 // CHECK:STDOUT:   %I.assoc_type => constants.%I.assoc_type.e1a

+ 2 - 2
toolchain/check/testdata/impl/compound.carbon

@@ -51,7 +51,7 @@ fn NonInstanceCall2(n: {.b: ()}) {
   // CHECK:STDERR: fail_non-instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `{.b: ()}` into type implementing `NonInstance2` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   n.(NonInstance2.F2)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_non-instance.carbon:[[@LINE+4]]:3: note: type `{.b: ()}` does not implement interface `Core.ImplicitAs(NonInstance2)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_non-instance.carbon:[[@LINE+4]]:3: note: type `{.b: ()}` does not implement interface `Core.ImplicitAs(NonInstance2)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   n.(NonInstance2.F2)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -75,7 +75,7 @@ fn NonInstanceCallIndirect(p: {.c: ()}*) {
   // CHECK:STDERR: fail_non-instance_indirect.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `{.c: ()}` into type implementing `NonInstance3` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   p->(NonInstance3.F3)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_non-instance_indirect.carbon:[[@LINE+4]]:3: note: type `{.c: ()}` does not implement interface `Core.ImplicitAs(NonInstance3)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_non-instance_indirect.carbon:[[@LINE+4]]:3: note: type `{.c: ()}` does not implement interface `Core.ImplicitAs(NonInstance3)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   p->(NonInstance3.F3)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 6 - 6
toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon

@@ -136,7 +136,7 @@ class FMissingReturnType {
     // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+16]]:5: error: cannot implicitly convert expression of type `()` to `bool` [ConversionFailure]
     // CHECK:STDERR:     fn F[self: bool](b: bool);
     // CHECK:STDERR:     ^~~~~~~~~~~~~~~~~~~~~~~~~~
-    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+13]]:5: note: type `()` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessNote]
+    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+13]]:5: note: type `()` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessInContext]
     // CHECK:STDERR:     fn F[self: bool](b: bool);
     // CHECK:STDERR:     ^~~~~~~~~~~~~~~~~~~~~~~~~~
     // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-39]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
@@ -146,7 +146,7 @@ class FMissingReturnType {
     // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-43]]:32: error: cannot implicitly convert expression of type `bool` to `FDifferentParamType` [ConversionFailure]
     // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
     // CHECK:STDERR:                                ^~~~~~~
-    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: note: type `bool` does not implement interface `Core.ImplicitAs(FDifferentParamType)` [MissingImplInMemberAccessNote]
+    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: note: type `bool` does not implement interface `Core.ImplicitAs(FDifferentParamType)` [MissingImplInMemberAccessInContext]
     // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
     // CHECK:STDERR:                                ^~~~~~~
     fn F[self: bool](b: bool);
@@ -165,7 +165,7 @@ class FDifferentParamType {
     // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-62]]:20: error: cannot implicitly convert expression of type `bool` to `FDifferentImplicitParamType` [ConversionFailure]
     // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
     // CHECK:STDERR:                    ^~~~~~~~~~
-    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-65]]:20: note: type `bool` does not implement interface `Core.ImplicitAs(FDifferentImplicitParamType)` [MissingImplInMemberAccessNote]
+    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-65]]:20: note: type `bool` does not implement interface `Core.ImplicitAs(FDifferentImplicitParamType)` [MissingImplInMemberAccessInContext]
     // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; }
     // CHECK:STDERR:                    ^~~~~~~~~~
     fn F[self: bool](b: Self) -> bool;
@@ -190,7 +190,7 @@ class FDifferentReturnType {
     // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+10]]:5: error: cannot implicitly convert expression of type `FDifferentReturnType` to `bool` [ConversionFailure]
     // CHECK:STDERR:     fn F[self: bool](b: bool) -> Self;
     // CHECK:STDERR:     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: type `FDifferentReturnType` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessNote]
+    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: type `FDifferentReturnType` does not implement interface `Core.ImplicitAs(bool)` [MissingImplInMemberAccessInContext]
     // CHECK:STDERR:     fn F[self: bool](b: bool) -> Self;
     // CHECK:STDERR:     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-93]]:15: note: while building thunk to match the signature of this function [ThunkSignature]
@@ -205,7 +205,7 @@ interface SelfNested {
   // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+6]]:8: error: cannot implicitly convert expression of type `SelfNestedBadParam` to `i32` [ConversionFailure]
   // CHECK:STDERR:   fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
   // CHECK:STDERR:        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+3]]:8: note: type `SelfNestedBadParam` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+3]]:8: note: type `SelfNestedBadParam` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
   // CHECK:STDERR:        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fn F(x: (Self*, {.x: Self, .y: i32})) -> array(Self, 4);
@@ -229,7 +229,7 @@ class SelfNestedBadReturnType {
     // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+10]]:5: error: cannot implicitly convert expression of type `array(SelfNestedBadParam, 4)` to `array(SelfNestedBadReturnType, 4)` [ConversionFailure]
     // CHECK:STDERR:     fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> array(SelfNestedBadParam, 4);
     // CHECK:STDERR:     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: type `array(SelfNestedBadParam, 4)` does not implement interface `Core.ImplicitAs(array(SelfNestedBadReturnType, 4))` [MissingImplInMemberAccessNote]
+    // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: note: type `array(SelfNestedBadParam, 4)` does not implement interface `Core.ImplicitAs(array(SelfNestedBadReturnType, 4))` [MissingImplInMemberAccessInContext]
     // CHECK:STDERR:     fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> array(SelfNestedBadParam, 4);
     // CHECK:STDERR:     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-24]]:3: note: while building thunk to match the signature of this function [ThunkSignature]

+ 1 - 1
toolchain/check/testdata/impl/fail_impl_bad_interface.carbon

@@ -19,7 +19,7 @@ library "[[@TEST_NAME]]";
 // CHECK:STDERR: fail_impl_as_false.carbon:[[@LINE+7]]:13: error: cannot implicitly convert non-type value of type `bool` to `type` [ConversionFailureNonTypeToFacet]
 // CHECK:STDERR: impl i32 as false {}
 // CHECK:STDERR:             ^~~~~
-// CHECK:STDERR: fail_impl_as_false.carbon:[[@LINE+4]]:13: note: type `bool` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_impl_as_false.carbon:[[@LINE+4]]:13: note: type `bool` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: impl i32 as false {}
 // CHECK:STDERR:             ^~~~~
 // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/impl/fail_impl_bad_type.carbon

@@ -17,7 +17,7 @@ interface I {}
 // CHECK:STDERR: fail_impl_bad_type.carbon:[[@LINE+7]]:6: error: cannot implicitly convert non-type value of type `bool` to `type` [ConversionFailureNonTypeToFacet]
 // CHECK:STDERR: impl true as I {}
 // CHECK:STDERR:      ^~~~
-// CHECK:STDERR: fail_impl_bad_type.carbon:[[@LINE+4]]:6: note: type `bool` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_impl_bad_type.carbon:[[@LINE+4]]:6: note: type `bool` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: impl true as I {}
 // CHECK:STDERR:      ^~~~
 // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/impl/fail_self_type_mismatch.carbon

@@ -19,7 +19,7 @@ interface I {
   // CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE+6]]:8: error: cannot implicitly convert expression of type `C(i32 as I)` to `C(i32)` [ConversionFailure]
   // CHECK:STDERR:   fn F(c: C(Self));
   // CHECK:STDERR:        ^~~~~~~~~~
-  // CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE+3]]:8: note: type `C(i32 as I)` does not implement interface `Core.ImplicitAs(C(i32))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE+3]]:8: note: type `C(i32 as I)` does not implement interface `Core.ImplicitAs(C(i32))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn F(c: C(Self));
   // CHECK:STDERR:        ^~~~~~~~~~
   fn F(c: C(Self));

+ 4 - 4
toolchain/check/testdata/impl/impl_thunk.carbon

@@ -124,7 +124,7 @@ impl A as X {
   // CHECK:STDERR: fail_inheritance_value_conversion_copy_return.carbon:[[@LINE+10]]:3: error: cannot copy value of type `A` [CopyOfUncopyableType]
   // CHECK:STDERR:   fn F() -> B;
   // CHECK:STDERR:   ^~~~~~~~~~~~
-  // CHECK:STDERR: fail_inheritance_value_conversion_copy_return.carbon:[[@LINE+7]]:3: note: type `A` does not implement interface `Core.Copy` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_inheritance_value_conversion_copy_return.carbon:[[@LINE+7]]:3: note: type `A` does not implement interface `Core.Copy` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn F() -> B;
   // CHECK:STDERR:   ^~~~~~~~~~~~
   // CHECK:STDERR: fail_inheritance_value_conversion_copy_return.carbon:[[@LINE-11]]:3: note: while building thunk to match the signature of this function [ThunkSignature]
@@ -143,7 +143,7 @@ interface I {
   // CHECK:STDERR: fail_param_type_mismatch.carbon:[[@LINE+6]]:8: error: cannot implicitly convert expression of type `A` to `B` [ConversionFailure]
   // CHECK:STDERR:   fn F(a: Self);
   // CHECK:STDERR:        ^~~~~~~
-  // CHECK:STDERR: fail_param_type_mismatch.carbon:[[@LINE+3]]:8: note: type `A` does not implement interface `Core.ImplicitAs(B)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_param_type_mismatch.carbon:[[@LINE+3]]:8: note: type `A` does not implement interface `Core.ImplicitAs(B)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn F(a: Self);
   // CHECK:STDERR:        ^~~~~~~
   fn F(a: Self);
@@ -178,7 +178,7 @@ impl A as I {
   // CHECK:STDERR: fail_return_mismatch.carbon:[[@LINE+10]]:3: error: cannot implicitly convert expression of type `B` to `A` [ConversionFailure]
   // CHECK:STDERR:   fn F() -> B;
   // CHECK:STDERR:   ^~~~~~~~~~~~
-  // CHECK:STDERR: fail_return_mismatch.carbon:[[@LINE+7]]:3: note: type `B` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_return_mismatch.carbon:[[@LINE+7]]:3: note: type `B` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn F() -> B;
   // CHECK:STDERR:   ^~~~~~~~~~~~
   // CHECK:STDERR: fail_return_mismatch.carbon:[[@LINE-13]]:3: note: while building thunk to match the signature of this function [ThunkSignature]
@@ -267,7 +267,7 @@ class C {
     // CHECK:STDERR: fail_param_type_incomplete.carbon:[[@LINE-14]]:8: error: cannot implicitly convert expression of type `B` to `C` [ConversionFailure]
     // CHECK:STDERR:   fn F(a: T);
     // CHECK:STDERR:        ^~~~
-    // CHECK:STDERR: fail_param_type_incomplete.carbon:[[@LINE-17]]:8: note: type `B` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessNote]
+    // CHECK:STDERR: fail_param_type_incomplete.carbon:[[@LINE-17]]:8: note: type `B` does not implement interface `Core.ImplicitAs(C)` [MissingImplInMemberAccessInContext]
     // CHECK:STDERR:   fn F(a: T);
     // CHECK:STDERR:        ^~~~
     // CHECK:STDERR: fail_param_type_incomplete.carbon:[[@LINE+7]]:10: note: initializing function parameter [InCallToFunctionParam]

+ 2 - 2
toolchain/check/testdata/impl/import_compound.carbon

@@ -49,7 +49,7 @@ fn NonInstanceCallImportFail(n: {.i: ()}) {
   // CHECK:STDERR: fail_import_non-instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `{.i: ()}` into type implementing `NonInstance` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   n.(NonInstance.F)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_import_non-instance.carbon:[[@LINE+4]]:3: note: type `{.i: ()}` does not implement interface `Core.ImplicitAs(NonInstance)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_import_non-instance.carbon:[[@LINE+4]]:3: note: type `{.i: ()}` does not implement interface `Core.ImplicitAs(NonInstance)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   n.(NonInstance.F)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -65,7 +65,7 @@ fn NonInstanceCallIndirectImport(p: {.i: ()}*) {
   // CHECK:STDERR: fail_import_non-instance_indirect.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `{.i: ()}` into type implementing `NonInstance` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   p->(NonInstance.F)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_import_non-instance_indirect.carbon:[[@LINE+4]]:3: note: type `{.i: ()}` does not implement interface `Core.ImplicitAs(NonInstance)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_import_non-instance_indirect.carbon:[[@LINE+4]]:3: note: type `{.i: ()}` does not implement interface `Core.ImplicitAs(NonInstance)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   p->(NonInstance.F)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/impl/lookup/fail_function_types.carbon

@@ -29,7 +29,7 @@ fn F() {
   // CHECK:STDERR: fail_function_type_with_self_type.carbon:[[@LINE+7]]:3: error: cannot convert non-type value of type `<type of G in () as Z>*` to `type` with `as` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   &(().(Z.G)) as type;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_function_type_with_self_type.carbon:[[@LINE+4]]:3: note: type `<type of G in () as Z>*` does not implement interface `Core.As(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_function_type_with_self_type.carbon:[[@LINE+4]]:3: note: type `<type of G in () as Z>*` does not implement interface `Core.As(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   &(().(Z.G)) as type;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -49,7 +49,7 @@ fn F() {
   // CHECK:STDERR: fail_function_type.carbon:[[@LINE+7]]:3: error: cannot convert non-type value of type `<type of F>*` to `type` with `as` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   &F as type;
   // CHECK:STDERR:   ^~~~~~~~~~
-  // CHECK:STDERR: fail_function_type.carbon:[[@LINE+4]]:3: note: type `<type of F>*` does not implement interface `Core.As(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_function_type.carbon:[[@LINE+4]]:3: note: type `<type of F>*` does not implement interface `Core.As(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   &F as type;
   // CHECK:STDERR:   ^~~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/impl/lookup/import_error.carbon

@@ -35,7 +35,7 @@ fn F[unused U:! type](T:! Z) {
   // CHECK:STDERR: fail_import_error.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `()` to `T.(Z.X)` [ConversionFailure]
   // CHECK:STDERR:   let unused a: T.X = ();
   // CHECK:STDERR:                       ^~
-  // CHECK:STDERR: fail_import_error.carbon:[[@LINE+4]]:23: note: type `()` does not implement interface `Core.ImplicitAs(T.(Z.X))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_import_error.carbon:[[@LINE+4]]:23: note: type `()` does not implement interface `Core.ImplicitAs(T.(Z.X))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: T.X = ();
   // CHECK:STDERR:                       ^~
   // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/impl/lookup/specialization.carbon

@@ -240,7 +240,7 @@ fn F[D:! Y](unused d: D) {
   // CHECK:STDERR: fail_specialized_class_with_symbolic_facet_value_param.carbon:[[@LINE+7]]:30: error: cannot implicitly convert expression of type `()` to `C(D).(Z.X)` [ConversionFailure]
   // CHECK:STDERR:   let unused a: C(D).(Z.X) = ();
   // CHECK:STDERR:                              ^~
-  // CHECK:STDERR: fail_specialized_class_with_symbolic_facet_value_param.carbon:[[@LINE+4]]:30: note: type `()` does not implement interface `Core.ImplicitAs(C(D).(Z.X))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_specialized_class_with_symbolic_facet_value_param.carbon:[[@LINE+4]]:30: note: type `()` does not implement interface `Core.ImplicitAs(C(D).(Z.X))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: C(D).(Z.X) = ();
   // CHECK:STDERR:                              ^~
   // CHECK:STDERR:
@@ -342,7 +342,7 @@ fn F[unused U:! type](T:! Z(C)) {
   // CHECK:STDERR: fail_specialization_written_after_generic_use_of_type_constant.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `C` to `T.(Z(C).X)` [ConversionFailure]
   // CHECK:STDERR:   let unused a: T.X = {} as C;
   // CHECK:STDERR:                       ^~~~~~~
-  // CHECK:STDERR: fail_specialization_written_after_generic_use_of_type_constant.carbon:[[@LINE+4]]:23: note: type `C` does not implement interface `Core.ImplicitAs(T.(Z(C).X))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_specialization_written_after_generic_use_of_type_constant.carbon:[[@LINE+4]]:23: note: type `C` does not implement interface `Core.ImplicitAs(T.(Z(C).X))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: T.X = {} as C;
   // CHECK:STDERR:                       ^~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon

@@ -48,7 +48,7 @@ fn F(T:! Z(C), t: T) {
   // CHECK:STDERR: fail_nonfinal_specialized_symbolic_rewrite.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `T` to `T.(Z(C).X)` [ConversionFailure]
   // CHECK:STDERR:   let unused a: T.X = t;
   // CHECK:STDERR:                       ^
-  // CHECK:STDERR: fail_nonfinal_specialized_symbolic_rewrite.carbon:[[@LINE+4]]:23: note: type `T` does not implement interface `Core.ImplicitAs(T.(Z(C).X))` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_nonfinal_specialized_symbolic_rewrite.carbon:[[@LINE+4]]:23: note: type `T` does not implement interface `Core.ImplicitAs(T.(Z(C).X))` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused a: T.X = t;
   // CHECK:STDERR:                       ^
   // CHECK:STDERR:

+ 3 - 3
toolchain/check/testdata/impl/use_assoc_entity.carbon

@@ -147,14 +147,14 @@ class E {
     // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+14]]:13: error: cannot implicitly convert non-type value of type `<associated entity in J>` to `type` [ConversionFailureNonTypeToFacet]
     // CHECK:STDERR:     fn F(u: U) -> U {
     // CHECK:STDERR:             ^
-    // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+11]]:13: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+    // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+11]]:13: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
     // CHECK:STDERR:     fn F(u: U) -> U {
     // CHECK:STDERR:             ^
     // CHECK:STDERR:
     // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+7]]:19: error: cannot implicitly convert non-type value of type `<associated entity in J>` to `type` [ConversionFailureNonTypeToFacet]
     // CHECK:STDERR:     fn F(u: U) -> U {
     // CHECK:STDERR:                   ^
-    // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+4]]:19: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+    // CHECK:STDERR: fail_todo_use_associated_constant_in_impl.carbon:[[@LINE+4]]:19: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
     // CHECK:STDERR:     fn F(u: U) -> U {
     // CHECK:STDERR:                   ^
     // CHECK:STDERR:
@@ -212,7 +212,7 @@ class E {
   // CHECK:STDERR: fail_todo_use_extend_constant.carbon:[[@LINE+7]]:13: error: cannot implicitly convert non-type value of type `<associated entity in J>` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   fn G() -> X { return (); }
   // CHECK:STDERR:             ^
-  // CHECK:STDERR: fail_todo_use_extend_constant.carbon:[[@LINE+4]]:13: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_extend_constant.carbon:[[@LINE+4]]:13: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn G() -> X { return (); }
   // CHECK:STDERR:             ^
   // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/impl/using_invalid_interface.carbon

@@ -65,7 +65,7 @@ fn G() {
   // CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `IMisuse` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   F(c);
   // CHECK:STDERR:   ^~~~
-  // CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+7]]:3: note: type `C` does not implement interface `Core.ImplicitAs(IMisuse)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+7]]:3: note: type `C` does not implement interface `Core.ImplicitAs(IMisuse)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   F(c);
   // CHECK:STDERR:   ^~~~
   // CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE-10]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam]
@@ -113,7 +113,7 @@ fn G() {
   // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+10]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `IMisuse` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   F(c);
   // CHECK:STDERR:   ^~~~
-  // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+7]]:3: note: type `C` does not implement interface `Core.ImplicitAs(IMisuse)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+7]]:3: note: type `C` does not implement interface `Core.ImplicitAs(IMisuse)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   F(c);
   // CHECK:STDERR:   ^~~~
   // CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-10]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam]

+ 1 - 1
toolchain/check/testdata/index/fail_array_non_int_indexing.carbon

@@ -16,7 +16,7 @@ var a: array(i32, 1) = (12,);
 // CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+7]]:16: error: cannot implicitly convert expression of type `Core.FloatLiteral` to `i32` [ConversionFailure]
 // CHECK:STDERR: var b: i32 = a[2.6];
 // CHECK:STDERR:                ^~~
-// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+4]]:16: note: type `Core.FloatLiteral` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
+// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+4]]:16: note: type `Core.FloatLiteral` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
 // CHECK:STDERR: var b: i32 = a[2.6];
 // CHECK:STDERR:                ^~~
 // CHECK:STDERR:

+ 4 - 4
toolchain/check/testdata/interface/compound_member_access.carbon

@@ -60,7 +60,7 @@ fn Compound3(V:! K2, y: V) {
   // CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `V` into type implementing `K2` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   y.(K2.Q2)();
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+4]]:3: note: type `V` does not implement interface `Core.ImplicitAs(K2)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+4]]:3: note: type `V` does not implement interface `Core.ImplicitAs(K2)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   y.(K2.Q2)();
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -148,7 +148,7 @@ fn Fails() {
   // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   ({} as C).((A & A).G)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   ({} as C).((A & A).G)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -156,7 +156,7 @@ fn Fails() {
   // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   (({} as C) as (C as (A & A))).((A & A).G)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   (({} as C) as (C as (A & A))).((A & A).G)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -164,7 +164,7 @@ fn Fails() {
   // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `C` into type implementing `A` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   (({} as C) as (C as (A & A))).(A.G)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_combine_non_instance.carbon:[[@LINE+4]]:3: note: type `C` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   (({} as C) as (C as (A & A))).(A.G)();
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon

@@ -16,7 +16,7 @@ interface I {
   // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   let T:! type = 42;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let T:! type = 42;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/interface/fail_member_lookup.carbon

@@ -31,7 +31,7 @@ fn F() {
   // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+7]]:17: error: cannot implicitly convert non-type value of type `<associated entity in Interface>` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   var unused v: Interface.T;
   // CHECK:STDERR:                 ^~~~~~~~~~~
-  // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:17: note: type `<associated entity in Interface>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:17: note: type `<associated entity in Interface>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var unused v: Interface.T;
   // CHECK:STDERR:                 ^~~~~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/interface/fail_type_as_facet.carbon

@@ -15,7 +15,7 @@ interface I {
   // CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+7]]:18: error: cannot implicitly convert non-type value of type `Self.(TODO: element 0 in incomplete Self as I)` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   fn F[X:! T](x: X);
   // CHECK:STDERR:                  ^
-  // CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+4]]:18: note: type `Self.(TODO: element 0 in incomplete Self as I)` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+4]]:18: note: type `Self.(TODO: element 0 in incomplete Self as I)` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   fn F[X:! T](x: X);
   // CHECK:STDERR:                  ^
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/interface/require.carbon

@@ -323,7 +323,7 @@ interface Z(T:! type) {
   // CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+7]]:11: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
   // CHECK:STDERR:   require 1 impls Y;
   // CHECK:STDERR:           ^
-  // CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+4]]:11: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+4]]:11: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   require 1 impls Y;
   // CHECK:STDERR:           ^
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/interop/cpp/builtins.llp64.carbon

@@ -82,7 +82,7 @@ fn F() {
   // CHECK:STDERR: fail_implicit_conversion_long_to_i32.carbon:[[@LINE+7]]:32: error: cannot implicitly convert expression of type `Cpp.long` to `i32` [ConversionFailure]
   // CHECK:STDERR:   let unused carbon_i32: i32 = cpp_long;
   // CHECK:STDERR:                                ^~~~~~~~
-  // CHECK:STDERR: fail_implicit_conversion_long_to_i32.carbon:[[@LINE+4]]:32: note: type `Cpp.long` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_implicit_conversion_long_to_i32.carbon:[[@LINE+4]]:32: note: type `Cpp.long` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused carbon_i32: i32 = cpp_long;
   // CHECK:STDERR:                                ^~~~~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/interop/cpp/builtins.lp64.carbon

@@ -81,7 +81,7 @@ fn F() {
   // CHECK:STDERR: fail_implicit_conversion_long_long_to_i64.carbon:[[@LINE+7]]:32: error: cannot implicitly convert expression of type `Cpp.long_long` to `i64` [ConversionFailure]
   // CHECK:STDERR:   let unused carbon_i64: i64 = cpp_long_long;
   // CHECK:STDERR:                                ^~~~~~~~~~~~~
-  // CHECK:STDERR: fail_implicit_conversion_long_long_to_i64.carbon:[[@LINE+4]]:32: note: type `Cpp.long_long` does not implement interface `Core.ImplicitAs(i64)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_implicit_conversion_long_long_to_i64.carbon:[[@LINE+4]]:32: note: type `Cpp.long_long` does not implement interface `Core.ImplicitAs(i64)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused carbon_i64: i64 = cpp_long_long;
   // CHECK:STDERR:                                ^~~~~~~~~~~~~
   // CHECK:STDERR:

+ 19 - 19
toolchain/check/testdata/interop/cpp/class/base.carbon

@@ -159,7 +159,7 @@ fn ConvertA(p: Cpp.C*) -> Cpp.A* {
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.C*` to `Cpp.A*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.C*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.C*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -170,7 +170,7 @@ fn ConvertB(p: Cpp.C*) -> Cpp.B* {
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.C*` to `Cpp.B*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.C*` does not implement interface `Core.ImplicitAs(Cpp.B*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.C*` does not implement interface `Core.ImplicitAs(Cpp.B*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -181,7 +181,7 @@ fn ConvertOneNonEmptyBaseToEmpty1(p: Cpp.OneNonEmptyBase*) -> Cpp.Empty1* {
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.OneNonEmptyBase*` to `Cpp.Empty1*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.OneNonEmptyBase*` does not implement interface `Core.ImplicitAs(Cpp.Empty1*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.OneNonEmptyBase*` does not implement interface `Core.ImplicitAs(Cpp.Empty1*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -192,7 +192,7 @@ fn ConvertOneNonEmptyBaseToEmpty2(p: Cpp.OneNonEmptyBase*) -> Cpp.Empty2* {
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.OneNonEmptyBase*` to `Cpp.Empty2*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.OneNonEmptyBase*` does not implement interface `Core.ImplicitAs(Cpp.Empty2*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.OneNonEmptyBase*` does not implement interface `Core.ImplicitAs(Cpp.Empty2*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -203,7 +203,7 @@ fn ConvertTwoNonEmptyBasesToA(p: Cpp.TwoNonEmptyBases*) -> Cpp.A* {
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.TwoNonEmptyBases*` to `Cpp.A*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.TwoNonEmptyBases*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.TwoNonEmptyBases*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -214,7 +214,7 @@ fn ConvertTwoNonEmptyBasesToB(p: Cpp.TwoNonEmptyBases*) -> Cpp.B* {
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.TwoNonEmptyBases*` to `Cpp.B*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.TwoNonEmptyBases*` does not implement interface `Core.ImplicitAs(Cpp.B*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.TwoNonEmptyBases*` does not implement interface `Core.ImplicitAs(Cpp.B*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -225,7 +225,7 @@ fn ConvertOnePolymorphicBaseToA(p: Cpp.OnePolymorphicBase*) -> Cpp.A* {
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.OnePolymorphicBase*` to `Cpp.A*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.OnePolymorphicBase*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.OnePolymorphicBase*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -236,7 +236,7 @@ fn ConvertOnePolymorphicBaseToB(p: Cpp.OnePolymorphicBase*) -> Cpp.B* {
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.OnePolymorphicBase*` to `Cpp.B*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.OnePolymorphicBase*` does not implement interface `Core.ImplicitAs(Cpp.B*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.OnePolymorphicBase*` does not implement interface `Core.ImplicitAs(Cpp.B*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -247,7 +247,7 @@ fn ConvertTwoPolymorphicBasesToPolymorphic1(p: Cpp.TwoPolymorphicBases*) -> Cpp.
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.TwoPolymorphicBases*` to `Cpp.Polymorphic1*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.TwoPolymorphicBases*` does not implement interface `Core.ImplicitAs(Cpp.Polymorphic1*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.TwoPolymorphicBases*` does not implement interface `Core.ImplicitAs(Cpp.Polymorphic1*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -258,7 +258,7 @@ fn ConvertTwoPolymorphicBasesToPolymorphic2(p: Cpp.TwoPolymorphicBases*) -> Cpp.
   // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.TwoPolymorphicBases*` to `Cpp.Polymorphic2*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.TwoPolymorphicBases*` does not implement interface `Core.ImplicitAs(Cpp.Polymorphic2*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_multiple_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.TwoPolymorphicBases*` does not implement interface `Core.ImplicitAs(Cpp.Polymorphic2*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -311,7 +311,7 @@ fn Convert(p: Cpp.B*) -> Cpp.A* {
   // CHECK:STDERR: fail_todo_use_virtual_inheritance.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.B*` to `Cpp.A*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_virtual_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.B*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_virtual_inheritance.carbon:[[@LINE+4]]:3: note: type `Cpp.B*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -346,7 +346,7 @@ fn ConvertBA(p: Cpp.B*) -> Cpp.A* {
   // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.B*` to `Cpp.A*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:3: note: type `Cpp.B*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:3: note: type `Cpp.B*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -357,7 +357,7 @@ fn ConvertCA(p: Cpp.C*) -> Cpp.A* {
   // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.C*` to `Cpp.A*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:3: note: type `Cpp.C*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:3: note: type `Cpp.C*` does not implement interface `Core.ImplicitAs(Cpp.A*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -368,7 +368,7 @@ fn ConvertDB(p: Cpp.D*) -> Cpp.B* {
   // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.D*` to `Cpp.B*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:3: note: type `Cpp.D*` does not implement interface `Core.ImplicitAs(Cpp.B*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:3: note: type `Cpp.D*` does not implement interface `Core.ImplicitAs(Cpp.B*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -379,7 +379,7 @@ fn ConvertDC(p: Cpp.D*) -> Cpp.C* {
   // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Cpp.D*` to `Cpp.C*` [ConversionFailure]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:3: note: type `Cpp.D*` does not implement interface `Core.ImplicitAs(Cpp.C*)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:3: note: type `Cpp.D*` does not implement interface `Core.ImplicitAs(Cpp.C*)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return p;
   // CHECK:STDERR:   ^~~~~~~~~
   // CHECK:STDERR:
@@ -390,7 +390,7 @@ fn AccessBA(d: Cpp.D) -> i32 {
   // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+7]]:11: error: cannot convert expression of type `Cpp.D` to `Cpp.B` with `as` [ConversionFailure]
   // CHECK:STDERR:   return (d as Cpp.B).b;
   // CHECK:STDERR:           ^~~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:11: note: type `Cpp.D` does not implement interface `Core.As(Cpp.B)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:11: note: type `Cpp.D` does not implement interface `Core.As(Cpp.B)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return (d as Cpp.B).b;
   // CHECK:STDERR:           ^~~~~~~~~~
   // CHECK:STDERR:
@@ -401,7 +401,7 @@ fn AccessCA(d: Cpp.D) -> i32 {
   // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+7]]:11: error: cannot convert expression of type `Cpp.D` to `Cpp.C` with `as` [ConversionFailure]
   // CHECK:STDERR:   return (d as Cpp.C).b;
   // CHECK:STDERR:           ^~~~~~~~~~
-  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:11: note: type `Cpp.D` does not implement interface `Core.As(Cpp.C)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:11: note: type `Cpp.D` does not implement interface `Core.As(Cpp.C)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return (d as Cpp.C).b;
   // CHECK:STDERR:           ^~~~~~~~~~
   // CHECK:STDERR:
@@ -412,7 +412,7 @@ fn AccessDB(d: Cpp.D) -> i32 {
   // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+7]]:10: error: cannot implicitly convert expression of type `Cpp.D` to `Cpp.B` [ConversionFailure]
   // CHECK:STDERR:   return d.b;
   // CHECK:STDERR:          ^~~
-  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:10: note: type `Cpp.D` does not implement interface `Core.ImplicitAs(Cpp.B)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:10: note: type `Cpp.D` does not implement interface `Core.ImplicitAs(Cpp.B)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return d.b;
   // CHECK:STDERR:          ^~~
   // CHECK:STDERR:
@@ -423,7 +423,7 @@ fn AccessDC(d: Cpp.D) -> i32 {
   // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+7]]:10: error: cannot implicitly convert expression of type `Cpp.D` to `Cpp.C` [ConversionFailure]
   // CHECK:STDERR:   return d.c;
   // CHECK:STDERR:          ^~~
-  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:10: note: type `Cpp.D` does not implement interface `Core.ImplicitAs(Cpp.C)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_use_diamond.carbon:[[@LINE+4]]:10: note: type `Cpp.D` does not implement interface `Core.ImplicitAs(Cpp.C)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   return d.c;
   // CHECK:STDERR:          ^~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/interop/cpp/class/non_aggregate_init.carbon

@@ -32,7 +32,7 @@ fn Make() {
   // CHECK:STDERR: fail_non_aggregate_init.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `{}` to `Cpp.X` [ConversionFailure]
   // CHECK:STDERR:   var _: Cpp.X = {};
   // CHECK:STDERR:   ^~~~~~~~~~~~
-  // CHECK:STDERR: fail_non_aggregate_init.carbon:[[@LINE+4]]:3: note: type `{}` does not implement interface `Core.ImplicitAs(Cpp.X)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_non_aggregate_init.carbon:[[@LINE+4]]:3: note: type `{}` does not implement interface `Core.ImplicitAs(Cpp.X)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   var _: Cpp.X = {};
   // CHECK:STDERR:   ^~~~~~~~~~~~
   // CHECK:STDERR:

+ 20 - 20
toolchain/check/testdata/interop/cpp/class/template.carbon

@@ -60,22 +60,22 @@ using Xint = X<int>;
 
 library "[[@TEST_NAME]]";
 
-// CHECK:STDERR: fail_use_instantiation_error.carbon:[[@LINE+8]]:10: in file included here [InCppInclude]
-// CHECK:STDERR: ./instantiation_error.h:3:25: error: type 'int' cannot be used prior to '::' because it has no members [CppInteropParseError]
-// CHECK:STDERR:     3 |   using type = typename T::member;
-// CHECK:STDERR:       |                         ^
-// CHECK:STDERR: fail_use_instantiation_error.carbon:[[@LINE+4]]:10: in file included here [InCppInclude]
-// CHECK:STDERR: ./instantiation_error.h:2:29: note: in instantiation of template class 'X<int>' requested here [CppInteropParseNote]
-// CHECK:STDERR:     2 | template<typename T> struct X {
-// CHECK:STDERR:       |                             ^
 import Cpp library "instantiation_error.h";
 
 //@dump-sem-ir-begin
 var x: Cpp.XY.r#type = 0;
 
-// CHECK:STDERR: fail_use_instantiation_error.carbon:[[@LINE+4]]:8: note: while completing C++ type `Cpp.X` [InCppTypeCompletion]
+// CHECK:STDERR: fail_use_instantiation_error.carbon:[[@LINE+12]]:8: error: member access into incomplete class `Cpp.X` [QualifiedExprInIncompleteClassScope]
 // CHECK:STDERR: var y: Cpp.Xint.r#type = 0;
 // CHECK:STDERR:        ^~~~~~~~~~~~~
+// CHECK:STDERR: fail_use_instantiation_error.carbon:[[@LINE-8]]:10: in file included here [InCppInclude]
+// CHECK:STDERR: ./instantiation_error.h:3:25: note: type 'int' cannot be used prior to '::' because it has no members [CppInteropParseError]
+// CHECK:STDERR:     3 |   using type = typename T::member;
+// CHECK:STDERR:       |                         ^
+// CHECK:STDERR: fail_use_instantiation_error.carbon:[[@LINE-12]]:10: in file included here [InCppInclude]
+// CHECK:STDERR: ./instantiation_error.h:2:29: note: in instantiation of template class 'X<int>' requested here [CppInteropParseNote]
+// CHECK:STDERR:     2 | template<typename T> struct X {
+// CHECK:STDERR:       |                             ^
 // CHECK:STDERR:
 var y: Cpp.Xint.r#type = 0;
 //@dump-sem-ir-end
@@ -208,11 +208,11 @@ var y: Cpp.Xint.r#type = 0;
 // CHECK:STDOUT:     %x.var_patt: %pattern_type.7ce = var_pattern %x.patt [concrete]
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %x.var: ref %i32 = var %x.var_patt [concrete]
-// CHECK:STDOUT:   %.loc15: type = splice_block %type.ref.loc15 [concrete = constants.%i32] {
-// CHECK:STDOUT:     %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
+// CHECK:STDOUT:   %.loc7: type = splice_block %type.ref.loc7 [concrete = constants.%i32] {
+// CHECK:STDOUT:     %Cpp.ref.loc7: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
 // CHECK:STDOUT:     %XY.ref: type = name_ref XY, imports.%X.decl.dec4cb.1 [concrete = constants.%X.32d59e.1]
 // CHECK:STDOUT:     <elided>
-// CHECK:STDOUT:     %type.ref.loc15: type = name_ref r#type, %i32.2 [concrete = constants.%i32]
+// CHECK:STDOUT:     %type.ref.loc7: type = name_ref r#type, %i32.2 [concrete = constants.%i32]
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %x: ref %i32 = ref_binding x, %x.var [concrete = %x.var]
 // CHECK:STDOUT:   name_binding_decl {
@@ -231,14 +231,14 @@ var y: Cpp.Xint.r#type = 0;
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @__global_init() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %int_0.loc15: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
-// CHECK:STDOUT:   %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
-// CHECK:STDOUT:   %bound_method.loc15_1.1: <bound method> = bound_method %int_0.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
-// CHECK:STDOUT:   %specific_fn.loc15: <specific function> = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
-// CHECK:STDOUT:   %bound_method.loc15_1.2: <bound method> = bound_method %int_0.loc15, %specific_fn.loc15 [concrete = constants.%bound_method]
-// CHECK:STDOUT:   %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15: init %i32 = call %bound_method.loc15_1.2(%int_0.loc15) [concrete = constants.%int_0.6a9]
-// CHECK:STDOUT:   %.loc15: init %i32 = converted %int_0.loc15, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15 [concrete = constants.%int_0.6a9]
-// CHECK:STDOUT:   assign file.%x.var, %.loc15
+// CHECK:STDOUT:   %int_0.loc7: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
+// CHECK:STDOUT:   %impl.elem0.loc7: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
+// CHECK:STDOUT:   %bound_method.loc7_1.1: <bound method> = bound_method %int_0.loc7, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
+// CHECK:STDOUT:   %specific_fn.loc7: <specific function> = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
+// CHECK:STDOUT:   %bound_method.loc7_1.2: <bound method> = bound_method %int_0.loc7, %specific_fn.loc7 [concrete = constants.%bound_method]
+// CHECK:STDOUT:   %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7: init %i32 = call %bound_method.loc7_1.2(%int_0.loc7) [concrete = constants.%int_0.6a9]
+// CHECK:STDOUT:   %.loc7: init %i32 = converted %int_0.loc7, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%int_0.6a9]
+// CHECK:STDOUT:   assign file.%x.var, %.loc7
 // CHECK:STDOUT:   %int_0.loc21: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
 // CHECK:STDOUT:   %impl.elem0.loc21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
 // CHECK:STDOUT:   %bound_method.loc21_1.1: <bound method> = bound_method %int_0.loc21, %impl.elem0.loc21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]

+ 5 - 5
toolchain/check/testdata/interop/cpp/enum/convert.carbon

@@ -42,7 +42,7 @@ fn F() {
   // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert expression of type `Cpp.Enum` to `i8` with `as` [ConversionFailure]
   // CHECK:STDERR:   Cpp.Enum.a as i8;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `Cpp.Enum` does not implement interface `Core.As(i8)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `Cpp.Enum` does not implement interface `Core.As(i8)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   Cpp.Enum.a as i8;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -51,7 +51,7 @@ fn F() {
   // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert expression of type `Cpp.Enum` to `i32` with `as` [ConversionFailure]
   // CHECK:STDERR:   Cpp.Enum.a as i32;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `Cpp.Enum` does not implement interface `Core.As(i32)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `Cpp.Enum` does not implement interface `Core.As(i32)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   Cpp.Enum.a as i32;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -60,7 +60,7 @@ fn F() {
   // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert expression of type `i8` to `Cpp.Enum` with `as` [ConversionFailure]
   // CHECK:STDERR:   (42 as i8) as Cpp.Enum;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `i8` does not implement interface `Core.As(Cpp.Enum)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `i8` does not implement interface `Core.As(Cpp.Enum)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   (42 as i8) as Cpp.Enum;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -69,7 +69,7 @@ fn F() {
   // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert expression of type `i32` to `Cpp.Enum` with `as` [ConversionFailure]
   // CHECK:STDERR:   (42 as i32) as Cpp.Enum;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `i32` does not implement interface `Core.As(Cpp.Enum)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `i32` does not implement interface `Core.As(Cpp.Enum)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   (42 as i32) as Cpp.Enum;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:
@@ -78,7 +78,7 @@ fn F() {
   // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+7]]:3: error: cannot convert expression of type `Cpp.Enum` to `Cpp.DifferentSize` with `as` [ConversionFailure]
   // CHECK:STDERR:   Cpp.a as Cpp.DifferentSize;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `Cpp.Enum` does not implement interface `Core.As(Cpp.DifferentSize)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_wrong_type.carbon:[[@LINE+4]]:3: note: type `Cpp.Enum` does not implement interface `Core.As(Cpp.DifferentSize)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   Cpp.a as Cpp.DifferentSize;
   // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~~~~
   // CHECK:STDERR:

+ 2 - 2
toolchain/check/testdata/interop/cpp/enum/unscoped.carbon

@@ -39,7 +39,7 @@ fn F() {
   // CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+7]]:29: error: cannot implicitly convert expression of type `Cpp.Enum` to `Cpp.Other` [ConversionFailure]
   // CHECK:STDERR:   let unused c: Cpp.Other = Cpp.Enum.c;
   // CHECK:STDERR:                             ^~~~~~~~~~
-  // CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+4]]:29: note: type `Cpp.Enum` does not implement interface `Core.ImplicitAs(Cpp.Other)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+4]]:29: note: type `Cpp.Enum` does not implement interface `Core.ImplicitAs(Cpp.Other)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused c: Cpp.Other = Cpp.Enum.c;
   // CHECK:STDERR:                             ^~~~~~~~~~
   // CHECK:STDERR:
@@ -48,7 +48,7 @@ fn F() {
   // CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+7]]:30: error: cannot implicitly convert expression of type `Cpp.Enum` to `Cpp.Other` [ConversionFailure]
   // CHECK:STDERR:   let unused c2: Cpp.Other = Cpp.c;
   // CHECK:STDERR:                              ^~~~~
-  // CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+4]]:30: note: type `Cpp.Enum` does not implement interface `Core.ImplicitAs(Cpp.Other)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+4]]:30: note: type `Cpp.Enum` does not implement interface `Core.ImplicitAs(Cpp.Other)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   let unused c2: Cpp.Other = Cpp.c;
   // CHECK:STDERR:                              ^~~~~
   // CHECK:STDERR:

+ 1 - 1
toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon

@@ -293,7 +293,7 @@ fn F() {
   // CHECK:STDERR: fail_import_short_param_int32_arg.carbon:[[@LINE+11]]:11: error: cannot implicitly convert expression of type `i32` to `i16` [ConversionFailure]
   // CHECK:STDERR:   Cpp.foo(1 as i32);
   // CHECK:STDERR:           ^~~~~~~~
-  // CHECK:STDERR: fail_import_short_param_int32_arg.carbon:[[@LINE+8]]:11: note: type `i32` does not implement interface `Core.ImplicitAs(i16)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_import_short_param_int32_arg.carbon:[[@LINE+8]]:11: note: type `i32` does not implement interface `Core.ImplicitAs(i16)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   Cpp.foo(1 as i32);
   // CHECK:STDERR:           ^~~~~~~~
   // CHECK:STDERR: fail_import_short_param_int32_arg.carbon:[[@LINE-9]]:10: in file included here [InCppInclude]

+ 1 - 1
toolchain/check/testdata/interop/cpp/function/operators.carbon

@@ -224,7 +224,7 @@ fn F() {
   // CHECK:STDERR: fail_todo_import_assignment.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Core.IntLiteral` to `Cpp.C` [ConversionFailure]
   // CHECK:STDERR:   c = 42;
   // CHECK:STDERR:   ^~~~~~
-  // CHECK:STDERR: fail_todo_import_assignment.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(Cpp.C)` [MissingImplInMemberAccessNote]
+  // CHECK:STDERR: fail_todo_import_assignment.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(Cpp.C)` [MissingImplInMemberAccessInContext]
   // CHECK:STDERR:   c = 42;
   // CHECK:STDERR:   ^~~~~~
   // CHECK:STDERR:

Некоторые файлы не были показаны из-за большого количества измененных файлов