From 40707aa76bba06fbe84ba493946c2150d55d6aca Mon Sep 17 00:00:00 2001 From: Benjamin Brienen Date: Thu, 26 Dec 2024 19:21:09 -0500 Subject: [PATCH] cfg stuff --- Cargo.toml | 3 +++ src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index dbb7d42..470c000 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,6 +46,9 @@ std_instead_of_core = "warn" std_instead_of_alloc = "warn" alloc_instead_of_core = "warn" +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] } + [workspace.lints.rust] missing_docs = "warn" unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] } diff --git a/src/lib.rs b/src/lib.rs index dfc5775..89703f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ // FIXME(15321): solve CI failures, then replace with `#![expect()]`. #![allow(missing_docs, reason = "Not all docs are written yet, see #3492.")] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(any(docsrs, docsrs_dep), feature(doc_auto_cfg, rustdoc_internals))] use proc_macro::TokenStream; use proc_macro2::{Literal, Span as Span2, TokenStream as TokenStream2};