Skip to content

Commit

Permalink
glib-macros: Disambiguate TryFrom<usize>::Error for DerivedProperties…
Browse files Browse the repository at this point in the history
…Enum

This should allow structs with a property named "error" to compile successfully
  • Loading branch information
rmnscnce committed Apr 12, 2023
1 parent 4510666 commit 174e9e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glib-macros/src/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ fn expand_properties_enum(props: &[PropDesc]) -> TokenStream2 {
impl std::convert::TryFrom<usize> for DerivedPropertiesEnum {
type Error = usize;

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

0 comments on commit 174e9e8

Please sign in to comment.