How to Use Experimental Swift Versions and Features in Xcode
We can click the Universal download link to install the Swift toolchain that you’re interested in. For example, if you’re eager to try out a cutting edge feature like Swift 6’s isolation regions feature you can download the trunk development toolchain. Or if you’re interested in trying out a feature that has made its way into the Swift 6 release branch, you could download the Swift 6.0 Development toolchain.
Once you’ve downloaded your toolchain and you can install it through a convenient installer. This process is pretty self explanatory.
After installing the toolchain, you can activate this new Swift version in Xcode through the Xcode → Toolchains menu.
[…]
To try out new Swift features, we sometimes need to enable them through a compiler flag. The evolution proposal that goes along with the feature you’d like to try will have an Implementation field in its header that explains which toolchain contains the feature, and whether the feature is gated behind a flag or not.