Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ambiguous_associated_items case #4

Merged
merged 1 commit into from
Jun 30, 2019

Conversation

rgiot
Copy link
Contributor

@rgiot rgiot commented Jun 30, 2019

Hello,

my enum looks like that:

#[derive(IntoPrimitive, TryFromPrimitive, Copy, Clone, PartialEq, Debug)]
#[repr(u8)]
pub enum BasicTokenNoPrefix {
    EndOfTokenisedLine = 0,
    StatementSeparator = 1,

    [...]
    Error,
    [...]
}

and I obtain this compilation error when using it:

error: ambiguous associated item
 --> src/basic/tokens.rs:7:10
  |
7 | #[derive(IntoPrimitive, TryFromPrimitive, Copy, Clone, PartialEq, Debug)]
  |          ^^^^^^^^^^^^^^^^
  |
  = note: #[deny(ambiguous_associated_items)] on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #57644 <https://github.com/rust-lang/rust/issues/57644>
note: `Error` could refer to variant defined here
 --> src/basic/tokens.rs:145:5
  |
14|     Error,
  |     ^^^^^
note: `Error` could also refer to associated type defined here

This patch allows to fix this issue.

@illicitonion illicitonion merged commit 5f15458 into illicitonion:master Jun 30, 2019
@illicitonion
Copy link
Owner

Thanks for the fix! I've just published 0.2.2 with this commit included :)

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