Skip to content

Commit 174e9e8

Browse files
committed
glib-macros: Disambiguate TryFrom<usize>::Error for DerivedPropertiesEnum
This should allow structs with a property named "error" to compile successfully
1 parent 4510666 commit 174e9e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

glib-macros/src/properties.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ fn expand_properties_enum(props: &[PropDesc]) -> TokenStream2 {
620620
impl std::convert::TryFrom<usize> for DerivedPropertiesEnum {
621621
type Error = usize;
622622

623-
fn try_from(item: usize) -> ::core::result::Result<Self, Self::Error> {
623+
fn try_from(item: usize) -> ::core::result::Result<Self, <Self as std::convert::TryFrom<usize>>::Error> {
624624
match item {
625625
#(#indices => ::core::result::Result::Ok(Self::#properties),)*
626626
_ => ::core::result::Result::Err(item)

0 commit comments

Comments
 (0)