@available(removed=N, renamed="NewName") {:#fi-0214}This is like fi-0205: Invalid @available(removed=N), but for when the renamed argument is involved.
When an element is marked @available(removed=N, renamed="NewName"), it means the element can no longer be used at version N, and is renamed to “NewName” post-removal. You cannot use “NewName” for something else:
{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0214.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
If you want to rename the element while keeping its ABI, use the replaced argument instead of 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-0214-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
Notice that in this case you must use @selector to ensure the renamed method has the same ABI.
If you want the new element to have a different ABI, then keep removed and ensure that the renamed argument and the new element use different names:
{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0214-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}
See FIDL versioning to learn more about versioning.