Replace the modern safe FormatterServices allocation alias

Proprietary

Modern-.NET preparation recipe replacing resolved FormatterServices.GetSafeUninitializedObject(Type) calls with RuntimeHelpers.GetUninitializedObject(Type). On .NET 8 the obsolete method forwards directly to that runtime helper, with identical type annotations. Preserve constructor-free allocation, argument evaluation and call/argument IDs. This is not a Framework CAS/trust-policy emulation claim; select it for a modern-.NET target. Leave method groups, unresolved/lookalike calls, discarded qualifier comments, conditional snapshots, expression-tree/lambda/query contexts and unsupported legacy alias/static/scoped/global imports unchanged. Retain namespace imports and other formatter operations; not in version composites.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net8.UseRuntimeHelpersForSafeUninitializedObject
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net8.UseRuntimeHelpersForSafeUninitializedObject

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.