Xcode 13.0. If you're banging out SwiftUI code, and you got the following error message:
Generic parameter 'Destination' could not be inferred
and it'll follow up with the following error as well (if you tried to navigate to a Text view):
Cannot convert value of type 'Text' to expected argument type '() -> Destination'
then you probably tried to create a NavigationLink and let auto-complete add the following code:
NavigationLink(tag: Hashable, selection: Binding<Hashable?>, destination: () -> _, label: () -> _)
The solution is to not use the auto-complete version of NavigationLink, but instead use a different sequence of parameters:
NavigationLink(destination: () -> _, tag: Hashable, selection: Binding<Hashable?>, label: () -> _)