yew icon indicating copy to clipboard operation
yew copied to clipboard

Emit Warning when not using shorthand syntax

Open Xavientois opened this issue 3 years ago • 1 comments

When this is better supported for macros, we should create a clippy warning to suggest that users make use of the shorthand syntax where possible.

From this comment:

I feel like it should emit a warning much like clippy::redundant_field_names in the future.

This cannot be done until #1970 is closed and this sort of warning is better supported for macros.

Xavientois avatar Jul 31 '21 15:07 Xavientois

Once #1748 lands then we could add a lint for this? or use the emit_warning! macro that comes with the proc-macro-error dependency in that PR to emit the warning when we are parsing and find an ident that matches the property name.

mc1098 avatar Jul 31 '21 21:07 mc1098