fi-0023: Redundant attribute placement {:#fi-0023}

Attributes applied to the declaration of a named type apply to the resulting type the same as attributes applied directly to the type's layout.

This error occurs attributes are placed on both a type declaration and that declaration's layout.

{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0023.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}

To fix this error, either move all attributes to the type declaration or move all attributes to the layout.

{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0023.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}

FIDL includes this error to avoid confusion which might be caused by having attributes on both the declaration and layout of a single type.