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

Rust 1.81 lint fixes #237

Merged
merged 7 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ internal-tests = [
"tokio/rt-multi-thread",
]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docs)'] }

[dev-dependencies]
safer-ffi.path = "."
safer-ffi.features = ["internal-tests"]
Expand Down Expand Up @@ -110,7 +113,7 @@ scopeguard.default-features = false

serde.version = "1.0.204"
serde.optional = true
serde.default_features = false
serde.default-features = false

stabby.version = "36.1.1"
stabby.optional = true
Expand Down
1 change: 1 addition & 0 deletions src/proc_macro/derives/c_type/struct_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use super::*;

#[allow(unexpected_cfgs)]
pub(in crate)
fn derive (
args: Args,
Expand Down
1 change: 1 addition & 0 deletions src/proc_macro/derives/dyn_trait/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ define_kws! {$

pub
struct Args {
#[allow(dead_code)]
pub dyn_: sym![dyn],
pub clone: Option<sym![Clone]>,
}
Expand Down
1 change: 1 addition & 0 deletions src/proc_macro/derives/dyn_trait/coercions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ match_! {(
struct Env<'r> {
// quote-interpolable/friendly stuff from the caller.
$(
#[allow(dead_code)]
pub
$field : &'r dyn ToTokens,
)*
Expand Down
1 change: 1 addition & 0 deletions src/proc_macro/ffi_export/const_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl Parse for Args {
}


#[allow(unexpected_cfgs)]
pub(in super)
fn handle (
Args { untyped }: Args,
Expand Down
2 changes: 1 addition & 1 deletion src/proc_macro/ffi_export/fn_/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub(in crate)
struct Executor {
pub(in crate) kw: kw::executor,
pub(in crate) _eq: Token![=],
#[cfg_attr(not(feature = "async_fn"),
#[cfg_attr(not(feature = "async-fn"),
allow(dead_code),
)]
pub(in crate) block_on: Expr,
Expand Down
1 change: 0 additions & 1 deletion src/proc_macro/ffi_export/static_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ fn handle (
_input: ItemStatic,
) -> Result<TokenStream2>
{
#[cfg(not(TODO))]
todo!("`#[ffi_export]`ing a `static`");
}
Loading