Skip to content

avoid ambiguous associated item in TryFrom implementations#376

Closed
hunts wants to merge 1 commit intocapnproto:masterfrom
hunts:avoid-ambiguous-associated-items
Closed

avoid ambiguous associated item in TryFrom implementations#376
hunts wants to merge 1 commit intocapnproto:masterfrom
hunts:avoid-ambiguous-associated-items

Conversation

@hunts
Copy link

@hunts hunts commented Jan 30, 2023

This was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

See also: rust-lang/rust#57644

Without this change, latest versions of cargo would report this:

error: ambiguous associated item
   --> src/log_capnp.rs:213:69
    |
213 |             fn try_from(value: u16) -> ::core::result::Result<Self, Self::Error> {
    |                                                                     ^^^^^^^^^^^ help: use fully-qualified syntax: `<Level as TryFrom>::Error`
    |

This was previously accepted by the compiler but is being
phased out; it will become a hard error in a future release!

See also: rust-lang/rust#57644
@dwrensha
Copy link
Member

Thanks! Fixed in 59f2ad3. (Your version didn't quite work.)

@dwrensha dwrensha closed this Jan 30, 2023
@hunts hunts deleted the avoid-ambiguous-associated-items branch January 30, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants