Skip to content

Commit bfd3ee0

Browse files
authored
Document features for docs.rs (#2367)
Resolves #2223
1 parent 1ff160a commit bfd3ee0

File tree

13 files changed

+27
-1
lines changed

13 files changed

+27
-1
lines changed

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,6 @@ zip = { version = "2.2.3", default-features = false, features = ["deflate"] }
134134

135135
[workspace.lints.clippy]
136136
large_futures = "deny"
137+
138+
[workspace.lints.rust]
139+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs)'] }

sdk/core/azure_core/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ tokio_process = ["dep:tokio", "tokio/process"]
6060
tokio_sleep = ["typespec_client_core/tokio_sleep"]
6161
xml = ["typespec_client_core/xml"]
6262

63+
[lints]
64+
workspace = true
65+
6366
[package.metadata.docs.rs]
6467
features = [
6568
"hmac_openssl",

sdk/core/azure_core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#![forbid(unsafe_code)]
55
#![deny(missing_debug_implementations, nonstandard_style)]
6-
// #![warn(missing_docs, future_incompatible, unreachable_pub)]
76
#![doc = include_str!("../README.md")]
7+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
88

99
#[macro_use]
1010
mod macros;

sdk/core/azure_core_amqp/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,8 @@ fe2o3_amqp = [
4747
"serde_bytes",
4848
]
4949

50+
[lints]
51+
workspace = true
52+
5053
[package.metadata.docs.rs]
5154
features = ["fe2o3_amqp"]

sdk/core/azure_core_amqp/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License.
33

44
#![doc = include_str!("../README.md")]
5+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
56

67
#[cfg(all(feature = "fe2o3_amqp", not(target_arch = "wasm32")))]
78
mod fe2o3;

sdk/eventhubs/azure_messaging_eventhubs/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ azure_core_test.workspace = true
3434
azure_identity.workspace = true
3535
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "time"] }
3636
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }
37+
38+
[lints]
39+
workspace = true

sdk/eventhubs/azure_messaging_eventhubs/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![recursion_limit = "128"]
55
#![warn(missing_docs)]
66
#![doc = include_str!("../README.md")]
7+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
78

89
pub(crate) mod common;
910

sdk/identity/azure_identity/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ client_certificate = ["openssl"]
5353
# https://github.com/Azure/azure-cli/issues/19700
5454
old_azure_cli = ["time/local-offset", "tz-rs"]
5555

56+
[lints]
57+
workspace = true
58+
5659
[package.metadata.docs.rs]
5760
features = [
5861
"client_certificate",

sdk/identity/azure_identity/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License.
33

44
#![doc = include_str!("../README.md")]
5+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
56

67
mod authorization_code_flow;
78
mod azure_pipelines_credential;

sdk/typespec/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ default = ["http", "json"]
2525
http = []
2626
json = ["dep:serde", "dep:serde_json"]
2727
amqp = []
28+
29+
[lints]
30+
workspace = true

sdk/typespec/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License.
33

44
#![doc = include_str!("../README.md")]
5+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
56

67
pub mod error;
78
#[cfg(feature = "http")]

sdk/typespec/typespec_client_core/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,6 @@ features = [
7979
"tokio_sleep",
8080
"xml",
8181
]
82+
83+
[lints]
84+
workspace = true

sdk/typespec/typespec_client_core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License.
33

44
#![doc = include_str!("../README.md")]
5+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
56

67
#[macro_use]
78
mod macros;

0 commit comments

Comments
 (0)