We want to ensure that we use spans for both decls that include where the
name was defined, whether that was from the link_name attribute or not.
Get the name of the symbol that’s linked against for a given extern declaration. That is,
the name specified in a #[link_name = …] attribute if one was specified, else, just the
symbol’s name.
Checks whether two types are structurally the same enough that the declarations shouldn’t
clash. We need this so we don’t emit a lint when two modules both declare an extern struct,
with the same members (as the declarations shouldn’t clash).