diff --git a/src/Compilers/Core/CodeAnalysisTest/Collections/ImmutableSegmentedListBuilderTest.cs b/src/Compilers/Core/CodeAnalysisTest/Collections/ImmutableSegmentedListBuilderTest.cs index f369a082b2b58..90c8bfb3be889 100644 --- a/src/Compilers/Core/CodeAnalysisTest/Collections/ImmutableSegmentedListBuilderTest.cs +++ b/src/Compilers/Core/CodeAnalysisTest/Collections/ImmutableSegmentedListBuilderTest.cs @@ -380,7 +380,7 @@ public void ItemRef() var builder = new ImmutableSegmentedList.Builder(list); ref readonly var safeRef = ref builder.ItemRef(1); - ref var unsafeRef = ref Unsafe.AsRef(in safeRef); + ref var unsafeRef = ref Unsafe.AsRef(safeRef); Assert.Equal(2, builder.ItemRef(1)); diff --git a/src/Compilers/Core/CodeAnalysisTest/Collections/ImmutableSegmentedListTest.cs b/src/Compilers/Core/CodeAnalysisTest/Collections/ImmutableSegmentedListTest.cs index b153618443d3e..87f16a050f0e5 100644 --- a/src/Compilers/Core/CodeAnalysisTest/Collections/ImmutableSegmentedListTest.cs +++ b/src/Compilers/Core/CodeAnalysisTest/Collections/ImmutableSegmentedListTest.cs @@ -815,7 +815,7 @@ public void ItemRef() var list = new[] { 1, 2, 3 }.ToImmutableSegmentedList(); ref readonly var safeRef = ref list.ItemRef(1); - ref var unsafeRef = ref Unsafe.AsRef(in safeRef); + ref var unsafeRef = ref Unsafe.AsRef(safeRef); Assert.Equal(2, list.ItemRef(1));