Skip to content

Commit 76dd176

Browse files
Use fully-qualified path to refer to the associated type
Prevent "ambiguous associated type" if one of the variants is named `Numeric`.
1 parent cc09d89 commit 76dd176

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

enumflags_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ fn gen_enumflags(ast: &mut DeriveInput, default: Vec<Ident>) -> Result<TokenStre
345345
const BITFLAGS_TYPE_NAME : &'static str =
346346
concat!("BitFlags<", stringify!(#ident), ">");
347347

348-
fn bits(self) -> Self::Numeric {
348+
fn bits(self) -> <Self as ::enumflags2::_internal::RawBitFlags>::Numeric {
349349
self as #repr
350350
}
351351
}

0 commit comments

Comments
 (0)