Remove use of 'private_in_public' lint.

The lint no longer exists. This gets rid of a compile-time warning for users.

Resolves #2608.
This commit is contained in:
Sergio Benitez 2023-09-20 15:33:51 -07:00
parent 498af3d9d0
commit 2cf38a5aa3
3 changed files with 6 additions and 3 deletions

View File

@ -123,7 +123,9 @@ pub fn derive_from_form(input: proc_macro::TokenStream) -> TokenStream {
Ok(quote_spanned! { input.span() => Ok(quote_spanned! { input.span() =>
/// Rocket generated FormForm context. /// Rocket generated FormForm context.
#[doc(hidden)] #[doc(hidden)]
#[allow(private_in_public)] #[allow(unknown_lints)]
#[allow(renamed_and_removed_lints)]
#[allow(private_in_public, private_bounds)]
#vis struct #ctxt_ty #impl_gen #where_clause { #vis struct #ctxt_ty #impl_gen #where_clause {
__opts: #_form::Options, __opts: #_form::Options,
__errors: #_form::Errors<'r>, __errors: #_form::Errors<'r>,
@ -148,6 +150,7 @@ pub fn derive_from_form(input: proc_macro::TokenStream) -> TokenStream {
#[allow(unused_imports)] #[allow(unused_imports)]
use #_http::uncased::AsUncased; use #_http::uncased::AsUncased;
}) })
.outer_mapper(quote!(#[allow(renamed_and_removed_lints)]))
.outer_mapper(quote!(#[allow(private_in_public)])) .outer_mapper(quote!(#[allow(private_in_public)]))
.outer_mapper(quote!(#[rocket::async_trait])) .outer_mapper(quote!(#[rocket::async_trait]))
.inner_mapper(MapperBuild::new() .inner_mapper(MapperBuild::new()

View File

@ -984,7 +984,7 @@ fn json_wrapper_works() {
assert_eq!(form, JsonToken(Json("foo bar"))); assert_eq!(form, JsonToken(Json("foo bar")));
} }
// FIXME: https://github.com/rust-lang/rust/issues/86706 #[allow(renamed_and_removed_lints)]
#[allow(private_in_public)] #[allow(private_in_public)]
struct Q<T>(T); struct Q<T>(T);

View File

@ -247,7 +247,7 @@ fn uri_display_serde() {
assert_query_value_roundtrip!(JsonFoo, JsonFoo(Json(bam.clone()))); assert_query_value_roundtrip!(JsonFoo, JsonFoo(Json(bam.clone())));
// FIXME: https://github.com/rust-lang/rust/issues/86706 #[allow(renamed_and_removed_lints)]
#[allow(private_in_public)] #[allow(private_in_public)]
#[derive(Debug, PartialEq, Clone, FromForm, UriDisplayQuery)] #[derive(Debug, PartialEq, Clone, FromForm, UriDisplayQuery)]
struct Q<T>(Json<T>); struct Q<T>(Json<T>);