Skip to content

Commit da5ac94

Browse files
Remove unused EquatableDiagnostic type (#403)
Since #401 factored diagnostics out of the incremental model, EquatableDiagnostic is no longer used anywhere in the codebase. Raw Diagnostic objects now flow through a separate pipeline that preserves source locations for #pragma warning disable support. Also removes the now-unused GetLocationTrimmed extension method from RoslynHelpers, which was only called by EquatableDiagnostic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ac6dc95 commit da5ac94

2 files changed

Lines changed: 0 additions & 80 deletions

File tree

src/PolyType.Roslyn/Helpers/RoslynHelpers.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,6 @@ attributeData.ConstructorArguments[0].Value is INamedTypeSymbol typeParam &&
341341
return builderType is { IsGenericType: false } && builderMethod is not null;
342342
}
343343
}
344-
345-
/// <summary>
346-
/// Get a location object that doesn't capture a reference to Compilation.
347-
/// </summary>
348-
public static Location GetLocationTrimmed(this Location location)
349-
{
350-
return Location.Create(location.SourceTree?.FilePath ?? string.Empty, location.SourceSpan, location.GetLineSpan().Span);
351-
}
352-
353344
public static ICollection<ITypeSymbol> GetSortedTypeHierarchy(this ITypeSymbol type)
354345
{
355346
if (type.TypeKind is not TypeKind.Interface)

src/PolyType.Roslyn/IncrementalTypes/EquatableDiagnostic.cs

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)