diff --git a/core/prelude/iterate.carbon b/core/prelude/iterate.carbon index 9aff9863f08c..859aa140d0a0 100644 --- a/core/prelude/iterate.carbon +++ b/core/prelude/iterate.carbon @@ -31,7 +31,9 @@ impl forall [T: Copy & Destroy, N: IntLiteral] } } -interface CppRangeForIterate { +// Iteration support for C++ ranges. + +private interface CppRangeForIterate { let Iterator: type; let Sentinel: type; @@ -40,31 +42,41 @@ interface CppRangeForIterate { fn End(self) -> Sentinel; } -impl forall [ - R: CppRangeForIterate where - .Iterator impls Copy & Destroy & CppUnsafeDeref & Inc & EqWith(.Sentinel) and - .Iterator.(CppUnsafeDeref.Result) impls Copy & Destroy and - .Sentinel impls Copy & Destroy -] - R as Iterate - where - .ElementType = R.Iterator.(CppUnsafeDeref.Result) and - .CursorType = (R.Iterator, R.Sentinel) -{ - alias ElementType = R.Iterator.(CppUnsafeDeref.Result); +private constraint CppIterator { + require impls Inc & Destroy; + require impls CppUnsafeDeref where .Result impls Destroy; - fn NewCursor(self) -> (R.Iterator, R.Sentinel) { + alias ValueType = CppUnsafeDeref.Result; +} + +private constraint CppSentinelFor(T: CppIterator) { + require impls Destroy; + require T impls EqWith(Self); +} + +private constraint CppRange { + extend require impls CppRangeForIterate; + // TODO: `Self.` should not be necessary here. + require Self.(Iterator) impls CppIterator; + require Self.(Sentinel) impls CppSentinelFor(Self.(Iterator)); + + alias ValueType = Self.(Iterator).(CppIterator.ValueType); +} + +impl forall [T: CppRange where .ValueType impls Copy] + T as Iterate where + .ElementType = T.ValueType and + .CursorType = (T.Iterator, T.Sentinel) { + fn NewCursor(self) -> CursorType { return (self.Begin(), self.End()); } - fn Next(unused self, cursor: (R.Iterator, R.Sentinel)*) -> Optional(ElementType) { + fn Next(unused self, cursor: CursorType*) -> Optional(ElementType) { if (cursor->0 != cursor->1) { - returned var result: Optional(ElementType) = - Optional(ElementType).Some(cursor->0.(CppUnsafeDeref.Op)()); + returned var result: Optional(ElementType) = cursor->0.(CppUnsafeDeref.Op)(); ++cursor->0; return var; - } else { - return Optional(ElementType).None(); } + return Optional(ElementType).None(); } } diff --git a/toolchain/check/eval_inst.cpp b/toolchain/check/eval_inst.cpp index 1f8c362dabff..aad6bb884b6c 100644 --- a/toolchain/check/eval_inst.cpp +++ b/toolchain/check/eval_inst.cpp @@ -645,8 +645,35 @@ auto EvalConstantInst(Context& context, SemIR::RequireSpecificDefinition inst) return ConstantEvalResult::NewSamePhase(inst); } -auto EvalConstantInst(Context& context, SemIR::SpecificConstant inst) - -> ConstantEvalResult { +auto EvalConstantInst(Context& context, SemIR::InstId inst_id, + SemIR::SpecificConstant inst) -> ConstantEvalResult { + // The SpecificConstant can refer to a constant in the definition region of + // the generic. This can happen during substitution. If it does, resolve the + // definition region now. + // + // TODO: This is somewhat unprincipled; it's not clear this is the right way + // to address this problem. We mostly don't need this because eval blocks for + // generics contain instructions to cause specifics to be resolved as needed, + // but substitution doesn't run those. Other options to consider: + // + // * Detect this case in Subst and resolve the specific there instead. This + // could be limited to the case where we are substituting into a + // non-canonical instruction. + // * Move away from using Subst in general, and rely on eval blocks + // containing instructions to resolve specifics as needed. This would + // require us to build more generics, for contexts where we currently use + // Subst but could form a specific instead. + auto const_id = context.constant_values().GetAttached(inst.inst_id); + if (const_id.has_value() && const_id.is_symbolic()) { + const auto& symbolic_const = + context.constant_values().GetSymbolicConstant(const_id); + if (symbolic_const.index.has_value() && + symbolic_const.index.region() == SemIR::GenericInstIndex::Definition) { + ResolveSpecificDefinition(context, SemIR::LocId(inst_id), + inst.specific_id); + } + } + // Pull the constant value out of the specific. return ConstantEvalResult::Existing(SemIR::GetConstantValueInSpecific( context.sem_ir(), inst.specific_id, inst.inst_id)); diff --git a/toolchain/check/testdata/class/field/field_initializer.carbon b/toolchain/check/testdata/class/field/field_initializer.carbon index 9b5779f96832..eb4a6960a77d 100644 --- a/toolchain/check/testdata/class/field/field_initializer.carbon +++ b/toolchain/check/testdata/class/field/field_initializer.carbon @@ -133,7 +133,7 @@ var C: Class = {}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %.loc5_12: %Class.elem = field_decl field, element0, initializer = inst64000105 [concrete] +// CHECK:STDOUT: %.loc5_12: %Class.elem = field_decl field, element0, initializer = inst64000106 [concrete] // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] // CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39] // CHECK:STDOUT: %bound_method.loc5_20.1: = bound_method %int_123, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index abeee86f4ecf..fbe5139a3a8f 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -111,8 +111,8 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.778: = impl_witness imports.%ImplicitAs.impl_witness_table.1f3, @Core.IntLiteral.as.ImplicitAs.impl.0e9(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.e39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] -// CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] +// CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic] // CHECK:STDOUT: %Iterate.lookup_impl_witness.98d: = lookup_impl_witness %.Self.frozen.bdd, @Iterate [symbolic_self] // CHECK:STDOUT: %impl.elem1.990: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.98d, element1 [symbolic_self] // CHECK:STDOUT: %Destroy.lookup_impl_witness.173: = lookup_impl_witness %Int.67af24.1, @Destroy [symbolic] @@ -195,8 +195,8 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %.f62: require_specific_def_type = require_specific_def @Int.as.Inc.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Inc.facet.a38: %Inc.type = facet_value %Int.67af24.1, (%Inc.lookup_impl_witness.428) [symbolic] // CHECK:STDOUT: %Inc.WithSelf.Op.type.36a: type = fn_type @Inc.WithSelf.Op, @Inc.WithSelf(%Inc.facet.a38) [symbolic] -// CHECK:STDOUT: %.952c: type = fn_type_with_self_type %Inc.WithSelf.Op.type.36a, %Inc.facet.a38 [symbolic] -// CHECK:STDOUT: %impl.elem0.7b5: %.952c = impl_witness_access %Inc.lookup_impl_witness.428, element0 [symbolic] +// CHECK:STDOUT: %.952: type = fn_type_with_self_type %Inc.WithSelf.Op.type.36a, %Inc.facet.a38 [symbolic] +// CHECK:STDOUT: %impl.elem0.7b5: %.952 = impl_witness_access %Inc.lookup_impl_witness.428, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.ed1: = specific_impl_function %impl.elem0.7b5, @Inc.WithSelf.Op(%Inc.facet.a38) [symbolic] // CHECK:STDOUT: %Optional.Some.specific_fn.d36: = specific_function %Optional.Some.bcf, @Optional.Some(%OptionalStorage.facet.b99) [symbolic] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.8f1: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.7bb) [symbolic] @@ -262,8 +262,8 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Core.import_ref.6e4: @Optional.%Optional.None.type (%Optional.None.type.bdc) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.01e)] // CHECK:STDOUT: %Core.import_ref.84ba: @Optional.%Optional.Some.type (%Optional.Some.type.304) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.2a0)] // CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %CursorType] -// CHECK:STDOUT: %Core.import_ref.717c: @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1f3 = impl_witness_table (%Core.import_ref.717c), @Core.IntLiteral.as.ImplicitAs.impl.0e9 [concrete] +// CHECK:STDOUT: %Core.import_ref.717: @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e74) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.0e9.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.845)] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.1f3 = impl_witness_table (%Core.import_ref.717), @Core.IntLiteral.as.ImplicitAs.impl.0e9 [concrete] // CHECK:STDOUT: %CursorType: %Destroy.type = assoc_const_decl @CursorType [concrete] {} // CHECK:STDOUT: %Core.import_ref.ebd7: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %ElementType] // CHECK:STDOUT: %ElementType: %facet_type.f48 = assoc_const_decl @ElementType [concrete] {} @@ -668,8 +668,8 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Inc.lookup_impl_witness: = lookup_impl_witness %Int.loc11_37.1, @Inc [symbolic = %Inc.lookup_impl_witness (constants.%Inc.lookup_impl_witness.428)] // CHECK:STDOUT: %Inc.facet.loc14_9.3: %Inc.type = facet_value %Int.loc11_37.1, (%Inc.lookup_impl_witness) [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet.a38)] // CHECK:STDOUT: %Inc.WithSelf.Op.type: type = fn_type @Inc.WithSelf.Op, @Inc.WithSelf(%Inc.facet.loc14_9.3) [symbolic = %Inc.WithSelf.Op.type (constants.%Inc.WithSelf.Op.type.36a)] -// CHECK:STDOUT: %.loc14_9.4: type = fn_type_with_self_type %Inc.WithSelf.Op.type, %Inc.facet.loc14_9.3 [symbolic = %.loc14_9.4 (constants.%.952c)] -// CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.4 (%.952c) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.7b5)] +// CHECK:STDOUT: %.loc14_9.4: type = fn_type_with_self_type %Inc.WithSelf.Op.type, %Inc.facet.loc14_9.3 [symbolic = %.loc14_9.4 (constants.%.952)] +// CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.4 (%.952) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.7b5)] // CHECK:STDOUT: %specific_impl_fn.loc14_9.2: = specific_impl_function %impl.elem0.loc14_9.2, @Inc.WithSelf.Op(%Inc.facet.loc14_9.3) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.ed1)] // CHECK:STDOUT: %Optional.Some.type: type = fn_type @Optional.Some, @Optional(%OptionalStorage.facet.loc11_69.1) [symbolic = %Optional.Some.type (constants.%Optional.Some.type.422)] // CHECK:STDOUT: %Optional.Some: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.422) = struct_value () [symbolic = %Optional.Some (constants.%Optional.Some.bcf)] @@ -731,7 +731,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %cursor.ref.loc14: @IntRange.as.Iterate.impl.Next.%ptr.loc11_38.1 (%ptr.41e) = name_ref cursor, %cursor // CHECK:STDOUT: %.loc14_11: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_37.1 (%Int.67af24.1) = deref %cursor.ref.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.4 (%.952c) = impl_witness_access constants.%Inc.lookup_impl_witness.428, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.7b5)] +// CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.4 (%.952) = impl_witness_access constants.%Inc.lookup_impl_witness.428, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.7b5)] // CHECK:STDOUT: %bound_method.loc14_9.1: = bound_method %.loc14_11, %impl.elem0.loc14_9.1 // CHECK:STDOUT: %Inc.facet.loc14_9.1: %Inc.type = facet_value constants.%Int.67af24.1, (constants.%Inc.lookup_impl_witness.428) [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet.a38)] // CHECK:STDOUT: %.loc14_9.1: %Inc.type = converted constants.%Int.67af24.1, %Inc.facet.loc14_9.1 [symbolic = %Inc.facet.loc14_9.3 (constants.%Inc.facet.a38)] diff --git a/toolchain/check/testdata/interop/cpp/impls/cpp_range_for_iterate.carbon b/toolchain/check/testdata/interop/cpp/impls/cpp_range_for_iterate.carbon new file mode 100644 index 000000000000..b83ef7d2387e --- /dev/null +++ b/toolchain/check/testdata/interop/cpp/impls/cpp_range_for_iterate.carbon @@ -0,0 +1,406 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon +// +// EXTRA-ARGS: --clang-arg=-std=c++20 +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/impls/cpp_range_for_iterate.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/impls/cpp_range_for_iterate.carbon + +// --- cpp_range_for_iterate.carbon +package Core library "cpp_range_for_iterate"; + +import library "prelude/parts/bool"; + +interface CppRangeForIterate { + let Iterator: type; + let Sentinel: type; + + // TODO: self must be ref-qualified + fn Begin(self) -> Iterator; + fn End(self) -> Sentinel; +} + +interface IsRange { + let Result: bool; +} + +final impl forall [T: CppRangeForIterate] T as IsRange where .Result = true {} +impl forall [T: type] T as IsRange where .Result = false {} + +fn AssertIsRange(unused generic R: IsRange where .Result = true) {} +fn AssertIsNotRange(unused generic S: IsRange where .Result = false) {} + +// --- methods_return_same_type.carbon +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +class MutableRange { + struct Iterator {}; +public: + auto begin() -> Iterator; + auto end() -> Iterator; +}; + +class ConstRange { + struct Iterator {}; +public: + auto begin() const -> Iterator; + auto end() const -> Iterator; +}; +'''; + +fn Test() { + Core.AssertIsRange(Cpp.MutableRange); + Core.AssertIsRange(Cpp.ConstRange); +} + +// --- methods_return_different_types.carbon +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +class MutableRangeWithSentinel { + struct Iterator {}; + struct Sentinel {}; +public: + auto begin() -> Iterator; + auto end() -> Sentinel; +}; + +class ConstRangeWithSentinel { + struct Iterator {}; + struct Sentinel {}; +public: + auto begin() const -> Iterator; + auto end() const -> Sentinel; +}; +'''; + +fn Test() { + Core.AssertIsRange(Cpp.MutableRangeWithSentinel); + Core.AssertIsRange(Cpp.ConstRangeWithSentinel); +} + +// --- adl_return_same_types.carbon +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +namespace N { +class ConstRange { + struct Iterator {}; +public: + friend auto begin(const ConstRange&) -> Iterator; + friend auto end(const ConstRange&) -> Iterator; +}; +} // namespace N +'''; + +fn Test() { + Core.AssertIsRange(Cpp.N.ConstRange); +} + +// --- fail_todo_adl_returns_same_types_mutable.carbon +// CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon: error: value expression passed to reference parameter [ValueForRefParam] +// TODO: merge with adl_returns_same_types.carbon when passing. +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +namespace N { +class MutableRange { + struct Iterator {}; +public: + // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE+11]]:34: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: friend auto begin(MutableRange&) -> Iterator; + // CHECK:STDERR: ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:10:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: fn Begin(self) -> Iterator; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: cpp_range_for_iterate.carbon:21:33: note: initializing generic parameter `R` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsRange(unused generic R: IsRange where .Result = true) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon: error: value expression passed to reference parameter [ValueForRefParam] + friend auto begin(MutableRange&) -> Iterator; + // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE+10]]:32: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: friend auto end(MutableRange&) -> Iterator; + // CHECK:STDERR: ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:11:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: fn End(self) -> Sentinel; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: cpp_range_for_iterate.carbon:21:33: note: initializing generic parameter `R` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsRange(unused generic R: IsRange where .Result = true) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + friend auto end(MutableRange&) -> Iterator; +}; +} // namespace N +'''; + +fn Test() { + Core.AssertIsRange(Cpp.N.MutableRange); +} + +// --- adl_returns_different_types.carbon +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +namespace N { +class ConstRangeWithSentinel { + struct Iterator {}; + struct Sentinel {}; +public: + friend auto begin(const ConstRangeWithSentinel&) -> Iterator; + friend auto end(const ConstRangeWithSentinel&) -> Sentinel; +}; +} // namespace N +'''; + +fn Test() { + Core.AssertIsRange(Cpp.N.ConstRangeWithSentinel); +} + +// --- fail_todo_adl_returns_different_types_mutable.carbon +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +namespace N { +class MutableRangeWithSentinel { + struct Iterator { + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+5]]:31: error: unknown type name 'ValueType' [CppInteropParseError] + // CHECK:STDERR: 14 | auto operator*() const -> ValueType&; + // CHECK:STDERR: | ^ + // CHECK:STDERR: + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon: error: value expression passed to reference parameter [ValueForRefParam] + auto operator*() const -> ValueType&; + auto operator++() -> Iterator&; + }; + + struct Sentinel { + friend auto operator==(Sentinel, Iterator) -> bool; + friend auto operator!=(Sentinel, Iterator) -> bool; + }; +public: + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+11]]:46: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: friend auto begin(MutableRangeWithSentinel&) -> Iterator; + // CHECK:STDERR: ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:10:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: fn Begin(self) -> Iterator; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: cpp_range_for_iterate.carbon:21:33: note: initializing generic parameter `R` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsRange(unused generic R: IsRange where .Result = true) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon: error: value expression passed to reference parameter [ValueForRefParam] + friend auto begin(MutableRangeWithSentinel&) -> Iterator; + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+10]]:44: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: friend auto end(MutableRangeWithSentinel&) -> Sentinel; + // CHECK:STDERR: ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:11:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: fn End(self) -> Sentinel; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: cpp_range_for_iterate.carbon:21:33: note: initializing generic parameter `R` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsRange(unused generic R: IsRange where .Result = true) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + friend auto end(MutableRangeWithSentinel&) -> Sentinel; +}; +} +'''; + +fn Test() { + Core.AssertIsRange(Cpp.N.MutableRangeWithSentinel); +} + +// --- fail_todo_adl_overloads.carbon +// CHECK:STDERR: fail_todo_adl_overloads.carbon: error: value expression passed to reference parameter [ValueForRefParam] +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +namespace N { +class MutableAndConstRange { + struct Iterator {}; + struct ConstIterator {}; +public: + // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE+11]]:42: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: friend auto begin(MutableAndConstRange&) -> Iterator; + // CHECK:STDERR: ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:10:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: fn Begin(self) -> Iterator; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: cpp_range_for_iterate.carbon:21:33: note: initializing generic parameter `R` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsRange(unused generic R: IsRange where .Result = true) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + // CHECK:STDERR: fail_todo_adl_overloads.carbon: error: value expression passed to reference parameter [ValueForRefParam] + friend auto begin(MutableAndConstRange&) -> Iterator; + // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE+10]]:40: note: initializing function parameter [InCallToFunctionParam] + // CHECK:STDERR: friend auto end(MutableAndConstRange&) -> Iterator; + // CHECK:STDERR: ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:11:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: fn End(self) -> Sentinel; + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: cpp_range_for_iterate.carbon:21:33: note: initializing generic parameter `R` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsRange(unused generic R: IsRange where .Result = true) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + friend auto end(MutableAndConstRange&) -> Iterator; + + friend auto begin(const MutableAndConstRange&) -> ConstIterator; + friend auto end(const MutableAndConstRange&) -> ConstIterator; +}; +} +'''; + +fn Test() { + Core.AssertIsRange(Cpp.N.MutableAndConstRange); +} + +// --- not_ranges.carbon +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +class NoBeginEnd {}; + +struct NoBeginMethod { + auto end() -> int; +}; + +struct NoEndMethod { + auto begin() -> int; +}; + +struct NoBeginADL { + friend auto end(NoBeginADL) -> int; +}; + +struct NoEndADL { + friend auto begin(NoEndADL) -> int; +}; + +struct BeginMethodEndADL { + auto begin() -> int; + friend auto end(BeginMethodEndADL) -> int; +}; + +struct BeginADLEndMethod { + friend auto begin(BeginADLEndMethod) -> int; + auto end() -> int; +}; + +struct BeginFieldEndMethod { + int begin; + auto end() -> int; +}; + +struct BeginMethodEndField { + auto begin() -> int; + int end; +}; +'''; + +fn Test() { + Core.AssertIsNotRange(Cpp.NoBeginEnd); + Core.AssertIsNotRange(Cpp.NoBeginMethod); + Core.AssertIsNotRange(Cpp.NoEndMethod); + Core.AssertIsNotRange(Cpp.NoBeginADL); + Core.AssertIsNotRange(Cpp.NoEndADL); + Core.AssertIsNotRange(Cpp.BeginMethodEndADL); + Core.AssertIsNotRange(Cpp.BeginADLEndMethod); + Core.AssertIsNotRange(Cpp.BeginFieldEndMethod); + Core.AssertIsNotRange(Cpp.BeginMethodEndField); +} + +// --- fail_deleted.carbon +library "[[@TEST_NAME]]"; + +import Core library "cpp_range_for_iterate"; + +import Cpp inline '''c++ +struct BeginMethodDeleted { + auto begin() = delete; + auto end() -> int; +}; + +struct EndMethodDeleted { + auto begin() -> int; + auto end() = delete; +}; + +struct BeginFunctionDeleted { + friend auto begin(const BeginFunctionDeleted&) = delete; + friend auto end(const BeginFunctionDeleted&) -> int; +}; + +struct EndFunctionDeleted { + friend auto begin(const EndFunctionDeleted&) -> int; + friend auto end(const EndFunctionDeleted&) = delete; +}; +'''; + +fn Test() { + // CHECK:STDERR: fail_deleted.carbon:[[@LINE+10]]:47: error: attempt to use a deleted function [CppInteropParseError] + // CHECK:STDERR: 38 | Core.AssertIsNotRange(Cpp.BeginMethodDeleted); + // CHECK:STDERR: | ^ + // CHECK:STDERR: fail_deleted.carbon:[[@LINE-24]]:8: note: 'begin' has been explicitly marked deleted here [CppInteropParseNote] + // CHECK:STDERR: 7 | auto begin() = delete; + // CHECK:STDERR: | ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:22:36: note: initializing generic parameter `S` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsNotRange(unused generic S: IsRange where .Result = false) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + Core.AssertIsNotRange(Cpp.BeginMethodDeleted); + // CHECK:STDERR: fail_deleted.carbon:[[@LINE+10]]:45: error: attempt to use a deleted function [CppInteropParseError] + // CHECK:STDERR: 49 | Core.AssertIsNotRange(Cpp.EndMethodDeleted); + // CHECK:STDERR: | ^ + // CHECK:STDERR: fail_deleted.carbon:[[@LINE-29]]:8: note: 'end' has been explicitly marked deleted here [CppInteropParseNote] + // CHECK:STDERR: 13 | auto end() = delete; + // CHECK:STDERR: | ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:22:36: note: initializing generic parameter `S` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsNotRange(unused generic S: IsRange where .Result = false) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + Core.AssertIsNotRange(Cpp.EndMethodDeleted); + // CHECK:STDERR: fail_deleted.carbon:[[@LINE+10]]:49: error: call to deleted function 'begin' [CppInteropParseError] + // CHECK:STDERR: 60 | Core.AssertIsNotRange(Cpp.BeginFunctionDeleted); + // CHECK:STDERR: | ^ + // CHECK:STDERR: fail_deleted.carbon:[[@LINE-36]]:15: note: candidate function has been explicitly deleted [CppInteropParseNote] + // CHECK:STDERR: 17 | friend auto begin(const BeginFunctionDeleted&) = delete; + // CHECK:STDERR: | ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:22:36: note: initializing generic parameter `S` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsNotRange(unused generic S: IsRange where .Result = false) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + Core.AssertIsNotRange(Cpp.BeginFunctionDeleted); + // CHECK:STDERR: fail_deleted.carbon:[[@LINE+10]]:47: error: call to deleted function 'end' [CppInteropParseError] + // CHECK:STDERR: 71 | Core.AssertIsNotRange(Cpp.EndFunctionDeleted); + // CHECK:STDERR: | ^ + // CHECK:STDERR: fail_deleted.carbon:[[@LINE-41]]:15: note: candidate function has been explicitly deleted [CppInteropParseNote] + // CHECK:STDERR: 23 | friend auto end(const EndFunctionDeleted&) = delete; + // CHECK:STDERR: | ^ + // CHECK:STDERR: cpp_range_for_iterate.carbon:22:36: note: initializing generic parameter `S` declared here [InitializingGenericParam] + // CHECK:STDERR: fn AssertIsNotRange(unused generic S: IsRange where .Result = false) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + Core.AssertIsNotRange(Cpp.EndFunctionDeleted); +} diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon index ee68e8fb5b97..eb9b49c38aba 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon @@ -1605,10 +1605,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.315: %ImplicitAs.type.7eb = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.type.21e369.1: type = fn_type @Cpp.long.as.EqWith.impl.NotEqual.1, @Cpp.long.as.EqWith.impl.5b1(%T.315) [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.385432.1: %Cpp.long.as.EqWith.impl.NotEqual.type.21e369.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.type.21e369.2: type = fn_type @Cpp.long.as.EqWith.impl.NotEqual.2, @Cpp.long.as.EqWith.impl.5b1(%T.315) [symbolic] -// CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.385432.2: %Cpp.long.as.EqWith.impl.NotEqual.type.21e369.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.type.814973.1: type = fn_type @Cpp.long.as.EqWith.impl.Equal.1, @Cpp.long.as.EqWith.impl.5b1(%T.315) [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.4a8971.1: %Cpp.long.as.EqWith.impl.Equal.type.814973.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.type.21e369.2: type = fn_type @Cpp.long.as.EqWith.impl.NotEqual.2, @Cpp.long.as.EqWith.impl.5b1(%T.315) [symbolic] +// CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.385432.2: %Cpp.long.as.EqWith.impl.NotEqual.type.21e369.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.type.814973.2: type = fn_type @Cpp.long.as.EqWith.impl.Equal.2, @Cpp.long.as.EqWith.impl.5b1(%T.315) [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.4a8971.2: %Cpp.long.as.EqWith.impl.Equal.type.814973.2 = struct_value () [symbolic] // CHECK:STDOUT: %EqWith.type.aee: type = facet_type <@EqWith, @EqWith(Core.IntLiteral)> [concrete] @@ -1639,18 +1639,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %OrderedWith.type.7dc: type = facet_type <@OrderedWith, @OrderedWith(%i32)> [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.1: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.1, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.e4afa3.1: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.2: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.2, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] -// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.e4afa3.2: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.1: type = fn_type @Cpp.long.as.OrderedWith.impl.Greater.1, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.37f70d.1: %Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.2: type = fn_type @Cpp.long.as.OrderedWith.impl.Greater.2, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] -// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.37f70d.2: %Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.35cecb.1: type = fn_type @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.351d50.1: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.35cecb.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.35cecb.2: type = fn_type @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.2, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] -// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.351d50.2: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.35cecb.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.type.3ff9ca.1: type = fn_type @Cpp.long.as.OrderedWith.impl.Less.1, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.76c9f3.1: %Cpp.long.as.OrderedWith.impl.Less.type.3ff9ca.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.2: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.2, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] +// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.e4afa3.2: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.2: type = fn_type @Cpp.long.as.OrderedWith.impl.Greater.2, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] +// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.37f70d.2: %Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.35cecb.2: type = fn_type @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.2, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] +// CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.351d50.2: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.35cecb.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.type.3ff9ca.2: type = fn_type @Cpp.long.as.OrderedWith.impl.Less.2, @Cpp.long.as.OrderedWith.impl.3fc(%T.315) [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.76c9f3.2: %Cpp.long.as.OrderedWith.impl.Less.type.3ff9ca.2 = struct_value () [symbolic] // CHECK:STDOUT: %OrderedWith.type.975: type = facet_type <@OrderedWith, @OrderedWith(Core.IntLiteral)> [concrete] @@ -1752,8 +1752,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.cd6: @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.Equal.type.2 (%Cpp.long.as.EqWith.impl.Equal.type.814973.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.Equal.2 (constants.%Cpp.long.as.EqWith.impl.Equal.4a8971.1)] // CHECK:STDOUT: %Core.import_ref.40e: @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.NotEqual.type.2 (%Cpp.long.as.EqWith.impl.NotEqual.type.21e369.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.NotEqual.2 (constants.%Cpp.long.as.EqWith.impl.NotEqual.385432.1)] // CHECK:STDOUT: %EqWith.impl_witness_table.fc9 = impl_witness_table (%Core.import_ref.cd6, %Core.import_ref.40e), @Cpp.long.as.EqWith.impl.5b1 [concrete] -// CHECK:STDOUT: %Core.NotEqual.db5: @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.NotEqual.type.1 (%Cpp.long.as.EqWith.impl.NotEqual.type.21e369.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.NotEqual.1 (constants.%Cpp.long.as.EqWith.impl.NotEqual.385432.2)] // CHECK:STDOUT: %Core.Equal.025: @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.Equal.type.1 (%Cpp.long.as.EqWith.impl.Equal.type.814973.2) = import_ref Core//prelude/types/cpp/int, Equal, loaded [symbolic = @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.Equal.1 (constants.%Cpp.long.as.EqWith.impl.Equal.4a8971.2)] +// CHECK:STDOUT: %Core.NotEqual.db5: @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.NotEqual.type.1 (%Cpp.long.as.EqWith.impl.NotEqual.type.21e369.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @Cpp.long.as.EqWith.impl.5b1.%Cpp.long.as.EqWith.impl.NotEqual.1 (constants.%Cpp.long.as.EqWith.impl.NotEqual.385432.2)] // CHECK:STDOUT: %Core.import_ref.06c923.2: %i32.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a75 = impl_witness_table (%Core.import_ref.06c923.2), @i32.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.d32f: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Less.type.2 (%Cpp.long.as.OrderedWith.impl.Less.type.3ff9ca.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Less.2 (constants.%Cpp.long.as.OrderedWith.impl.Less.76c9f3.1)] @@ -1761,10 +1761,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.b5f: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Greater.type.2 (%Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Greater.2 (constants.%Cpp.long.as.OrderedWith.impl.Greater.37f70d.1)] // CHECK:STDOUT: %Core.import_ref.a8b: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.2 (%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.2 (constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.e4afa3.1)] // CHECK:STDOUT: %OrderedWith.impl_witness_table.41e = impl_witness_table (%Core.import_ref.d32f, %Core.import_ref.4be, %Core.import_ref.b5f, %Core.import_ref.a8b), @Cpp.long.as.OrderedWith.impl.3fc [concrete] -// CHECK:STDOUT: %Core.GreaterOrEquivalent.839: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.1 (%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.2) = import_ref Core//prelude/types/cpp/int, GreaterOrEquivalent, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.1 (constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.e4afa3.2)] -// CHECK:STDOUT: %Core.Greater.ac9: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Greater.type.1 (%Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Greater.1 (constants.%Cpp.long.as.OrderedWith.impl.Greater.37f70d.2)] -// CHECK:STDOUT: %Core.LessOrEquivalent.a62: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.1 (%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.35cecb.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.351d50.2)] // CHECK:STDOUT: %Core.Less.a91: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Less.type.1 (%Cpp.long.as.OrderedWith.impl.Less.type.3ff9ca.2) = import_ref Core//prelude/types/cpp/int, Less, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Less.1 (constants.%Cpp.long.as.OrderedWith.impl.Less.76c9f3.2)] +// CHECK:STDOUT: %Core.LessOrEquivalent.a62: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.1 (%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.35cecb.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.351d50.2)] +// CHECK:STDOUT: %Core.Greater.ac9: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Greater.type.1 (%Cpp.long.as.OrderedWith.impl.Greater.type.e2eef7.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.Greater.1 (constants.%Cpp.long.as.OrderedWith.impl.Greater.37f70d.2)] +// CHECK:STDOUT: %Core.GreaterOrEquivalent.839: @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.1 (%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.154997.2) = import_ref Core//prelude/types/cpp/int, GreaterOrEquivalent, loaded [symbolic = @Cpp.long.as.OrderedWith.impl.3fc.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.1 (constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.e4afa3.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ComparisonsHeterogeneousLongLeftSide() { @@ -2061,10 +2061,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.315: %ImplicitAs.type.7eb = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.type.92df03.1: type = fn_type @T.as_type.as.EqWith.impl.NotEqual.1, @T.as_type.as.EqWith.impl.673(%T.315) [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.a7a615.1: %T.as_type.as.EqWith.impl.NotEqual.type.92df03.1 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.type.92df03.2: type = fn_type @T.as_type.as.EqWith.impl.NotEqual.2, @T.as_type.as.EqWith.impl.673(%T.315) [symbolic] -// CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.a7a615.2: %T.as_type.as.EqWith.impl.NotEqual.type.92df03.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.Equal.type.94a46e.1: type = fn_type @T.as_type.as.EqWith.impl.Equal.1, @T.as_type.as.EqWith.impl.673(%T.315) [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.Equal.3fb574.1: %T.as_type.as.EqWith.impl.Equal.type.94a46e.1 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.type.92df03.2: type = fn_type @T.as_type.as.EqWith.impl.NotEqual.2, @T.as_type.as.EqWith.impl.673(%T.315) [symbolic] +// CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.a7a615.2: %T.as_type.as.EqWith.impl.NotEqual.type.92df03.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.Equal.type.94a46e.2: type = fn_type @T.as_type.as.EqWith.impl.Equal.2, @T.as_type.as.EqWith.impl.673(%T.315) [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.Equal.3fb574.2: %T.as_type.as.EqWith.impl.Equal.type.94a46e.2 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.f82: = impl_witness imports.%ImplicitAs.impl_witness_table.a75 [concrete] @@ -2094,18 +2094,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %OrderedWith.type.a48: type = facet_type <@OrderedWith, @OrderedWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.1: type = fn_type @T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.56ba82.1: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.1 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.2: type = fn_type @T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.56ba82.2: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.type.4af657.1: type = fn_type @T.as_type.as.OrderedWith.impl.Greater.1, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.00ebff.1: %T.as_type.as.OrderedWith.impl.Greater.type.4af657.1 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.type.4af657.2: type = fn_type @T.as_type.as.OrderedWith.impl.Greater.2, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.00ebff.2: %T.as_type.as.OrderedWith.impl.Greater.type.4af657.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.accc59.1: type = fn_type @T.as_type.as.OrderedWith.impl.LessOrEquivalent.1, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.e8206a.1: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.accc59.1 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.accc59.2: type = fn_type @T.as_type.as.OrderedWith.impl.LessOrEquivalent.2, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.e8206a.2: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.accc59.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Less.type.62945a.1: type = fn_type @T.as_type.as.OrderedWith.impl.Less.1, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Less.2ef721.1: %T.as_type.as.OrderedWith.impl.Less.type.62945a.1 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.2: type = fn_type @T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.56ba82.2: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.2 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.type.4af657.2: type = fn_type @T.as_type.as.OrderedWith.impl.Greater.2, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.00ebff.2: %T.as_type.as.OrderedWith.impl.Greater.type.4af657.2 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.accc59.2: type = fn_type @T.as_type.as.OrderedWith.impl.LessOrEquivalent.2, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.e8206a.2: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.accc59.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Less.type.62945a.2: type = fn_type @T.as_type.as.OrderedWith.impl.Less.2, @T.as_type.as.OrderedWith.impl.821(%T.315) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Less.2ef721.2: %T.as_type.as.OrderedWith.impl.Less.type.62945a.2 = struct_value () [symbolic] // CHECK:STDOUT: %OrderedWith.impl_witness.029: = impl_witness imports.%OrderedWith.impl_witness_table.969, @T.as_type.as.OrderedWith.impl.821(%ImplicitAs.facet.ce4) [concrete] @@ -2230,8 +2230,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.a8d8: @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.Equal.type.2 (%T.as_type.as.EqWith.impl.Equal.type.94a46e.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.Equal.2 (constants.%T.as_type.as.EqWith.impl.Equal.3fb574.1)] // CHECK:STDOUT: %Core.import_ref.81b: @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.NotEqual.type.2 (%T.as_type.as.EqWith.impl.NotEqual.type.92df03.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.NotEqual.2 (constants.%T.as_type.as.EqWith.impl.NotEqual.a7a615.1)] // CHECK:STDOUT: %EqWith.impl_witness_table.9cc = impl_witness_table (%Core.import_ref.a8d8, %Core.import_ref.81b), @T.as_type.as.EqWith.impl.673 [concrete] -// CHECK:STDOUT: %Core.NotEqual.d11: @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.NotEqual.type.1 (%T.as_type.as.EqWith.impl.NotEqual.type.92df03.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.NotEqual.1 (constants.%T.as_type.as.EqWith.impl.NotEqual.a7a615.2)] // CHECK:STDOUT: %Core.Equal.d4c: @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.Equal.type.1 (%T.as_type.as.EqWith.impl.Equal.type.94a46e.2) = import_ref Core//prelude/types/cpp/int, Equal, loaded [symbolic = @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.Equal.1 (constants.%T.as_type.as.EqWith.impl.Equal.3fb574.2)] +// CHECK:STDOUT: %Core.NotEqual.d11: @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.NotEqual.type.1 (%T.as_type.as.EqWith.impl.NotEqual.type.92df03.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @T.as_type.as.EqWith.impl.673.%T.as_type.as.EqWith.impl.NotEqual.1 (constants.%T.as_type.as.EqWith.impl.NotEqual.a7a615.2)] // CHECK:STDOUT: %Core.import_ref.06c923.2: %i32.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a75 = impl_witness_table (%Core.import_ref.06c923.2), @i32.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.0c1: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Less.type.2 (%T.as_type.as.OrderedWith.impl.Less.type.62945a.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Less.2 (constants.%T.as_type.as.OrderedWith.impl.Less.2ef721.1)] @@ -2239,10 +2239,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.dc8: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Greater.type.2 (%T.as_type.as.OrderedWith.impl.Greater.type.4af657.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Greater.2 (constants.%T.as_type.as.OrderedWith.impl.Greater.00ebff.1)] // CHECK:STDOUT: %Core.import_ref.fbeb: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2 (%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2 (constants.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.56ba82.1)] // CHECK:STDOUT: %OrderedWith.impl_witness_table.969 = impl_witness_table (%Core.import_ref.0c1, %Core.import_ref.f03, %Core.import_ref.dc8, %Core.import_ref.fbeb), @T.as_type.as.OrderedWith.impl.821 [concrete] -// CHECK:STDOUT: %Core.GreaterOrEquivalent.e06: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.2) = import_ref Core//prelude/types/cpp/int, GreaterOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.56ba82.2)] -// CHECK:STDOUT: %Core.Greater.0b3: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Greater.type.1 (%T.as_type.as.OrderedWith.impl.Greater.type.4af657.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Greater.1 (constants.%T.as_type.as.OrderedWith.impl.Greater.00ebff.2)] -// CHECK:STDOUT: %Core.LessOrEquivalent.27e: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.accc59.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.e8206a.2)] // CHECK:STDOUT: %Core.Less.2f9: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Less.type.1 (%T.as_type.as.OrderedWith.impl.Less.type.62945a.2) = import_ref Core//prelude/types/cpp/int, Less, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Less.1 (constants.%T.as_type.as.OrderedWith.impl.Less.2ef721.2)] +// CHECK:STDOUT: %Core.LessOrEquivalent.27e: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.accc59.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.e8206a.2)] +// CHECK:STDOUT: %Core.Greater.0b3: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Greater.type.1 (%T.as_type.as.OrderedWith.impl.Greater.type.4af657.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.Greater.1 (constants.%T.as_type.as.OrderedWith.impl.Greater.00ebff.2)] +// CHECK:STDOUT: %Core.GreaterOrEquivalent.e06: @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2225a2.2) = import_ref Core//prelude/types/cpp/int, GreaterOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.821.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.56ba82.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ComparisonsHeterogeneousLongRightSide() { diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon index 39d075a21ab6..4e0ed3060c00 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon @@ -1530,10 +1530,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.bf2: %ImplicitAs.type.0ec = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.1: type = fn_type @Cpp.long_long.as.EqWith.impl.NotEqual.1, @Cpp.long_long.as.EqWith.impl.600(%T.bf2) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.4b5f60.1: %Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.2: type = fn_type @Cpp.long_long.as.EqWith.impl.NotEqual.2, @Cpp.long_long.as.EqWith.impl.600(%T.bf2) [symbolic] -// CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.4b5f60.2: %Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.type.f2c091.1: type = fn_type @Cpp.long_long.as.EqWith.impl.Equal.1, @Cpp.long_long.as.EqWith.impl.600(%T.bf2) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.ec6d64.1: %Cpp.long_long.as.EqWith.impl.Equal.type.f2c091.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.2: type = fn_type @Cpp.long_long.as.EqWith.impl.NotEqual.2, @Cpp.long_long.as.EqWith.impl.600(%T.bf2) [symbolic] +// CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.4b5f60.2: %Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.type.f2c091.2: type = fn_type @Cpp.long_long.as.EqWith.impl.Equal.2, @Cpp.long_long.as.EqWith.impl.600(%T.bf2) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.ec6d64.2: %Cpp.long_long.as.EqWith.impl.Equal.type.f2c091.2 = struct_value () [symbolic] // CHECK:STDOUT: %EqWith.type.aee: type = facet_type <@EqWith, @EqWith(Core.IntLiteral)> [concrete] @@ -1564,18 +1564,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %OrderedWith.type.af1: type = facet_type <@OrderedWith, @OrderedWith(%i64)> [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.1: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.c812d5.1: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.2, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] -// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.c812d5.2: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.1: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Greater.1, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.692f01.1: %Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Greater.2, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] -// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.692f01.2: %Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.7ff5fb.1: type = fn_type @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.1, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.33bdbc.1: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.7ff5fb.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.7ff5fb.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.2, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] -// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.33bdbc.2: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.7ff5fb.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.type.a2518e.1: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Less.1, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.0057df.1: %Cpp.long_long.as.OrderedWith.impl.Less.type.a2518e.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.2, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] +// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.c812d5.2: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Greater.2, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] +// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.692f01.2: %Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.7ff5fb.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.2, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] +// CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.33bdbc.2: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.7ff5fb.2 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.type.a2518e.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Less.2, @Cpp.long_long.as.OrderedWith.impl.deb(%T.bf2) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.0057df.2: %Cpp.long_long.as.OrderedWith.impl.Less.type.a2518e.2 = struct_value () [symbolic] // CHECK:STDOUT: %OrderedWith.type.975: type = facet_type <@OrderedWith, @OrderedWith(Core.IntLiteral)> [concrete] @@ -1677,8 +1677,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.import_ref.7e1: @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.Equal.type.2 (%Cpp.long_long.as.EqWith.impl.Equal.type.f2c091.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.Equal.2 (constants.%Cpp.long_long.as.EqWith.impl.Equal.ec6d64.1)] // CHECK:STDOUT: %Core.import_ref.ba2: @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.NotEqual.type.2 (%Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.NotEqual.2 (constants.%Cpp.long_long.as.EqWith.impl.NotEqual.4b5f60.1)] // CHECK:STDOUT: %EqWith.impl_witness_table.efb = impl_witness_table (%Core.import_ref.7e1, %Core.import_ref.ba2), @Cpp.long_long.as.EqWith.impl.600 [concrete] -// CHECK:STDOUT: %Core.NotEqual.422: @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.NotEqual.type.1 (%Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.NotEqual.1 (constants.%Cpp.long_long.as.EqWith.impl.NotEqual.4b5f60.2)] // CHECK:STDOUT: %Core.Equal.cce: @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.Equal.type.1 (%Cpp.long_long.as.EqWith.impl.Equal.type.f2c091.2) = import_ref Core//prelude/types/cpp/int, Equal, loaded [symbolic = @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.Equal.1 (constants.%Cpp.long_long.as.EqWith.impl.Equal.ec6d64.2)] +// CHECK:STDOUT: %Core.NotEqual.422: @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.NotEqual.type.1 (%Cpp.long_long.as.EqWith.impl.NotEqual.type.b639b1.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @Cpp.long_long.as.EqWith.impl.600.%Cpp.long_long.as.EqWith.impl.NotEqual.1 (constants.%Cpp.long_long.as.EqWith.impl.NotEqual.4b5f60.2)] // CHECK:STDOUT: %Core.import_ref.06c923.2: %i64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a87 = impl_witness_table (%Core.import_ref.06c923.2), @i64.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.020: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Less.type.2 (%Cpp.long_long.as.OrderedWith.impl.Less.type.a2518e.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Less.2 (constants.%Cpp.long_long.as.OrderedWith.impl.Less.0057df.1)] @@ -1686,10 +1686,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.import_ref.ba3: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Greater.type.2 (%Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Greater.2 (constants.%Cpp.long_long.as.OrderedWith.impl.Greater.692f01.1)] // CHECK:STDOUT: %Core.import_ref.cea: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.2 (%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.2 (constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.c812d5.1)] // CHECK:STDOUT: %OrderedWith.impl_witness_table.cdc = impl_witness_table (%Core.import_ref.020, %Core.import_ref.152, %Core.import_ref.ba3, %Core.import_ref.cea), @Cpp.long_long.as.OrderedWith.impl.deb [concrete] -// CHECK:STDOUT: %Core.GreaterOrEquivalent.7ba: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.1 (%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.2) = import_ref Core//prelude/types/cpp/int, GreaterOrEquivalent, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1 (constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.c812d5.2)] -// CHECK:STDOUT: %Core.Greater.91c: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Greater.type.1 (%Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Greater.1 (constants.%Cpp.long_long.as.OrderedWith.impl.Greater.692f01.2)] -// CHECK:STDOUT: %Core.LessOrEquivalent.211: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.1 (%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.7ff5fb.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.33bdbc.2)] // CHECK:STDOUT: %Core.Less.868: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Less.type.1 (%Cpp.long_long.as.OrderedWith.impl.Less.type.a2518e.2) = import_ref Core//prelude/types/cpp/int, Less, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Less.1 (constants.%Cpp.long_long.as.OrderedWith.impl.Less.0057df.2)] +// CHECK:STDOUT: %Core.LessOrEquivalent.211: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.1 (%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.7ff5fb.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.33bdbc.2)] +// CHECK:STDOUT: %Core.Greater.91c: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Greater.type.1 (%Cpp.long_long.as.OrderedWith.impl.Greater.type.9c33c6.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.Greater.1 (constants.%Cpp.long_long.as.OrderedWith.impl.Greater.692f01.2)] +// CHECK:STDOUT: %Core.GreaterOrEquivalent.7ba: @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.1 (%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.362d6d.2) = import_ref Core//prelude/types/cpp/int, GreaterOrEquivalent, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.deb.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1 (constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.c812d5.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ComparisonsHeterogeneousLongLongLeftSide() { @@ -1986,10 +1986,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.bf2: %ImplicitAs.type.0ec = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.type.925fdb.1: type = fn_type @T.as_type.as.EqWith.impl.NotEqual.3, @T.as_type.as.EqWith.impl.6d3(%T.bf2) [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.b16a99.1: %T.as_type.as.EqWith.impl.NotEqual.type.925fdb.1 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.type.925fdb.2: type = fn_type @T.as_type.as.EqWith.impl.NotEqual.4, @T.as_type.as.EqWith.impl.6d3(%T.bf2) [symbolic] -// CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.b16a99.2: %T.as_type.as.EqWith.impl.NotEqual.type.925fdb.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.Equal.type.3cb0e1.1: type = fn_type @T.as_type.as.EqWith.impl.Equal.3, @T.as_type.as.EqWith.impl.6d3(%T.bf2) [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.Equal.a1333e.1: %T.as_type.as.EqWith.impl.Equal.type.3cb0e1.1 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.type.925fdb.2: type = fn_type @T.as_type.as.EqWith.impl.NotEqual.4, @T.as_type.as.EqWith.impl.6d3(%T.bf2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.EqWith.impl.NotEqual.b16a99.2: %T.as_type.as.EqWith.impl.NotEqual.type.925fdb.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.Equal.type.3cb0e1.2: type = fn_type @T.as_type.as.EqWith.impl.Equal.4, @T.as_type.as.EqWith.impl.6d3(%T.bf2) [symbolic] // CHECK:STDOUT: %T.as_type.as.EqWith.impl.Equal.a1333e.2: %T.as_type.as.EqWith.impl.Equal.type.3cb0e1.2 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.305: = impl_witness imports.%ImplicitAs.impl_witness_table.a87 [concrete] @@ -2019,18 +2019,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %OrderedWith.type.456: type = facet_type <@OrderedWith, @OrderedWith(%Cpp.long_long)> [concrete] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.1: type = fn_type @T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.3, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.df5290.1: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.1 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.2: type = fn_type @T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.4, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.df5290.2: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.1: type = fn_type @T.as_type.as.OrderedWith.impl.Greater.3, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.878ae3.1: %T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.1 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.2: type = fn_type @T.as_type.as.OrderedWith.impl.Greater.4, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.878ae3.2: %T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.3d985f.1: type = fn_type @T.as_type.as.OrderedWith.impl.LessOrEquivalent.3, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.2cb445.1: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.3d985f.1 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.3d985f.2: type = fn_type @T.as_type.as.OrderedWith.impl.LessOrEquivalent.4, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.2cb445.2: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.3d985f.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Less.type.2daa9a.1: type = fn_type @T.as_type.as.OrderedWith.impl.Less.3, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Less.c37ef5.1: %T.as_type.as.OrderedWith.impl.Less.type.2daa9a.1 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.2: type = fn_type @T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.4, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.df5290.2: %T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.2 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.2: type = fn_type @T.as_type.as.OrderedWith.impl.Greater.4, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Greater.878ae3.2: %T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.2 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.3d985f.2: type = fn_type @T.as_type.as.OrderedWith.impl.LessOrEquivalent.4, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.2cb445.2: %T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.3d985f.2 = struct_value () [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Less.type.2daa9a.2: type = fn_type @T.as_type.as.OrderedWith.impl.Less.4, @T.as_type.as.OrderedWith.impl.df2(%T.bf2) [symbolic] // CHECK:STDOUT: %T.as_type.as.OrderedWith.impl.Less.c37ef5.2: %T.as_type.as.OrderedWith.impl.Less.type.2daa9a.2 = struct_value () [symbolic] // CHECK:STDOUT: %OrderedWith.impl_witness.7e3: = impl_witness imports.%OrderedWith.impl_witness_table.8b4, @T.as_type.as.OrderedWith.impl.df2(%ImplicitAs.facet.7a4) [concrete] @@ -2155,8 +2155,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.import_ref.c48: @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.Equal.type.2 (%T.as_type.as.EqWith.impl.Equal.type.3cb0e1.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.Equal.2 (constants.%T.as_type.as.EqWith.impl.Equal.a1333e.1)] // CHECK:STDOUT: %Core.import_ref.98d: @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.NotEqual.type.2 (%T.as_type.as.EqWith.impl.NotEqual.type.925fdb.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.NotEqual.2 (constants.%T.as_type.as.EqWith.impl.NotEqual.b16a99.1)] // CHECK:STDOUT: %EqWith.impl_witness_table.db1 = impl_witness_table (%Core.import_ref.c48, %Core.import_ref.98d), @T.as_type.as.EqWith.impl.6d3 [concrete] -// CHECK:STDOUT: %Core.NotEqual.0b2: @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.NotEqual.type.1 (%T.as_type.as.EqWith.impl.NotEqual.type.925fdb.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.NotEqual.1 (constants.%T.as_type.as.EqWith.impl.NotEqual.b16a99.2)] // CHECK:STDOUT: %Core.Equal.4f5: @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.Equal.type.1 (%T.as_type.as.EqWith.impl.Equal.type.3cb0e1.2) = import_ref Core//prelude/types/cpp/int, Equal, loaded [symbolic = @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.Equal.1 (constants.%T.as_type.as.EqWith.impl.Equal.a1333e.2)] +// CHECK:STDOUT: %Core.NotEqual.0b2: @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.NotEqual.type.1 (%T.as_type.as.EqWith.impl.NotEqual.type.925fdb.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @T.as_type.as.EqWith.impl.6d3.%T.as_type.as.EqWith.impl.NotEqual.1 (constants.%T.as_type.as.EqWith.impl.NotEqual.b16a99.2)] // CHECK:STDOUT: %Core.import_ref.06c923.2: %i64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a87 = impl_witness_table (%Core.import_ref.06c923.2), @i64.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.97f: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Less.type.2 (%T.as_type.as.OrderedWith.impl.Less.type.2daa9a.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Less.2 (constants.%T.as_type.as.OrderedWith.impl.Less.c37ef5.1)] @@ -2164,10 +2164,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.import_ref.56a: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Greater.type.2 (%T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Greater.2 (constants.%T.as_type.as.OrderedWith.impl.Greater.878ae3.1)] // CHECK:STDOUT: %Core.import_ref.b00d: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.2 (%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2 (constants.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.df5290.1)] // CHECK:STDOUT: %OrderedWith.impl_witness_table.8b4 = impl_witness_table (%Core.import_ref.97f, %Core.import_ref.409, %Core.import_ref.56a, %Core.import_ref.b00d), @T.as_type.as.OrderedWith.impl.df2 [concrete] -// CHECK:STDOUT: %Core.GreaterOrEquivalent.8e2: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.2) = import_ref Core//prelude/types/cpp/int, GreaterOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.df5290.2)] -// CHECK:STDOUT: %Core.Greater.c24: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Greater.type.1 (%T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Greater.1 (constants.%T.as_type.as.OrderedWith.impl.Greater.878ae3.2)] -// CHECK:STDOUT: %Core.LessOrEquivalent.d90: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.3d985f.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.2cb445.2)] // CHECK:STDOUT: %Core.Less.2d9: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Less.type.1 (%T.as_type.as.OrderedWith.impl.Less.type.2daa9a.2) = import_ref Core//prelude/types/cpp/int, Less, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Less.1 (constants.%T.as_type.as.OrderedWith.impl.Less.c37ef5.2)] +// CHECK:STDOUT: %Core.LessOrEquivalent.d90: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.LessOrEquivalent.type.3d985f.2) = import_ref Core//prelude/types/cpp/int, LessOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.LessOrEquivalent.2cb445.2)] +// CHECK:STDOUT: %Core.Greater.c24: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Greater.type.1 (%T.as_type.as.OrderedWith.impl.Greater.type.4fb98a.2) = import_ref Core//prelude/types/cpp/int, Greater, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.Greater.1 (constants.%T.as_type.as.OrderedWith.impl.Greater.878ae3.2)] +// CHECK:STDOUT: %Core.GreaterOrEquivalent.8e2: @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.1 (%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.d6724c.2) = import_ref Core//prelude/types/cpp/int, GreaterOrEquivalent, loaded [symbolic = @T.as_type.as.OrderedWith.impl.df2.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1 (constants.%T.as_type.as.OrderedWith.impl.GreaterOrEquivalent.df5290.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ComparisonsHeterogeneousLongLongRightSide() { diff --git a/toolchain/check/testdata/interop/cpp/range_for.carbon b/toolchain/check/testdata/interop/cpp/range_for.carbon index 8039e519ebff..1c9aa9e83646 100644 --- a/toolchain/check/testdata/interop/cpp/range_for.carbon +++ b/toolchain/check/testdata/interop/cpp/range_for.carbon @@ -219,28 +219,28 @@ fn TestIterate[R: Core.Iterate where .ElementType = f64](r: R) { } fn TestIterateDriver(var m: Cpp.N.MutableRange) { - // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE+28]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE+28]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(m); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon: note: value expression passed to reference parameter [ValueForRefParam] // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE-21]]:34: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: friend auto begin(MutableRange&) -> Iterator; // CHECK:STDERR: ^ - // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:39:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:41:3: note: while building thunk to match the signature of this function [ThunkSignature] // CHECK:STDERR: fn Begin(self) -> Iterator; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE-21]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = f64](r: R) { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE+14]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE+14]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(m); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon: note: value expression passed to reference parameter [ValueForRefParam] // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE-34]]:32: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: friend auto end(MutableRange&) -> Iterator; // CHECK:STDERR: ^ - // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:40:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:42:3: note: while building thunk to match the signature of this function [ThunkSignature] // CHECK:STDERR: fn End(self) -> Sentinel; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_same_types_mutable.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] @@ -349,45 +349,48 @@ fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { } fn TestIterateDriver(var m: Cpp.N.MutableRange) { - // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+42]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+45]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(m); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon: note: value expression passed to reference parameter [ValueForRefParam] // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-21]]:34: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: friend auto begin(MutableRange&) -> Iterator; // CHECK:STDERR: ^ - // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:39:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:41:3: note: while building thunk to match the signature of this function [ThunkSignature] // CHECK:STDERR: fn Begin(self) -> Iterator; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-21]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+28]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+31]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(m); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon: note: value expression passed to reference parameter [ValueForRefParam] // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-34]]:32: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: friend auto end(MutableRange&) -> Sentinel; // CHECK:STDERR: ^ - // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:40:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:42:3: note: while building thunk to match the signature of this function [ThunkSignature] // CHECK:STDERR: fn End(self) -> Sentinel; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+14]]:3: error: semantics TODO: `Rewriting operator== using operator== is not supported` [SemanticsTodo] + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+17]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(m); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-42]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+14]]:3: note: semantics TODO: `Rewriting operator== using operator== is not supported` [SemanticsTodo] + // CHECK:STDERR: TestIterate(m); + // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-45]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.N.MutableRange` into type implementing `Core.Iterate where .(Core.Iterate.ElementType) = Cpp.N.ValueType as Core.Destroy & Core.Copy` [ConversionFailureTypeToFacet] // CHECK:STDERR: TestIterate(m); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-49]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-52]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -457,28 +460,28 @@ fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { } fn TestIterateDriver(var mc: Cpp.N.MutableAndConstRange) { - // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE+28]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE+28]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(mc); // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_overloads.carbon: note: value expression passed to reference parameter [ValueForRefParam] // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE-24]]:44: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: friend auto begin(MutableAndConstRange&) -> Iterator; // CHECK:STDERR: ^ - // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:39:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:41:3: note: while building thunk to match the signature of this function [ThunkSignature] // CHECK:STDERR: fn Begin(self) -> Iterator; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE-21]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn TestIterate[R: Core.Iterate where .ElementType = Cpp.N.ValueType](r: R) { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE+14]]:3: error: facet type `Core.CppRangeForIterate where .(Core.CppRangeForIterate.Iterator) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator) impls Core.Copy and .(Core.CppRangeForIterate.Iterator) impls Core.CppUnsafeDeref and .(Core.CppRangeForIterate.Iterator) impls Core.EqWith(.(Core.CppRangeForIterate.Sentinel)) and .(Core.CppRangeForIterate.Iterator) impls Core.Inc and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Destroy and .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy and .(Core.CppRangeForIterate.Sentinel) impls Core.Destroy and .(Core.CppRangeForIterate.Sentinel) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE+14]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] // CHECK:STDERR: TestIterate(mc); // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_overloads.carbon: note: value expression passed to reference parameter [ValueForRefParam] // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE-37]]:42: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: friend auto end(MutableAndConstRange&) -> Iterator; // CHECK:STDERR: ^ - // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:40:3: note: while building thunk to match the signature of this function [ThunkSignature] + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:42:3: note: while building thunk to match the signature of this function [ThunkSignature] // CHECK:STDERR: fn End(self) -> Sentinel; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_adl_overloads.carbon:[[@LINE-35]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] @@ -562,9 +565,7 @@ struct EndFunctionDeleted { }; '''; -// We deliberately use `Core.CppRangeForIterate` here, since we want to confirm -// that types don't implement this interface. -fn Test[R: Core.CppRangeForIterate](unused r: R) {} +fn Test[R: Core.Iterate](unused r: R) {} fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, var no_begin_method: Cpp.NoBeginMethod, @@ -580,137 +581,176 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, var begin_function_deleted: Cpp.BeginFunctionDeleted, var end_function_deleted: Cpp.EndFunctionDeleted) { - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoBeginEnd` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoBeginEnd` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(no_begin_end); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-19]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_begin_end); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoBeginMethod` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoBeginMethod` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(no_begin_method); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-28]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_begin_method); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoEndMethod` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoEndMethod` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(no_end_method); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-37]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_end_method); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoBeginADL` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoBeginADL` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(no_begin_adl); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-46]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_begin_adl); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoEndADL` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.NoEndADL` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(no_end_adl); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-55]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(no_end_adl); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginMethodEndADL` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginMethodEndADL` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(begin_method_end_adl); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-64]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_method_end_adl); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginADLEndMethod` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginADLEndMethod` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(begin_adl_end_method); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-73]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_adl_end_method); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginFieldEndMethod` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginFieldEndMethod` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(begin_field_end_method); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-82]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_field_end_method); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginMethodEndField` into type implementing `Core.CppRangeForIterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginMethodEndField` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] // CHECK:STDERR: Test(begin_method_end_field); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-91]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_method_end_field); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+10]]:28: error: attempt to use a deleted function [CppInteropParseError] - // CHECK:STDERR: 173 | Test(begin_method_deleted); - // CHECK:STDERR: | ^ - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-122]]:8: note: 'begin' has been explicitly marked deleted here [CppInteropParseNote] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+20]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: Test(begin_method_deleted); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:63:9: note: attempt to use a deleted function [CppInteropParseError] + // CHECK:STDERR: 63 | alias ValueType = Self.(Iterator).(CppIterator.ValueType); + // CHECK:STDERR: | ^ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-123]]:8: note: 'begin' has been explicitly marked deleted here [CppInteropParseNote] // CHECK:STDERR: 44 | auto begin() = delete; // CHECK:STDERR: | ^ - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-103]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-106]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginMethodDeleted` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: Test(begin_method_deleted); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-113]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_method_deleted); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+10]]:26: error: attempt to use a deleted function [CppInteropParseError] - // CHECK:STDERR: 185 | Test(end_method_deleted); - // CHECK:STDERR: | ^ - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-128]]:8: note: 'end' has been explicitly marked deleted here [CppInteropParseNote] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+20]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: Test(end_method_deleted); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:63:9: note: attempt to use a deleted function [CppInteropParseError] + // CHECK:STDERR: 63 | alias ValueType = Self.(Iterator).(CppIterator.ValueType); + // CHECK:STDERR: | ^ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-139]]:8: note: 'end' has been explicitly marked deleted here [CppInteropParseNote] // CHECK:STDERR: 50 | auto end() = delete; // CHECK:STDERR: | ^ - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-115]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-128]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.EndMethodDeleted` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: Test(end_method_deleted); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-135]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(end_method_deleted); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+10]]:30: error: call to deleted function 'begin' [CppInteropParseError] - // CHECK:STDERR: 197 | Test(begin_function_deleted); - // CHECK:STDERR: | ^ - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-136]]:15: note: candidate function has been explicitly deleted [CppInteropParseNote] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+20]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: Test(begin_function_deleted); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:63:9: note: call to deleted function 'begin' [CppInteropParseError] + // CHECK:STDERR: 63 | alias ValueType = Self.(Iterator).(CppIterator.ValueType); + // CHECK:STDERR: | ^~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-157]]:15: note: candidate function has been explicitly deleted [CppInteropParseNote] // CHECK:STDERR: 54 | friend auto begin(const BeginFunctionDeleted&) = delete; // CHECK:STDERR: | ^ - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-127]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-150]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.BeginFunctionDeleted` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: Test(begin_function_deleted); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-157]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(begin_function_deleted); - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+10]]:28: error: call to deleted function 'end' [CppInteropParseError] - // CHECK:STDERR: 209 | Test(end_function_deleted); - // CHECK:STDERR: | ^ - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-142]]:15: note: candidate function has been explicitly deleted [CppInteropParseNote] + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+20]]:3: error: facet type `Core.CppRange where .(Core.CppRangeForIterate.Iterator).(Core.CppUnsafeDeref.Result) impls Core.Copy` can not be identified [ImplLookupInUnidentifiedFacetType] + // CHECK:STDERR: Test(end_function_deleted); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: {{.*}}/prelude/iterate.carbon:63:9: note: call to deleted function 'end' [CppInteropParseError] + // CHECK:STDERR: 63 | alias ValueType = Self.(Iterator).(CppIterator.ValueType); + // CHECK:STDERR: | ^~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-173]]:15: note: candidate function has been explicitly deleted [CppInteropParseNote] // CHECK:STDERR: 60 | friend auto end(const EndFunctionDeleted&) = delete; // CHECK:STDERR: | ^ - // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-139]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] - // CHECK:STDERR: fn Test[R: Core.CppRangeForIterate](unused r: R) {} - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-172]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE+7]]:3: error: cannot convert type `Cpp.EndFunctionDeleted` into type implementing `Core.Iterate` [ConversionFailureTypeToFacet] + // CHECK:STDERR: Test(end_function_deleted); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_never_valid.carbon:[[@LINE-179]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: fn Test[R: Core.Iterate](unused r: R) {} + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Test(end_function_deleted); } - // CHECK:STDOUT: --- methods_return_same_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -745,30 +785,29 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Int.67af24.2: type = class_type @Int, @Int(%To) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.914: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %CppRangeForIterate.type: type = facet_type <@CppRangeForIterate> [concrete] -// CHECK:STDOUT: %.Self.aed: %CppRangeForIterate.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.f6b: = lookup_impl_witness %.Self.aed, @CppRangeForIterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.b73: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element0 [symbolic_self] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.595: = lookup_impl_witness %impl.elem0.b73, @CppUnsafeDeref [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a2f: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.595, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem1.228: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element1 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate_where.type.1c721f.1: type = facet_type <@CppRangeForIterate where %impl.elem0.b73 impls @Destroy and %impl.elem0.b73 impls @Copy and %impl.elem0.b73 impls @CppUnsafeDeref and %impl.elem0.b73 impls @EqWith, @EqWith(%impl.elem1.228) and %impl.elem0.b73 impls @Inc and %impl.elem0.a2f impls @Destroy and %impl.elem0.a2f impls @Copy and %impl.elem1.228 impls @Destroy and %impl.elem1.228 impls @Copy> [concrete] -// CHECK:STDOUT: %R.39b: %CppRangeForIterate_where.type.1c721f.1 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.7e2712.2: = lookup_impl_witness %R.39b, @CppRangeForIterate [symbolic] -// CHECK:STDOUT: %impl.elem1.7a0bff.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element1 [symbolic] -// CHECK:STDOUT: %impl.elem0.73eb7f.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element0 [symbolic] -// CHECK:STDOUT: %tuple.type.3cf: type = tuple_type (%impl.elem0.73eb7f.2, %impl.elem1.7a0bff.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.69f: = lookup_impl_witness %tuple.type.3cf, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.593: %Destroy.type = facet_value %tuple.type.3cf, (%Destroy.lookup_impl_witness.69f) [symbolic] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.aa7: = lookup_impl_witness %impl.elem0.73eb7f.2, @CppUnsafeDeref [symbolic] -// CHECK:STDOUT: %impl.elem0.af7: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.aa7, element0 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.ec3: = lookup_impl_witness %impl.elem0.af7, @Destroy [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.a7a: = lookup_impl_witness %impl.elem0.af7, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.194: %facet_type.f48 = facet_value %impl.elem0.af7, (%Destroy.lookup_impl_witness.ec3, %Copy.lookup_impl_witness.a7a) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.c6a: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.49a: %R.as_type.as.Iterate.impl.Next.type.c6a = struct_value () [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.2e2: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.71b: %R.as_type.as.Iterate.impl.NewCursor.type.2e2 = struct_value () [symbolic] +// CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] +// CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.50b: = lookup_impl_witness %.Self.e0b, @CppRangeForIterate [symbolic_self] +// CHECK:STDOUT: %impl.elem0.32d: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.50b, element0 [symbolic_self] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d, @CppUnsafeDeref [symbolic_self] +// CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] +// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] +// CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] +// CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] +// CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] +// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.8ae: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.064: %T.as_type.as.Iterate.impl.Next.type.8ae = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.09f: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.ae5: %T.as_type.as.Iterate.impl.NewCursor.type.09f = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.3: type = fn_type @Destroy.Op.loc30_53.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.3: %Destroy.Op.type.1d8f74.3 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.3: = custom_witness (%Destroy.Op.1a2547.3), @Destroy [concrete] @@ -778,10 +817,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %facet_value.ba2: %facet_type.f48 = facet_value %i32, (%custom_witness.df9cc1.3, %Copy.impl_witness.0e0) [concrete] // CHECK:STDOUT: %Iterate_where.type.ec1: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.ba2> [concrete] // CHECK:STDOUT: %pattern_type.a4d: type = pattern_type %Iterate_where.type.ec1 [concrete] -// CHECK:STDOUT: %R.patt.bbc: %pattern_type.a4d = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R.869: %Iterate_where.type.ec1 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %R.as_type.a02: type = facet_access_type %R.869 [symbolic] -// CHECK:STDOUT: %pattern_type.b2da: type = pattern_type %R.as_type.a02 [symbolic] +// CHECK:STDOUT: %R.patt: %pattern_type.a4d = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.ec1 = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] +// CHECK:STDOUT: %pattern_type.b2da: type = pattern_type %R.as_type [symbolic] // CHECK:STDOUT: %r.param_patt.774: %pattern_type.b2da = value_param_pattern [symbolic] // CHECK:STDOUT: %r.patt.54b: %pattern_type.b2da = at_binding_pattern r, %r.param_patt.774 [symbolic] // CHECK:STDOUT: %facet_type.037: type = facet_type <@IntFitsIn, @IntFitsIn(%Int.67af24.2) & @AnyInt> [symbolic] @@ -789,8 +828,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %From.as_type.as.ImplicitAs.impl.Convert.type.7fa: type = fn_type @From.as_type.as.ImplicitAs.impl.Convert, @From.as_type.as.ImplicitAs.impl(%To, %From.6a4) [symbolic] // CHECK:STDOUT: %From.as_type.as.ImplicitAs.impl.Convert.643: %From.as_type.as.ImplicitAs.impl.Convert.type.7fa = struct_value () [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.6b6 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.18b: = lookup_impl_witness %R.869, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.353: %Iterate.type = facet_value %R.as_type.a02, (%Iterate.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.18b: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.353: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.18b) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.8fb: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.353) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.Next.type.830: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.353) [symbolic] // CHECK:STDOUT: %.985: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.8fb, %Iterate.facet.353 [symbolic] @@ -814,8 +853,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %MaybeUnformed.023: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.d07318.2) [concrete] // CHECK:STDOUT: %.1d6a7: type = maybe_unformed_type %i32 [concrete] // CHECK:STDOUT: %struct_type.value.has_value.ad0: type = struct_type {.value: %MaybeUnformed.023, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.bef, @Optional.HasValue(%OptionalStorage.facet.563) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.0ee, @Optional.Get(%OptionalStorage.facet.563) [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.89c: = specific_function %Optional.HasValue.bef, @Optional.HasValue(%OptionalStorage.facet.563) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.69a: = specific_function %Optional.Get.0ee, @Optional.Get(%OptionalStorage.facet.563) [concrete] // CHECK:STDOUT: %AddAssignWith.type.941: type = facet_type <@AddAssignWith, @AddAssignWith(%i32)> [concrete] // CHECK:STDOUT: %ImplicitAs.type.f7de31.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Int.67af24.1)> [symbolic] // CHECK:STDOUT: %U.4e6: %ImplicitAs.type.f7de31.2 = symbolic_binding U, 1 [symbolic] @@ -868,28 +907,25 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %custom_witness.955: = custom_witness (%Iterator.Op.a2a866.2), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.0aed5d.3: type = fn_type @Iterator.Op.3 [concrete] // CHECK:STDOUT: %Iterator.Op.a2a866.3: %Iterator.Op.type.0aed5d.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1f5: = custom_witness (%Iterator.Op.a2a866.3), @Copy [concrete] +// CHECK:STDOUT: %custom_witness.444: = custom_witness (%Iterator.Op.a2a866.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type.ca8475.1: type = fn_type @Equal.1 [concrete] // CHECK:STDOUT: %Equal.285b15.1: %Equal.type.ca8475.1 = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.53d9ee.1: type = fn_type @NotEqual.1 [concrete] // CHECK:STDOUT: %NotEqual.119263.1: %NotEqual.type.53d9ee.1 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.981: = custom_witness (%Equal.285b15.1, %NotEqual.119263.1), @EqWith, @EqWith(%Iterator.3ee) [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0aed5d.4: type = fn_type @Iterator.Op.4 [concrete] -// CHECK:STDOUT: %Iterator.Op.a2a866.4: %Iterator.Op.type.0aed5d.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.444: = custom_witness (%Iterator.Op.a2a866.4), @Inc [concrete] -// CHECK:STDOUT: %facet_value.cd6: %CppRangeForIterate_where.type.1c721f.1 = facet_value %MutableRange, (%custom_witness.df9cc1.3, %Copy.impl_witness.0e0, %custom_witness.ed3, %custom_witness.955, %custom_witness.1f5, %custom_witness.ef8, %custom_witness.981, %custom_witness.444) [concrete] +// CHECK:STDOUT: %facet_value.036: %CppRange_where.type.d682d6.1 = facet_value %MutableRange, (%custom_witness.df9cc1.3, %Copy.impl_witness.0e0, %custom_witness.ed3, %custom_witness.955, %custom_witness.ef8, %custom_witness.444, %custom_witness.981) [concrete] // CHECK:STDOUT: %tuple.type.508: type = tuple_type (%Iterator.3ee, %Iterator.3ee) [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.10: type = fn_type @Destroy.Op.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.10: %Destroy.Op.type.1d8f74.10 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.10: = custom_witness (%Destroy.Op.1a2547.10), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.30f: %Destroy.type = facet_value %tuple.type.508, (%custom_witness.df9cc1.10) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.7dd: = impl_witness imports.%Iterate.impl_witness_table.cd6, @R.as_type.as.Iterate.impl(%facet_value.cd6) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.13b: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%facet_value.cd6) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.0a0: %R.as_type.as.Iterate.impl.NewCursor.type.13b = struct_value () [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.4fa: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%facet_value.cd6) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.693: %R.as_type.as.Iterate.impl.Next.type.4fa = struct_value () [concrete] -// CHECK:STDOUT: %Iterate.facet.3e3: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.7dd) [concrete] -// CHECK:STDOUT: %facet_value.04f: %Iterate_where.type.ec1 = facet_value %MutableRange, (%Iterate.impl_witness.7dd) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.d4c: = impl_witness imports.%Iterate.impl_witness_table.314, @T.as_type.as.Iterate.impl(%facet_value.036) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.668: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.036) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.e51: %T.as_type.as.Iterate.impl.NewCursor.type.668 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.600: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.036) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.65a: %T.as_type.as.Iterate.impl.Next.type.600 = struct_value () [concrete] +// CHECK:STDOUT: %Iterate.facet.5a9: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.d4c) [concrete] +// CHECK:STDOUT: %facet_value.f19: %Iterate_where.type.ec1 = facet_value %MutableRange, (%Iterate.impl_witness.d4c) [concrete] // CHECK:STDOUT: %r.param_patt.c79: %pattern_type.e635 = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.16f: %pattern_type.e635 = at_binding_pattern r, %r.param_patt.c79 [concrete] // CHECK:STDOUT: %Iterator.260: type = class_type @Iterator.2 [concrete] @@ -898,54 +934,51 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %ConstRange.End.type: type = fn_type @ConstRange.End [concrete] // CHECK:STDOUT: %ConstRange.End: %ConstRange.End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.23e: = custom_witness (%Iterator.260, %Iterator.260, %ConstRange.Begin, %ConstRange.End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.1: type = fn_type @Iterator.Op.5 [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.1: type = fn_type @Iterator.Op.4 [concrete] // CHECK:STDOUT: %Iterator.Op.1c3e4a.1: %Iterator.Op.type.0f34b8.1 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.adb: = custom_witness (%i32, %Iterator.Op.1c3e4a.1), @CppUnsafeDeref [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.2: type = fn_type @Iterator.Op.6 [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.2: type = fn_type @Iterator.Op.5 [concrete] // CHECK:STDOUT: %Iterator.Op.1c3e4a.2: %Iterator.Op.type.0f34b8.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.6e8: = custom_witness (%Iterator.Op.1c3e4a.2), @Destroy [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.3: type = fn_type @Iterator.Op.7 [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.3: type = fn_type @Iterator.Op.6 [concrete] // CHECK:STDOUT: %Iterator.Op.1c3e4a.3: %Iterator.Op.type.0f34b8.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.150: = custom_witness (%Iterator.Op.1c3e4a.3), @Copy [concrete] +// CHECK:STDOUT: %custom_witness.746: = custom_witness (%Iterator.Op.1c3e4a.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type.ca8475.2: type = fn_type @Equal.2 [concrete] // CHECK:STDOUT: %Equal.285b15.2: %Equal.type.ca8475.2 = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.53d9ee.2: type = fn_type @NotEqual.2 [concrete] // CHECK:STDOUT: %NotEqual.119263.2: %NotEqual.type.53d9ee.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.941: = custom_witness (%Equal.285b15.2, %NotEqual.119263.2), @EqWith, @EqWith(%Iterator.260) [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.4: type = fn_type @Iterator.Op.8 [concrete] -// CHECK:STDOUT: %Iterator.Op.1c3e4a.4: %Iterator.Op.type.0f34b8.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.746: = custom_witness (%Iterator.Op.1c3e4a.4), @Inc [concrete] -// CHECK:STDOUT: %facet_value.e88: %CppRangeForIterate_where.type.1c721f.1 = facet_value %ConstRange, (%custom_witness.df9cc1.3, %Copy.impl_witness.0e0, %custom_witness.23e, %custom_witness.6e8, %custom_witness.150, %custom_witness.adb, %custom_witness.941, %custom_witness.746) [concrete] +// CHECK:STDOUT: %facet_value.f06: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.df9cc1.3, %Copy.impl_witness.0e0, %custom_witness.23e, %custom_witness.6e8, %custom_witness.adb, %custom_witness.746, %custom_witness.941) [concrete] // CHECK:STDOUT: %tuple.type.69f: type = tuple_type (%Iterator.260, %Iterator.260) [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.11: type = fn_type @Destroy.Op.3 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.11: %Destroy.Op.type.1d8f74.11 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.11: = custom_witness (%Destroy.Op.1a2547.11), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.e4c: %Destroy.type = facet_value %tuple.type.69f, (%custom_witness.df9cc1.11) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.cf5: = impl_witness imports.%Iterate.impl_witness_table.cd6, @R.as_type.as.Iterate.impl(%facet_value.e88) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.ee6: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%facet_value.e88) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.e1b: %R.as_type.as.Iterate.impl.NewCursor.type.ee6 = struct_value () [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.c4a: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%facet_value.e88) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.119: %R.as_type.as.Iterate.impl.Next.type.c4a = struct_value () [concrete] -// CHECK:STDOUT: %Iterate.facet.da6: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.cf5) [concrete] -// CHECK:STDOUT: %facet_value.f37: %Iterate_where.type.ec1 = facet_value %ConstRange, (%Iterate.impl_witness.cf5) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.ab5: = impl_witness imports.%Iterate.impl_witness_table.314, @T.as_type.as.Iterate.impl(%facet_value.f06) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.ae3: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.f06) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.65a: %T.as_type.as.Iterate.impl.NewCursor.type.ae3 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.9a7: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.f06) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.bb3: %T.as_type.as.Iterate.impl.Next.type.9a7 = struct_value () [concrete] +// CHECK:STDOUT: %Iterate.facet.016: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.ab5) [concrete] +// CHECK:STDOUT: %facet_value.a7f: %Iterate_where.type.ec1 = facet_value %ConstRange, (%Iterate.impl_witness.ab5) [concrete] // CHECK:STDOUT: %r.param_patt.83e: %pattern_type.0ba = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.116: %pattern_type.0ba = at_binding_pattern r, %r.param_patt.83e [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.083: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.3e3) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.4ed: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.3e3) [concrete] -// CHECK:STDOUT: %.0e97: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.083, %Iterate.facet.3e3 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.specific_fn.3ac: = specific_function %R.as_type.as.Iterate.impl.NewCursor.0a0, @R.as_type.as.Iterate.impl.NewCursor(%facet_value.cd6) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.a6c: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.5a9) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.1fe: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.5a9) [concrete] +// CHECK:STDOUT: %.cd3: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.a6c, %Iterate.facet.5a9 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.904: = specific_function %T.as_type.as.Iterate.impl.NewCursor.e51, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.036) [concrete] // CHECK:STDOUT: %ptr.45c: type = ptr_type %tuple.type.508 [concrete] -// CHECK:STDOUT: %.037: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.4ed, %Iterate.facet.3e3 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.specific_fn.50d: = specific_function %R.as_type.as.Iterate.impl.Next.693, @R.as_type.as.Iterate.impl.Next(%facet_value.cd6) [concrete] +// CHECK:STDOUT: %.46f: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.1fe, %Iterate.facet.5a9 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.8af: = specific_function %T.as_type.as.Iterate.impl.Next.65a, @T.as_type.as.Iterate.impl.Next(%facet_value.036) [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.c6c: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.30f) [concrete] // CHECK:STDOUT: %.0a4: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.c6c, %Destroy.facet.30f [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.005: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.da6) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.212: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.da6) [concrete] -// CHECK:STDOUT: %.bb7: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.005, %Iterate.facet.da6 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.specific_fn.e84: = specific_function %R.as_type.as.Iterate.impl.NewCursor.e1b, @R.as_type.as.Iterate.impl.NewCursor(%facet_value.e88) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.2b9: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.016) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.f09: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.016) [concrete] +// CHECK:STDOUT: %.283: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.2b9, %Iterate.facet.016 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.c42: = specific_function %T.as_type.as.Iterate.impl.NewCursor.65a, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.f06) [concrete] // CHECK:STDOUT: %ptr.c5c: type = ptr_type %tuple.type.69f [concrete] -// CHECK:STDOUT: %.fc66: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.212, %Iterate.facet.da6 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.specific_fn.9ce: = specific_function %R.as_type.as.Iterate.impl.Next.119, @R.as_type.as.Iterate.impl.Next(%facet_value.e88) [concrete] +// CHECK:STDOUT: %.899: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.f09, %Iterate.facet.016 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.e2e: = specific_function %T.as_type.as.Iterate.impl.Next.bb3, @T.as_type.as.Iterate.impl.Next(%facet_value.f06) [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.7ec: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.e4c) [concrete] // CHECK:STDOUT: %.0e7: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.7ec, %Destroy.facet.e4c [concrete] // CHECK:STDOUT: %complete_type.c28: = complete_type_witness %tuple.type.508 [concrete] @@ -962,11 +995,11 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.e31: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.671) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.a54)] // CHECK:STDOUT: %Core.import_ref.cea = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded // CHECK:STDOUT: %OptionalStorage.impl_witness_table.199 = impl_witness_table (%Core.import_ref.0c6, %Core.import_ref.6d6, %Core.import_ref.6f3, %Core.import_ref.af2, %Core.import_ref.e31, %Core.import_ref.cea), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.301: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.194)] -// CHECK:STDOUT: %Core.import_ref.89f: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.593)] -// CHECK:STDOUT: %Core.import_ref.f6b: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.2e2) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.71b)] -// CHECK:STDOUT: %Core.import_ref.630: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.c6a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.49a)] -// CHECK:STDOUT: %Iterate.impl_witness_table.cd6 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.f6b, %Core.import_ref.630), @R.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] +// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.6fc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.09f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.ae5)] +// CHECK:STDOUT: %Core.import_ref.8cc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.8ae) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.064)] +// CHECK:STDOUT: %Iterate.impl_witness_table.314 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.6fc, %Core.import_ref.8cc), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %Core.import_ref.cd6: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.ac8) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.5e0)] // CHECK:STDOUT: %Copy.impl_witness_table.367 = impl_witness_table (%Core.import_ref.cd6), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.2a4: @From.as_type.as.ImplicitAs.impl.%From.as_type.as.ImplicitAs.impl.Convert.type (%From.as_type.as.ImplicitAs.impl.Convert.type.7fa) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @From.as_type.as.ImplicitAs.impl.%From.as_type.as.ImplicitAs.impl.Convert (constants.%From.as_type.as.ImplicitAs.impl.Convert.643)] @@ -1002,19 +1035,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc34_19.2: @TestIterate.%.loc34_19.21 (%.fa0) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_19.2 (constants.%impl.elem0.544)] // CHECK:STDOUT: %specific_impl_fn.loc34_19.6: = specific_impl_function %impl.elem0.loc34_19.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc34_19.6 (constants.%specific_impl_fn.fa9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc30_61.1 (%R.as_type.a02)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc30_61.1 (%R.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.6b6 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc30_61.1 (%R.as_type.a02) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc30_61.1 (%R.as_type) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc34_19.1: @TestIterate.%.loc34_19.19 (%.985) = impl_witness_access constants.%Iterate.lookup_impl_witness.18b, element2 [symbolic = %impl.elem2.loc34_19.2 (constants.%impl.elem2.8ec)] // CHECK:STDOUT: %bound_method.loc34_19.1: = bound_method %r.ref, %impl.elem2.loc34_19.1 -// CHECK:STDOUT: %Iterate.facet.loc34_19.1: %Iterate.type = facet_value constants.%R.as_type.a02, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] -// CHECK:STDOUT: %.loc34_19.1: %Iterate.type = converted constants.%R.as_type.a02, %Iterate.facet.loc34_19.1 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] -// CHECK:STDOUT: %Iterate.facet.loc34_19.2: %Iterate.type = facet_value constants.%R.as_type.a02, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] -// CHECK:STDOUT: %.loc34_19.2: %Iterate.type = converted constants.%R.as_type.a02, %Iterate.facet.loc34_19.2 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %.loc34_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.1 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %.loc34_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.2 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] // CHECK:STDOUT: %specific_impl_fn.loc34_19.1: = specific_impl_function %impl.elem2.loc34_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.353) [symbolic = %specific_impl_fn.loc34_19.4 (constants.%specific_impl_fn.9ca)] // CHECK:STDOUT: %bound_method.loc34_19.2: = bound_method %r.ref, %specific_impl_fn.loc34_19.1 // CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.c8a) = var_storage invalid @@ -1026,10 +1059,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %addr: @TestIterate.%ptr (%ptr.2ef) = addr_of %var // CHECK:STDOUT: %impl.elem3.loc34_19.1: @TestIterate.%.loc34_19.20 (%.f86) = impl_witness_access constants.%Iterate.lookup_impl_witness.18b, element3 [symbolic = %impl.elem3.loc34_19.2 (constants.%impl.elem3.5f7)] // CHECK:STDOUT: %bound_method.loc34_19.3: = bound_method %r.ref, %impl.elem3.loc34_19.1 -// CHECK:STDOUT: %Iterate.facet.loc34_19.3: %Iterate.type = facet_value constants.%R.as_type.a02, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] -// CHECK:STDOUT: %.loc34_19.3: %Iterate.type = converted constants.%R.as_type.a02, %Iterate.facet.loc34_19.3 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] -// CHECK:STDOUT: %Iterate.facet.loc34_19.4: %Iterate.type = facet_value constants.%R.as_type.a02, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] -// CHECK:STDOUT: %.loc34_19.4: %Iterate.type = converted constants.%R.as_type.a02, %Iterate.facet.loc34_19.4 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %.loc34_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.3 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.18b) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] +// CHECK:STDOUT: %.loc34_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.4 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.353)] // CHECK:STDOUT: %.loc34_19.5: %Destroy.type = converted constants.%as_type.c8a, constants.%impl.elem1.295 [symbolic = %impl.elem1 (constants.%impl.elem1.295)] // CHECK:STDOUT: %.loc34_19.6: %Destroy.type = converted constants.%as_type.c8a, constants.%impl.elem1.295 [symbolic = %impl.elem1 (constants.%impl.elem1.295)] // CHECK:STDOUT: %specific_impl_fn.loc34_19.2: = specific_impl_function %impl.elem3.loc34_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.353) [symbolic = %specific_impl_fn.loc34_19.5 (constants.%specific_impl_fn.9a8)] @@ -1040,7 +1073,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc34_19.9: %Optional.HasValue.type.560 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.bef] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.560 = name_ref HasValue, %.loc34_19.9 [concrete = constants.%Optional.HasValue.bef] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc34_19.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.specific_fn.89c] // CHECK:STDOUT: %bound_method.loc34_19.5: = bound_method %.loc34_19.8, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc34_19.10: %Optional.a23 = acquire_value %.loc34_19.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc34_19.5(%.loc34_19.10) @@ -1052,7 +1085,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc34_19.13: %Optional.Get.type.11a = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.0ee] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.11a = name_ref Get, %.loc34_19.13 [concrete = constants.%Optional.Get.0ee] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc34_19.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.specific_fn.69a] // CHECK:STDOUT: %bound_method.loc34_19.6: = bound_method %.loc34_19.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc34_19.14: %Optional.a23 = acquire_value %.loc34_19.8 // CHECK:STDOUT: %Optional.Get.call: init %i32 = call %bound_method.loc34_19.6(%.loc34_19.14) @@ -1124,38 +1157,38 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt.loc49: %pattern_type.6b6 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %m.ref: ref %MutableRange = name_ref m, %m -// CHECK:STDOUT: %impl.elem2.loc49: %.0e97 = impl_witness_access constants.%Iterate.impl_witness.7dd, element2 [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.0a0] +// CHECK:STDOUT: %impl.elem2.loc49: %.cd3 = impl_witness_access constants.%Iterate.impl_witness.d4c, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.e51] // CHECK:STDOUT: %bound_method.loc49_19.1: = bound_method %m.ref, %impl.elem2.loc49 -// CHECK:STDOUT: %facet_value.loc49_19.1: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.ed3, constants.%custom_witness.955, constants.%custom_witness.1f5, constants.%custom_witness.ef8, constants.%custom_witness.981, constants.%custom_witness.444) [concrete = constants.%facet_value.cd6] -// CHECK:STDOUT: %.loc49_19.1: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc49_19.1 [concrete = constants.%facet_value.cd6] -// CHECK:STDOUT: %facet_value.loc49_19.2: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.ed3, constants.%custom_witness.955, constants.%custom_witness.1f5, constants.%custom_witness.ef8, constants.%custom_witness.981, constants.%custom_witness.444) [concrete = constants.%facet_value.cd6] -// CHECK:STDOUT: %.loc49_19.2: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc49_19.2 [concrete = constants.%facet_value.cd6] -// CHECK:STDOUT: %specific_fn.loc49_19.1: = specific_function %impl.elem2.loc49, @R.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.cd6) [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn.3ac] +// CHECK:STDOUT: %facet_value.loc49_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.ed3, constants.%custom_witness.955, constants.%custom_witness.ef8, constants.%custom_witness.444, constants.%custom_witness.981) [concrete = constants.%facet_value.036] +// CHECK:STDOUT: %.loc49_19.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.1 [concrete = constants.%facet_value.036] +// CHECK:STDOUT: %facet_value.loc49_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.ed3, constants.%custom_witness.955, constants.%custom_witness.ef8, constants.%custom_witness.444, constants.%custom_witness.981) [concrete = constants.%facet_value.036] +// CHECK:STDOUT: %.loc49_19.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.2 [concrete = constants.%facet_value.036] +// CHECK:STDOUT: %specific_fn.loc49_19.1: = specific_function %impl.elem2.loc49, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.036) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.904] // CHECK:STDOUT: %bound_method.loc49_19.2: = bound_method %m.ref, %specific_fn.loc49_19.1 // CHECK:STDOUT: %var.loc49: ref %tuple.type.508 = var_storage invalid // CHECK:STDOUT: %.loc49_18.1: %MutableRange = acquire_value %m.ref -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.call.loc49: init %tuple.type.508 to %var.loc49 = call %bound_method.loc49_19.2(%.loc49_18.1) -// CHECK:STDOUT: assign %var.loc49, %R.as_type.as.Iterate.impl.NewCursor.call.loc49 +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call.loc49: init %tuple.type.508 to %var.loc49 = call %bound_method.loc49_19.2(%.loc49_18.1) +// CHECK:STDOUT: assign %var.loc49, %T.as_type.as.Iterate.impl.NewCursor.call.loc49 // CHECK:STDOUT: br !for.next.loc49 // CHECK:STDOUT: // CHECK:STDOUT: !for.next.loc49: // CHECK:STDOUT: %addr.loc49: %ptr.45c = addr_of %var.loc49 -// CHECK:STDOUT: %impl.elem3.loc49: %.037 = impl_witness_access constants.%Iterate.impl_witness.7dd, element3 [concrete = constants.%R.as_type.as.Iterate.impl.Next.693] +// CHECK:STDOUT: %impl.elem3.loc49: %.46f = impl_witness_access constants.%Iterate.impl_witness.d4c, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.65a] // CHECK:STDOUT: %bound_method.loc49_19.3: = bound_method %m.ref, %impl.elem3.loc49 -// CHECK:STDOUT: %facet_value.loc49_19.3: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.ed3, constants.%custom_witness.955, constants.%custom_witness.1f5, constants.%custom_witness.ef8, constants.%custom_witness.981, constants.%custom_witness.444) [concrete = constants.%facet_value.cd6] -// CHECK:STDOUT: %.loc49_19.3: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc49_19.3 [concrete = constants.%facet_value.cd6] -// CHECK:STDOUT: %facet_value.loc49_19.4: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.ed3, constants.%custom_witness.955, constants.%custom_witness.1f5, constants.%custom_witness.ef8, constants.%custom_witness.981, constants.%custom_witness.444) [concrete = constants.%facet_value.cd6] -// CHECK:STDOUT: %.loc49_19.4: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc49_19.4 [concrete = constants.%facet_value.cd6] -// CHECK:STDOUT: %specific_fn.loc49_19.2: = specific_function %impl.elem3.loc49, @R.as_type.as.Iterate.impl.Next(constants.%facet_value.cd6) [concrete = constants.%R.as_type.as.Iterate.impl.Next.specific_fn.50d] +// CHECK:STDOUT: %facet_value.loc49_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.ed3, constants.%custom_witness.955, constants.%custom_witness.ef8, constants.%custom_witness.444, constants.%custom_witness.981) [concrete = constants.%facet_value.036] +// CHECK:STDOUT: %.loc49_19.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.3 [concrete = constants.%facet_value.036] +// CHECK:STDOUT: %facet_value.loc49_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.ed3, constants.%custom_witness.955, constants.%custom_witness.ef8, constants.%custom_witness.444, constants.%custom_witness.981) [concrete = constants.%facet_value.036] +// CHECK:STDOUT: %.loc49_19.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.4 [concrete = constants.%facet_value.036] +// CHECK:STDOUT: %specific_fn.loc49_19.2: = specific_function %impl.elem3.loc49, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.036) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.8af] // CHECK:STDOUT: %bound_method.loc49_19.4: = bound_method %m.ref, %specific_fn.loc49_19.2 // CHECK:STDOUT: %.loc49_19.5: ref %Optional.a23 = temporary_storage // CHECK:STDOUT: %.loc49_18.2: %MutableRange = acquire_value %m.ref -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.call.loc49: init %Optional.a23 to %.loc49_19.5 = call %bound_method.loc49_19.4(%.loc49_18.2, %addr.loc49) -// CHECK:STDOUT: %.loc49_19.6: ref %Optional.a23 = temporary %.loc49_19.5, %R.as_type.as.Iterate.impl.Next.call.loc49 +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc49: init %Optional.a23 to %.loc49_19.5 = call %bound_method.loc49_19.4(%.loc49_18.2, %addr.loc49) +// CHECK:STDOUT: %.loc49_19.6: ref %Optional.a23 = temporary %.loc49_19.5, %T.as_type.as.Iterate.impl.Next.call.loc49 // CHECK:STDOUT: %.loc49_19.7: %Optional.HasValue.type.560 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.bef] // CHECK:STDOUT: %HasValue.ref.loc49: %Optional.HasValue.type.560 = name_ref HasValue, %.loc49_19.7 [concrete = constants.%Optional.HasValue.bef] // CHECK:STDOUT: %Optional.HasValue.bound.loc49: = bound_method %.loc49_19.6, %HasValue.ref.loc49 -// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc49: = specific_function %HasValue.ref.loc49, @Optional.HasValue(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc49: = specific_function %HasValue.ref.loc49, @Optional.HasValue(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.specific_fn.89c] // CHECK:STDOUT: %bound_method.loc49_19.5: = bound_method %.loc49_19.6, %Optional.HasValue.specific_fn.loc49 // CHECK:STDOUT: %.loc49_19.8: %Optional.a23 = acquire_value %.loc49_19.6 // CHECK:STDOUT: %Optional.HasValue.call.loc49: init bool = call %bound_method.loc49_19.5(%.loc49_19.8) @@ -1167,7 +1200,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc49_19.11: %Optional.Get.type.11a = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.0ee] // CHECK:STDOUT: %Get.ref.loc49: %Optional.Get.type.11a = name_ref Get, %.loc49_19.11 [concrete = constants.%Optional.Get.0ee] // CHECK:STDOUT: %Optional.Get.bound.loc49: = bound_method %.loc49_19.6, %Get.ref.loc49 -// CHECK:STDOUT: %Optional.Get.specific_fn.loc49: = specific_function %Get.ref.loc49, @Optional.Get(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn.loc49: = specific_function %Get.ref.loc49, @Optional.Get(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.specific_fn.69a] // CHECK:STDOUT: %bound_method.loc49_19.6: = bound_method %.loc49_19.6, %Optional.Get.specific_fn.loc49 // CHECK:STDOUT: %.loc49_19.12: %Optional.a23 = acquire_value %.loc49_19.6 // CHECK:STDOUT: %Optional.Get.call.loc49: init %i32 = call %bound_method.loc49_19.6(%.loc49_19.12) @@ -1200,36 +1233,36 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt.loc55: %pattern_type.6b6 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %c.ref: %ConstRange = name_ref c, %c -// CHECK:STDOUT: %impl.elem2.loc55: %.bb7 = impl_witness_access constants.%Iterate.impl_witness.cf5, element2 [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.e1b] +// CHECK:STDOUT: %impl.elem2.loc55: %.283 = impl_witness_access constants.%Iterate.impl_witness.ab5, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.65a] // CHECK:STDOUT: %bound_method.loc55_19.1: = bound_method %c.ref, %impl.elem2.loc55 -// CHECK:STDOUT: %facet_value.loc55_19.1: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.23e, constants.%custom_witness.6e8, constants.%custom_witness.150, constants.%custom_witness.adb, constants.%custom_witness.941, constants.%custom_witness.746) [concrete = constants.%facet_value.e88] -// CHECK:STDOUT: %.loc55_19.1: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc55_19.1 [concrete = constants.%facet_value.e88] -// CHECK:STDOUT: %facet_value.loc55_19.2: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.23e, constants.%custom_witness.6e8, constants.%custom_witness.150, constants.%custom_witness.adb, constants.%custom_witness.941, constants.%custom_witness.746) [concrete = constants.%facet_value.e88] -// CHECK:STDOUT: %.loc55_19.2: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc55_19.2 [concrete = constants.%facet_value.e88] -// CHECK:STDOUT: %specific_fn.loc55_19.1: = specific_function %impl.elem2.loc55, @R.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.e88) [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn.e84] +// CHECK:STDOUT: %facet_value.loc55_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.23e, constants.%custom_witness.6e8, constants.%custom_witness.adb, constants.%custom_witness.746, constants.%custom_witness.941) [concrete = constants.%facet_value.f06] +// CHECK:STDOUT: %.loc55_19.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.1 [concrete = constants.%facet_value.f06] +// CHECK:STDOUT: %facet_value.loc55_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.23e, constants.%custom_witness.6e8, constants.%custom_witness.adb, constants.%custom_witness.746, constants.%custom_witness.941) [concrete = constants.%facet_value.f06] +// CHECK:STDOUT: %.loc55_19.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.2 [concrete = constants.%facet_value.f06] +// CHECK:STDOUT: %specific_fn.loc55_19.1: = specific_function %impl.elem2.loc55, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.f06) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.c42] // CHECK:STDOUT: %bound_method.loc55_19.2: = bound_method %c.ref, %specific_fn.loc55_19.1 // CHECK:STDOUT: %var.loc55: ref %tuple.type.69f = var_storage invalid -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.call.loc55: init %tuple.type.69f to %var.loc55 = call %bound_method.loc55_19.2(%c.ref) -// CHECK:STDOUT: assign %var.loc55, %R.as_type.as.Iterate.impl.NewCursor.call.loc55 +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call.loc55: init %tuple.type.69f to %var.loc55 = call %bound_method.loc55_19.2(%c.ref) +// CHECK:STDOUT: assign %var.loc55, %T.as_type.as.Iterate.impl.NewCursor.call.loc55 // CHECK:STDOUT: br !for.next.loc55 // CHECK:STDOUT: // CHECK:STDOUT: !for.next.loc55: // CHECK:STDOUT: %addr.loc55: %ptr.c5c = addr_of %var.loc55 -// CHECK:STDOUT: %impl.elem3.loc55: %.fc66 = impl_witness_access constants.%Iterate.impl_witness.cf5, element3 [concrete = constants.%R.as_type.as.Iterate.impl.Next.119] +// CHECK:STDOUT: %impl.elem3.loc55: %.899 = impl_witness_access constants.%Iterate.impl_witness.ab5, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.bb3] // CHECK:STDOUT: %bound_method.loc55_19.3: = bound_method %c.ref, %impl.elem3.loc55 -// CHECK:STDOUT: %facet_value.loc55_19.3: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.23e, constants.%custom_witness.6e8, constants.%custom_witness.150, constants.%custom_witness.adb, constants.%custom_witness.941, constants.%custom_witness.746) [concrete = constants.%facet_value.e88] -// CHECK:STDOUT: %.loc55_19.3: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc55_19.3 [concrete = constants.%facet_value.e88] -// CHECK:STDOUT: %facet_value.loc55_19.4: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.23e, constants.%custom_witness.6e8, constants.%custom_witness.150, constants.%custom_witness.adb, constants.%custom_witness.941, constants.%custom_witness.746) [concrete = constants.%facet_value.e88] -// CHECK:STDOUT: %.loc55_19.4: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc55_19.4 [concrete = constants.%facet_value.e88] -// CHECK:STDOUT: %specific_fn.loc55_19.2: = specific_function %impl.elem3.loc55, @R.as_type.as.Iterate.impl.Next(constants.%facet_value.e88) [concrete = constants.%R.as_type.as.Iterate.impl.Next.specific_fn.9ce] +// CHECK:STDOUT: %facet_value.loc55_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.23e, constants.%custom_witness.6e8, constants.%custom_witness.adb, constants.%custom_witness.746, constants.%custom_witness.941) [concrete = constants.%facet_value.f06] +// CHECK:STDOUT: %.loc55_19.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.3 [concrete = constants.%facet_value.f06] +// CHECK:STDOUT: %facet_value.loc55_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.0e0, constants.%custom_witness.23e, constants.%custom_witness.6e8, constants.%custom_witness.adb, constants.%custom_witness.746, constants.%custom_witness.941) [concrete = constants.%facet_value.f06] +// CHECK:STDOUT: %.loc55_19.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.4 [concrete = constants.%facet_value.f06] +// CHECK:STDOUT: %specific_fn.loc55_19.2: = specific_function %impl.elem3.loc55, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.f06) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.e2e] // CHECK:STDOUT: %bound_method.loc55_19.4: = bound_method %c.ref, %specific_fn.loc55_19.2 // CHECK:STDOUT: %.loc55_19.5: ref %Optional.a23 = temporary_storage -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.call.loc55: init %Optional.a23 to %.loc55_19.5 = call %bound_method.loc55_19.4(%c.ref, %addr.loc55) -// CHECK:STDOUT: %.loc55_19.6: ref %Optional.a23 = temporary %.loc55_19.5, %R.as_type.as.Iterate.impl.Next.call.loc55 +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc55: init %Optional.a23 to %.loc55_19.5 = call %bound_method.loc55_19.4(%c.ref, %addr.loc55) +// CHECK:STDOUT: %.loc55_19.6: ref %Optional.a23 = temporary %.loc55_19.5, %T.as_type.as.Iterate.impl.Next.call.loc55 // CHECK:STDOUT: %.loc55_19.7: %Optional.HasValue.type.560 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.bef] // CHECK:STDOUT: %HasValue.ref.loc55: %Optional.HasValue.type.560 = name_ref HasValue, %.loc55_19.7 [concrete = constants.%Optional.HasValue.bef] // CHECK:STDOUT: %Optional.HasValue.bound.loc55: = bound_method %.loc55_19.6, %HasValue.ref.loc55 -// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc55: = specific_function %HasValue.ref.loc55, @Optional.HasValue(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc55: = specific_function %HasValue.ref.loc55, @Optional.HasValue(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.HasValue.specific_fn.89c] // CHECK:STDOUT: %bound_method.loc55_19.5: = bound_method %.loc55_19.6, %Optional.HasValue.specific_fn.loc55 // CHECK:STDOUT: %.loc55_19.8: %Optional.a23 = acquire_value %.loc55_19.6 // CHECK:STDOUT: %Optional.HasValue.call.loc55: init bool = call %bound_method.loc55_19.5(%.loc55_19.8) @@ -1241,7 +1274,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc55_19.11: %Optional.Get.type.11a = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.0ee] // CHECK:STDOUT: %Get.ref.loc55: %Optional.Get.type.11a = name_ref Get, %.loc55_19.11 [concrete = constants.%Optional.Get.0ee] // CHECK:STDOUT: %Optional.Get.bound.loc55: = bound_method %.loc55_19.6, %Get.ref.loc55 -// CHECK:STDOUT: %Optional.Get.specific_fn.loc55: = specific_function %Get.ref.loc55, @Optional.Get(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn.loc55: = specific_function %Get.ref.loc55, @Optional.Get(constants.%OptionalStorage.facet.563) [concrete = constants.%Optional.Get.specific_fn.69a] // CHECK:STDOUT: %bound_method.loc55_19.6: = bound_method %.loc55_19.6, %Optional.Get.specific_fn.loc55 // CHECK:STDOUT: %.loc55_19.12: %Optional.a23 = acquire_value %.loc55_19.6 // CHECK:STDOUT: %Optional.Get.call.loc55: init %i32 = call %bound_method.loc55_19.6(%.loc55_19.12) @@ -1273,18 +1306,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%R.869) { -// CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt.bbc -// CHECK:STDOUT: %R.loc30_17.1 => constants.%R.869 -// CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%R.as_type.a02 +// CHECK:STDOUT: specific @TestIterate(constants.%R) { +// CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc30_17.1 => constants.%R +// CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%R.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b2da // CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.774 // CHECK:STDOUT: %r.patt.loc30_59.2 => constants.%r.patt.54b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.04f) { -// CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt.bbc -// CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.04f +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.f19) { +// CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.f19 // CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%MutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e635 // CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.c79 @@ -1292,20 +1325,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc30 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.7dd -// CHECK:STDOUT: %Iterate.facet.loc34_19.5 => constants.%Iterate.facet.3e3 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.083 -// CHECK:STDOUT: %.loc34_19.19 => constants.%.0e97 -// CHECK:STDOUT: %impl.elem2.loc34_19.2 => constants.%R.as_type.as.Iterate.impl.NewCursor.0a0 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.4 => constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn.3ac +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.d4c +// CHECK:STDOUT: %Iterate.facet.loc34_19.5 => constants.%Iterate.facet.5a9 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.a6c +// CHECK:STDOUT: %.loc34_19.19 => constants.%.cd3 +// CHECK:STDOUT: %impl.elem2.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.e51 +// CHECK:STDOUT: %specific_impl_fn.loc34_19.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.904 // CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.30f // CHECK:STDOUT: %as_type => constants.%tuple.type.508 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.c28 // CHECK:STDOUT: %ptr => constants.%ptr.45c -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.4ed -// CHECK:STDOUT: %.loc34_19.20 => constants.%.037 -// CHECK:STDOUT: %impl.elem3.loc34_19.2 => constants.%R.as_type.as.Iterate.impl.Next.693 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.5 => constants.%R.as_type.as.Iterate.impl.Next.specific_fn.50d +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.1fe +// CHECK:STDOUT: %.loc34_19.20 => constants.%.46f +// CHECK:STDOUT: %impl.elem3.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.Next.65a +// CHECK:STDOUT: %specific_impl_fn.loc34_19.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.8af // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.c6c // CHECK:STDOUT: %.loc34_19.21 => constants.%.0a4 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.10 @@ -1313,9 +1346,9 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %specific_impl_fn.loc34_19.6 => constants.%Destroy.Op.1a2547.10 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.f37) { -// CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt.bbc -// CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.f37 +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.a7f) { +// CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.a7f // CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0ba // CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.83e @@ -1323,20 +1356,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc30 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.cf5 -// CHECK:STDOUT: %Iterate.facet.loc34_19.5 => constants.%Iterate.facet.da6 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.005 -// CHECK:STDOUT: %.loc34_19.19 => constants.%.bb7 -// CHECK:STDOUT: %impl.elem2.loc34_19.2 => constants.%R.as_type.as.Iterate.impl.NewCursor.e1b -// CHECK:STDOUT: %specific_impl_fn.loc34_19.4 => constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn.e84 +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.ab5 +// CHECK:STDOUT: %Iterate.facet.loc34_19.5 => constants.%Iterate.facet.016 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.2b9 +// CHECK:STDOUT: %.loc34_19.19 => constants.%.283 +// CHECK:STDOUT: %impl.elem2.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.65a +// CHECK:STDOUT: %specific_impl_fn.loc34_19.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.c42 // CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.e4c // CHECK:STDOUT: %as_type => constants.%tuple.type.69f // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.8d5 // CHECK:STDOUT: %ptr => constants.%ptr.c5c -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.212 -// CHECK:STDOUT: %.loc34_19.20 => constants.%.fc66 -// CHECK:STDOUT: %impl.elem3.loc34_19.2 => constants.%R.as_type.as.Iterate.impl.Next.119 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.5 => constants.%R.as_type.as.Iterate.impl.Next.specific_fn.9ce +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.f09 +// CHECK:STDOUT: %.loc34_19.20 => constants.%.899 +// CHECK:STDOUT: %impl.elem3.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.Next.bb3 +// CHECK:STDOUT: %specific_impl_fn.loc34_19.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.e2e // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.7ec // CHECK:STDOUT: %.loc34_19.21 => constants.%.0e7 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.11 @@ -1350,14 +1383,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Optional.Get.type.bb9: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.Get.fa1: %Optional.Get.type.bb9 = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.e9e: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.HasValue.6cd: %Optional.HasValue.type.e9e = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %DefaultOptionalStorage.d50: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.671: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.a54: %T.as_type.as.OptionalStorage.impl.Get.type.671 = struct_value () [symbolic] @@ -1369,31 +1402,30 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.faf: %T.as_type.as.OptionalStorage.impl.None.type.f62 = struct_value () [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.type: type = facet_type <@CppRangeForIterate> [concrete] -// CHECK:STDOUT: %.Self.aed: %CppRangeForIterate.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.f6b: = lookup_impl_witness %.Self.aed, @CppRangeForIterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.b73: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element0 [symbolic_self] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.595: = lookup_impl_witness %impl.elem0.b73, @CppUnsafeDeref [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a2f: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.595, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem1.228: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element1 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate_where.type.1c721f.1: type = facet_type <@CppRangeForIterate where %impl.elem0.b73 impls @Destroy and %impl.elem0.b73 impls @Copy and %impl.elem0.b73 impls @CppUnsafeDeref and %impl.elem0.b73 impls @EqWith, @EqWith(%impl.elem1.228) and %impl.elem0.b73 impls @Inc and %impl.elem0.a2f impls @Destroy and %impl.elem0.a2f impls @Copy and %impl.elem1.228 impls @Destroy and %impl.elem1.228 impls @Copy> [concrete] -// CHECK:STDOUT: %R.39b: %CppRangeForIterate_where.type.1c721f.1 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.7e2712.2: = lookup_impl_witness %R.39b, @CppRangeForIterate [symbolic] -// CHECK:STDOUT: %impl.elem1.7a0bff.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element1 [symbolic] -// CHECK:STDOUT: %impl.elem0.73eb7f.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element0 [symbolic] -// CHECK:STDOUT: %tuple.type.3cf: type = tuple_type (%impl.elem0.73eb7f.2, %impl.elem1.7a0bff.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.69f: = lookup_impl_witness %tuple.type.3cf, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.593: %Destroy.type = facet_value %tuple.type.3cf, (%Destroy.lookup_impl_witness.69f) [symbolic] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.aa7: = lookup_impl_witness %impl.elem0.73eb7f.2, @CppUnsafeDeref [symbolic] -// CHECK:STDOUT: %impl.elem0.af7: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.aa7, element0 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.ec3: = lookup_impl_witness %impl.elem0.af7, @Destroy [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.a7a: = lookup_impl_witness %impl.elem0.af7, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.194: %facet_type = facet_value %impl.elem0.af7, (%Destroy.lookup_impl_witness.ec3, %Copy.lookup_impl_witness.a7a) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.c6a: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.49a: %R.as_type.as.Iterate.impl.Next.type.c6a = struct_value () [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.2e2: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.71b: %R.as_type.as.Iterate.impl.NewCursor.type.2e2 = struct_value () [symbolic] +// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] +// CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.50b: = lookup_impl_witness %.Self.e0b, @CppRangeForIterate [symbolic_self] +// CHECK:STDOUT: %impl.elem0.32d: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.50b, element0 [symbolic_self] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d, @CppUnsafeDeref [symbolic_self] +// CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] +// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] +// CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] +// CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] +// CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] +// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.8ae: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.064: %T.as_type.as.Iterate.impl.Next.type.8ae = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.09f: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.ae5: %T.as_type.as.Iterate.impl.NewCursor.type.09f = struct_value () [symbolic] // CHECK:STDOUT: %ValueType: type = class_type @ValueType [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -1409,18 +1441,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %ValueType.Op.type.83af6e.2: type = fn_type @ValueType.Op.2 [concrete] // CHECK:STDOUT: %ValueType.Op.4dca31.2: %ValueType.Op.type.83af6e.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.d0da43.1: = custom_witness (%ValueType.Op.4dca31.2), @Copy [concrete] -// CHECK:STDOUT: %facet_value.bf1: %facet_type = facet_value %ValueType, (%custom_witness.e7a31c.1, %custom_witness.d0da43.1) [concrete] +// CHECK:STDOUT: %facet_value.bf1: %facet_type.f48 = facet_value %ValueType, (%custom_witness.e7a31c.1, %custom_witness.d0da43.1) [concrete] // CHECK:STDOUT: %Iterate_where.type.502: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.bf1> [concrete] // CHECK:STDOUT: %pattern_type.4c7: type = pattern_type %Iterate_where.type.502 [concrete] -// CHECK:STDOUT: %R.patt.35d: %pattern_type.4c7 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R.0bd: %Iterate_where.type.502 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %R.as_type.f55: type = facet_access_type %R.0bd [symbolic] -// CHECK:STDOUT: %pattern_type.d2d: type = pattern_type %R.as_type.f55 [symbolic] +// CHECK:STDOUT: %R.patt: %pattern_type.4c7 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.502 = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] +// CHECK:STDOUT: %pattern_type.d2d: type = pattern_type %R.as_type [symbolic] // CHECK:STDOUT: %r.patt.d27: %pattern_type.d2d = ref_binding_pattern r [symbolic] // CHECK:STDOUT: %r.param_patt.a41: %pattern_type.d2d = var_param_pattern %r.patt.d27 [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.e9f = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.06b: = lookup_impl_witness %R.0bd, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.dbf: %Iterate.type = facet_value %R.as_type.f55, (%Iterate.lookup_impl_witness.06b) [symbolic] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.06b: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.dbf: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.06b) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.1b1: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.dbf) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.Next.type.705: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.dbf) [symbolic] // CHECK:STDOUT: %.1c2: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.1b1, %Iterate.facet.dbf [symbolic] @@ -1444,8 +1476,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %MaybeUnformed.02e: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.4e5) [concrete] // CHECK:STDOUT: %.98c: type = maybe_unformed_type %ValueType [concrete] // CHECK:STDOUT: %struct_type.value.has_value.761: type = struct_type {.value: %MaybeUnformed.02e, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.fbf, @Optional.HasValue(%OptionalStorage.facet.ada) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.c12, @Optional.Get(%OptionalStorage.facet.ada) [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.2c9: = specific_function %Optional.HasValue.fbf, @Optional.HasValue(%OptionalStorage.facet.ada) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.188: = specific_function %Optional.Get.c12, @Optional.Get(%OptionalStorage.facet.ada) [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.7: type = fn_type @Destroy.Op.loc44_29.6 [concrete] @@ -1474,34 +1506,28 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %custom_witness.95581e.1: = custom_witness (%Iterator.Op.a2a866.2), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.0aed5d.3: type = fn_type @Iterator.Op.3 [concrete] // CHECK:STDOUT: %Iterator.Op.a2a866.3: %Iterator.Op.type.0aed5d.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1f52e9.1: = custom_witness (%Iterator.Op.a2a866.3), @Copy [concrete] +// CHECK:STDOUT: %custom_witness.444: = custom_witness (%Iterator.Op.a2a866.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type.ca8475.1: type = fn_type @Equal.1 [concrete] // CHECK:STDOUT: %Equal.285b15.1: %Equal.type.ca8475.1 = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.53d9ee.1: type = fn_type @NotEqual.1 [concrete] // CHECK:STDOUT: %NotEqual.119263.1: %NotEqual.type.53d9ee.1 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.3e8: = custom_witness (%Equal.285b15.1, %NotEqual.119263.1), @EqWith, @EqWith(%Sentinel.9b2) [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0aed5d.4: type = fn_type @Iterator.Op.4 [concrete] -// CHECK:STDOUT: %Iterator.Op.a2a866.4: %Iterator.Op.type.0aed5d.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.444: = custom_witness (%Iterator.Op.a2a866.4), @Inc [concrete] -// CHECK:STDOUT: %Sentinel.Op.type.0aed5d.1: type = fn_type @Sentinel.Op.1 [concrete] -// CHECK:STDOUT: %Sentinel.Op.a2a866.1: %Sentinel.Op.type.0aed5d.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.95581e.2: = custom_witness (%Sentinel.Op.a2a866.1), @Destroy [concrete] -// CHECK:STDOUT: %Sentinel.Op.type.0aed5d.2: type = fn_type @Sentinel.Op.2 [concrete] -// CHECK:STDOUT: %Sentinel.Op.a2a866.2: %Sentinel.Op.type.0aed5d.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1f52e9.2: = custom_witness (%Sentinel.Op.a2a866.2), @Copy [concrete] -// CHECK:STDOUT: %facet_value.55a: %CppRangeForIterate_where.type.1c721f.1 = facet_value %MutableRange, (%custom_witness.e7a31c.1, %custom_witness.d0da43.1, %custom_witness.6b6, %custom_witness.95581e.1, %custom_witness.1f52e9.1, %custom_witness.90a, %custom_witness.3e8, %custom_witness.444, %custom_witness.95581e.2, %custom_witness.1f52e9.2) [concrete] +// CHECK:STDOUT: %Sentinel.Op.type.0ae: type = fn_type @Sentinel.Op.1 [concrete] +// CHECK:STDOUT: %Sentinel.Op.a2a: %Sentinel.Op.type.0ae = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.95581e.2: = custom_witness (%Sentinel.Op.a2a), @Destroy [concrete] +// CHECK:STDOUT: %facet_value.9f5: %CppRange_where.type.d682d6.1 = facet_value %MutableRange, (%custom_witness.e7a31c.1, %custom_witness.d0da43.1, %custom_witness.6b6, %custom_witness.95581e.1, %custom_witness.90a, %custom_witness.444, %custom_witness.3e8, %custom_witness.95581e.2) [concrete] // CHECK:STDOUT: %tuple.type.829: type = tuple_type (%Iterator.3ee, %Sentinel.9b2) [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.8: type = fn_type @Destroy.Op.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.8: %Destroy.Op.type.1d8f74.8 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.8: = custom_witness (%Destroy.Op.1a2547.8), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.305: %Destroy.type = facet_value %tuple.type.829, (%custom_witness.df9cc1.8) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.ef2: = impl_witness imports.%Iterate.impl_witness_table.cd6, @R.as_type.as.Iterate.impl(%facet_value.55a) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.b08: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%facet_value.55a) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.aa8: %R.as_type.as.Iterate.impl.NewCursor.type.b08 = struct_value () [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.210: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%facet_value.55a) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.de6: %R.as_type.as.Iterate.impl.Next.type.210 = struct_value () [concrete] -// CHECK:STDOUT: %Iterate.facet.ac1: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.ef2) [concrete] -// CHECK:STDOUT: %facet_value.82d: %Iterate_where.type.502 = facet_value %MutableRange, (%Iterate.impl_witness.ef2) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.0d5: = impl_witness imports.%Iterate.impl_witness_table.314, @T.as_type.as.Iterate.impl(%facet_value.9f5) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.1f5: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.9f5) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.21c: %T.as_type.as.Iterate.impl.NewCursor.type.1f5 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.7f7: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.9f5) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.2e9: %T.as_type.as.Iterate.impl.Next.type.7f7 = struct_value () [concrete] +// CHECK:STDOUT: %Iterate.facet.e34: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.0d5) [concrete] +// CHECK:STDOUT: %facet_value.43b: %Iterate_where.type.502 = facet_value %MutableRange, (%Iterate.impl_witness.0d5) [concrete] // CHECK:STDOUT: %r.patt.f69: %pattern_type.e635 = ref_binding_pattern r [concrete] // CHECK:STDOUT: %r.param_patt.91e: %pattern_type.e635 = var_param_pattern %r.patt.f69 [concrete] // CHECK:STDOUT: %Iterator.260: type = class_type @Iterator.2 [concrete] @@ -1511,60 +1537,54 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %ConstRange.End.type: type = fn_type @ConstRange.End [concrete] // CHECK:STDOUT: %ConstRange.End: %ConstRange.End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.a03: = custom_witness (%Iterator.260, %Sentinel.4c4, %ConstRange.Begin, %ConstRange.End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.1: type = fn_type @Iterator.Op.5 [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.1: type = fn_type @Iterator.Op.4 [concrete] // CHECK:STDOUT: %Iterator.Op.1c3e4a.1: %Iterator.Op.type.0f34b8.1 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.78b: = custom_witness (%ValueType, %Iterator.Op.1c3e4a.1), @CppUnsafeDeref [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.2: type = fn_type @Iterator.Op.6 [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.2: type = fn_type @Iterator.Op.5 [concrete] // CHECK:STDOUT: %Iterator.Op.1c3e4a.2: %Iterator.Op.type.0f34b8.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.6e8a2e.1: = custom_witness (%Iterator.Op.1c3e4a.2), @Destroy [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.3: type = fn_type @Iterator.Op.7 [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.3: type = fn_type @Iterator.Op.6 [concrete] // CHECK:STDOUT: %Iterator.Op.1c3e4a.3: %Iterator.Op.type.0f34b8.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.15091a.1: = custom_witness (%Iterator.Op.1c3e4a.3), @Copy [concrete] +// CHECK:STDOUT: %custom_witness.746: = custom_witness (%Iterator.Op.1c3e4a.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type.ca8475.2: type = fn_type @Equal.2 [concrete] // CHECK:STDOUT: %Equal.285b15.2: %Equal.type.ca8475.2 = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.53d9ee.2: type = fn_type @NotEqual.2 [concrete] // CHECK:STDOUT: %NotEqual.119263.2: %NotEqual.type.53d9ee.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.c55: = custom_witness (%Equal.285b15.2, %NotEqual.119263.2), @EqWith, @EqWith(%Sentinel.4c4) [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.4: type = fn_type @Iterator.Op.8 [concrete] -// CHECK:STDOUT: %Iterator.Op.1c3e4a.4: %Iterator.Op.type.0f34b8.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.746: = custom_witness (%Iterator.Op.1c3e4a.4), @Inc [concrete] -// CHECK:STDOUT: %Sentinel.Op.type.0f34b8.1: type = fn_type @Sentinel.Op.3 [concrete] -// CHECK:STDOUT: %Sentinel.Op.1c3e4a.1: %Sentinel.Op.type.0f34b8.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.6e8a2e.2: = custom_witness (%Sentinel.Op.1c3e4a.1), @Destroy [concrete] -// CHECK:STDOUT: %Sentinel.Op.type.0f34b8.2: type = fn_type @Sentinel.Op.4 [concrete] -// CHECK:STDOUT: %Sentinel.Op.1c3e4a.2: %Sentinel.Op.type.0f34b8.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.15091a.2: = custom_witness (%Sentinel.Op.1c3e4a.2), @Copy [concrete] -// CHECK:STDOUT: %facet_value.445: %CppRangeForIterate_where.type.1c721f.1 = facet_value %ConstRange, (%custom_witness.e7a31c.1, %custom_witness.d0da43.1, %custom_witness.a03, %custom_witness.6e8a2e.1, %custom_witness.15091a.1, %custom_witness.78b, %custom_witness.c55, %custom_witness.746, %custom_witness.6e8a2e.2, %custom_witness.15091a.2) [concrete] +// CHECK:STDOUT: %Sentinel.Op.type.0f3: type = fn_type @Sentinel.Op.2 [concrete] +// CHECK:STDOUT: %Sentinel.Op.1c3: %Sentinel.Op.type.0f3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.6e8a2e.2: = custom_witness (%Sentinel.Op.1c3), @Destroy [concrete] +// CHECK:STDOUT: %facet_value.782: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.e7a31c.1, %custom_witness.d0da43.1, %custom_witness.a03, %custom_witness.6e8a2e.1, %custom_witness.78b, %custom_witness.746, %custom_witness.c55, %custom_witness.6e8a2e.2) [concrete] // CHECK:STDOUT: %tuple.type.99f: type = tuple_type (%Iterator.260, %Sentinel.4c4) [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.9: type = fn_type @Destroy.Op.3 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.9: %Destroy.Op.type.1d8f74.9 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.9: = custom_witness (%Destroy.Op.1a2547.9), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.e08: %Destroy.type = facet_value %tuple.type.99f, (%custom_witness.df9cc1.9) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.214: = impl_witness imports.%Iterate.impl_witness_table.cd6, @R.as_type.as.Iterate.impl(%facet_value.445) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.799: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%facet_value.445) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.865: %R.as_type.as.Iterate.impl.NewCursor.type.799 = struct_value () [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.75d: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%facet_value.445) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.31e: %R.as_type.as.Iterate.impl.Next.type.75d = struct_value () [concrete] -// CHECK:STDOUT: %Iterate.facet.02a: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.214) [concrete] -// CHECK:STDOUT: %facet_value.915: %Iterate_where.type.502 = facet_value %ConstRange, (%Iterate.impl_witness.214) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.bfb: = impl_witness imports.%Iterate.impl_witness_table.314, @T.as_type.as.Iterate.impl(%facet_value.782) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.620: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.782) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.603: %T.as_type.as.Iterate.impl.NewCursor.type.620 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.9f1: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.782) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.257: %T.as_type.as.Iterate.impl.Next.type.9f1 = struct_value () [concrete] +// CHECK:STDOUT: %Iterate.facet.554: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.bfb) [concrete] +// CHECK:STDOUT: %facet_value.537: %Iterate_where.type.502 = facet_value %ConstRange, (%Iterate.impl_witness.bfb) [concrete] // CHECK:STDOUT: %r.patt.36a: %pattern_type.0ba = ref_binding_pattern r [concrete] // CHECK:STDOUT: %r.param_patt.501: %pattern_type.0ba = var_param_pattern %r.patt.36a [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.625: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.ac1) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.810: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.ac1) [concrete] -// CHECK:STDOUT: %.44e: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.625, %Iterate.facet.ac1 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.specific_fn.6f4: = specific_function %R.as_type.as.Iterate.impl.NewCursor.aa8, @R.as_type.as.Iterate.impl.NewCursor(%facet_value.55a) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.150: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.e34) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.4ec: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.e34) [concrete] +// CHECK:STDOUT: %.967: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.150, %Iterate.facet.e34 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.173: = specific_function %T.as_type.as.Iterate.impl.NewCursor.21c, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.9f5) [concrete] // CHECK:STDOUT: %ptr.d6b: type = ptr_type %tuple.type.829 [concrete] -// CHECK:STDOUT: %.121: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.810, %Iterate.facet.ac1 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.specific_fn.c86: = specific_function %R.as_type.as.Iterate.impl.Next.de6, @R.as_type.as.Iterate.impl.Next(%facet_value.55a) [concrete] +// CHECK:STDOUT: %.ea7: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.4ec, %Iterate.facet.e34 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.227: = specific_function %T.as_type.as.Iterate.impl.Next.2e9, @T.as_type.as.Iterate.impl.Next(%facet_value.9f5) [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.c89: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.305) [concrete] // CHECK:STDOUT: %.e8a: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.c89, %Destroy.facet.305 [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.3b7: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.02a) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.c48: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.02a) [concrete] -// CHECK:STDOUT: %.71c: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.3b7, %Iterate.facet.02a [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.specific_fn.4ff: = specific_function %R.as_type.as.Iterate.impl.NewCursor.865, @R.as_type.as.Iterate.impl.NewCursor(%facet_value.445) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.3b2: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.554) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.8f7: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.554) [concrete] +// CHECK:STDOUT: %.5fd: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.3b2, %Iterate.facet.554 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.c6a: = specific_function %T.as_type.as.Iterate.impl.NewCursor.603, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.782) [concrete] // CHECK:STDOUT: %ptr.2f7: type = ptr_type %tuple.type.99f [concrete] -// CHECK:STDOUT: %.7e8: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.c48, %Iterate.facet.02a [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.specific_fn.e3d: = specific_function %R.as_type.as.Iterate.impl.Next.31e, @R.as_type.as.Iterate.impl.Next(%facet_value.445) [concrete] +// CHECK:STDOUT: %.db8: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.8f7, %Iterate.facet.554 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.6f5: = specific_function %T.as_type.as.Iterate.impl.Next.257, @T.as_type.as.Iterate.impl.Next(%facet_value.782) [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.e30: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.e08) [concrete] // CHECK:STDOUT: %.987: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.e30, %Destroy.facet.e08 [concrete] // CHECK:STDOUT: %complete_type.94f: = complete_type_witness %tuple.type.829 [concrete] @@ -1587,11 +1607,11 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.e31: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.671) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.a54)] // CHECK:STDOUT: %Core.import_ref.cea = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded // CHECK:STDOUT: %OptionalStorage.impl_witness_table.199 = impl_witness_table (%Core.import_ref.0c6, %Core.import_ref.6d6, %Core.import_ref.6f3, %Core.import_ref.af2, %Core.import_ref.e31, %Core.import_ref.cea), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.301: %facet_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.194)] -// CHECK:STDOUT: %Core.import_ref.89f: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.593)] -// CHECK:STDOUT: %Core.import_ref.f6b: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.2e2) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.71b)] -// CHECK:STDOUT: %Core.import_ref.630: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.c6a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.49a)] -// CHECK:STDOUT: %Iterate.impl_witness_table.cd6 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.f6b, %Core.import_ref.630), @R.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] +// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.6fc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.09f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.ae5)] +// CHECK:STDOUT: %Core.import_ref.8cc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.8ae) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.064)] +// CHECK:STDOUT: %Iterate.impl_witness_table.314 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.6fc, %Core.import_ref.8cc), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %ValueType.decl: type = class_decl @ValueType [concrete = constants.%ValueType] {} {} // CHECK:STDOUT: %ValueType.cpp_destructor.decl: %ValueType.cpp_destructor.type = fn_decl @ValueType.cpp_destructor [concrete = constants.%ValueType.cpp_destructor] { // CHECK:STDOUT: @@ -1630,23 +1650,23 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc44_29.2: @TestIterate.%.loc44_29.22 (%.98a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc44_29.2 (constants.%impl.elem0.81b)] // CHECK:STDOUT: %specific_impl_fn.loc44_29.6: = specific_impl_function %impl.elem0.loc44_29.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc44_29.6 (constants.%specific_impl_fn.bf3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: ref @TestIterate.%R.as_type.loc40_75.1 (%R.as_type.f55)) { +// CHECK:STDOUT: fn(%r.param: ref @TestIterate.%R.as_type.loc40_75.1 (%R.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.e9f = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: ref @TestIterate.%R.as_type.loc40_75.1 (%R.as_type.f55) = name_ref r, %r +// CHECK:STDOUT: %r.ref: ref @TestIterate.%R.as_type.loc40_75.1 (%R.as_type) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc44_29.1: @TestIterate.%.loc44_29.20 (%.1c2) = impl_witness_access constants.%Iterate.lookup_impl_witness.06b, element2 [symbolic = %impl.elem2.loc44_29.2 (constants.%impl.elem2.49b)] // CHECK:STDOUT: %bound_method.loc44_29.1: = bound_method %r.ref, %impl.elem2.loc44_29.1 -// CHECK:STDOUT: %Iterate.facet.loc44_29.1: %Iterate.type = facet_value constants.%R.as_type.f55, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] -// CHECK:STDOUT: %.loc44_29.1: %Iterate.type = converted constants.%R.as_type.f55, %Iterate.facet.loc44_29.1 [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] -// CHECK:STDOUT: %Iterate.facet.loc44_29.2: %Iterate.type = facet_value constants.%R.as_type.f55, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] -// CHECK:STDOUT: %.loc44_29.2: %Iterate.type = converted constants.%R.as_type.f55, %Iterate.facet.loc44_29.2 [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %Iterate.facet.loc44_29.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %.loc44_29.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_29.1 [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %Iterate.facet.loc44_29.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %.loc44_29.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_29.2 [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] // CHECK:STDOUT: %specific_impl_fn.loc44_29.1: = specific_impl_function %impl.elem2.loc44_29.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.dbf) [symbolic = %specific_impl_fn.loc44_29.4 (constants.%specific_impl_fn.6f3)] // CHECK:STDOUT: %bound_method.loc44_29.2: = bound_method %r.ref, %specific_impl_fn.loc44_29.1 // CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.dbb) = var_storage invalid -// CHECK:STDOUT: %.loc44_28.1: @TestIterate.%R.as_type.loc40_75.1 (%R.as_type.f55) = acquire_value %r.ref +// CHECK:STDOUT: %.loc44_28.1: @TestIterate.%R.as_type.loc40_75.1 (%R.as_type) = acquire_value %r.ref // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.dbb) to %var = call %bound_method.loc44_29.2(%.loc44_28.1) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next @@ -1655,22 +1675,22 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %addr.loc44: @TestIterate.%ptr (%ptr.bde) = addr_of %var // CHECK:STDOUT: %impl.elem3.loc44_29.1: @TestIterate.%.loc44_29.21 (%.bd3) = impl_witness_access constants.%Iterate.lookup_impl_witness.06b, element3 [symbolic = %impl.elem3.loc44_29.2 (constants.%impl.elem3.d57)] // CHECK:STDOUT: %bound_method.loc44_29.3: = bound_method %r.ref, %impl.elem3.loc44_29.1 -// CHECK:STDOUT: %Iterate.facet.loc44_29.3: %Iterate.type = facet_value constants.%R.as_type.f55, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] -// CHECK:STDOUT: %.loc44_29.3: %Iterate.type = converted constants.%R.as_type.f55, %Iterate.facet.loc44_29.3 [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] -// CHECK:STDOUT: %Iterate.facet.loc44_29.4: %Iterate.type = facet_value constants.%R.as_type.f55, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] -// CHECK:STDOUT: %.loc44_29.4: %Iterate.type = converted constants.%R.as_type.f55, %Iterate.facet.loc44_29.4 [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %Iterate.facet.loc44_29.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %.loc44_29.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_29.3 [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %Iterate.facet.loc44_29.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.06b) [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] +// CHECK:STDOUT: %.loc44_29.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_29.4 [symbolic = %Iterate.facet.loc44_29.5 (constants.%Iterate.facet.dbf)] // CHECK:STDOUT: %.loc44_29.5: %Destroy.type = converted constants.%as_type.dbb, constants.%impl.elem1.3cf [symbolic = %impl.elem1 (constants.%impl.elem1.3cf)] // CHECK:STDOUT: %.loc44_29.6: %Destroy.type = converted constants.%as_type.dbb, constants.%impl.elem1.3cf [symbolic = %impl.elem1 (constants.%impl.elem1.3cf)] // CHECK:STDOUT: %specific_impl_fn.loc44_29.2: = specific_impl_function %impl.elem3.loc44_29.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.dbf) [symbolic = %specific_impl_fn.loc44_29.5 (constants.%specific_impl_fn.fca)] // CHECK:STDOUT: %bound_method.loc44_29.4: = bound_method %r.ref, %specific_impl_fn.loc44_29.2 // CHECK:STDOUT: %.loc44_29.7: ref %Optional.f2f = temporary_storage -// CHECK:STDOUT: %.loc44_28.2: @TestIterate.%R.as_type.loc40_75.1 (%R.as_type.f55) = acquire_value %r.ref +// CHECK:STDOUT: %.loc44_28.2: @TestIterate.%R.as_type.loc40_75.1 (%R.as_type) = acquire_value %r.ref // CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.f2f to %.loc44_29.7 = call %bound_method.loc44_29.4(%.loc44_28.2, %addr.loc44) // CHECK:STDOUT: %.loc44_29.8: ref %Optional.f2f = temporary %.loc44_29.7, %Iterate.WithSelf.Next.call // CHECK:STDOUT: %.loc44_29.9: %Optional.HasValue.type.436 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.fbf] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.436 = name_ref HasValue, %.loc44_29.9 [concrete = constants.%Optional.HasValue.fbf] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc44_29.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.specific_fn.2c9] // CHECK:STDOUT: %bound_method.loc44_29.5: = bound_method %.loc44_29.8, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc44_29.10: %Optional.f2f = acquire_value %.loc44_29.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc44_29.5(%.loc44_29.10) @@ -1682,7 +1702,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc44_29.13: %Optional.Get.type.f8c = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.c12] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.f8c = name_ref Get, %.loc44_29.13 [concrete = constants.%Optional.Get.c12] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc44_29.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.specific_fn.188] // CHECK:STDOUT: %bound_method.loc44_29.6: = bound_method %.loc44_29.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc44_29.14: ref %ValueType = temporary_storage // CHECK:STDOUT: %.loc44_29.15: %Optional.f2f = acquire_value %.loc44_29.8 @@ -1757,38 +1777,38 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt.loc59: %pattern_type.e9f = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %m.ref: ref %MutableRange = name_ref m, %m -// CHECK:STDOUT: %impl.elem2.loc59: %.44e = impl_witness_access constants.%Iterate.impl_witness.ef2, element2 [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.aa8] +// CHECK:STDOUT: %impl.elem2.loc59: %.967 = impl_witness_access constants.%Iterate.impl_witness.0d5, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.21c] // CHECK:STDOUT: %bound_method.loc59_29.1: = bound_method %m.ref, %impl.elem2.loc59 -// CHECK:STDOUT: %facet_value.loc59_29.1: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.6b6, constants.%custom_witness.95581e.1, constants.%custom_witness.1f52e9.1, constants.%custom_witness.90a, constants.%custom_witness.3e8, constants.%custom_witness.444, constants.%custom_witness.95581e.2, constants.%custom_witness.1f52e9.2) [concrete = constants.%facet_value.55a] -// CHECK:STDOUT: %.loc59_29.1: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc59_29.1 [concrete = constants.%facet_value.55a] -// CHECK:STDOUT: %facet_value.loc59_29.2: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.6b6, constants.%custom_witness.95581e.1, constants.%custom_witness.1f52e9.1, constants.%custom_witness.90a, constants.%custom_witness.3e8, constants.%custom_witness.444, constants.%custom_witness.95581e.2, constants.%custom_witness.1f52e9.2) [concrete = constants.%facet_value.55a] -// CHECK:STDOUT: %.loc59_29.2: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc59_29.2 [concrete = constants.%facet_value.55a] -// CHECK:STDOUT: %specific_fn.loc59_29.1: = specific_function %impl.elem2.loc59, @R.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.55a) [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn.6f4] +// CHECK:STDOUT: %facet_value.loc59_29.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.6b6, constants.%custom_witness.95581e.1, constants.%custom_witness.90a, constants.%custom_witness.444, constants.%custom_witness.3e8, constants.%custom_witness.95581e.2) [concrete = constants.%facet_value.9f5] +// CHECK:STDOUT: %.loc59_29.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc59_29.1 [concrete = constants.%facet_value.9f5] +// CHECK:STDOUT: %facet_value.loc59_29.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.6b6, constants.%custom_witness.95581e.1, constants.%custom_witness.90a, constants.%custom_witness.444, constants.%custom_witness.3e8, constants.%custom_witness.95581e.2) [concrete = constants.%facet_value.9f5] +// CHECK:STDOUT: %.loc59_29.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc59_29.2 [concrete = constants.%facet_value.9f5] +// CHECK:STDOUT: %specific_fn.loc59_29.1: = specific_function %impl.elem2.loc59, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.9f5) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.173] // CHECK:STDOUT: %bound_method.loc59_29.2: = bound_method %m.ref, %specific_fn.loc59_29.1 // CHECK:STDOUT: %var.loc59: ref %tuple.type.829 = var_storage invalid // CHECK:STDOUT: %.loc59_28.1: %MutableRange = acquire_value %m.ref -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.call.loc59: init %tuple.type.829 to %var.loc59 = call %bound_method.loc59_29.2(%.loc59_28.1) -// CHECK:STDOUT: assign %var.loc59, %R.as_type.as.Iterate.impl.NewCursor.call.loc59 +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call.loc59: init %tuple.type.829 to %var.loc59 = call %bound_method.loc59_29.2(%.loc59_28.1) +// CHECK:STDOUT: assign %var.loc59, %T.as_type.as.Iterate.impl.NewCursor.call.loc59 // CHECK:STDOUT: br !for.next.loc59 // CHECK:STDOUT: // CHECK:STDOUT: !for.next.loc59: // CHECK:STDOUT: %addr.loc59: %ptr.d6b = addr_of %var.loc59 -// CHECK:STDOUT: %impl.elem3.loc59: %.121 = impl_witness_access constants.%Iterate.impl_witness.ef2, element3 [concrete = constants.%R.as_type.as.Iterate.impl.Next.de6] +// CHECK:STDOUT: %impl.elem3.loc59: %.ea7 = impl_witness_access constants.%Iterate.impl_witness.0d5, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.2e9] // CHECK:STDOUT: %bound_method.loc59_29.3: = bound_method %m.ref, %impl.elem3.loc59 -// CHECK:STDOUT: %facet_value.loc59_29.3: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.6b6, constants.%custom_witness.95581e.1, constants.%custom_witness.1f52e9.1, constants.%custom_witness.90a, constants.%custom_witness.3e8, constants.%custom_witness.444, constants.%custom_witness.95581e.2, constants.%custom_witness.1f52e9.2) [concrete = constants.%facet_value.55a] -// CHECK:STDOUT: %.loc59_29.3: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc59_29.3 [concrete = constants.%facet_value.55a] -// CHECK:STDOUT: %facet_value.loc59_29.4: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.6b6, constants.%custom_witness.95581e.1, constants.%custom_witness.1f52e9.1, constants.%custom_witness.90a, constants.%custom_witness.3e8, constants.%custom_witness.444, constants.%custom_witness.95581e.2, constants.%custom_witness.1f52e9.2) [concrete = constants.%facet_value.55a] -// CHECK:STDOUT: %.loc59_29.4: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc59_29.4 [concrete = constants.%facet_value.55a] -// CHECK:STDOUT: %specific_fn.loc59_29.2: = specific_function %impl.elem3.loc59, @R.as_type.as.Iterate.impl.Next(constants.%facet_value.55a) [concrete = constants.%R.as_type.as.Iterate.impl.Next.specific_fn.c86] +// CHECK:STDOUT: %facet_value.loc59_29.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.6b6, constants.%custom_witness.95581e.1, constants.%custom_witness.90a, constants.%custom_witness.444, constants.%custom_witness.3e8, constants.%custom_witness.95581e.2) [concrete = constants.%facet_value.9f5] +// CHECK:STDOUT: %.loc59_29.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc59_29.3 [concrete = constants.%facet_value.9f5] +// CHECK:STDOUT: %facet_value.loc59_29.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.6b6, constants.%custom_witness.95581e.1, constants.%custom_witness.90a, constants.%custom_witness.444, constants.%custom_witness.3e8, constants.%custom_witness.95581e.2) [concrete = constants.%facet_value.9f5] +// CHECK:STDOUT: %.loc59_29.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc59_29.4 [concrete = constants.%facet_value.9f5] +// CHECK:STDOUT: %specific_fn.loc59_29.2: = specific_function %impl.elem3.loc59, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.9f5) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.227] // CHECK:STDOUT: %bound_method.loc59_29.4: = bound_method %m.ref, %specific_fn.loc59_29.2 // CHECK:STDOUT: %.loc59_29.5: ref %Optional.f2f = temporary_storage // CHECK:STDOUT: %.loc59_28.2: %MutableRange = acquire_value %m.ref -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.call.loc59: init %Optional.f2f to %.loc59_29.5 = call %bound_method.loc59_29.4(%.loc59_28.2, %addr.loc59) -// CHECK:STDOUT: %.loc59_29.6: ref %Optional.f2f = temporary %.loc59_29.5, %R.as_type.as.Iterate.impl.Next.call.loc59 +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc59: init %Optional.f2f to %.loc59_29.5 = call %bound_method.loc59_29.4(%.loc59_28.2, %addr.loc59) +// CHECK:STDOUT: %.loc59_29.6: ref %Optional.f2f = temporary %.loc59_29.5, %T.as_type.as.Iterate.impl.Next.call.loc59 // CHECK:STDOUT: %.loc59_29.7: %Optional.HasValue.type.436 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.fbf] // CHECK:STDOUT: %HasValue.ref.loc59: %Optional.HasValue.type.436 = name_ref HasValue, %.loc59_29.7 [concrete = constants.%Optional.HasValue.fbf] // CHECK:STDOUT: %Optional.HasValue.bound.loc59: = bound_method %.loc59_29.6, %HasValue.ref.loc59 -// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc59: = specific_function %HasValue.ref.loc59, @Optional.HasValue(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc59: = specific_function %HasValue.ref.loc59, @Optional.HasValue(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.specific_fn.2c9] // CHECK:STDOUT: %bound_method.loc59_29.5: = bound_method %.loc59_29.6, %Optional.HasValue.specific_fn.loc59 // CHECK:STDOUT: %.loc59_29.8: %Optional.f2f = acquire_value %.loc59_29.6 // CHECK:STDOUT: %Optional.HasValue.call.loc59: init bool = call %bound_method.loc59_29.5(%.loc59_29.8) @@ -1800,7 +1820,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc59_29.11: %Optional.Get.type.f8c = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.c12] // CHECK:STDOUT: %Get.ref.loc59: %Optional.Get.type.f8c = name_ref Get, %.loc59_29.11 [concrete = constants.%Optional.Get.c12] // CHECK:STDOUT: %Optional.Get.bound.loc59: = bound_method %.loc59_29.6, %Get.ref.loc59 -// CHECK:STDOUT: %Optional.Get.specific_fn.loc59: = specific_function %Get.ref.loc59, @Optional.Get(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn.loc59: = specific_function %Get.ref.loc59, @Optional.Get(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.specific_fn.188] // CHECK:STDOUT: %bound_method.loc59_29.6: = bound_method %.loc59_29.6, %Optional.Get.specific_fn.loc59 // CHECK:STDOUT: %.loc59_29.12: ref %ValueType = temporary_storage // CHECK:STDOUT: %.loc59_29.13: %Optional.f2f = acquire_value %.loc59_29.6 @@ -1836,36 +1856,36 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt.loc63: %pattern_type.e9f = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %c.ref: %ConstRange = name_ref c, %c -// CHECK:STDOUT: %impl.elem2.loc63: %.71c = impl_witness_access constants.%Iterate.impl_witness.214, element2 [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.865] +// CHECK:STDOUT: %impl.elem2.loc63: %.5fd = impl_witness_access constants.%Iterate.impl_witness.bfb, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.603] // CHECK:STDOUT: %bound_method.loc63_29.1: = bound_method %c.ref, %impl.elem2.loc63 -// CHECK:STDOUT: %facet_value.loc63_29.1: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.a03, constants.%custom_witness.6e8a2e.1, constants.%custom_witness.15091a.1, constants.%custom_witness.78b, constants.%custom_witness.c55, constants.%custom_witness.746, constants.%custom_witness.6e8a2e.2, constants.%custom_witness.15091a.2) [concrete = constants.%facet_value.445] -// CHECK:STDOUT: %.loc63_29.1: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc63_29.1 [concrete = constants.%facet_value.445] -// CHECK:STDOUT: %facet_value.loc63_29.2: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.a03, constants.%custom_witness.6e8a2e.1, constants.%custom_witness.15091a.1, constants.%custom_witness.78b, constants.%custom_witness.c55, constants.%custom_witness.746, constants.%custom_witness.6e8a2e.2, constants.%custom_witness.15091a.2) [concrete = constants.%facet_value.445] -// CHECK:STDOUT: %.loc63_29.2: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc63_29.2 [concrete = constants.%facet_value.445] -// CHECK:STDOUT: %specific_fn.loc63_29.1: = specific_function %impl.elem2.loc63, @R.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.445) [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn.4ff] +// CHECK:STDOUT: %facet_value.loc63_29.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.a03, constants.%custom_witness.6e8a2e.1, constants.%custom_witness.78b, constants.%custom_witness.746, constants.%custom_witness.c55, constants.%custom_witness.6e8a2e.2) [concrete = constants.%facet_value.782] +// CHECK:STDOUT: %.loc63_29.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc63_29.1 [concrete = constants.%facet_value.782] +// CHECK:STDOUT: %facet_value.loc63_29.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.a03, constants.%custom_witness.6e8a2e.1, constants.%custom_witness.78b, constants.%custom_witness.746, constants.%custom_witness.c55, constants.%custom_witness.6e8a2e.2) [concrete = constants.%facet_value.782] +// CHECK:STDOUT: %.loc63_29.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc63_29.2 [concrete = constants.%facet_value.782] +// CHECK:STDOUT: %specific_fn.loc63_29.1: = specific_function %impl.elem2.loc63, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.782) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.c6a] // CHECK:STDOUT: %bound_method.loc63_29.2: = bound_method %c.ref, %specific_fn.loc63_29.1 // CHECK:STDOUT: %var.loc63: ref %tuple.type.99f = var_storage invalid -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.call.loc63: init %tuple.type.99f to %var.loc63 = call %bound_method.loc63_29.2(%c.ref) -// CHECK:STDOUT: assign %var.loc63, %R.as_type.as.Iterate.impl.NewCursor.call.loc63 +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call.loc63: init %tuple.type.99f to %var.loc63 = call %bound_method.loc63_29.2(%c.ref) +// CHECK:STDOUT: assign %var.loc63, %T.as_type.as.Iterate.impl.NewCursor.call.loc63 // CHECK:STDOUT: br !for.next.loc63 // CHECK:STDOUT: // CHECK:STDOUT: !for.next.loc63: // CHECK:STDOUT: %addr.loc63: %ptr.2f7 = addr_of %var.loc63 -// CHECK:STDOUT: %impl.elem3.loc63: %.7e8 = impl_witness_access constants.%Iterate.impl_witness.214, element3 [concrete = constants.%R.as_type.as.Iterate.impl.Next.31e] +// CHECK:STDOUT: %impl.elem3.loc63: %.db8 = impl_witness_access constants.%Iterate.impl_witness.bfb, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.257] // CHECK:STDOUT: %bound_method.loc63_29.3: = bound_method %c.ref, %impl.elem3.loc63 -// CHECK:STDOUT: %facet_value.loc63_29.3: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.a03, constants.%custom_witness.6e8a2e.1, constants.%custom_witness.15091a.1, constants.%custom_witness.78b, constants.%custom_witness.c55, constants.%custom_witness.746, constants.%custom_witness.6e8a2e.2, constants.%custom_witness.15091a.2) [concrete = constants.%facet_value.445] -// CHECK:STDOUT: %.loc63_29.3: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc63_29.3 [concrete = constants.%facet_value.445] -// CHECK:STDOUT: %facet_value.loc63_29.4: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.a03, constants.%custom_witness.6e8a2e.1, constants.%custom_witness.15091a.1, constants.%custom_witness.78b, constants.%custom_witness.c55, constants.%custom_witness.746, constants.%custom_witness.6e8a2e.2, constants.%custom_witness.15091a.2) [concrete = constants.%facet_value.445] -// CHECK:STDOUT: %.loc63_29.4: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc63_29.4 [concrete = constants.%facet_value.445] -// CHECK:STDOUT: %specific_fn.loc63_29.2: = specific_function %impl.elem3.loc63, @R.as_type.as.Iterate.impl.Next(constants.%facet_value.445) [concrete = constants.%R.as_type.as.Iterate.impl.Next.specific_fn.e3d] +// CHECK:STDOUT: %facet_value.loc63_29.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.a03, constants.%custom_witness.6e8a2e.1, constants.%custom_witness.78b, constants.%custom_witness.746, constants.%custom_witness.c55, constants.%custom_witness.6e8a2e.2) [concrete = constants.%facet_value.782] +// CHECK:STDOUT: %.loc63_29.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc63_29.3 [concrete = constants.%facet_value.782] +// CHECK:STDOUT: %facet_value.loc63_29.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.e7a31c.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.a03, constants.%custom_witness.6e8a2e.1, constants.%custom_witness.78b, constants.%custom_witness.746, constants.%custom_witness.c55, constants.%custom_witness.6e8a2e.2) [concrete = constants.%facet_value.782] +// CHECK:STDOUT: %.loc63_29.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc63_29.4 [concrete = constants.%facet_value.782] +// CHECK:STDOUT: %specific_fn.loc63_29.2: = specific_function %impl.elem3.loc63, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.782) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.6f5] // CHECK:STDOUT: %bound_method.loc63_29.4: = bound_method %c.ref, %specific_fn.loc63_29.2 // CHECK:STDOUT: %.loc63_29.5: ref %Optional.f2f = temporary_storage -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.call.loc63: init %Optional.f2f to %.loc63_29.5 = call %bound_method.loc63_29.4(%c.ref, %addr.loc63) -// CHECK:STDOUT: %.loc63_29.6: ref %Optional.f2f = temporary %.loc63_29.5, %R.as_type.as.Iterate.impl.Next.call.loc63 +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc63: init %Optional.f2f to %.loc63_29.5 = call %bound_method.loc63_29.4(%c.ref, %addr.loc63) +// CHECK:STDOUT: %.loc63_29.6: ref %Optional.f2f = temporary %.loc63_29.5, %T.as_type.as.Iterate.impl.Next.call.loc63 // CHECK:STDOUT: %.loc63_29.7: %Optional.HasValue.type.436 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.fbf] // CHECK:STDOUT: %HasValue.ref.loc63: %Optional.HasValue.type.436 = name_ref HasValue, %.loc63_29.7 [concrete = constants.%Optional.HasValue.fbf] // CHECK:STDOUT: %Optional.HasValue.bound.loc63: = bound_method %.loc63_29.6, %HasValue.ref.loc63 -// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc63: = specific_function %HasValue.ref.loc63, @Optional.HasValue(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc63: = specific_function %HasValue.ref.loc63, @Optional.HasValue(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.HasValue.specific_fn.2c9] // CHECK:STDOUT: %bound_method.loc63_29.5: = bound_method %.loc63_29.6, %Optional.HasValue.specific_fn.loc63 // CHECK:STDOUT: %.loc63_29.8: %Optional.f2f = acquire_value %.loc63_29.6 // CHECK:STDOUT: %Optional.HasValue.call.loc63: init bool = call %bound_method.loc63_29.5(%.loc63_29.8) @@ -1877,7 +1897,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc63_29.11: %Optional.Get.type.f8c = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.c12] // CHECK:STDOUT: %Get.ref.loc63: %Optional.Get.type.f8c = name_ref Get, %.loc63_29.11 [concrete = constants.%Optional.Get.c12] // CHECK:STDOUT: %Optional.Get.bound.loc63: = bound_method %.loc63_29.6, %Get.ref.loc63 -// CHECK:STDOUT: %Optional.Get.specific_fn.loc63: = specific_function %Get.ref.loc63, @Optional.Get(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn.loc63: = specific_function %Get.ref.loc63, @Optional.Get(constants.%OptionalStorage.facet.ada) [concrete = constants.%Optional.Get.specific_fn.188] // CHECK:STDOUT: %bound_method.loc63_29.6: = bound_method %.loc63_29.6, %Optional.Get.specific_fn.loc63 // CHECK:STDOUT: %.loc63_29.12: ref %ValueType = temporary_storage // CHECK:STDOUT: %.loc63_29.13: %Optional.f2f = acquire_value %.loc63_29.6 @@ -1912,18 +1932,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%R.0bd) { -// CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt.35d -// CHECK:STDOUT: %R.loc40_17.1 => constants.%R.0bd -// CHECK:STDOUT: %R.as_type.loc40_75.1 => constants.%R.as_type.f55 +// CHECK:STDOUT: specific @TestIterate(constants.%R) { +// CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc40_17.1 => constants.%R +// CHECK:STDOUT: %R.as_type.loc40_75.1 => constants.%R.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d2d // CHECK:STDOUT: %r.patt.loc40_73.2 => constants.%r.patt.d27 // CHECK:STDOUT: %r.param_patt.loc40_68.2 => constants.%r.param_patt.a41 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.82d) { -// CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt.35d -// CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.82d +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.43b) { +// CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.43b // CHECK:STDOUT: %R.as_type.loc40_75.1 => constants.%MutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e635 // CHECK:STDOUT: %r.patt.loc40_73.2 => constants.%r.patt.f69 @@ -1931,20 +1951,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc40 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.ef2 -// CHECK:STDOUT: %Iterate.facet.loc44_29.5 => constants.%Iterate.facet.ac1 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.625 -// CHECK:STDOUT: %.loc44_29.20 => constants.%.44e -// CHECK:STDOUT: %impl.elem2.loc44_29.2 => constants.%R.as_type.as.Iterate.impl.NewCursor.aa8 -// CHECK:STDOUT: %specific_impl_fn.loc44_29.4 => constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn.6f4 +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.0d5 +// CHECK:STDOUT: %Iterate.facet.loc44_29.5 => constants.%Iterate.facet.e34 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.150 +// CHECK:STDOUT: %.loc44_29.20 => constants.%.967 +// CHECK:STDOUT: %impl.elem2.loc44_29.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.21c +// CHECK:STDOUT: %specific_impl_fn.loc44_29.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.173 // CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.305 // CHECK:STDOUT: %as_type => constants.%tuple.type.829 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.94f // CHECK:STDOUT: %ptr => constants.%ptr.d6b -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.810 -// CHECK:STDOUT: %.loc44_29.21 => constants.%.121 -// CHECK:STDOUT: %impl.elem3.loc44_29.2 => constants.%R.as_type.as.Iterate.impl.Next.de6 -// CHECK:STDOUT: %specific_impl_fn.loc44_29.5 => constants.%R.as_type.as.Iterate.impl.Next.specific_fn.c86 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.4ec +// CHECK:STDOUT: %.loc44_29.21 => constants.%.ea7 +// CHECK:STDOUT: %impl.elem3.loc44_29.2 => constants.%T.as_type.as.Iterate.impl.Next.2e9 +// CHECK:STDOUT: %specific_impl_fn.loc44_29.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.227 // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.c89 // CHECK:STDOUT: %.loc44_29.22 => constants.%.e8a // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.8 @@ -1952,9 +1972,9 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %specific_impl_fn.loc44_29.6 => constants.%Destroy.Op.1a2547.8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.915) { -// CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt.35d -// CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.915 +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.537) { +// CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.537 // CHECK:STDOUT: %R.as_type.loc40_75.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0ba // CHECK:STDOUT: %r.patt.loc40_73.2 => constants.%r.patt.36a @@ -1962,20 +1982,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc40 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.214 -// CHECK:STDOUT: %Iterate.facet.loc44_29.5 => constants.%Iterate.facet.02a -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.3b7 -// CHECK:STDOUT: %.loc44_29.20 => constants.%.71c -// CHECK:STDOUT: %impl.elem2.loc44_29.2 => constants.%R.as_type.as.Iterate.impl.NewCursor.865 -// CHECK:STDOUT: %specific_impl_fn.loc44_29.4 => constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn.4ff +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.bfb +// CHECK:STDOUT: %Iterate.facet.loc44_29.5 => constants.%Iterate.facet.554 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.3b2 +// CHECK:STDOUT: %.loc44_29.20 => constants.%.5fd +// CHECK:STDOUT: %impl.elem2.loc44_29.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.603 +// CHECK:STDOUT: %specific_impl_fn.loc44_29.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.c6a // CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.e08 // CHECK:STDOUT: %as_type => constants.%tuple.type.99f // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.dea // CHECK:STDOUT: %ptr => constants.%ptr.2f7 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.c48 -// CHECK:STDOUT: %.loc44_29.21 => constants.%.7e8 -// CHECK:STDOUT: %impl.elem3.loc44_29.2 => constants.%R.as_type.as.Iterate.impl.Next.31e -// CHECK:STDOUT: %specific_impl_fn.loc44_29.5 => constants.%R.as_type.as.Iterate.impl.Next.specific_fn.e3d +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.8f7 +// CHECK:STDOUT: %.loc44_29.21 => constants.%.db8 +// CHECK:STDOUT: %impl.elem3.loc44_29.2 => constants.%T.as_type.as.Iterate.impl.Next.257 +// CHECK:STDOUT: %specific_impl_fn.loc44_29.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.6f5 // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.e30 // CHECK:STDOUT: %.loc44_29.22 => constants.%.987 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.9 @@ -1989,14 +2009,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Optional.Get.type.bb9: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.Get.fa1: %Optional.Get.type.bb9 = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.e9e: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.HasValue.6cd: %Optional.HasValue.type.e9e = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %DefaultOptionalStorage.d50: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.671: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.a54: %T.as_type.as.OptionalStorage.impl.Get.type.671 = struct_value () [symbolic] @@ -2009,31 +2029,30 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.type: type = facet_type <@CppRangeForIterate> [concrete] -// CHECK:STDOUT: %.Self.aed: %CppRangeForIterate.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.f6b: = lookup_impl_witness %.Self.aed, @CppRangeForIterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.b73: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element0 [symbolic_self] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.595: = lookup_impl_witness %impl.elem0.b73, @CppUnsafeDeref [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a2f: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.595, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem1.228: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element1 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate_where.type.1c721f.1: type = facet_type <@CppRangeForIterate where %impl.elem0.b73 impls @Destroy and %impl.elem0.b73 impls @Copy and %impl.elem0.b73 impls @CppUnsafeDeref and %impl.elem0.b73 impls @EqWith, @EqWith(%impl.elem1.228) and %impl.elem0.b73 impls @Inc and %impl.elem0.a2f impls @Destroy and %impl.elem0.a2f impls @Copy and %impl.elem1.228 impls @Destroy and %impl.elem1.228 impls @Copy> [concrete] -// CHECK:STDOUT: %R.39b: %CppRangeForIterate_where.type.1c721f.1 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.7e2712.2: = lookup_impl_witness %R.39b, @CppRangeForIterate [symbolic] -// CHECK:STDOUT: %impl.elem1.7a0bff.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element1 [symbolic] -// CHECK:STDOUT: %impl.elem0.73eb7f.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element0 [symbolic] -// CHECK:STDOUT: %tuple.type.3cf: type = tuple_type (%impl.elem0.73eb7f.2, %impl.elem1.7a0bff.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.69f: = lookup_impl_witness %tuple.type.3cf, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.593: %Destroy.type = facet_value %tuple.type.3cf, (%Destroy.lookup_impl_witness.69f) [symbolic] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.aa7: = lookup_impl_witness %impl.elem0.73eb7f.2, @CppUnsafeDeref [symbolic] -// CHECK:STDOUT: %impl.elem0.af7: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.aa7, element0 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.ec3: = lookup_impl_witness %impl.elem0.af7, @Destroy [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.a7a: = lookup_impl_witness %impl.elem0.af7, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.194: %facet_type = facet_value %impl.elem0.af7, (%Destroy.lookup_impl_witness.ec3, %Copy.lookup_impl_witness.a7a) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.c6a: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.49a: %R.as_type.as.Iterate.impl.Next.type.c6a = struct_value () [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.2e2: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.71b: %R.as_type.as.Iterate.impl.NewCursor.type.2e2 = struct_value () [symbolic] +// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] +// CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.50b: = lookup_impl_witness %.Self.e0b, @CppRangeForIterate [symbolic_self] +// CHECK:STDOUT: %impl.elem0.32d: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.50b, element0 [symbolic_self] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d, @CppUnsafeDeref [symbolic_self] +// CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] +// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] +// CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] +// CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] +// CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] +// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.8ae: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.064: %T.as_type.as.Iterate.impl.Next.type.8ae = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.09f: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.ae5: %T.as_type.as.Iterate.impl.NewCursor.type.09f = struct_value () [symbolic] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64.dc1: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.fb7: type = pattern_type %f64.dc1 [concrete] @@ -2043,18 +2062,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.ff3: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.d93: %Float.as.Copy.impl.Op.type.ff3 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.873: = impl_witness imports.%Copy.impl_witness_table.4e8, @Float.as.Copy.impl(%int_64) [concrete] -// CHECK:STDOUT: %facet_value.209: %facet_type = facet_value %f64.dc1, (%custom_witness.df9cc1.3, %Copy.impl_witness.873) [concrete] +// CHECK:STDOUT: %facet_value.209: %facet_type.f48 = facet_value %f64.dc1, (%custom_witness.df9cc1.3, %Copy.impl_witness.873) [concrete] // CHECK:STDOUT: %Iterate_where.type.a32: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.209> [concrete] // CHECK:STDOUT: %pattern_type.ff5: type = pattern_type %Iterate_where.type.a32 [concrete] -// CHECK:STDOUT: %R.patt.ae1: %pattern_type.ff5 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R.c6e: %Iterate_where.type.a32 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %R.as_type.087: type = facet_access_type %R.c6e [symbolic] -// CHECK:STDOUT: %pattern_type.3d7: type = pattern_type %R.as_type.087 [symbolic] +// CHECK:STDOUT: %R.patt: %pattern_type.ff5 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.a32 = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] +// CHECK:STDOUT: %pattern_type.3d7: type = pattern_type %R.as_type [symbolic] // CHECK:STDOUT: %r.param_patt.03a: %pattern_type.3d7 = value_param_pattern [symbolic] // CHECK:STDOUT: %r.patt.b86: %pattern_type.3d7 = at_binding_pattern r, %r.param_patt.03a [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.fb7 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.93c: = lookup_impl_witness %R.c6e, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.94d: %Iterate.type = facet_value %R.as_type.087, (%Iterate.lookup_impl_witness.93c) [symbolic] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.93c: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.94d: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.93c) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.4c7: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.94d) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.Next.type.275: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.94d) [symbolic] // CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.4c7, %Iterate.facet.94d [symbolic] @@ -2078,8 +2097,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %MaybeUnformed.b7e: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.339) [concrete] // CHECK:STDOUT: %.cc0: type = maybe_unformed_type %f64.dc1 [concrete] // CHECK:STDOUT: %struct_type.value.has_value.ad9: type = struct_type {.value: %MaybeUnformed.b7e, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.53b, @Optional.HasValue(%OptionalStorage.facet.c07) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.5f1, @Optional.Get(%OptionalStorage.facet.c07) [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.30e: = specific_function %Optional.HasValue.53b, @Optional.HasValue(%OptionalStorage.facet.c07) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.84c: = specific_function %Optional.Get.5f1, @Optional.Get(%OptionalStorage.facet.c07) [concrete] // CHECK:STDOUT: %AddAssignWith.type.ff9: type = facet_type <@AddAssignWith, @AddAssignWith(%f64.dc1)> [concrete] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.type.fdd: type = fn_type @Float.as.AddAssignWith.impl.Op, @Float.as.AddAssignWith.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.430: %Float.as.AddAssignWith.impl.Op.type.fdd = struct_value () [symbolic] @@ -2096,7 +2115,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Destroy.WithSelf.Op.type.41f: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%impl.elem1.7a9) [symbolic] // CHECK:STDOUT: %.148: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.41f, %impl.elem1.7a9 [symbolic] // CHECK:STDOUT: %impl.elem0.461: %.148 = impl_witness_access %Destroy.lookup_impl_witness.def, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.095: = specific_impl_function %impl.elem0.461, @Destroy.WithSelf.Op(%impl.elem1.7a9) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.095b: = specific_impl_function %impl.elem0.461, @Destroy.WithSelf.Op(%impl.elem1.7a9) [symbolic] // CHECK:STDOUT: %ConstRange: type = class_type @ConstRange [concrete] // CHECK:STDOUT: %pattern_type.025: type = pattern_type %ConstRange [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -2115,37 +2134,34 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %custom_witness.213: = custom_witness (%Iterator.Op.583fda.2), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.ac7e09.3: type = fn_type @Iterator.Op.3 [concrete] // CHECK:STDOUT: %Iterator.Op.583fda.3: %Iterator.Op.type.ac7e09.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.a31: = custom_witness (%Iterator.Op.583fda.3), @Copy [concrete] +// CHECK:STDOUT: %custom_witness.393: = custom_witness (%Iterator.Op.583fda.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.821: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Iterator) [concrete] -// CHECK:STDOUT: %Iterator.Op.type.ac7e09.4: type = fn_type @Iterator.Op.4 [concrete] -// CHECK:STDOUT: %Iterator.Op.583fda.4: %Iterator.Op.type.ac7e09.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.393: = custom_witness (%Iterator.Op.583fda.4), @Inc [concrete] -// CHECK:STDOUT: %facet_value.c05: %CppRangeForIterate_where.type.1c721f.1 = facet_value %ConstRange, (%custom_witness.df9cc1.3, %Copy.impl_witness.873, %custom_witness.5d5, %custom_witness.213, %custom_witness.a31, %custom_witness.994, %custom_witness.821, %custom_witness.393) [concrete] +// CHECK:STDOUT: %facet_value.f27: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.df9cc1.3, %Copy.impl_witness.873, %custom_witness.5d5, %custom_witness.213, %custom_witness.994, %custom_witness.393, %custom_witness.821) [concrete] // CHECK:STDOUT: %tuple.type.005: type = tuple_type (%Iterator, %Iterator) [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.10: type = fn_type @Destroy.Op.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.10: %Destroy.Op.type.1d8f74.10 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.10: = custom_witness (%Destroy.Op.1a2547.10), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.40b: %Destroy.type = facet_value %tuple.type.005, (%custom_witness.df9cc1.10) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.939: = impl_witness imports.%Iterate.impl_witness_table.cd6, @R.as_type.as.Iterate.impl(%facet_value.c05) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.bb4: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%facet_value.c05) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.945: %R.as_type.as.Iterate.impl.NewCursor.type.bb4 = struct_value () [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.e75: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%facet_value.c05) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.3b9: %R.as_type.as.Iterate.impl.Next.type.e75 = struct_value () [concrete] -// CHECK:STDOUT: %Iterate.facet.10d: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.939) [concrete] -// CHECK:STDOUT: %facet_value.098: %Iterate_where.type.a32 = facet_value %ConstRange, (%Iterate.impl_witness.939) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.ec7: = impl_witness imports.%Iterate.impl_witness_table.314, @T.as_type.as.Iterate.impl(%facet_value.f27) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.711: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.f27) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.063: %T.as_type.as.Iterate.impl.NewCursor.type.711 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.109: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.f27) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.5a5: %T.as_type.as.Iterate.impl.Next.type.109 = struct_value () [concrete] +// CHECK:STDOUT: %Iterate.facet.2c9: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.ec7) [concrete] +// CHECK:STDOUT: %facet_value.656: %Iterate_where.type.a32 = facet_value %ConstRange, (%Iterate.impl_witness.ec7) [concrete] // CHECK:STDOUT: %r.param_patt.a73: %pattern_type.025 = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.0e2: %pattern_type.025 = at_binding_pattern r, %r.param_patt.a73 [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.dbb: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.10d) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.e39: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.10d) [concrete] -// CHECK:STDOUT: %.639: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.dbb, %Iterate.facet.10d [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %R.as_type.as.Iterate.impl.NewCursor.945, @R.as_type.as.Iterate.impl.NewCursor(%facet_value.c05) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.174: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.2c9) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.554: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.2c9) [concrete] +// CHECK:STDOUT: %.f26: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.174, %Iterate.facet.2c9 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.063, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.f27) [concrete] // CHECK:STDOUT: %ptr.d1a: type = ptr_type %tuple.type.005 [concrete] -// CHECK:STDOUT: %.eba: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.e39, %Iterate.facet.10d [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %R.as_type.as.Iterate.impl.Next.3b9, @R.as_type.as.Iterate.impl.Next(%facet_value.c05) [concrete] +// CHECK:STDOUT: %.968: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.554, %Iterate.facet.2c9 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.5a5, @T.as_type.as.Iterate.impl.Next(%facet_value.f27) [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.117: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.40b) [concrete] // CHECK:STDOUT: %.5a4: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.117, %Destroy.facet.40b [concrete] // CHECK:STDOUT: %complete_type.320: = complete_type_witness %tuple.type.005 [concrete] @@ -2161,11 +2177,11 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.e31: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.671) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.a54)] // CHECK:STDOUT: %Core.import_ref.cea = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded // CHECK:STDOUT: %OptionalStorage.impl_witness_table.199 = impl_witness_table (%Core.import_ref.0c6, %Core.import_ref.6d6, %Core.import_ref.6f3, %Core.import_ref.af2, %Core.import_ref.e31, %Core.import_ref.cea), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.301: %facet_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.194)] -// CHECK:STDOUT: %Core.import_ref.89f: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.593)] -// CHECK:STDOUT: %Core.import_ref.f6b: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.2e2) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.71b)] -// CHECK:STDOUT: %Core.import_ref.630: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.c6a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.49a)] -// CHECK:STDOUT: %Iterate.impl_witness_table.cd6 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.f6b, %Core.import_ref.630), @R.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] +// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.6fc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.09f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.ae5)] +// CHECK:STDOUT: %Core.import_ref.8cc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.8ae) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.064)] +// CHECK:STDOUT: %Iterate.impl_witness_table.314 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.6fc, %Core.import_ref.8cc), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e69: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.ff3) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.d93)] // CHECK:STDOUT: %Copy.impl_witness_table.4e8 = impl_witness_table (%Core.import_ref.e69), @Float.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.cb3: @Float.as.AddAssignWith.impl.%Float.as.AddAssignWith.impl.Op.type (%Float.as.AddAssignWith.impl.Op.type.fdd) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.AddAssignWith.impl.%Float.as.AddAssignWith.impl.Op (constants.%Float.as.AddAssignWith.impl.Op.430)] @@ -2193,21 +2209,21 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc24_19.21: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %impl.elem1 [symbolic = %.loc24_19.21 (constants.%.148)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.def)] // CHECK:STDOUT: %impl.elem0.loc24_19.2: @TestIterate.%.loc24_19.21 (%.148) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc24_19.2 (constants.%impl.elem0.461)] -// CHECK:STDOUT: %specific_impl_fn.loc24_19.6: = specific_impl_function %impl.elem0.loc24_19.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc24_19.6 (constants.%specific_impl_fn.095)] +// CHECK:STDOUT: %specific_impl_fn.loc24_19.6: = specific_impl_function %impl.elem0.loc24_19.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc24_19.6 (constants.%specific_impl_fn.095b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc20_61.1 (%R.as_type.087)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc20_61.1 (%R.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.fb7 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc20_61.1 (%R.as_type.087) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc20_61.1 (%R.as_type) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc24_19.1: @TestIterate.%.loc24_19.19 (%.a62) = impl_witness_access constants.%Iterate.lookup_impl_witness.93c, element2 [symbolic = %impl.elem2.loc24_19.2 (constants.%impl.elem2.c7b)] // CHECK:STDOUT: %bound_method.loc24_19.1: = bound_method %r.ref, %impl.elem2.loc24_19.1 -// CHECK:STDOUT: %Iterate.facet.loc24_19.1: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %.loc24_19.1: %Iterate.type = converted constants.%R.as_type.087, %Iterate.facet.loc24_19.1 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %Iterate.facet.loc24_19.2: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %.loc24_19.2: %Iterate.type = converted constants.%R.as_type.087, %Iterate.facet.loc24_19.2 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %.loc24_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.1 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %.loc24_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.2 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] // CHECK:STDOUT: %specific_impl_fn.loc24_19.1: = specific_impl_function %impl.elem2.loc24_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.94d) [symbolic = %specific_impl_fn.loc24_19.4 (constants.%specific_impl_fn.1b8)] // CHECK:STDOUT: %bound_method.loc24_19.2: = bound_method %r.ref, %specific_impl_fn.loc24_19.1 // CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.8e4) = var_storage invalid @@ -2219,10 +2235,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %addr: @TestIterate.%ptr (%ptr.bac) = addr_of %var // CHECK:STDOUT: %impl.elem3.loc24_19.1: @TestIterate.%.loc24_19.20 (%.a06) = impl_witness_access constants.%Iterate.lookup_impl_witness.93c, element3 [symbolic = %impl.elem3.loc24_19.2 (constants.%impl.elem3.7bd)] // CHECK:STDOUT: %bound_method.loc24_19.3: = bound_method %r.ref, %impl.elem3.loc24_19.1 -// CHECK:STDOUT: %Iterate.facet.loc24_19.3: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %.loc24_19.3: %Iterate.type = converted constants.%R.as_type.087, %Iterate.facet.loc24_19.3 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %Iterate.facet.loc24_19.4: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %.loc24_19.4: %Iterate.type = converted constants.%R.as_type.087, %Iterate.facet.loc24_19.4 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %.loc24_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.3 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %.loc24_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.4 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.94d)] // CHECK:STDOUT: %.loc24_19.5: %Destroy.type = converted constants.%as_type.8e4, constants.%impl.elem1.7a9 [symbolic = %impl.elem1 (constants.%impl.elem1.7a9)] // CHECK:STDOUT: %.loc24_19.6: %Destroy.type = converted constants.%as_type.8e4, constants.%impl.elem1.7a9 [symbolic = %impl.elem1 (constants.%impl.elem1.7a9)] // CHECK:STDOUT: %specific_impl_fn.loc24_19.2: = specific_impl_function %impl.elem3.loc24_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.94d) [symbolic = %specific_impl_fn.loc24_19.5 (constants.%specific_impl_fn.666)] @@ -2233,7 +2249,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc24_19.9: %Optional.HasValue.type.c09 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.53b] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.c09 = name_ref HasValue, %.loc24_19.9 [concrete = constants.%Optional.HasValue.53b] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc24_19.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.specific_fn.30e] // CHECK:STDOUT: %bound_method.loc24_19.5: = bound_method %.loc24_19.8, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc24_19.10: %Optional.c42 = acquire_value %.loc24_19.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc24_19.5(%.loc24_19.10) @@ -2245,7 +2261,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc24_19.13: %Optional.Get.type.4f6 = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.5f1] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.4f6 = name_ref Get, %.loc24_19.13 [concrete = constants.%Optional.Get.5f1] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc24_19.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.specific_fn.84c] // CHECK:STDOUT: %bound_method.loc24_19.6: = bound_method %.loc24_19.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc24_19.14: %Optional.c42 = acquire_value %.loc24_19.8 // CHECK:STDOUT: %Optional.Get.call: init %f64.dc1 = call %bound_method.loc24_19.6(%.loc24_19.14) @@ -2271,7 +2287,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %bound_method.loc24_19.7: = bound_method %var, %impl.elem0.loc24_19.1 // CHECK:STDOUT: %.loc24_19.17: %Destroy.type = converted constants.%as_type.8e4, constants.%impl.elem1.7a9 [symbolic = %impl.elem1 (constants.%impl.elem1.7a9)] // CHECK:STDOUT: %.loc24_19.18: %Destroy.type = converted constants.%as_type.8e4, constants.%impl.elem1.7a9 [symbolic = %impl.elem1 (constants.%impl.elem1.7a9)] -// CHECK:STDOUT: %specific_impl_fn.loc24_19.3: = specific_impl_function %impl.elem0.loc24_19.1, @Destroy.WithSelf.Op(constants.%impl.elem1.7a9) [symbolic = %specific_impl_fn.loc24_19.6 (constants.%specific_impl_fn.095)] +// CHECK:STDOUT: %specific_impl_fn.loc24_19.3: = specific_impl_function %impl.elem0.loc24_19.1, @Destroy.WithSelf.Op(constants.%impl.elem1.7a9) [symbolic = %specific_impl_fn.loc24_19.6 (constants.%specific_impl_fn.095b)] // CHECK:STDOUT: %bound_method.loc24_19.8: = bound_method %var, %specific_impl_fn.loc24_19.3 // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc24_19.8(%var) // CHECK:STDOUT: @@ -2312,36 +2328,36 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.fb7 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %c.ref: %ConstRange = name_ref c, %c -// CHECK:STDOUT: %impl.elem2: %.639 = impl_witness_access constants.%Iterate.impl_witness.939, element2 [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.945] +// CHECK:STDOUT: %impl.elem2: %.f26 = impl_witness_access constants.%Iterate.impl_witness.ec7, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.063] // CHECK:STDOUT: %bound_method.loc38_19.1: = bound_method %c.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc38_19.1: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.5d5, constants.%custom_witness.213, constants.%custom_witness.a31, constants.%custom_witness.994, constants.%custom_witness.821, constants.%custom_witness.393) [concrete = constants.%facet_value.c05] -// CHECK:STDOUT: %.loc38_19.1: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc38_19.1 [concrete = constants.%facet_value.c05] -// CHECK:STDOUT: %facet_value.loc38_19.2: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.5d5, constants.%custom_witness.213, constants.%custom_witness.a31, constants.%custom_witness.994, constants.%custom_witness.821, constants.%custom_witness.393) [concrete = constants.%facet_value.c05] -// CHECK:STDOUT: %.loc38_19.2: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc38_19.2 [concrete = constants.%facet_value.c05] -// CHECK:STDOUT: %specific_fn.loc38_19.1: = specific_function %impl.elem2, @R.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.c05) [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc38_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.5d5, constants.%custom_witness.213, constants.%custom_witness.994, constants.%custom_witness.393, constants.%custom_witness.821) [concrete = constants.%facet_value.f27] +// CHECK:STDOUT: %.loc38_19.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.1 [concrete = constants.%facet_value.f27] +// CHECK:STDOUT: %facet_value.loc38_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.5d5, constants.%custom_witness.213, constants.%custom_witness.994, constants.%custom_witness.393, constants.%custom_witness.821) [concrete = constants.%facet_value.f27] +// CHECK:STDOUT: %.loc38_19.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.2 [concrete = constants.%facet_value.f27] +// CHECK:STDOUT: %specific_fn.loc38_19.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.f27) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc38_19.2: = bound_method %c.ref, %specific_fn.loc38_19.1 // CHECK:STDOUT: %var: ref %tuple.type.005 = var_storage invalid -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.005 to %var = call %bound_method.loc38_19.2(%c.ref) -// CHECK:STDOUT: assign %var, %R.as_type.as.Iterate.impl.NewCursor.call +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.005 to %var = call %bound_method.loc38_19.2(%c.ref) +// CHECK:STDOUT: assign %var, %T.as_type.as.Iterate.impl.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr: %ptr.d1a = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.eba = impl_witness_access constants.%Iterate.impl_witness.939, element3 [concrete = constants.%R.as_type.as.Iterate.impl.Next.3b9] +// CHECK:STDOUT: %impl.elem3: %.968 = impl_witness_access constants.%Iterate.impl_witness.ec7, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.5a5] // CHECK:STDOUT: %bound_method.loc38_19.3: = bound_method %c.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc38_19.3: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.5d5, constants.%custom_witness.213, constants.%custom_witness.a31, constants.%custom_witness.994, constants.%custom_witness.821, constants.%custom_witness.393) [concrete = constants.%facet_value.c05] -// CHECK:STDOUT: %.loc38_19.3: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc38_19.3 [concrete = constants.%facet_value.c05] -// CHECK:STDOUT: %facet_value.loc38_19.4: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.5d5, constants.%custom_witness.213, constants.%custom_witness.a31, constants.%custom_witness.994, constants.%custom_witness.821, constants.%custom_witness.393) [concrete = constants.%facet_value.c05] -// CHECK:STDOUT: %.loc38_19.4: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc38_19.4 [concrete = constants.%facet_value.c05] -// CHECK:STDOUT: %specific_fn.loc38_19.2: = specific_function %impl.elem3, @R.as_type.as.Iterate.impl.Next(constants.%facet_value.c05) [concrete = constants.%R.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc38_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.5d5, constants.%custom_witness.213, constants.%custom_witness.994, constants.%custom_witness.393, constants.%custom_witness.821) [concrete = constants.%facet_value.f27] +// CHECK:STDOUT: %.loc38_19.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.3 [concrete = constants.%facet_value.f27] +// CHECK:STDOUT: %facet_value.loc38_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.5d5, constants.%custom_witness.213, constants.%custom_witness.994, constants.%custom_witness.393, constants.%custom_witness.821) [concrete = constants.%facet_value.f27] +// CHECK:STDOUT: %.loc38_19.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.4 [concrete = constants.%facet_value.f27] +// CHECK:STDOUT: %specific_fn.loc38_19.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.f27) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc38_19.4: = bound_method %c.ref, %specific_fn.loc38_19.2 // CHECK:STDOUT: %.loc38_19.5: ref %Optional.c42 = temporary_storage -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.call: init %Optional.c42 to %.loc38_19.5 = call %bound_method.loc38_19.4(%c.ref, %addr) -// CHECK:STDOUT: %.loc38_19.6: ref %Optional.c42 = temporary %.loc38_19.5, %R.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.c42 to %.loc38_19.5 = call %bound_method.loc38_19.4(%c.ref, %addr) +// CHECK:STDOUT: %.loc38_19.6: ref %Optional.c42 = temporary %.loc38_19.5, %T.as_type.as.Iterate.impl.Next.call // CHECK:STDOUT: %.loc38_19.7: %Optional.HasValue.type.c09 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.53b] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.c09 = name_ref HasValue, %.loc38_19.7 [concrete = constants.%Optional.HasValue.53b] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc38_19.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.specific_fn.30e] // CHECK:STDOUT: %bound_method.loc38_19.5: = bound_method %.loc38_19.6, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc38_19.8: %Optional.c42 = acquire_value %.loc38_19.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc38_19.5(%.loc38_19.8) @@ -2353,7 +2369,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc38_19.11: %Optional.Get.type.4f6 = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.5f1] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.4f6 = name_ref Get, %.loc38_19.11 [concrete = constants.%Optional.Get.5f1] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc38_19.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.specific_fn.84c] // CHECK:STDOUT: %bound_method.loc38_19.6: = bound_method %.loc38_19.6, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc38_19.12: %Optional.c42 = acquire_value %.loc38_19.6 // CHECK:STDOUT: %Optional.Get.call: init %f64.dc1 = call %bound_method.loc38_19.6(%.loc38_19.12) @@ -2380,18 +2396,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%R.c6e) { -// CHECK:STDOUT: %R.patt.loc20_17.2 => constants.%R.patt.ae1 -// CHECK:STDOUT: %R.loc20_17.1 => constants.%R.c6e -// CHECK:STDOUT: %R.as_type.loc20_61.1 => constants.%R.as_type.087 +// CHECK:STDOUT: specific @TestIterate(constants.%R) { +// CHECK:STDOUT: %R.patt.loc20_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc20_17.1 => constants.%R +// CHECK:STDOUT: %R.as_type.loc20_61.1 => constants.%R.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d7 // CHECK:STDOUT: %r.param_patt.loc20_59.2 => constants.%r.param_patt.03a // CHECK:STDOUT: %r.patt.loc20_59.2 => constants.%r.patt.b86 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.098) { -// CHECK:STDOUT: %R.patt.loc20_17.2 => constants.%R.patt.ae1 -// CHECK:STDOUT: %R.loc20_17.1 => constants.%facet_value.098 +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.656) { +// CHECK:STDOUT: %R.patt.loc20_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc20_17.1 => constants.%facet_value.656 // CHECK:STDOUT: %R.as_type.loc20_61.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.025 // CHECK:STDOUT: %r.param_patt.loc20_59.2 => constants.%r.param_patt.a73 @@ -2399,20 +2415,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc20 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.939 -// CHECK:STDOUT: %Iterate.facet.loc24_19.5 => constants.%Iterate.facet.10d -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.dbb -// CHECK:STDOUT: %.loc24_19.19 => constants.%.639 -// CHECK:STDOUT: %impl.elem2.loc24_19.2 => constants.%R.as_type.as.Iterate.impl.NewCursor.945 -// CHECK:STDOUT: %specific_impl_fn.loc24_19.4 => constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.ec7 +// CHECK:STDOUT: %Iterate.facet.loc24_19.5 => constants.%Iterate.facet.2c9 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.174 +// CHECK:STDOUT: %.loc24_19.19 => constants.%.f26 +// CHECK:STDOUT: %impl.elem2.loc24_19.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.063 +// CHECK:STDOUT: %specific_impl_fn.loc24_19.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn // CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.40b // CHECK:STDOUT: %as_type => constants.%tuple.type.005 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.320 // CHECK:STDOUT: %ptr => constants.%ptr.d1a -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.e39 -// CHECK:STDOUT: %.loc24_19.20 => constants.%.eba -// CHECK:STDOUT: %impl.elem3.loc24_19.2 => constants.%R.as_type.as.Iterate.impl.Next.3b9 -// CHECK:STDOUT: %specific_impl_fn.loc24_19.5 => constants.%R.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.554 +// CHECK:STDOUT: %.loc24_19.20 => constants.%.968 +// CHECK:STDOUT: %impl.elem3.loc24_19.2 => constants.%T.as_type.as.Iterate.impl.Next.5a5 +// CHECK:STDOUT: %specific_impl_fn.loc24_19.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.117 // CHECK:STDOUT: %.loc24_19.21 => constants.%.5a4 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.10 @@ -2426,14 +2442,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Optional.Get.type.bb9: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.Get.fa1: %Optional.Get.type.bb9 = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.e9e: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.HasValue.6cd: %Optional.HasValue.type.e9e = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %DefaultOptionalStorage.d50: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.671: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.a54: %T.as_type.as.OptionalStorage.impl.Get.type.671 = struct_value () [symbolic] @@ -2446,31 +2462,30 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.type: type = facet_type <@CppRangeForIterate> [concrete] -// CHECK:STDOUT: %.Self.aed: %CppRangeForIterate.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.f6b: = lookup_impl_witness %.Self.aed, @CppRangeForIterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.b73: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element0 [symbolic_self] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.595: = lookup_impl_witness %impl.elem0.b73, @CppUnsafeDeref [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a2f: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.595, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem1.228: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element1 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate_where.type.1c721f.1: type = facet_type <@CppRangeForIterate where %impl.elem0.b73 impls @Destroy and %impl.elem0.b73 impls @Copy and %impl.elem0.b73 impls @CppUnsafeDeref and %impl.elem0.b73 impls @EqWith, @EqWith(%impl.elem1.228) and %impl.elem0.b73 impls @Inc and %impl.elem0.a2f impls @Destroy and %impl.elem0.a2f impls @Copy and %impl.elem1.228 impls @Destroy and %impl.elem1.228 impls @Copy> [concrete] -// CHECK:STDOUT: %R.39b: %CppRangeForIterate_where.type.1c721f.1 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.7e2712.2: = lookup_impl_witness %R.39b, @CppRangeForIterate [symbolic] -// CHECK:STDOUT: %impl.elem1.7a0bff.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element1 [symbolic] -// CHECK:STDOUT: %impl.elem0.73eb7f.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element0 [symbolic] -// CHECK:STDOUT: %tuple.type.3cf: type = tuple_type (%impl.elem0.73eb7f.2, %impl.elem1.7a0bff.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.69f: = lookup_impl_witness %tuple.type.3cf, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.593: %Destroy.type = facet_value %tuple.type.3cf, (%Destroy.lookup_impl_witness.69f) [symbolic] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.aa7: = lookup_impl_witness %impl.elem0.73eb7f.2, @CppUnsafeDeref [symbolic] -// CHECK:STDOUT: %impl.elem0.af7: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.aa7, element0 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.ec3: = lookup_impl_witness %impl.elem0.af7, @Destroy [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.a7a: = lookup_impl_witness %impl.elem0.af7, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.194: %facet_type = facet_value %impl.elem0.af7, (%Destroy.lookup_impl_witness.ec3, %Copy.lookup_impl_witness.a7a) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.c6a: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.49a: %R.as_type.as.Iterate.impl.Next.type.c6a = struct_value () [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.2e2: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.71b: %R.as_type.as.Iterate.impl.NewCursor.type.2e2 = struct_value () [symbolic] +// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] +// CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.50b: = lookup_impl_witness %.Self.e0b, @CppRangeForIterate [symbolic_self] +// CHECK:STDOUT: %impl.elem0.32d: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.50b, element0 [symbolic_self] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d, @CppUnsafeDeref [symbolic_self] +// CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] +// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] +// CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] +// CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] +// CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] +// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.8ae: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.064: %T.as_type.as.Iterate.impl.Next.type.8ae = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.09f: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.ae5: %T.as_type.as.Iterate.impl.NewCursor.type.09f = struct_value () [symbolic] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64.dc1: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.fb7: type = pattern_type %f64.dc1 [concrete] @@ -2480,18 +2495,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.ff3: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.d93: %Float.as.Copy.impl.Op.type.ff3 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.873: = impl_witness imports.%Copy.impl_witness_table.4e8, @Float.as.Copy.impl(%int_64) [concrete] -// CHECK:STDOUT: %facet_value.209: %facet_type = facet_value %f64.dc1, (%custom_witness.df9cc1.3, %Copy.impl_witness.873) [concrete] +// CHECK:STDOUT: %facet_value.209: %facet_type.f48 = facet_value %f64.dc1, (%custom_witness.df9cc1.3, %Copy.impl_witness.873) [concrete] // CHECK:STDOUT: %Iterate_where.type.a32: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.209> [concrete] // CHECK:STDOUT: %pattern_type.ff5: type = pattern_type %Iterate_where.type.a32 [concrete] -// CHECK:STDOUT: %R.patt.ae1: %pattern_type.ff5 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R.c6e: %Iterate_where.type.a32 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %R.as_type.087: type = facet_access_type %R.c6e [symbolic] -// CHECK:STDOUT: %pattern_type.3d7: type = pattern_type %R.as_type.087 [symbolic] +// CHECK:STDOUT: %R.patt: %pattern_type.ff5 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.a32 = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] +// CHECK:STDOUT: %pattern_type.3d7: type = pattern_type %R.as_type [symbolic] // CHECK:STDOUT: %r.param_patt.03a: %pattern_type.3d7 = value_param_pattern [symbolic] // CHECK:STDOUT: %r.patt.b86: %pattern_type.3d7 = at_binding_pattern r, %r.param_patt.03a [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.fb7 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.93c: = lookup_impl_witness %R.c6e, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.94d: %Iterate.type = facet_value %R.as_type.087, (%Iterate.lookup_impl_witness.93c) [symbolic] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.93c: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.94d: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.93c) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.4c7: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.94d) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.Next.type.275: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.94d) [symbolic] // CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.4c7, %Iterate.facet.94d [symbolic] @@ -2515,8 +2530,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %MaybeUnformed.b7e: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.339) [concrete] // CHECK:STDOUT: %.cc0: type = maybe_unformed_type %f64.dc1 [concrete] // CHECK:STDOUT: %struct_type.value.has_value.ad9: type = struct_type {.value: %MaybeUnformed.b7e, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.53b, @Optional.HasValue(%OptionalStorage.facet.c07) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.5f1, @Optional.Get(%OptionalStorage.facet.c07) [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.30e: = specific_function %Optional.HasValue.53b, @Optional.HasValue(%OptionalStorage.facet.c07) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.84c: = specific_function %Optional.Get.5f1, @Optional.Get(%OptionalStorage.facet.c07) [concrete] // CHECK:STDOUT: %AddAssignWith.type.ff9: type = facet_type <@AddAssignWith, @AddAssignWith(%f64.dc1)> [concrete] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.type.fdd: type = fn_type @Float.as.AddAssignWith.impl.Op, @Float.as.AddAssignWith.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.430: %Float.as.AddAssignWith.impl.Op.type.fdd = struct_value () [symbolic] @@ -2533,7 +2548,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Destroy.WithSelf.Op.type.41f: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%impl.elem1.7a9) [symbolic] // CHECK:STDOUT: %.148: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.41f, %impl.elem1.7a9 [symbolic] // CHECK:STDOUT: %impl.elem0.461: %.148 = impl_witness_access %Destroy.lookup_impl_witness.def, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.095: = specific_impl_function %impl.elem0.461, @Destroy.WithSelf.Op(%impl.elem1.7a9) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.095b: = specific_impl_function %impl.elem0.461, @Destroy.WithSelf.Op(%impl.elem1.7a9) [symbolic] // CHECK:STDOUT: %MutableRange: type = class_type @MutableRange [concrete] // CHECK:STDOUT: %pattern_type.992: type = pattern_type %MutableRange [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -2552,37 +2567,34 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %custom_witness.c08: = custom_witness (%Iterator.Op.ac6aad.2), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.b9731e.3: type = fn_type @Iterator.Op.3 [concrete] // CHECK:STDOUT: %Iterator.Op.ac6aad.3: %Iterator.Op.type.b9731e.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.29f: = custom_witness (%Iterator.Op.ac6aad.3), @Copy [concrete] +// CHECK:STDOUT: %custom_witness.491: = custom_witness (%Iterator.Op.ac6aad.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.ed8: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Iterator) [concrete] -// CHECK:STDOUT: %Iterator.Op.type.b9731e.4: type = fn_type @Iterator.Op.4 [concrete] -// CHECK:STDOUT: %Iterator.Op.ac6aad.4: %Iterator.Op.type.b9731e.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.491: = custom_witness (%Iterator.Op.ac6aad.4), @Inc [concrete] -// CHECK:STDOUT: %facet_value.85f: %CppRangeForIterate_where.type.1c721f.1 = facet_value %MutableRange, (%custom_witness.df9cc1.3, %Copy.impl_witness.873, %custom_witness.902, %custom_witness.c08, %custom_witness.29f, %custom_witness.05b, %custom_witness.ed8, %custom_witness.491) [concrete] +// CHECK:STDOUT: %facet_value.cb9: %CppRange_where.type.d682d6.1 = facet_value %MutableRange, (%custom_witness.df9cc1.3, %Copy.impl_witness.873, %custom_witness.902, %custom_witness.c08, %custom_witness.05b, %custom_witness.491, %custom_witness.ed8) [concrete] // CHECK:STDOUT: %tuple.type.dd0: type = tuple_type (%Iterator, %Iterator) [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.10: type = fn_type @Destroy.Op.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.10: %Destroy.Op.type.1d8f74.10 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.10: = custom_witness (%Destroy.Op.1a2547.10), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.e1e: %Destroy.type = facet_value %tuple.type.dd0, (%custom_witness.df9cc1.10) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.ce4: = impl_witness imports.%Iterate.impl_witness_table.cd6, @R.as_type.as.Iterate.impl(%facet_value.85f) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.5d3: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%facet_value.85f) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.bc5: %R.as_type.as.Iterate.impl.NewCursor.type.5d3 = struct_value () [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.74e: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%facet_value.85f) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.8ab: %R.as_type.as.Iterate.impl.Next.type.74e = struct_value () [concrete] -// CHECK:STDOUT: %Iterate.facet.2f3: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.ce4) [concrete] -// CHECK:STDOUT: %facet_value.a73: %Iterate_where.type.a32 = facet_value %MutableRange, (%Iterate.impl_witness.ce4) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.da2: = impl_witness imports.%Iterate.impl_witness_table.314, @T.as_type.as.Iterate.impl(%facet_value.cb9) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.926: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.cb9) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.b0d: %T.as_type.as.Iterate.impl.NewCursor.type.926 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.cc7: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.cb9) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.055: %T.as_type.as.Iterate.impl.Next.type.cc7 = struct_value () [concrete] +// CHECK:STDOUT: %Iterate.facet.4ef: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.da2) [concrete] +// CHECK:STDOUT: %facet_value.c2b: %Iterate_where.type.a32 = facet_value %MutableRange, (%Iterate.impl_witness.da2) [concrete] // CHECK:STDOUT: %r.param_patt.aeb: %pattern_type.992 = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.fe7: %pattern_type.992 = at_binding_pattern r, %r.param_patt.aeb [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.3d1: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.2f3) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.d94: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.2f3) [concrete] -// CHECK:STDOUT: %.9ef: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.3d1, %Iterate.facet.2f3 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %R.as_type.as.Iterate.impl.NewCursor.bc5, @R.as_type.as.Iterate.impl.NewCursor(%facet_value.85f) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.4ae: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.4ef) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.dc8: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.4ef) [concrete] +// CHECK:STDOUT: %.4eb: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.4ae, %Iterate.facet.4ef [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.b0d, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.cb9) [concrete] // CHECK:STDOUT: %ptr.a4f: type = ptr_type %tuple.type.dd0 [concrete] -// CHECK:STDOUT: %.ade: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.d94, %Iterate.facet.2f3 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %R.as_type.as.Iterate.impl.Next.8ab, @R.as_type.as.Iterate.impl.Next(%facet_value.85f) [concrete] +// CHECK:STDOUT: %.0ef: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.dc8, %Iterate.facet.4ef [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.055, @T.as_type.as.Iterate.impl.Next(%facet_value.cb9) [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.452: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.e1e) [concrete] // CHECK:STDOUT: %.899: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.452, %Destroy.facet.e1e [concrete] // CHECK:STDOUT: %complete_type.843: = complete_type_witness %tuple.type.dd0 [concrete] @@ -2598,11 +2610,11 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.e31: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.671) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.a54)] // CHECK:STDOUT: %Core.import_ref.cea = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded // CHECK:STDOUT: %OptionalStorage.impl_witness_table.199 = impl_witness_table (%Core.import_ref.0c6, %Core.import_ref.6d6, %Core.import_ref.6f3, %Core.import_ref.af2, %Core.import_ref.e31, %Core.import_ref.cea), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.301: %facet_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.194)] -// CHECK:STDOUT: %Core.import_ref.89f: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.593)] -// CHECK:STDOUT: %Core.import_ref.f6b: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.2e2) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.71b)] -// CHECK:STDOUT: %Core.import_ref.630: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.c6a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.49a)] -// CHECK:STDOUT: %Iterate.impl_witness_table.cd6 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.f6b, %Core.import_ref.630), @R.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] +// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.6fc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.09f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.ae5)] +// CHECK:STDOUT: %Core.import_ref.8cc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.8ae) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.064)] +// CHECK:STDOUT: %Iterate.impl_witness_table.314 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.6fc, %Core.import_ref.8cc), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e69: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.ff3) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.d93)] // CHECK:STDOUT: %Copy.impl_witness_table.4e8 = impl_witness_table (%Core.import_ref.e69), @Float.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.cb3: @Float.as.AddAssignWith.impl.%Float.as.AddAssignWith.impl.Op.type (%Float.as.AddAssignWith.impl.Op.type.fdd) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.AddAssignWith.impl.%Float.as.AddAssignWith.impl.Op (constants.%Float.as.AddAssignWith.impl.Op.430)] @@ -2630,21 +2642,21 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc26_19.21: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %impl.elem1 [symbolic = %.loc26_19.21 (constants.%.148)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.def)] // CHECK:STDOUT: %impl.elem0.loc26_19.2: @TestIterate.%.loc26_19.21 (%.148) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_19.2 (constants.%impl.elem0.461)] -// CHECK:STDOUT: %specific_impl_fn.loc26_19.6: = specific_impl_function %impl.elem0.loc26_19.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc26_19.6 (constants.%specific_impl_fn.095)] +// CHECK:STDOUT: %specific_impl_fn.loc26_19.6: = specific_impl_function %impl.elem0.loc26_19.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc26_19.6 (constants.%specific_impl_fn.095b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc22_61.1 (%R.as_type.087)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc22_61.1 (%R.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.fb7 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc22_61.1 (%R.as_type.087) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc22_61.1 (%R.as_type) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc26_19.1: @TestIterate.%.loc26_19.19 (%.a62) = impl_witness_access constants.%Iterate.lookup_impl_witness.93c, element2 [symbolic = %impl.elem2.loc26_19.2 (constants.%impl.elem2.c7b)] // CHECK:STDOUT: %bound_method.loc26_19.1: = bound_method %r.ref, %impl.elem2.loc26_19.1 -// CHECK:STDOUT: %Iterate.facet.loc26_19.1: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %.loc26_19.1: %Iterate.type = converted constants.%R.as_type.087, %Iterate.facet.loc26_19.1 [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %Iterate.facet.loc26_19.2: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %.loc26_19.2: %Iterate.type = converted constants.%R.as_type.087, %Iterate.facet.loc26_19.2 [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc26_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %.loc26_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc26_19.1 [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc26_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %.loc26_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc26_19.2 [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] // CHECK:STDOUT: %specific_impl_fn.loc26_19.1: = specific_impl_function %impl.elem2.loc26_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.94d) [symbolic = %specific_impl_fn.loc26_19.4 (constants.%specific_impl_fn.1b8)] // CHECK:STDOUT: %bound_method.loc26_19.2: = bound_method %r.ref, %specific_impl_fn.loc26_19.1 // CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.8e4) = var_storage invalid @@ -2656,10 +2668,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %addr: @TestIterate.%ptr (%ptr.bac) = addr_of %var // CHECK:STDOUT: %impl.elem3.loc26_19.1: @TestIterate.%.loc26_19.20 (%.a06) = impl_witness_access constants.%Iterate.lookup_impl_witness.93c, element3 [symbolic = %impl.elem3.loc26_19.2 (constants.%impl.elem3.7bd)] // CHECK:STDOUT: %bound_method.loc26_19.3: = bound_method %r.ref, %impl.elem3.loc26_19.1 -// CHECK:STDOUT: %Iterate.facet.loc26_19.3: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %.loc26_19.3: %Iterate.type = converted constants.%R.as_type.087, %Iterate.facet.loc26_19.3 [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %Iterate.facet.loc26_19.4: %Iterate.type = facet_value constants.%R.as_type.087, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] -// CHECK:STDOUT: %.loc26_19.4: %Iterate.type = converted constants.%R.as_type.087, %Iterate.facet.loc26_19.4 [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc26_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %.loc26_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc26_19.3 [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %Iterate.facet.loc26_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.93c) [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] +// CHECK:STDOUT: %.loc26_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc26_19.4 [symbolic = %Iterate.facet.loc26_19.5 (constants.%Iterate.facet.94d)] // CHECK:STDOUT: %.loc26_19.5: %Destroy.type = converted constants.%as_type.8e4, constants.%impl.elem1.7a9 [symbolic = %impl.elem1 (constants.%impl.elem1.7a9)] // CHECK:STDOUT: %.loc26_19.6: %Destroy.type = converted constants.%as_type.8e4, constants.%impl.elem1.7a9 [symbolic = %impl.elem1 (constants.%impl.elem1.7a9)] // CHECK:STDOUT: %specific_impl_fn.loc26_19.2: = specific_impl_function %impl.elem3.loc26_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.94d) [symbolic = %specific_impl_fn.loc26_19.5 (constants.%specific_impl_fn.666)] @@ -2670,7 +2682,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc26_19.9: %Optional.HasValue.type.c09 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.53b] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.c09 = name_ref HasValue, %.loc26_19.9 [concrete = constants.%Optional.HasValue.53b] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc26_19.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.specific_fn.30e] // CHECK:STDOUT: %bound_method.loc26_19.5: = bound_method %.loc26_19.8, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc26_19.10: %Optional.c42 = acquire_value %.loc26_19.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc26_19.5(%.loc26_19.10) @@ -2682,7 +2694,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc26_19.13: %Optional.Get.type.4f6 = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.5f1] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.4f6 = name_ref Get, %.loc26_19.13 [concrete = constants.%Optional.Get.5f1] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc26_19.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.specific_fn.84c] // CHECK:STDOUT: %bound_method.loc26_19.6: = bound_method %.loc26_19.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc26_19.14: %Optional.c42 = acquire_value %.loc26_19.8 // CHECK:STDOUT: %Optional.Get.call: init %f64.dc1 = call %bound_method.loc26_19.6(%.loc26_19.14) @@ -2708,7 +2720,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %bound_method.loc26_19.7: = bound_method %var, %impl.elem0.loc26_19.1 // CHECK:STDOUT: %.loc26_19.17: %Destroy.type = converted constants.%as_type.8e4, constants.%impl.elem1.7a9 [symbolic = %impl.elem1 (constants.%impl.elem1.7a9)] // CHECK:STDOUT: %.loc26_19.18: %Destroy.type = converted constants.%as_type.8e4, constants.%impl.elem1.7a9 [symbolic = %impl.elem1 (constants.%impl.elem1.7a9)] -// CHECK:STDOUT: %specific_impl_fn.loc26_19.3: = specific_impl_function %impl.elem0.loc26_19.1, @Destroy.WithSelf.Op(constants.%impl.elem1.7a9) [symbolic = %specific_impl_fn.loc26_19.6 (constants.%specific_impl_fn.095)] +// CHECK:STDOUT: %specific_impl_fn.loc26_19.3: = specific_impl_function %impl.elem0.loc26_19.1, @Destroy.WithSelf.Op(constants.%impl.elem1.7a9) [symbolic = %specific_impl_fn.loc26_19.6 (constants.%specific_impl_fn.095b)] // CHECK:STDOUT: %bound_method.loc26_19.8: = bound_method %var, %specific_impl_fn.loc26_19.3 // CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc26_19.8(%var) // CHECK:STDOUT: @@ -2749,38 +2761,38 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.fb7 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %m.ref: ref %MutableRange = name_ref m, %m -// CHECK:STDOUT: %impl.elem2: %.9ef = impl_witness_access constants.%Iterate.impl_witness.ce4, element2 [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.bc5] +// CHECK:STDOUT: %impl.elem2: %.4eb = impl_witness_access constants.%Iterate.impl_witness.da2, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.b0d] // CHECK:STDOUT: %bound_method.loc68_19.1: = bound_method %m.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc68_19.1: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.902, constants.%custom_witness.c08, constants.%custom_witness.29f, constants.%custom_witness.05b, constants.%custom_witness.ed8, constants.%custom_witness.491) [concrete = constants.%facet_value.85f] -// CHECK:STDOUT: %.loc68_19.1: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc68_19.1 [concrete = constants.%facet_value.85f] -// CHECK:STDOUT: %facet_value.loc68_19.2: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.902, constants.%custom_witness.c08, constants.%custom_witness.29f, constants.%custom_witness.05b, constants.%custom_witness.ed8, constants.%custom_witness.491) [concrete = constants.%facet_value.85f] -// CHECK:STDOUT: %.loc68_19.2: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc68_19.2 [concrete = constants.%facet_value.85f] -// CHECK:STDOUT: %specific_fn.loc68_19.1: = specific_function %impl.elem2, @R.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.85f) [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc68_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.902, constants.%custom_witness.c08, constants.%custom_witness.05b, constants.%custom_witness.491, constants.%custom_witness.ed8) [concrete = constants.%facet_value.cb9] +// CHECK:STDOUT: %.loc68_19.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc68_19.1 [concrete = constants.%facet_value.cb9] +// CHECK:STDOUT: %facet_value.loc68_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.902, constants.%custom_witness.c08, constants.%custom_witness.05b, constants.%custom_witness.491, constants.%custom_witness.ed8) [concrete = constants.%facet_value.cb9] +// CHECK:STDOUT: %.loc68_19.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc68_19.2 [concrete = constants.%facet_value.cb9] +// CHECK:STDOUT: %specific_fn.loc68_19.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.cb9) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc68_19.2: = bound_method %m.ref, %specific_fn.loc68_19.1 // CHECK:STDOUT: %var: ref %tuple.type.dd0 = var_storage invalid // CHECK:STDOUT: %.loc68_18.1: %MutableRange = acquire_value %m.ref -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.dd0 to %var = call %bound_method.loc68_19.2(%.loc68_18.1) -// CHECK:STDOUT: assign %var, %R.as_type.as.Iterate.impl.NewCursor.call +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.dd0 to %var = call %bound_method.loc68_19.2(%.loc68_18.1) +// CHECK:STDOUT: assign %var, %T.as_type.as.Iterate.impl.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr: %ptr.a4f = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.ade = impl_witness_access constants.%Iterate.impl_witness.ce4, element3 [concrete = constants.%R.as_type.as.Iterate.impl.Next.8ab] +// CHECK:STDOUT: %impl.elem3: %.0ef = impl_witness_access constants.%Iterate.impl_witness.da2, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.055] // CHECK:STDOUT: %bound_method.loc68_19.3: = bound_method %m.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc68_19.3: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.902, constants.%custom_witness.c08, constants.%custom_witness.29f, constants.%custom_witness.05b, constants.%custom_witness.ed8, constants.%custom_witness.491) [concrete = constants.%facet_value.85f] -// CHECK:STDOUT: %.loc68_19.3: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc68_19.3 [concrete = constants.%facet_value.85f] -// CHECK:STDOUT: %facet_value.loc68_19.4: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.902, constants.%custom_witness.c08, constants.%custom_witness.29f, constants.%custom_witness.05b, constants.%custom_witness.ed8, constants.%custom_witness.491) [concrete = constants.%facet_value.85f] -// CHECK:STDOUT: %.loc68_19.4: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableRange, %facet_value.loc68_19.4 [concrete = constants.%facet_value.85f] -// CHECK:STDOUT: %specific_fn.loc68_19.2: = specific_function %impl.elem3, @R.as_type.as.Iterate.impl.Next(constants.%facet_value.85f) [concrete = constants.%R.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc68_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.902, constants.%custom_witness.c08, constants.%custom_witness.05b, constants.%custom_witness.491, constants.%custom_witness.ed8) [concrete = constants.%facet_value.cb9] +// CHECK:STDOUT: %.loc68_19.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc68_19.3 [concrete = constants.%facet_value.cb9] +// CHECK:STDOUT: %facet_value.loc68_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.df9cc1.3, constants.%Copy.impl_witness.873, constants.%custom_witness.902, constants.%custom_witness.c08, constants.%custom_witness.05b, constants.%custom_witness.491, constants.%custom_witness.ed8) [concrete = constants.%facet_value.cb9] +// CHECK:STDOUT: %.loc68_19.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc68_19.4 [concrete = constants.%facet_value.cb9] +// CHECK:STDOUT: %specific_fn.loc68_19.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.cb9) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc68_19.4: = bound_method %m.ref, %specific_fn.loc68_19.2 // CHECK:STDOUT: %.loc68_19.5: ref %Optional.c42 = temporary_storage // CHECK:STDOUT: %.loc68_18.2: %MutableRange = acquire_value %m.ref -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.call: init %Optional.c42 to %.loc68_19.5 = call %bound_method.loc68_19.4(%.loc68_18.2, %addr) -// CHECK:STDOUT: %.loc68_19.6: ref %Optional.c42 = temporary %.loc68_19.5, %R.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.c42 to %.loc68_19.5 = call %bound_method.loc68_19.4(%.loc68_18.2, %addr) +// CHECK:STDOUT: %.loc68_19.6: ref %Optional.c42 = temporary %.loc68_19.5, %T.as_type.as.Iterate.impl.Next.call // CHECK:STDOUT: %.loc68_19.7: %Optional.HasValue.type.c09 = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.53b] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.c09 = name_ref HasValue, %.loc68_19.7 [concrete = constants.%Optional.HasValue.53b] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc68_19.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.HasValue.specific_fn.30e] // CHECK:STDOUT: %bound_method.loc68_19.5: = bound_method %.loc68_19.6, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc68_19.8: %Optional.c42 = acquire_value %.loc68_19.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc68_19.5(%.loc68_19.8) @@ -2792,7 +2804,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc68_19.11: %Optional.Get.type.4f6 = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.5f1] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.4f6 = name_ref Get, %.loc68_19.11 [concrete = constants.%Optional.Get.5f1] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc68_19.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c07) [concrete = constants.%Optional.Get.specific_fn.84c] // CHECK:STDOUT: %bound_method.loc68_19.6: = bound_method %.loc68_19.6, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc68_19.12: %Optional.c42 = acquire_value %.loc68_19.6 // CHECK:STDOUT: %Optional.Get.call: init %f64.dc1 = call %bound_method.loc68_19.6(%.loc68_19.12) @@ -2819,18 +2831,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%R.c6e) { -// CHECK:STDOUT: %R.patt.loc22_17.2 => constants.%R.patt.ae1 -// CHECK:STDOUT: %R.loc22_17.1 => constants.%R.c6e -// CHECK:STDOUT: %R.as_type.loc22_61.1 => constants.%R.as_type.087 +// CHECK:STDOUT: specific @TestIterate(constants.%R) { +// CHECK:STDOUT: %R.patt.loc22_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc22_17.1 => constants.%R +// CHECK:STDOUT: %R.as_type.loc22_61.1 => constants.%R.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d7 // CHECK:STDOUT: %r.param_patt.loc22_59.2 => constants.%r.param_patt.03a // CHECK:STDOUT: %r.patt.loc22_59.2 => constants.%r.patt.b86 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.a73) { -// CHECK:STDOUT: %R.patt.loc22_17.2 => constants.%R.patt.ae1 -// CHECK:STDOUT: %R.loc22_17.1 => constants.%facet_value.a73 +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.c2b) { +// CHECK:STDOUT: %R.patt.loc22_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc22_17.1 => constants.%facet_value.c2b // CHECK:STDOUT: %R.as_type.loc22_61.1 => constants.%MutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.992 // CHECK:STDOUT: %r.param_patt.loc22_59.2 => constants.%r.param_patt.aeb @@ -2838,20 +2850,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc22 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.ce4 -// CHECK:STDOUT: %Iterate.facet.loc26_19.5 => constants.%Iterate.facet.2f3 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.3d1 -// CHECK:STDOUT: %.loc26_19.19 => constants.%.9ef -// CHECK:STDOUT: %impl.elem2.loc26_19.2 => constants.%R.as_type.as.Iterate.impl.NewCursor.bc5 -// CHECK:STDOUT: %specific_impl_fn.loc26_19.4 => constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.da2 +// CHECK:STDOUT: %Iterate.facet.loc26_19.5 => constants.%Iterate.facet.4ef +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.4ae +// CHECK:STDOUT: %.loc26_19.19 => constants.%.4eb +// CHECK:STDOUT: %impl.elem2.loc26_19.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.b0d +// CHECK:STDOUT: %specific_impl_fn.loc26_19.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn // CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.e1e // CHECK:STDOUT: %as_type => constants.%tuple.type.dd0 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.843 // CHECK:STDOUT: %ptr => constants.%ptr.a4f -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.d94 -// CHECK:STDOUT: %.loc26_19.20 => constants.%.ade -// CHECK:STDOUT: %impl.elem3.loc26_19.2 => constants.%R.as_type.as.Iterate.impl.Next.8ab -// CHECK:STDOUT: %specific_impl_fn.loc26_19.5 => constants.%R.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.dc8 +// CHECK:STDOUT: %.loc26_19.20 => constants.%.0ef +// CHECK:STDOUT: %impl.elem3.loc26_19.2 => constants.%T.as_type.as.Iterate.impl.Next.055 +// CHECK:STDOUT: %specific_impl_fn.loc26_19.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.452 // CHECK:STDOUT: %.loc26_19.21 => constants.%.899 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.10 @@ -2865,14 +2877,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Optional.Get.type.bb9: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.Get.fa1: %Optional.Get.type.bb9 = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.e9e: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.HasValue.6cd: %Optional.HasValue.type.e9e = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %DefaultOptionalStorage.d50: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.671: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.a54: %T.as_type.as.OptionalStorage.impl.Get.type.671 = struct_value () [symbolic] @@ -2884,31 +2896,30 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.faf: %T.as_type.as.OptionalStorage.impl.None.type.f62 = struct_value () [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.type: type = facet_type <@CppRangeForIterate> [concrete] -// CHECK:STDOUT: %.Self.aed: %CppRangeForIterate.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.f6b: = lookup_impl_witness %.Self.aed, @CppRangeForIterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.b73: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element0 [symbolic_self] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.595: = lookup_impl_witness %impl.elem0.b73, @CppUnsafeDeref [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a2f: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.595, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem1.228: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element1 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate_where.type.1c721f.1: type = facet_type <@CppRangeForIterate where %impl.elem0.b73 impls @Destroy and %impl.elem0.b73 impls @Copy and %impl.elem0.b73 impls @CppUnsafeDeref and %impl.elem0.b73 impls @EqWith, @EqWith(%impl.elem1.228) and %impl.elem0.b73 impls @Inc and %impl.elem0.a2f impls @Destroy and %impl.elem0.a2f impls @Copy and %impl.elem1.228 impls @Destroy and %impl.elem1.228 impls @Copy> [concrete] -// CHECK:STDOUT: %R.39b: %CppRangeForIterate_where.type.1c721f.1 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.7e2712.2: = lookup_impl_witness %R.39b, @CppRangeForIterate [symbolic] -// CHECK:STDOUT: %impl.elem1.7a0bff.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element1 [symbolic] -// CHECK:STDOUT: %impl.elem0.73eb7f.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element0 [symbolic] -// CHECK:STDOUT: %tuple.type.3cf: type = tuple_type (%impl.elem0.73eb7f.2, %impl.elem1.7a0bff.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.69f: = lookup_impl_witness %tuple.type.3cf, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.593: %Destroy.type = facet_value %tuple.type.3cf, (%Destroy.lookup_impl_witness.69f) [symbolic] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.aa7: = lookup_impl_witness %impl.elem0.73eb7f.2, @CppUnsafeDeref [symbolic] -// CHECK:STDOUT: %impl.elem0.af7: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.aa7, element0 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.ec3: = lookup_impl_witness %impl.elem0.af7, @Destroy [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.a7a: = lookup_impl_witness %impl.elem0.af7, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.194: %facet_type = facet_value %impl.elem0.af7, (%Destroy.lookup_impl_witness.ec3, %Copy.lookup_impl_witness.a7a) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.c6a: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.49a: %R.as_type.as.Iterate.impl.Next.type.c6a = struct_value () [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.2e2: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.71b: %R.as_type.as.Iterate.impl.NewCursor.type.2e2 = struct_value () [symbolic] +// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] +// CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.50b: = lookup_impl_witness %.Self.e0b, @CppRangeForIterate [symbolic_self] +// CHECK:STDOUT: %impl.elem0.32d: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.50b, element0 [symbolic_self] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d, @CppUnsafeDeref [symbolic_self] +// CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] +// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] +// CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] +// CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] +// CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] +// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.8ae: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.064: %T.as_type.as.Iterate.impl.Next.type.8ae = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.09f: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.ae5: %T.as_type.as.Iterate.impl.NewCursor.type.09f = struct_value () [symbolic] // CHECK:STDOUT: %ValueType: type = class_type @ValueType [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -2924,18 +2935,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %ValueType.Op.type.79266b.2: type = fn_type @ValueType.Op.2 [concrete] // CHECK:STDOUT: %ValueType.Op.4c94b9.2: %ValueType.Op.type.79266b.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.c19: = custom_witness (%ValueType.Op.4c94b9.2), @Copy [concrete] -// CHECK:STDOUT: %facet_value.ccb: %facet_type = facet_value %ValueType, (%custom_witness.fef, %custom_witness.c19) [concrete] +// CHECK:STDOUT: %facet_value.ccb: %facet_type.f48 = facet_value %ValueType, (%custom_witness.fef, %custom_witness.c19) [concrete] // CHECK:STDOUT: %Iterate_where.type.f9d: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.ccb> [concrete] // CHECK:STDOUT: %pattern_type.c7b: type = pattern_type %Iterate_where.type.f9d [concrete] -// CHECK:STDOUT: %R.patt.81e: %pattern_type.c7b = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R.db4: %Iterate_where.type.f9d = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %R.as_type.c37: type = facet_access_type %R.db4 [symbolic] -// CHECK:STDOUT: %pattern_type.17d: type = pattern_type %R.as_type.c37 [symbolic] +// CHECK:STDOUT: %R.patt: %pattern_type.c7b = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.f9d = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] +// CHECK:STDOUT: %pattern_type.17d: type = pattern_type %R.as_type [symbolic] // CHECK:STDOUT: %r.param_patt.90c: %pattern_type.17d = value_param_pattern [symbolic] // CHECK:STDOUT: %r.patt.d6c: %pattern_type.17d = at_binding_pattern r, %r.param_patt.90c [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.173: = lookup_impl_witness %R.db4, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.b38: %Iterate.type = facet_value %R.as_type.c37, (%Iterate.lookup_impl_witness.173) [symbolic] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.173: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.b38: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.173) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.5cd: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.b38) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.Next.type.d51: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.b38) [symbolic] // CHECK:STDOUT: %.592: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.5cd, %Iterate.facet.b38 [symbolic] @@ -2959,8 +2970,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %MaybeUnformed.669: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.306) [concrete] // CHECK:STDOUT: %.b36: type = maybe_unformed_type %ValueType [concrete] // CHECK:STDOUT: %struct_type.value.has_value.5a1: type = struct_type {.value: %MaybeUnformed.669, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.3c0, @Optional.HasValue(%OptionalStorage.facet.cac) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.28e, @Optional.Get(%OptionalStorage.facet.cac) [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.ff3: = specific_function %Optional.HasValue.3c0, @Optional.HasValue(%OptionalStorage.facet.cac) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.c88: = specific_function %Optional.Get.28e, @Optional.Get(%OptionalStorage.facet.cac) [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.7: type = fn_type @Destroy.Op.loc31_31.6 [concrete] @@ -2987,43 +2998,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %custom_witness.21358e.1: = custom_witness (%Iterator.Op.583fda.2), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.ac7e09.3: type = fn_type @Iterator.Op.3 [concrete] // CHECK:STDOUT: %Iterator.Op.583fda.3: %Iterator.Op.type.ac7e09.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.a3150e.1: = custom_witness (%Iterator.Op.583fda.3), @Copy [concrete] +// CHECK:STDOUT: %custom_witness.393: = custom_witness (%Iterator.Op.583fda.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.aa4: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Sentinel) [concrete] -// CHECK:STDOUT: %Iterator.Op.type.ac7e09.4: type = fn_type @Iterator.Op.4 [concrete] -// CHECK:STDOUT: %Iterator.Op.583fda.4: %Iterator.Op.type.ac7e09.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.393: = custom_witness (%Iterator.Op.583fda.4), @Inc [concrete] -// CHECK:STDOUT: %Sentinel.Op.type.ac7e09.1: type = fn_type @Sentinel.Op.1 [concrete] -// CHECK:STDOUT: %Sentinel.Op.583fda.1: %Sentinel.Op.type.ac7e09.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.21358e.2: = custom_witness (%Sentinel.Op.583fda.1), @Destroy [concrete] -// CHECK:STDOUT: %Sentinel.Op.type.ac7e09.2: type = fn_type @Sentinel.Op.2 [concrete] -// CHECK:STDOUT: %Sentinel.Op.583fda.2: %Sentinel.Op.type.ac7e09.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.a3150e.2: = custom_witness (%Sentinel.Op.583fda.2), @Copy [concrete] -// CHECK:STDOUT: %facet_value.b1e: %CppRangeForIterate_where.type.1c721f.1 = facet_value %ConstRange, (%custom_witness.fef, %custom_witness.c19, %custom_witness.c2f, %custom_witness.21358e.1, %custom_witness.a3150e.1, %custom_witness.1d3, %custom_witness.aa4, %custom_witness.393, %custom_witness.21358e.2, %custom_witness.a3150e.2) [concrete] +// CHECK:STDOUT: %Sentinel.Op.type: type = fn_type @Sentinel.Op [concrete] +// CHECK:STDOUT: %Sentinel.Op: %Sentinel.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.21358e.2: = custom_witness (%Sentinel.Op), @Destroy [concrete] +// CHECK:STDOUT: %facet_value.2b3: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.fef, %custom_witness.c19, %custom_witness.c2f, %custom_witness.21358e.1, %custom_witness.1d3, %custom_witness.393, %custom_witness.aa4, %custom_witness.21358e.2) [concrete] // CHECK:STDOUT: %tuple.type.df8: type = tuple_type (%Iterator, %Sentinel) [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.8: type = fn_type @Destroy.Op.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.8: %Destroy.Op.type.1d8f74.8 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.8: = custom_witness (%Destroy.Op.1a2547.8), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.777: %Destroy.type = facet_value %tuple.type.df8, (%custom_witness.df9cc1.8) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.1a3: = impl_witness imports.%Iterate.impl_witness_table.cd6, @R.as_type.as.Iterate.impl(%facet_value.b1e) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.7d5: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%facet_value.b1e) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.35d: %R.as_type.as.Iterate.impl.NewCursor.type.7d5 = struct_value () [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.971: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%facet_value.b1e) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.8fc: %R.as_type.as.Iterate.impl.Next.type.971 = struct_value () [concrete] -// CHECK:STDOUT: %Iterate.facet.55f: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.1a3) [concrete] -// CHECK:STDOUT: %facet_value.19f: %Iterate_where.type.f9d = facet_value %ConstRange, (%Iterate.impl_witness.1a3) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.19b: = impl_witness imports.%Iterate.impl_witness_table.314, @T.as_type.as.Iterate.impl(%facet_value.2b3) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.7ca: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.2b3) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.e78: %T.as_type.as.Iterate.impl.NewCursor.type.7ca = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.ba6: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.2b3) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.9a0: %T.as_type.as.Iterate.impl.Next.type.ba6 = struct_value () [concrete] +// CHECK:STDOUT: %Iterate.facet.4e5: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.19b) [concrete] +// CHECK:STDOUT: %facet_value.2e4: %Iterate_where.type.f9d = facet_value %ConstRange, (%Iterate.impl_witness.19b) [concrete] // CHECK:STDOUT: %r.param_patt.a73: %pattern_type.025 = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.0e2: %pattern_type.025 = at_binding_pattern r, %r.param_patt.a73 [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.eb0: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.55f) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.326: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.55f) [concrete] -// CHECK:STDOUT: %.239: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.eb0, %Iterate.facet.55f [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %R.as_type.as.Iterate.impl.NewCursor.35d, @R.as_type.as.Iterate.impl.NewCursor(%facet_value.b1e) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.675: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.4e5) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.b3f: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.4e5) [concrete] +// CHECK:STDOUT: %.e7d: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.675, %Iterate.facet.4e5 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.e78, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.2b3) [concrete] // CHECK:STDOUT: %ptr.fc0: type = ptr_type %tuple.type.df8 [concrete] -// CHECK:STDOUT: %.eb6: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.326, %Iterate.facet.55f [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %R.as_type.as.Iterate.impl.Next.8fc, @R.as_type.as.Iterate.impl.Next(%facet_value.b1e) [concrete] +// CHECK:STDOUT: %.4c9: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.b3f, %Iterate.facet.4e5 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.9a0, @T.as_type.as.Iterate.impl.Next(%facet_value.2b3) [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.589: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.777) [concrete] // CHECK:STDOUT: %.4e1: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.589, %Destroy.facet.777 [concrete] // CHECK:STDOUT: %complete_type.e35: = complete_type_witness %tuple.type.df8 [concrete] @@ -3043,11 +3048,11 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.e31: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.671) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.a54)] // CHECK:STDOUT: %Core.import_ref.cea = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded // CHECK:STDOUT: %OptionalStorage.impl_witness_table.199 = impl_witness_table (%Core.import_ref.0c6, %Core.import_ref.6d6, %Core.import_ref.6f3, %Core.import_ref.af2, %Core.import_ref.e31, %Core.import_ref.cea), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.301: %facet_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.194)] -// CHECK:STDOUT: %Core.import_ref.89f: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.593)] -// CHECK:STDOUT: %Core.import_ref.f6b: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.2e2) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.71b)] -// CHECK:STDOUT: %Core.import_ref.630: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.c6a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.49a)] -// CHECK:STDOUT: %Iterate.impl_witness_table.cd6 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.f6b, %Core.import_ref.630), @R.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] +// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.6fc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.09f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.ae5)] +// CHECK:STDOUT: %Core.import_ref.8cc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.8ae) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.064)] +// CHECK:STDOUT: %Iterate.impl_witness_table.314 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.6fc, %Core.import_ref.8cc), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %N: = namespace [concrete] { // CHECK:STDOUT: .ValueType = %ValueType.decl // CHECK:STDOUT: .ConstRange = %ConstRange.decl @@ -3090,19 +3095,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc31_31.2: @TestIterate.%.loc31_31.22 (%.57c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc31_31.2 (constants.%impl.elem0.152)] // CHECK:STDOUT: %specific_impl_fn.loc31_31.6: = specific_impl_function %impl.elem0.loc31_31.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc31_31.6 (constants.%specific_impl_fn.9fb)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type.c37)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type.c37) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc31_31.1: @TestIterate.%.loc31_31.20 (%.592) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element2 [symbolic = %impl.elem2.loc31_31.2 (constants.%impl.elem2.ae2)] // CHECK:STDOUT: %bound_method.loc31_31.1: = bound_method %r.ref, %impl.elem2.loc31_31.1 -// CHECK:STDOUT: %Iterate.facet.loc31_31.1: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %.loc31_31.1: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc31_31.1 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %Iterate.facet.loc31_31.2: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %.loc31_31.2: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc31_31.2 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc31_31.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_31.1 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc31_31.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_31.2 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] // CHECK:STDOUT: %specific_impl_fn.loc31_31.1: = specific_impl_function %impl.elem2.loc31_31.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.b38) [symbolic = %specific_impl_fn.loc31_31.4 (constants.%specific_impl_fn.06e)] // CHECK:STDOUT: %bound_method.loc31_31.2: = bound_method %r.ref, %specific_impl_fn.loc31_31.1 // CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.e41) = var_storage invalid @@ -3114,10 +3119,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %addr.loc31: @TestIterate.%ptr (%ptr.d27) = addr_of %var // CHECK:STDOUT: %impl.elem3.loc31_31.1: @TestIterate.%.loc31_31.21 (%.524) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element3 [symbolic = %impl.elem3.loc31_31.2 (constants.%impl.elem3.7a5)] // CHECK:STDOUT: %bound_method.loc31_31.3: = bound_method %r.ref, %impl.elem3.loc31_31.1 -// CHECK:STDOUT: %Iterate.facet.loc31_31.3: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %.loc31_31.3: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc31_31.3 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %Iterate.facet.loc31_31.4: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %.loc31_31.4: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc31_31.4 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc31_31.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_31.3 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc31_31.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_31.4 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] // CHECK:STDOUT: %.loc31_31.5: %Destroy.type = converted constants.%as_type.e41, constants.%impl.elem1.834 [symbolic = %impl.elem1 (constants.%impl.elem1.834)] // CHECK:STDOUT: %.loc31_31.6: %Destroy.type = converted constants.%as_type.e41, constants.%impl.elem1.834 [symbolic = %impl.elem1 (constants.%impl.elem1.834)] // CHECK:STDOUT: %specific_impl_fn.loc31_31.2: = specific_impl_function %impl.elem3.loc31_31.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.b38) [symbolic = %specific_impl_fn.loc31_31.5 (constants.%specific_impl_fn.24b)] @@ -3128,7 +3133,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc31_31.9: %Optional.HasValue.type.36e = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.3c0] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.36e = name_ref HasValue, %.loc31_31.9 [concrete = constants.%Optional.HasValue.3c0] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc31_31.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.specific_fn.ff3] // CHECK:STDOUT: %bound_method.loc31_31.5: = bound_method %.loc31_31.8, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc31_31.10: %Optional.c14 = acquire_value %.loc31_31.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc31_31.5(%.loc31_31.10) @@ -3140,7 +3145,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc31_31.13: %Optional.Get.type.862 = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.28e] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.862 = name_ref Get, %.loc31_31.13 [concrete = constants.%Optional.Get.28e] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc31_31.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.specific_fn.c88] // CHECK:STDOUT: %bound_method.loc31_31.6: = bound_method %.loc31_31.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc31_31.14: ref %ValueType = temporary_storage // CHECK:STDOUT: %.loc31_31.15: %Optional.c14 = acquire_value %.loc31_31.8 @@ -3216,36 +3221,36 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %c.ref: %ConstRange = name_ref c, %c -// CHECK:STDOUT: %impl.elem2: %.239 = impl_witness_access constants.%Iterate.impl_witness.1a3, element2 [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.35d] +// CHECK:STDOUT: %impl.elem2: %.e7d = impl_witness_access constants.%Iterate.impl_witness.19b, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.e78] // CHECK:STDOUT: %bound_method.loc45_31.1: = bound_method %c.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc45_31.1: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.c2f, constants.%custom_witness.21358e.1, constants.%custom_witness.a3150e.1, constants.%custom_witness.1d3, constants.%custom_witness.aa4, constants.%custom_witness.393, constants.%custom_witness.21358e.2, constants.%custom_witness.a3150e.2) [concrete = constants.%facet_value.b1e] -// CHECK:STDOUT: %.loc45_31.1: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc45_31.1 [concrete = constants.%facet_value.b1e] -// CHECK:STDOUT: %facet_value.loc45_31.2: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.c2f, constants.%custom_witness.21358e.1, constants.%custom_witness.a3150e.1, constants.%custom_witness.1d3, constants.%custom_witness.aa4, constants.%custom_witness.393, constants.%custom_witness.21358e.2, constants.%custom_witness.a3150e.2) [concrete = constants.%facet_value.b1e] -// CHECK:STDOUT: %.loc45_31.2: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc45_31.2 [concrete = constants.%facet_value.b1e] -// CHECK:STDOUT: %specific_fn.loc45_31.1: = specific_function %impl.elem2, @R.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.b1e) [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc45_31.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.c2f, constants.%custom_witness.21358e.1, constants.%custom_witness.1d3, constants.%custom_witness.393, constants.%custom_witness.aa4, constants.%custom_witness.21358e.2) [concrete = constants.%facet_value.2b3] +// CHECK:STDOUT: %.loc45_31.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_31.1 [concrete = constants.%facet_value.2b3] +// CHECK:STDOUT: %facet_value.loc45_31.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.c2f, constants.%custom_witness.21358e.1, constants.%custom_witness.1d3, constants.%custom_witness.393, constants.%custom_witness.aa4, constants.%custom_witness.21358e.2) [concrete = constants.%facet_value.2b3] +// CHECK:STDOUT: %.loc45_31.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_31.2 [concrete = constants.%facet_value.2b3] +// CHECK:STDOUT: %specific_fn.loc45_31.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.2b3) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc45_31.2: = bound_method %c.ref, %specific_fn.loc45_31.1 // CHECK:STDOUT: %var: ref %tuple.type.df8 = var_storage invalid -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.df8 to %var = call %bound_method.loc45_31.2(%c.ref) -// CHECK:STDOUT: assign %var, %R.as_type.as.Iterate.impl.NewCursor.call +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.df8 to %var = call %bound_method.loc45_31.2(%c.ref) +// CHECK:STDOUT: assign %var, %T.as_type.as.Iterate.impl.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr.loc45: %ptr.fc0 = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.eb6 = impl_witness_access constants.%Iterate.impl_witness.1a3, element3 [concrete = constants.%R.as_type.as.Iterate.impl.Next.8fc] +// CHECK:STDOUT: %impl.elem3: %.4c9 = impl_witness_access constants.%Iterate.impl_witness.19b, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.9a0] // CHECK:STDOUT: %bound_method.loc45_31.3: = bound_method %c.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc45_31.3: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.c2f, constants.%custom_witness.21358e.1, constants.%custom_witness.a3150e.1, constants.%custom_witness.1d3, constants.%custom_witness.aa4, constants.%custom_witness.393, constants.%custom_witness.21358e.2, constants.%custom_witness.a3150e.2) [concrete = constants.%facet_value.b1e] -// CHECK:STDOUT: %.loc45_31.3: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc45_31.3 [concrete = constants.%facet_value.b1e] -// CHECK:STDOUT: %facet_value.loc45_31.4: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%ConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.c2f, constants.%custom_witness.21358e.1, constants.%custom_witness.a3150e.1, constants.%custom_witness.1d3, constants.%custom_witness.aa4, constants.%custom_witness.393, constants.%custom_witness.21358e.2, constants.%custom_witness.a3150e.2) [concrete = constants.%facet_value.b1e] -// CHECK:STDOUT: %.loc45_31.4: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%ConstRange, %facet_value.loc45_31.4 [concrete = constants.%facet_value.b1e] -// CHECK:STDOUT: %specific_fn.loc45_31.2: = specific_function %impl.elem3, @R.as_type.as.Iterate.impl.Next(constants.%facet_value.b1e) [concrete = constants.%R.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc45_31.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.c2f, constants.%custom_witness.21358e.1, constants.%custom_witness.1d3, constants.%custom_witness.393, constants.%custom_witness.aa4, constants.%custom_witness.21358e.2) [concrete = constants.%facet_value.2b3] +// CHECK:STDOUT: %.loc45_31.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_31.3 [concrete = constants.%facet_value.2b3] +// CHECK:STDOUT: %facet_value.loc45_31.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.c2f, constants.%custom_witness.21358e.1, constants.%custom_witness.1d3, constants.%custom_witness.393, constants.%custom_witness.aa4, constants.%custom_witness.21358e.2) [concrete = constants.%facet_value.2b3] +// CHECK:STDOUT: %.loc45_31.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_31.4 [concrete = constants.%facet_value.2b3] +// CHECK:STDOUT: %specific_fn.loc45_31.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.2b3) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc45_31.4: = bound_method %c.ref, %specific_fn.loc45_31.2 // CHECK:STDOUT: %.loc45_31.5: ref %Optional.c14 = temporary_storage -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.call: init %Optional.c14 to %.loc45_31.5 = call %bound_method.loc45_31.4(%c.ref, %addr.loc45) -// CHECK:STDOUT: %.loc45_31.6: ref %Optional.c14 = temporary %.loc45_31.5, %R.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.c14 to %.loc45_31.5 = call %bound_method.loc45_31.4(%c.ref, %addr.loc45) +// CHECK:STDOUT: %.loc45_31.6: ref %Optional.c14 = temporary %.loc45_31.5, %T.as_type.as.Iterate.impl.Next.call // CHECK:STDOUT: %.loc45_31.7: %Optional.HasValue.type.36e = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.3c0] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.36e = name_ref HasValue, %.loc45_31.7 [concrete = constants.%Optional.HasValue.3c0] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc45_31.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.specific_fn.ff3] // CHECK:STDOUT: %bound_method.loc45_31.5: = bound_method %.loc45_31.6, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc45_31.8: %Optional.c14 = acquire_value %.loc45_31.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc45_31.5(%.loc45_31.8) @@ -3257,7 +3262,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc45_31.11: %Optional.Get.type.862 = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.28e] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.862 = name_ref Get, %.loc45_31.11 [concrete = constants.%Optional.Get.28e] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc45_31.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.specific_fn.c88] // CHECK:STDOUT: %bound_method.loc45_31.6: = bound_method %.loc45_31.6, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc45_31.12: ref %ValueType = temporary_storage // CHECK:STDOUT: %.loc45_31.13: %Optional.c14 = acquire_value %.loc45_31.6 @@ -3293,18 +3298,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%R.db4) { -// CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt.81e -// CHECK:STDOUT: %R.loc27_17.1 => constants.%R.db4 -// CHECK:STDOUT: %R.as_type.loc27_73.1 => constants.%R.as_type.c37 +// CHECK:STDOUT: specific @TestIterate(constants.%R) { +// CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc27_17.1 => constants.%R +// CHECK:STDOUT: %R.as_type.loc27_73.1 => constants.%R.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.17d // CHECK:STDOUT: %r.param_patt.loc27_71.2 => constants.%r.param_patt.90c // CHECK:STDOUT: %r.patt.loc27_71.2 => constants.%r.patt.d6c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.19f) { -// CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt.81e -// CHECK:STDOUT: %R.loc27_17.1 => constants.%facet_value.19f +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.2e4) { +// CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc27_17.1 => constants.%facet_value.2e4 // CHECK:STDOUT: %R.as_type.loc27_73.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.025 // CHECK:STDOUT: %r.param_patt.loc27_71.2 => constants.%r.param_patt.a73 @@ -3312,20 +3317,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc27 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.1a3 -// CHECK:STDOUT: %Iterate.facet.loc31_31.5 => constants.%Iterate.facet.55f -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.eb0 -// CHECK:STDOUT: %.loc31_31.20 => constants.%.239 -// CHECK:STDOUT: %impl.elem2.loc31_31.2 => constants.%R.as_type.as.Iterate.impl.NewCursor.35d -// CHECK:STDOUT: %specific_impl_fn.loc31_31.4 => constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.19b +// CHECK:STDOUT: %Iterate.facet.loc31_31.5 => constants.%Iterate.facet.4e5 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.675 +// CHECK:STDOUT: %.loc31_31.20 => constants.%.e7d +// CHECK:STDOUT: %impl.elem2.loc31_31.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.e78 +// CHECK:STDOUT: %specific_impl_fn.loc31_31.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn // CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.777 // CHECK:STDOUT: %as_type => constants.%tuple.type.df8 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.e35 // CHECK:STDOUT: %ptr => constants.%ptr.fc0 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.326 -// CHECK:STDOUT: %.loc31_31.21 => constants.%.eb6 -// CHECK:STDOUT: %impl.elem3.loc31_31.2 => constants.%R.as_type.as.Iterate.impl.Next.8fc -// CHECK:STDOUT: %specific_impl_fn.loc31_31.5 => constants.%R.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.b3f +// CHECK:STDOUT: %.loc31_31.21 => constants.%.4c9 +// CHECK:STDOUT: %impl.elem3.loc31_31.2 => constants.%T.as_type.as.Iterate.impl.Next.9a0 +// CHECK:STDOUT: %specific_impl_fn.loc31_31.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.589 // CHECK:STDOUT: %.loc31_31.22 => constants.%.4e1 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.8 @@ -3339,14 +3344,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Optional.Get.type.bb9: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.Get.fa1: %Optional.Get.type.bb9 = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.e9e: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.HasValue.6cd: %Optional.HasValue.type.e9e = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %DefaultOptionalStorage.d50: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.671: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.a54: %T.as_type.as.OptionalStorage.impl.Get.type.671 = struct_value () [symbolic] @@ -3354,7 +3359,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.aa4: %T.as_type.as.OptionalStorage.impl.Has.type.d76 = struct_value () [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] // CHECK:STDOUT: %ValueType: type = class_type @ValueType [concrete] // CHECK:STDOUT: %pattern_type.e41: type = pattern_type %ValueType [concrete] // CHECK:STDOUT: %ValueType.cpp_destructor.type: type = fn_type @ValueType.cpp_destructor [concrete] @@ -3368,33 +3373,33 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %ValueType.Op.type.79266b.2: type = fn_type @ValueType.Op.2 [concrete] // CHECK:STDOUT: %ValueType.Op.4c94b9.2: %ValueType.Op.type.79266b.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.c19: = custom_witness (%ValueType.Op.4c94b9.2), @Copy [concrete] -// CHECK:STDOUT: %facet_value.ccb: %facet_type = facet_value %ValueType, (%custom_witness.fef, %custom_witness.c19) [concrete] +// CHECK:STDOUT: %facet_value.ccb: %facet_type.f48 = facet_value %ValueType, (%custom_witness.fef, %custom_witness.c19) [concrete] // CHECK:STDOUT: %Iterate_where.type.f9d: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.ccb> [concrete] // CHECK:STDOUT: %pattern_type.c7b: type = pattern_type %Iterate_where.type.f9d [concrete] -// CHECK:STDOUT: %R.patt.81e: %pattern_type.c7b = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R.db4: %Iterate_where.type.f9d = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %R.as_type.c37: type = facet_access_type %R.db4 [symbolic] -// CHECK:STDOUT: %pattern_type.17d: type = pattern_type %R.as_type.c37 [symbolic] +// CHECK:STDOUT: %R.patt: %pattern_type.c7b = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.f9d = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] +// CHECK:STDOUT: %pattern_type.17d: type = pattern_type %R.as_type [symbolic] // CHECK:STDOUT: %r.param_patt: %pattern_type.17d = value_param_pattern [symbolic] // CHECK:STDOUT: %r.patt: %pattern_type.17d = at_binding_pattern r, %r.param_patt [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.173: = lookup_impl_witness %R.db4, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet: %Iterate.type = facet_value %R.as_type.c37, (%Iterate.lookup_impl_witness.173) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.5cd: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.d51: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet) [symbolic] -// CHECK:STDOUT: %.592: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.5cd, %Iterate.facet [symbolic] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.173: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.b38: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.173) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.5cd: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.b38) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.d51: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.b38) [symbolic] +// CHECK:STDOUT: %.592: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.5cd, %Iterate.facet.b38 [symbolic] // CHECK:STDOUT: %impl.elem2.ae2: %.592 = impl_witness_access %Iterate.lookup_impl_witness.173, element2 [symbolic] // CHECK:STDOUT: %impl.elem1.834: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.173, element1 [symbolic] // CHECK:STDOUT: %as_type.e41: type = facet_access_type %impl.elem1.834 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.06e: = specific_impl_function %impl.elem2.ae2, @Iterate.WithSelf.NewCursor(%Iterate.facet) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.06e: = specific_impl_function %impl.elem2.ae2, @Iterate.WithSelf.NewCursor(%Iterate.facet.b38) [symbolic] // CHECK:STDOUT: %ptr.d27: type = ptr_type %as_type.e41 [symbolic] -// CHECK:STDOUT: %.524: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.d51, %Iterate.facet [symbolic] +// CHECK:STDOUT: %.524: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.d51, %Iterate.facet.b38 [symbolic] // CHECK:STDOUT: %impl.elem3.7a5: %.524 = impl_witness_access %Iterate.lookup_impl_witness.173, element3 [symbolic] // CHECK:STDOUT: %DefaultOptionalStorage.257: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.ccb) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.96c: = impl_witness imports.%OptionalStorage.impl_witness_table.96b, @T.as_type.as.OptionalStorage.impl(%facet_value.ccb) [concrete] // CHECK:STDOUT: %OptionalStorage.facet.f7e: %OptionalStorage.type = facet_value %ValueType, (%OptionalStorage.impl_witness.96c) [concrete] // CHECK:STDOUT: %Optional.df6: type = class_type @Optional, @Optional(%OptionalStorage.facet.f7e) [concrete] -// CHECK:STDOUT: %specific_impl_fn.24b: = specific_impl_function %impl.elem3.7a5, @Iterate.WithSelf.Next(%Iterate.facet) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.24b: = specific_impl_function %impl.elem3.7a5, @Iterate.WithSelf.Next(%Iterate.facet.b38) [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.a63: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.f7e) [concrete] // CHECK:STDOUT: %Optional.HasValue.bee: %Optional.HasValue.type.a63 = struct_value () [concrete] // CHECK:STDOUT: %Optional.Get.type.fe3: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.f7e) [concrete] @@ -3426,11 +3431,11 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.daba: @Optional.%Optional.Get.type (%Optional.Get.type.bb9) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.fa1)] // CHECK:STDOUT: %Core.import_ref.0c6: type = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.d50)] // CHECK:STDOUT: %Core.import_ref.887 = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded -// CHECK:STDOUT: %Core.import_ref.6eb5 = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.6eb = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded // CHECK:STDOUT: %Core.import_ref.af2: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d76) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.aa4)] // CHECK:STDOUT: %Core.import_ref.e31: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.671) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.a54)] // CHECK:STDOUT: %Core.import_ref.cea = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.96b = impl_witness_table (%Core.import_ref.0c6, %Core.import_ref.887, %Core.import_ref.6eb5, %Core.import_ref.af2, %Core.import_ref.e31, %Core.import_ref.cea), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.96b = impl_witness_table (%Core.import_ref.0c6, %Core.import_ref.887, %Core.import_ref.6eb, %Core.import_ref.af2, %Core.import_ref.e31, %Core.import_ref.cea), @T.as_type.as.OptionalStorage.impl [concrete] // CHECK:STDOUT: %N: = namespace [concrete] { // CHECK:STDOUT: .ValueType = %ValueType.decl // CHECK:STDOUT: .MutableRange = %MutableRange.decl @@ -3456,7 +3461,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc27_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.173)] -// CHECK:STDOUT: %Iterate.facet.loc31_31.5: %Iterate.type = facet_value %R.as_type.loc27_73.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.5: %Iterate.type = facet_value %R.as_type.loc27_73.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc31_31.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.5cd)] // CHECK:STDOUT: %.loc31_31.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc31_31.5 [symbolic = %.loc31_31.20 (constants.%.592)] // CHECK:STDOUT: %impl.elem2.loc31_31.2: @TestIterate.%.loc31_31.20 (%.592) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc31_31.2 (constants.%impl.elem2.ae2)] @@ -3473,20 +3478,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc31_31.2: @TestIterate.%.loc31_31.22 (%.57c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc31_31.2 (constants.%impl.elem0.152)] // CHECK:STDOUT: %specific_impl_fn.loc31_31.6: = specific_impl_function %impl.elem0.loc31_31.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc31_31.6 (constants.%specific_impl_fn.9fb)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type.c37)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type.c37) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_73.1 (%R.as_type) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc31_31.1: @TestIterate.%.loc31_31.20 (%.592) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element2 [symbolic = %impl.elem2.loc31_31.2 (constants.%impl.elem2.ae2)] // CHECK:STDOUT: %bound_method.loc31_31.1: = bound_method %r.ref, %impl.elem2.loc31_31.1 -// CHECK:STDOUT: %Iterate.facet.loc31_31.1: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] -// CHECK:STDOUT: %.loc31_31.1: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc31_31.1 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] -// CHECK:STDOUT: %Iterate.facet.loc31_31.2: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] -// CHECK:STDOUT: %.loc31_31.2: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc31_31.2 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] -// CHECK:STDOUT: %specific_impl_fn.loc31_31.1: = specific_impl_function %impl.elem2.loc31_31.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet) [symbolic = %specific_impl_fn.loc31_31.4 (constants.%specific_impl_fn.06e)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc31_31.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_31.1 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc31_31.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_31.2 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %specific_impl_fn.loc31_31.1: = specific_impl_function %impl.elem2.loc31_31.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.b38) [symbolic = %specific_impl_fn.loc31_31.4 (constants.%specific_impl_fn.06e)] // CHECK:STDOUT: %bound_method.loc31_31.2: = bound_method %r.ref, %specific_impl_fn.loc31_31.1 // CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.e41) = var_storage invalid // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.e41) to %var = call %bound_method.loc31_31.2(%r.ref) @@ -3497,13 +3502,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %addr.loc31: @TestIterate.%ptr (%ptr.d27) = addr_of %var // CHECK:STDOUT: %impl.elem3.loc31_31.1: @TestIterate.%.loc31_31.21 (%.524) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element3 [symbolic = %impl.elem3.loc31_31.2 (constants.%impl.elem3.7a5)] // CHECK:STDOUT: %bound_method.loc31_31.3: = bound_method %r.ref, %impl.elem3.loc31_31.1 -// CHECK:STDOUT: %Iterate.facet.loc31_31.3: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] -// CHECK:STDOUT: %.loc31_31.3: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc31_31.3 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] -// CHECK:STDOUT: %Iterate.facet.loc31_31.4: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] -// CHECK:STDOUT: %.loc31_31.4: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc31_31.4 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc31_31.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_31.3 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc31_31.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc31_31.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_31.4 [symbolic = %Iterate.facet.loc31_31.5 (constants.%Iterate.facet.b38)] // CHECK:STDOUT: %.loc31_31.5: %Destroy.type = converted constants.%as_type.e41, constants.%impl.elem1.834 [symbolic = %impl.elem1 (constants.%impl.elem1.834)] // CHECK:STDOUT: %.loc31_31.6: %Destroy.type = converted constants.%as_type.e41, constants.%impl.elem1.834 [symbolic = %impl.elem1 (constants.%impl.elem1.834)] -// CHECK:STDOUT: %specific_impl_fn.loc31_31.2: = specific_impl_function %impl.elem3.loc31_31.1, @Iterate.WithSelf.Next(constants.%Iterate.facet) [symbolic = %specific_impl_fn.loc31_31.5 (constants.%specific_impl_fn.24b)] +// CHECK:STDOUT: %specific_impl_fn.loc31_31.2: = specific_impl_function %impl.elem3.loc31_31.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.b38) [symbolic = %specific_impl_fn.loc31_31.5 (constants.%specific_impl_fn.24b)] // CHECK:STDOUT: %bound_method.loc31_31.4: = bound_method %r.ref, %specific_impl_fn.loc31_31.2 // CHECK:STDOUT: %.loc31_31.7: ref %Optional.df6 = temporary_storage // CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.df6 to %.loc31_31.7 = call %bound_method.loc31_31.4(%r.ref, %addr.loc31) @@ -3604,16 +3609,16 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %addr.loc95: = addr_of [concrete = ] +// CHECK:STDOUT: %addr.loc98: = addr_of [concrete = ] // CHECK:STDOUT: %HasValue.ref: = name_ref HasValue, [concrete = ] // CHECK:STDOUT: if br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: // CHECK:STDOUT: %Get.ref: = name_ref Get, [concrete = ] -// CHECK:STDOUT: %.loc95: type = splice_block %ValueType.ref.loc95 [concrete = constants.%ValueType] { -// CHECK:STDOUT: %Cpp.ref.loc95: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] -// CHECK:STDOUT: %N.ref.loc95: = name_ref N, imports.%N [concrete = imports.%N] -// CHECK:STDOUT: %ValueType.ref.loc95: type = name_ref ValueType, imports.%ValueType.decl [concrete = constants.%ValueType] +// CHECK:STDOUT: %.loc98: type = splice_block %ValueType.ref.loc98 [concrete = constants.%ValueType] { +// CHECK:STDOUT: %Cpp.ref.loc98: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] +// CHECK:STDOUT: %N.ref.loc98: = name_ref N, imports.%N [concrete = imports.%N] +// CHECK:STDOUT: %ValueType.ref.loc98: type = name_ref ValueType, imports.%ValueType.decl [concrete = constants.%ValueType] // CHECK:STDOUT: } // CHECK:STDOUT: %i: %ValueType = wrapper_binding i, [concrete = ] // CHECK:STDOUT: %sum.ref: ref %ValueType = name_ref sum, %sum @@ -3624,10 +3629,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%R.db4) { -// CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt.81e -// CHECK:STDOUT: %R.loc27_17.1 => constants.%R.db4 -// CHECK:STDOUT: %R.as_type.loc27_73.1 => constants.%R.as_type.c37 +// CHECK:STDOUT: specific @TestIterate(constants.%R) { +// CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc27_17.1 => constants.%R +// CHECK:STDOUT: %R.as_type.loc27_73.1 => constants.%R.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.17d // CHECK:STDOUT: %r.param_patt.loc27_71.2 => constants.%r.param_patt // CHECK:STDOUT: %r.patt.loc27_71.2 => constants.%r.patt @@ -3639,14 +3644,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Optional.Get.type.bb9: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.Get.fa1: %Optional.Get.type.bb9 = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.e9e: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.HasValue.6cd: %Optional.HasValue.type.e9e = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %DefaultOptionalStorage.d50: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.671: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.a54: %T.as_type.as.OptionalStorage.impl.Get.type.671 = struct_value () [symbolic] @@ -3658,31 +3663,30 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.faf: %T.as_type.as.OptionalStorage.impl.None.type.f62 = struct_value () [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.type: type = facet_type <@CppRangeForIterate> [concrete] -// CHECK:STDOUT: %.Self.aed: %CppRangeForIterate.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.f6b: = lookup_impl_witness %.Self.aed, @CppRangeForIterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.b73: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element0 [symbolic_self] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.595: = lookup_impl_witness %impl.elem0.b73, @CppUnsafeDeref [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a2f: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.595, element0 [symbolic_self] -// CHECK:STDOUT: %impl.elem1.228: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.f6b, element1 [symbolic_self] -// CHECK:STDOUT: %CppRangeForIterate_where.type.1c721f.1: type = facet_type <@CppRangeForIterate where %impl.elem0.b73 impls @Destroy and %impl.elem0.b73 impls @Copy and %impl.elem0.b73 impls @CppUnsafeDeref and %impl.elem0.b73 impls @EqWith, @EqWith(%impl.elem1.228) and %impl.elem0.b73 impls @Inc and %impl.elem0.a2f impls @Destroy and %impl.elem0.a2f impls @Copy and %impl.elem1.228 impls @Destroy and %impl.elem1.228 impls @Copy> [concrete] -// CHECK:STDOUT: %R.39b: %CppRangeForIterate_where.type.1c721f.1 = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.7e2712.2: = lookup_impl_witness %R.39b, @CppRangeForIterate [symbolic] -// CHECK:STDOUT: %impl.elem1.7a0bff.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element1 [symbolic] -// CHECK:STDOUT: %impl.elem0.73eb7f.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.7e2712.2, element0 [symbolic] -// CHECK:STDOUT: %tuple.type.3cf: type = tuple_type (%impl.elem0.73eb7f.2, %impl.elem1.7a0bff.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.69f: = lookup_impl_witness %tuple.type.3cf, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.593: %Destroy.type = facet_value %tuple.type.3cf, (%Destroy.lookup_impl_witness.69f) [symbolic] -// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.aa7: = lookup_impl_witness %impl.elem0.73eb7f.2, @CppUnsafeDeref [symbolic] -// CHECK:STDOUT: %impl.elem0.af7: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.aa7, element0 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.ec3: = lookup_impl_witness %impl.elem0.af7, @Destroy [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.a7a: = lookup_impl_witness %impl.elem0.af7, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.194: %facet_type = facet_value %impl.elem0.af7, (%Destroy.lookup_impl_witness.ec3, %Copy.lookup_impl_witness.a7a) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.c6a: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.49a: %R.as_type.as.Iterate.impl.Next.type.c6a = struct_value () [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.2e2: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%R.39b) [symbolic] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.71b: %R.as_type.as.Iterate.impl.NewCursor.type.2e2 = struct_value () [symbolic] +// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] +// CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.50b: = lookup_impl_witness %.Self.e0b, @CppRangeForIterate [symbolic_self] +// CHECK:STDOUT: %impl.elem0.32d: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.50b, element0 [symbolic_self] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d, @CppUnsafeDeref [symbolic_self] +// CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] +// CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] +// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] +// CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] +// CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] +// CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] +// CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] +// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.8ae: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.064: %T.as_type.as.Iterate.impl.Next.type.8ae = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.09f: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.ae5: %T.as_type.as.Iterate.impl.NewCursor.type.09f = struct_value () [symbolic] // CHECK:STDOUT: %ValueType: type = class_type @ValueType [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -3698,18 +3702,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %ValueType.Op.type.79266b.2: type = fn_type @ValueType.Op.2 [concrete] // CHECK:STDOUT: %ValueType.Op.4c94b9.2: %ValueType.Op.type.79266b.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.c19: = custom_witness (%ValueType.Op.4c94b9.2), @Copy [concrete] -// CHECK:STDOUT: %facet_value.ccb: %facet_type = facet_value %ValueType, (%custom_witness.fef, %custom_witness.c19) [concrete] +// CHECK:STDOUT: %facet_value.ccb: %facet_type.f48 = facet_value %ValueType, (%custom_witness.fef, %custom_witness.c19) [concrete] // CHECK:STDOUT: %Iterate_where.type.f9d: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.ccb> [concrete] // CHECK:STDOUT: %pattern_type.c7b: type = pattern_type %Iterate_where.type.f9d [concrete] -// CHECK:STDOUT: %R.patt.81e: %pattern_type.c7b = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R.db4: %Iterate_where.type.f9d = symbolic_binding R, 0 [symbolic] -// CHECK:STDOUT: %R.as_type.c37: type = facet_access_type %R.db4 [symbolic] -// CHECK:STDOUT: %pattern_type.17d: type = pattern_type %R.as_type.c37 [symbolic] +// CHECK:STDOUT: %R.patt: %pattern_type.c7b = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.f9d = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] +// CHECK:STDOUT: %pattern_type.17d: type = pattern_type %R.as_type [symbolic] // CHECK:STDOUT: %r.param_patt.90c: %pattern_type.17d = value_param_pattern [symbolic] // CHECK:STDOUT: %r.patt.d6c: %pattern_type.17d = at_binding_pattern r, %r.param_patt.90c [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.173: = lookup_impl_witness %R.db4, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.b38: %Iterate.type = facet_value %R.as_type.c37, (%Iterate.lookup_impl_witness.173) [symbolic] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.173: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.b38: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.173) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.5cd: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.b38) [symbolic] // CHECK:STDOUT: %Iterate.WithSelf.Next.type.d51: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.b38) [symbolic] // CHECK:STDOUT: %.592: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.5cd, %Iterate.facet.b38 [symbolic] @@ -3733,8 +3737,8 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %MaybeUnformed.669: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.306) [concrete] // CHECK:STDOUT: %.b36: type = maybe_unformed_type %ValueType [concrete] // CHECK:STDOUT: %struct_type.value.has_value.5a1: type = struct_type {.value: %MaybeUnformed.669, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.3c0, @Optional.HasValue(%OptionalStorage.facet.cac) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.28e, @Optional.Get(%OptionalStorage.facet.cac) [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.ff3: = specific_function %Optional.HasValue.3c0, @Optional.HasValue(%OptionalStorage.facet.cac) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.c88: = specific_function %Optional.Get.28e, @Optional.Get(%OptionalStorage.facet.cac) [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.7: type = fn_type @Destroy.Op.loc38_31.6 [concrete] @@ -3760,37 +3764,34 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %custom_witness.04a: = custom_witness (%Iterator.Op.549055.2), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.fa7609.3: type = fn_type @Iterator.Op.3 [concrete] // CHECK:STDOUT: %Iterator.Op.549055.3: %Iterator.Op.type.fa7609.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.cfc: = custom_witness (%Iterator.Op.549055.3), @Copy [concrete] +// CHECK:STDOUT: %custom_witness.01a: = custom_witness (%Iterator.Op.549055.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.c66: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Iterator) [concrete] -// CHECK:STDOUT: %Iterator.Op.type.fa7609.4: type = fn_type @Iterator.Op.4 [concrete] -// CHECK:STDOUT: %Iterator.Op.549055.4: %Iterator.Op.type.fa7609.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.01a: = custom_witness (%Iterator.Op.549055.4), @Inc [concrete] -// CHECK:STDOUT: %facet_value.88d: %CppRangeForIterate_where.type.1c721f.1 = facet_value %MutableAndConstRange, (%custom_witness.fef, %custom_witness.c19, %custom_witness.a40, %custom_witness.04a, %custom_witness.cfc, %custom_witness.dd5, %custom_witness.c66, %custom_witness.01a) [concrete] +// CHECK:STDOUT: %facet_value.32f: %CppRange_where.type.d682d6.1 = facet_value %MutableAndConstRange, (%custom_witness.fef, %custom_witness.c19, %custom_witness.a40, %custom_witness.04a, %custom_witness.dd5, %custom_witness.01a, %custom_witness.c66) [concrete] // CHECK:STDOUT: %tuple.type.56e: type = tuple_type (%Iterator, %Iterator) [concrete] // CHECK:STDOUT: %Destroy.Op.type.1d8f74.8: type = fn_type @Destroy.Op.2 [concrete] // CHECK:STDOUT: %Destroy.Op.1a2547.8: %Destroy.Op.type.1d8f74.8 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.df9cc1.8: = custom_witness (%Destroy.Op.1a2547.8), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.7aa: %Destroy.type = facet_value %tuple.type.56e, (%custom_witness.df9cc1.8) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.d03: = impl_witness imports.%Iterate.impl_witness_table.cd6, @R.as_type.as.Iterate.impl(%facet_value.88d) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.type.1da: type = fn_type @R.as_type.as.Iterate.impl.NewCursor, @R.as_type.as.Iterate.impl(%facet_value.88d) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.9f9: %R.as_type.as.Iterate.impl.NewCursor.type.1da = struct_value () [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.type.476: type = fn_type @R.as_type.as.Iterate.impl.Next, @R.as_type.as.Iterate.impl(%facet_value.88d) [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.622: %R.as_type.as.Iterate.impl.Next.type.476 = struct_value () [concrete] -// CHECK:STDOUT: %Iterate.facet.8e6: %Iterate.type = facet_value %MutableAndConstRange, (%Iterate.impl_witness.d03) [concrete] -// CHECK:STDOUT: %facet_value.fb9: %Iterate_where.type.f9d = facet_value %MutableAndConstRange, (%Iterate.impl_witness.d03) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.b79: = impl_witness imports.%Iterate.impl_witness_table.314, @T.as_type.as.Iterate.impl(%facet_value.32f) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.ffe: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.32f) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.39d: %T.as_type.as.Iterate.impl.NewCursor.type.ffe = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.a21: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.32f) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.96d: %T.as_type.as.Iterate.impl.Next.type.a21 = struct_value () [concrete] +// CHECK:STDOUT: %Iterate.facet.1ee: %Iterate.type = facet_value %MutableAndConstRange, (%Iterate.impl_witness.b79) [concrete] +// CHECK:STDOUT: %facet_value.1f3: %Iterate_where.type.f9d = facet_value %MutableAndConstRange, (%Iterate.impl_witness.b79) [concrete] // CHECK:STDOUT: %r.param_patt.8bb: %pattern_type.394 = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.ac4: %pattern_type.394 = at_binding_pattern r, %r.param_patt.8bb [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.726: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.8e6) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.604: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.8e6) [concrete] -// CHECK:STDOUT: %.c8e: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.726, %Iterate.facet.8e6 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %R.as_type.as.Iterate.impl.NewCursor.9f9, @R.as_type.as.Iterate.impl.NewCursor(%facet_value.88d) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.892: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.1ee) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.5cf: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.1ee) [concrete] +// CHECK:STDOUT: %.631: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.892, %Iterate.facet.1ee [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.39d, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.32f) [concrete] // CHECK:STDOUT: %ptr.484: type = ptr_type %tuple.type.56e [concrete] -// CHECK:STDOUT: %.06b: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.604, %Iterate.facet.8e6 [concrete] -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %R.as_type.as.Iterate.impl.Next.622, @R.as_type.as.Iterate.impl.Next(%facet_value.88d) [concrete] +// CHECK:STDOUT: %.60d: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.5cf, %Iterate.facet.1ee [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.96d, @T.as_type.as.Iterate.impl.Next(%facet_value.32f) [concrete] // CHECK:STDOUT: %Destroy.WithSelf.Op.type.b7b: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%Destroy.facet.7aa) [concrete] // CHECK:STDOUT: %.1ad: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.b7b, %Destroy.facet.7aa [concrete] // CHECK:STDOUT: %complete_type.1b5: = complete_type_witness %tuple.type.56e [concrete] @@ -3810,11 +3811,11 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.e31: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.671) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.a54)] // CHECK:STDOUT: %Core.import_ref.cea = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], unloaded // CHECK:STDOUT: %OptionalStorage.impl_witness_table.199 = impl_witness_table (%Core.import_ref.0c6, %Core.import_ref.6d6, %Core.import_ref.6f3, %Core.import_ref.af2, %Core.import_ref.e31, %Core.import_ref.cea), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.301: %facet_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.194)] -// CHECK:STDOUT: %Core.import_ref.89f: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.593)] -// CHECK:STDOUT: %Core.import_ref.f6b: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor.type (%R.as_type.as.Iterate.impl.NewCursor.type.2e2) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.NewCursor (constants.%R.as_type.as.Iterate.impl.NewCursor.71b)] -// CHECK:STDOUT: %Core.import_ref.630: @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next.type (%R.as_type.as.Iterate.impl.Next.type.c6a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @R.as_type.as.Iterate.impl.%R.as_type.as.Iterate.impl.Next (constants.%R.as_type.as.Iterate.impl.Next.49a)] -// CHECK:STDOUT: %Iterate.impl_witness_table.cd6 = impl_witness_table (%Core.import_ref.301, %Core.import_ref.89f, %Core.import_ref.f6b, %Core.import_ref.630), @R.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] +// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.6fc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.09f) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.ae5)] +// CHECK:STDOUT: %Core.import_ref.8cc: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.8ae) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.064)] +// CHECK:STDOUT: %Iterate.impl_witness_table.314 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.6fc, %Core.import_ref.8cc), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %N: = namespace [concrete] { // CHECK:STDOUT: .ValueType = %ValueType.decl // CHECK:STDOUT: .MutableAndConstRange = %MutableAndConstRange.decl @@ -3857,19 +3858,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %impl.elem0.loc38_31.2: @TestIterate.%.loc38_31.22 (%.57c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc38_31.2 (constants.%impl.elem0.152)] // CHECK:STDOUT: %specific_impl_fn.loc38_31.6: = specific_impl_function %impl.elem0.loc38_31.2, @Destroy.WithSelf.Op(%impl.elem1) [symbolic = %specific_impl_fn.loc38_31.6 (constants.%specific_impl_fn.9fb)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc34_73.1 (%R.as_type.c37)) { +// CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc34_73.1 (%R.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc34_73.1 (%R.as_type.c37) = name_ref r, %r +// CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc34_73.1 (%R.as_type) = name_ref r, %r // CHECK:STDOUT: %impl.elem2.loc38_31.1: @TestIterate.%.loc38_31.20 (%.592) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element2 [symbolic = %impl.elem2.loc38_31.2 (constants.%impl.elem2.ae2)] // CHECK:STDOUT: %bound_method.loc38_31.1: = bound_method %r.ref, %impl.elem2.loc38_31.1 -// CHECK:STDOUT: %Iterate.facet.loc38_31.1: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %.loc38_31.1: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc38_31.1 [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %Iterate.facet.loc38_31.2: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %.loc38_31.2: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc38_31.2 [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc38_31.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc38_31.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc38_31.1 [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc38_31.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc38_31.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc38_31.2 [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] // CHECK:STDOUT: %specific_impl_fn.loc38_31.1: = specific_impl_function %impl.elem2.loc38_31.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.b38) [symbolic = %specific_impl_fn.loc38_31.4 (constants.%specific_impl_fn.06e)] // CHECK:STDOUT: %bound_method.loc38_31.2: = bound_method %r.ref, %specific_impl_fn.loc38_31.1 // CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.e41) = var_storage invalid @@ -3881,10 +3882,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %addr.loc38: @TestIterate.%ptr (%ptr.d27) = addr_of %var // CHECK:STDOUT: %impl.elem3.loc38_31.1: @TestIterate.%.loc38_31.21 (%.524) = impl_witness_access constants.%Iterate.lookup_impl_witness.173, element3 [symbolic = %impl.elem3.loc38_31.2 (constants.%impl.elem3.7a5)] // CHECK:STDOUT: %bound_method.loc38_31.3: = bound_method %r.ref, %impl.elem3.loc38_31.1 -// CHECK:STDOUT: %Iterate.facet.loc38_31.3: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %.loc38_31.3: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc38_31.3 [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %Iterate.facet.loc38_31.4: %Iterate.type = facet_value constants.%R.as_type.c37, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] -// CHECK:STDOUT: %.loc38_31.4: %Iterate.type = converted constants.%R.as_type.c37, %Iterate.facet.loc38_31.4 [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc38_31.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc38_31.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc38_31.3 [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %Iterate.facet.loc38_31.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.173) [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] +// CHECK:STDOUT: %.loc38_31.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc38_31.4 [symbolic = %Iterate.facet.loc38_31.5 (constants.%Iterate.facet.b38)] // CHECK:STDOUT: %.loc38_31.5: %Destroy.type = converted constants.%as_type.e41, constants.%impl.elem1.834 [symbolic = %impl.elem1 (constants.%impl.elem1.834)] // CHECK:STDOUT: %.loc38_31.6: %Destroy.type = converted constants.%as_type.e41, constants.%impl.elem1.834 [symbolic = %impl.elem1 (constants.%impl.elem1.834)] // CHECK:STDOUT: %specific_impl_fn.loc38_31.2: = specific_impl_function %impl.elem3.loc38_31.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.b38) [symbolic = %specific_impl_fn.loc38_31.5 (constants.%specific_impl_fn.24b)] @@ -3895,7 +3896,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc38_31.9: %Optional.HasValue.type.36e = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.3c0] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.36e = name_ref HasValue, %.loc38_31.9 [concrete = constants.%Optional.HasValue.3c0] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc38_31.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.specific_fn.ff3] // CHECK:STDOUT: %bound_method.loc38_31.5: = bound_method %.loc38_31.8, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc38_31.10: %Optional.c14 = acquire_value %.loc38_31.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc38_31.5(%.loc38_31.10) @@ -3907,7 +3908,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc38_31.13: %Optional.Get.type.862 = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.28e] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.862 = name_ref Get, %.loc38_31.13 [concrete = constants.%Optional.Get.28e] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc38_31.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.specific_fn.c88] // CHECK:STDOUT: %bound_method.loc38_31.6: = bound_method %.loc38_31.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc38_31.14: ref %ValueType = temporary_storage // CHECK:STDOUT: %.loc38_31.15: %Optional.c14 = acquire_value %.loc38_31.8 @@ -3983,38 +3984,38 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.e41 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %mc.ref: ref %MutableAndConstRange = name_ref mc, %mc -// CHECK:STDOUT: %impl.elem2: %.c8e = impl_witness_access constants.%Iterate.impl_witness.d03, element2 [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.9f9] +// CHECK:STDOUT: %impl.elem2: %.631 = impl_witness_access constants.%Iterate.impl_witness.b79, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.39d] // CHECK:STDOUT: %bound_method.loc80_32.1: = bound_method %mc.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc80_32.1: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.a40, constants.%custom_witness.04a, constants.%custom_witness.cfc, constants.%custom_witness.dd5, constants.%custom_witness.c66, constants.%custom_witness.01a) [concrete = constants.%facet_value.88d] -// CHECK:STDOUT: %.loc80_32.1: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableAndConstRange, %facet_value.loc80_32.1 [concrete = constants.%facet_value.88d] -// CHECK:STDOUT: %facet_value.loc80_32.2: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.a40, constants.%custom_witness.04a, constants.%custom_witness.cfc, constants.%custom_witness.dd5, constants.%custom_witness.c66, constants.%custom_witness.01a) [concrete = constants.%facet_value.88d] -// CHECK:STDOUT: %.loc80_32.2: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableAndConstRange, %facet_value.loc80_32.2 [concrete = constants.%facet_value.88d] -// CHECK:STDOUT: %specific_fn.loc80_32.1: = specific_function %impl.elem2, @R.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.88d) [concrete = constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc80_32.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.a40, constants.%custom_witness.04a, constants.%custom_witness.dd5, constants.%custom_witness.01a, constants.%custom_witness.c66) [concrete = constants.%facet_value.32f] +// CHECK:STDOUT: %.loc80_32.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc80_32.1 [concrete = constants.%facet_value.32f] +// CHECK:STDOUT: %facet_value.loc80_32.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.a40, constants.%custom_witness.04a, constants.%custom_witness.dd5, constants.%custom_witness.01a, constants.%custom_witness.c66) [concrete = constants.%facet_value.32f] +// CHECK:STDOUT: %.loc80_32.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc80_32.2 [concrete = constants.%facet_value.32f] +// CHECK:STDOUT: %specific_fn.loc80_32.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.32f) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc80_32.2: = bound_method %mc.ref, %specific_fn.loc80_32.1 // CHECK:STDOUT: %var: ref %tuple.type.56e = var_storage invalid // CHECK:STDOUT: %.loc80_30.1: %MutableAndConstRange = acquire_value %mc.ref -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.56e to %var = call %bound_method.loc80_32.2(%.loc80_30.1) -// CHECK:STDOUT: assign %var, %R.as_type.as.Iterate.impl.NewCursor.call +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.56e to %var = call %bound_method.loc80_32.2(%.loc80_30.1) +// CHECK:STDOUT: assign %var, %T.as_type.as.Iterate.impl.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr.loc80: %ptr.484 = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.06b = impl_witness_access constants.%Iterate.impl_witness.d03, element3 [concrete = constants.%R.as_type.as.Iterate.impl.Next.622] +// CHECK:STDOUT: %impl.elem3: %.60d = impl_witness_access constants.%Iterate.impl_witness.b79, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.96d] // CHECK:STDOUT: %bound_method.loc80_32.3: = bound_method %mc.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc80_32.3: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.a40, constants.%custom_witness.04a, constants.%custom_witness.cfc, constants.%custom_witness.dd5, constants.%custom_witness.c66, constants.%custom_witness.01a) [concrete = constants.%facet_value.88d] -// CHECK:STDOUT: %.loc80_32.3: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableAndConstRange, %facet_value.loc80_32.3 [concrete = constants.%facet_value.88d] -// CHECK:STDOUT: %facet_value.loc80_32.4: %CppRangeForIterate_where.type.1c721f.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.a40, constants.%custom_witness.04a, constants.%custom_witness.cfc, constants.%custom_witness.dd5, constants.%custom_witness.c66, constants.%custom_witness.01a) [concrete = constants.%facet_value.88d] -// CHECK:STDOUT: %.loc80_32.4: %CppRangeForIterate_where.type.1c721f.1 = converted constants.%MutableAndConstRange, %facet_value.loc80_32.4 [concrete = constants.%facet_value.88d] -// CHECK:STDOUT: %specific_fn.loc80_32.2: = specific_function %impl.elem3, @R.as_type.as.Iterate.impl.Next(constants.%facet_value.88d) [concrete = constants.%R.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc80_32.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.a40, constants.%custom_witness.04a, constants.%custom_witness.dd5, constants.%custom_witness.01a, constants.%custom_witness.c66) [concrete = constants.%facet_value.32f] +// CHECK:STDOUT: %.loc80_32.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc80_32.3 [concrete = constants.%facet_value.32f] +// CHECK:STDOUT: %facet_value.loc80_32.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.fef, constants.%custom_witness.c19, constants.%custom_witness.a40, constants.%custom_witness.04a, constants.%custom_witness.dd5, constants.%custom_witness.01a, constants.%custom_witness.c66) [concrete = constants.%facet_value.32f] +// CHECK:STDOUT: %.loc80_32.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc80_32.4 [concrete = constants.%facet_value.32f] +// CHECK:STDOUT: %specific_fn.loc80_32.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.32f) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc80_32.4: = bound_method %mc.ref, %specific_fn.loc80_32.2 // CHECK:STDOUT: %.loc80_32.5: ref %Optional.c14 = temporary_storage // CHECK:STDOUT: %.loc80_30.2: %MutableAndConstRange = acquire_value %mc.ref -// CHECK:STDOUT: %R.as_type.as.Iterate.impl.Next.call: init %Optional.c14 to %.loc80_32.5 = call %bound_method.loc80_32.4(%.loc80_30.2, %addr.loc80) -// CHECK:STDOUT: %.loc80_32.6: ref %Optional.c14 = temporary %.loc80_32.5, %R.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.c14 to %.loc80_32.5 = call %bound_method.loc80_32.4(%.loc80_30.2, %addr.loc80) +// CHECK:STDOUT: %.loc80_32.6: ref %Optional.c14 = temporary %.loc80_32.5, %T.as_type.as.Iterate.impl.Next.call // CHECK:STDOUT: %.loc80_32.7: %Optional.HasValue.type.36e = specific_constant imports.%Core.import_ref.bb6, @Optional(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.3c0] // CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.36e = name_ref HasValue, %.loc80_32.7 [concrete = constants.%Optional.HasValue.3c0] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc80_32.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.HasValue.specific_fn.ff3] // CHECK:STDOUT: %bound_method.loc80_32.5: = bound_method %.loc80_32.6, %Optional.HasValue.specific_fn // CHECK:STDOUT: %.loc80_32.8: %Optional.c14 = acquire_value %.loc80_32.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc80_32.5(%.loc80_32.8) @@ -4026,7 +4027,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc80_32.11: %Optional.Get.type.862 = specific_constant imports.%Core.import_ref.daba, @Optional(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.28e] // CHECK:STDOUT: %Get.ref: %Optional.Get.type.862 = name_ref Get, %.loc80_32.11 [concrete = constants.%Optional.Get.28e] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc80_32.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.cac) [concrete = constants.%Optional.Get.specific_fn.c88] // CHECK:STDOUT: %bound_method.loc80_32.6: = bound_method %.loc80_32.6, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc80_32.12: ref %ValueType = temporary_storage // CHECK:STDOUT: %.loc80_32.13: %Optional.c14 = acquire_value %.loc80_32.6 @@ -4062,18 +4063,18 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%R.db4) { -// CHECK:STDOUT: %R.patt.loc34_17.2 => constants.%R.patt.81e -// CHECK:STDOUT: %R.loc34_17.1 => constants.%R.db4 -// CHECK:STDOUT: %R.as_type.loc34_73.1 => constants.%R.as_type.c37 +// CHECK:STDOUT: specific @TestIterate(constants.%R) { +// CHECK:STDOUT: %R.patt.loc34_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc34_17.1 => constants.%R +// CHECK:STDOUT: %R.as_type.loc34_73.1 => constants.%R.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.17d // CHECK:STDOUT: %r.param_patt.loc34_71.2 => constants.%r.param_patt.90c // CHECK:STDOUT: %r.patt.loc34_71.2 => constants.%r.patt.d6c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.fb9) { -// CHECK:STDOUT: %R.patt.loc34_17.2 => constants.%R.patt.81e -// CHECK:STDOUT: %R.loc34_17.1 => constants.%facet_value.fb9 +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.1f3) { +// CHECK:STDOUT: %R.patt.loc34_17.2 => constants.%R.patt +// CHECK:STDOUT: %R.loc34_17.1 => constants.%facet_value.1f3 // CHECK:STDOUT: %R.as_type.loc34_73.1 => constants.%MutableAndConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.394 // CHECK:STDOUT: %r.param_patt.loc34_71.2 => constants.%r.param_patt.8bb @@ -4081,20 +4082,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc34 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.d03 -// CHECK:STDOUT: %Iterate.facet.loc38_31.5 => constants.%Iterate.facet.8e6 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.726 -// CHECK:STDOUT: %.loc38_31.20 => constants.%.c8e -// CHECK:STDOUT: %impl.elem2.loc38_31.2 => constants.%R.as_type.as.Iterate.impl.NewCursor.9f9 -// CHECK:STDOUT: %specific_impl_fn.loc38_31.4 => constants.%R.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.b79 +// CHECK:STDOUT: %Iterate.facet.loc38_31.5 => constants.%Iterate.facet.1ee +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.892 +// CHECK:STDOUT: %.loc38_31.20 => constants.%.631 +// CHECK:STDOUT: %impl.elem2.loc38_31.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.39d +// CHECK:STDOUT: %specific_impl_fn.loc38_31.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn // CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.7aa // CHECK:STDOUT: %as_type => constants.%tuple.type.56e // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.1b5 // CHECK:STDOUT: %ptr => constants.%ptr.484 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.604 -// CHECK:STDOUT: %.loc38_31.21 => constants.%.06b -// CHECK:STDOUT: %impl.elem3.loc38_31.2 => constants.%R.as_type.as.Iterate.impl.Next.622 -// CHECK:STDOUT: %specific_impl_fn.loc38_31.5 => constants.%R.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.5cf +// CHECK:STDOUT: %.loc38_31.21 => constants.%.60d +// CHECK:STDOUT: %impl.elem3.loc38_31.2 => constants.%T.as_type.as.Iterate.impl.Next.96d +// CHECK:STDOUT: %specific_impl_fn.loc38_31.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn // CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.b7b // CHECK:STDOUT: %.loc38_31.22 => constants.%.1ad // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.df9cc1.8 diff --git a/toolchain/check/testdata/where_expr/subst.carbon b/toolchain/check/testdata/where_expr/subst.carbon new file mode 100644 index 000000000000..52db01c3c6d8 --- /dev/null +++ b/toolchain/check/testdata/where_expr/subst.carbon @@ -0,0 +1,30 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/where_expr/subst.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/where_expr/subst.carbon + +// --- subst_into_named_constraint.carbon +library "[[@TEST_NAME]]"; + +interface A { let T: type; } +constraint B { + require impls A; + alias U = Self.(A.T); +} + +// When type-checking this, we will thaw the `.Self` in the `.U = ()` +// constraint. That performs a substitution of a SpecificConstant that refers +// into the definition region of constraint B's NamedConstraintWithSelf generic. +// For this to work, we need to resolve the definition region of that specific +// as part of the substitution process. +fn F(generic _: B where .U = ()) {} + +class C { impl as A where .T = () {} } +fn Test() { F(C); } diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index 783c824b7373..606b124b0e5f 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -1833,6 +1833,7 @@ struct SpecificConstant { static constexpr auto Kind = InstKind::SpecificConstant.Define( {.ir_name = "specific_constant", .expr_category = ComputedExprCategory::SameAsFirstOperand, + .constant_needs_inst_id = InstConstantNeedsInstIdKind::DuringEvaluation, .is_lowered = false}); TypeId type_id;