forked from Peternator7/strum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disambiguate associated items in trait impls
The addition of TryFrom<&str> for EnumString breaks for enums that have a variant called "Error". Rewrite as <Self as Trait> where associated types are used as the return type for trait functions. Example: ```rust pub enum Test { Error, } ``` error: ambiguous associated item --> src/lib.rs:3:10 | 3 | #[derive(EnumString)] | ^^^^^^^^^^ | = 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 <rust-lang/rust#57644>
- Loading branch information
1 parent
5c0ee93
commit a483498
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters