An element that is never removed (directly or via inheritance) is not allowed to provide the legacy
argument to the @available
attribute:
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0182.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
Instead, remove the legacy
argument:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0182-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
Alternatively, keep the legacy
argument but add the removed
argument:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0182-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
The legacy
argument indicates whether an element should be added back at the LEGACY
version after being removed, so it doesn't make sense to use it on an element that is never removed. See the documentation on legacy
for more details.