xso-proc: avoid an `ambiguous_associated_items` error

Jonas Schäfer created

rustc forbids cases where an enum variant and an associated type of a
trait conflict for a while now [1].

We must thus avoid referring to associated items on types we do not
control in the macros. There was only one case I found, and it was in
the TryFrom implementation, and could be easily resolved by explicitly
spelling out Self::Error.

   [1]: https://github.com/rust-lang/rust/issues/57644

Change summary

xso-proc/src/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

xso-proc/src/lib.rs 🔗

@@ -95,7 +95,7 @@ fn from_xml_impl(input: Item) -> Result<TokenStream> {
         impl ::core::convert::TryFrom<::xso::exports::minidom::Element> for #ident {
             type Error = ::xso::error::FromElementError;
 
-            fn try_from(other: ::xso::exports::minidom::Element) -> ::core::result::Result<Self, Self::Error> {
+            fn try_from(other: ::xso::exports::minidom::Element) -> ::core::result::Result<Self, ::xso::error::FromElementError> {
                 ::xso::try_from_element(other)
             }
         }