Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add witness hint for function_marked_deprecated lint #1213

Merged

Conversation

sandptel
Copy link
Contributor

This adds a witness hint for function_marked_deprecated hint.

Witness Example

let witness = |a, b| function_marked_deprecated::function_to_deprecated(a, b);

calling the function should invoke the warning

warning: use of deprecated function `function_to_deprecated`
 --> <file-path:line:column>
  |
  |     let witness = |a, b| function_to_deprecated(a, b);
  |             ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(deprecated)]` on by default

Comments

Had an idea to mark this as #[deny(deprecated)] so it would represent breakage by throwing an error. Since its already been discussed in #1209, skipping that. It becomes pretty much similar to #1194.

@obi1kenobi obi1kenobi merged commit 8cbd5d1 into obi1kenobi:main Mar 25, 2025
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants