Skip to content

Commit

Permalink
Modifications to get stuff to compile on the new syn/darling version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lymia committed May 1, 2023
1 parent ff19a28 commit dcb82cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions enumset/tests/compile-fail/variants.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ error: repr cannot be smaller than bitset.
= note: this error originates in the derive macro `EnumSetType` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` is not satisfied
--> tests/compile-fail/variants.rs:64:5
|
64 | EnumSet::<OkayEnumButCantUseFromRepr>::from_repr(1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `EnumSetTypeWithRepr` is not implemented for `OkayEnumButCantUseFromRepr`
|
--> tests/compile-fail/variants.rs:64:5
|
64 | EnumSet::<OkayEnumButCantUseFromRepr>::from_repr(1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `EnumSetTypeWithRepr` is not implemented for `OkayEnumButCantUseFromRepr`
|
note: required by a bound in `enumset::EnumSet::<T>::from_repr`
--> src/lib.rs
|
| where T: EnumSetTypeWithRepr {
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `enumset::EnumSet::<T>::from_repr`
--> src/lib.rs
|
| where T: EnumSetTypeWithRepr {
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `EnumSet::<T>::from_repr`

error[E0277]: the trait bound `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` is not satisfied
--> tests/compile-fail/variants.rs:64:5
Expand Down
2 changes: 1 addition & 1 deletion enumset_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ fn derive_enum_set_type_0(input: DeriveInput, attrs: EnumsetAttrs) -> Result<Tok
} else if let Data::Enum(data) = &input.data {
let mut info = EnumSetInfo::new(&input, attrs);
for attr in &input.attrs {
if attr.path.is_ident(&Ident::new("repr", Span::call_site())) {
if attr.path().is_ident(&Ident::new("repr", Span::call_site())) {
let meta: Ident = attr.parse_args()?;
info.push_explicit_repr(attr.span(), meta.to_string().as_str())?;
}
Expand Down

0 comments on commit dcb82cb

Please sign in to comment.