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

FromForm derive macro uses removed private_in_public lint #2608

Closed
ItsDrike opened this issue Sep 9, 2023 · 2 comments
Closed

FromForm derive macro uses removed private_in_public lint #2608

ItsDrike opened this issue Sep 9, 2023 · 2 comments
Labels
deficiency Something doesn't work as well as it could

Comments

@ItsDrike
Copy link

ItsDrike commented Sep 9, 2023

Description

Using the FromForm derive macro causes a warning for renamed_and_removed_lints, explaining that the private_in_public lint is no longer available to appear on newer rust versions.

To Reproduce

Create a structure that derives FromForm, and compile with rust version of 1.72 (not sure exactly in which version this lint got removed, so some older versions might also produce the warning)

Expected Behavior

The #[allow(private_in_public)] should be removed, or replaced by the new lints. I'm not sure exactly what this lint is for, and what was should it be replaced with (if anything), but it would be nice to be able to avoid this warning on every struct that derives FromForm.

This wouldn't be as big of an issue if people could do #[allow(renamed_and_removed_lints)]. But putting this before the derive macro doesn't actually cause the lint to be allowed, probably since the derive macro actually puts the line with that allow elsewhere. This makes it very annoying to use FromForm as the warning is unavoidable.

Environment:

  • OS Distribution and Kernel: Arch Linux (6.4.12-arch1-1)
  • Rocket Version: 0.5.0-rc.3
@ItsDrike ItsDrike added the triage A bug report being investigated label Sep 9, 2023
@SergioBenitez SergioBenitez added deficiency Something doesn't work as well as it could and removed triage A bug report being investigated labels Sep 20, 2023
@SergioBenitez
Copy link
Member

Very annoying indeed. Pushing a fix soon.

SergioBenitez added a commit that referenced this issue Oct 27, 2023
The lint no longer exists. This gets rid of a compile-time warning for users.

Resolves #2608.
@CSharperMantle
Copy link
Contributor

CSharperMantle commented Jan 3, 2024

Rust 1.74.0 has stably replaced private_in_public lint with two rust-lang/rfcs#2145 compatible new lints: private_interfaces and private_bounds; see rust-lang/rust#113126 for details. Thus I think it is safe for us to move to these new lints when we are compiling on rustc > 1.74.0.

A PR is under way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deficiency Something doesn't work as well as it could
Projects
None yet
Development

No branches or pull requests

3 participants