Similar libraries such as fserr can be used with clippy.toml settings like
disallowed-methods = [
# Use fs_errr functions, so the filename is available in the error message
{ path = "std::fs::canonicalize", reason = "Use fs_err functions so the filename is available in the error message", replacement = "fs_err::canonicalize" },
{ path = "std::fs::copy", reason = "Use fs_err functions so the filename is available in the error message", replacement = "fs_err::copy" },
]
(and others for the other std:fs functions of course, this is just to demonstrate the idea). This then displays errors when you use the original method. There are similar features disallowed-macros,...
I am not sure if the regular arithmetic operators can be used here but it might be worth experimenting and perhaps working with the clippy developers to achieve a similar level of support to find spots where cadd can be used in existing code bases.
Similar libraries such as fserr can be used with clippy.toml settings like
(and others for the other std:fs functions of course, this is just to demonstrate the idea). This then displays errors when you use the original method. There are similar features disallowed-macros,...
I am not sure if the regular arithmetic operators can be used here but it might be worth experimenting and perhaps working with the clippy developers to achieve a similar level of support to find spots where cadd can be used in existing code bases.