"Implications of UnscopedRef attribute"

static IntRefContainer CreateContainer() {
	var x = 123;
	var container = new IntRefContainer();
	container.AssignAll(ref x); // Compiler prohibits this because of the [UnscopedRef] attribute
	return container;
}


Code snippet taken from "Complete C# Quick Reference - C# 11".