Simplify docsrs feature usage

- Don't instruct docs.rs to set it, it does so by default now:
  https://github.com/rust-lang/docs.rs/pull/2390
- Because of that, check-cfg also recognizes it and does not need
  extra configuration either.
This commit is contained in:
Jonas Platte 2024-05-30 04:35:07 -04:00 committed by GitHub
parent d9f08f585c
commit d91e6d7e63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 0 additions and 40 deletions

View File

@ -13,7 +13,6 @@ rust-version = { workspace = true }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features] [features]
# OutgoingRequest and IncomingResponse implementations # OutgoingRequest and IncomingResponse implementations

View File

@ -1,6 +0,0 @@
fn main() {
// Prevent unnecessary rerunning of this build script
println!("cargo:rerun-if-changed=build.rs");
// Prevent nightly CI from erroring on docsrs attributes
println!("cargo:rustc-check-cfg=cfg(docsrs)");
}

View File

@ -13,7 +13,6 @@ rust-version = { workspace = true }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features] [features]
client-api = ["dep:as_variant", "dep:ruma-client-api"] client-api = ["dep:as_variant", "dep:ruma-client-api"]

View File

@ -3,8 +3,6 @@ use std::{env, process};
fn main() { fn main() {
// Prevent unnecessary rerunning of this build script // Prevent unnecessary rerunning of this build script
println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=build.rs");
// Prevent nightly CI from erroring on docsrs attributes
println!("cargo:rustc-check-cfg=cfg(docsrs)");
let tls_features = [ let tls_features = [
("tls-native", env::var_os("CARGO_FEATURE_TLS_NATIVE").is_some()), ("tls-native", env::var_os("CARGO_FEATURE_TLS_NATIVE").is_some()),

View File

@ -12,7 +12,6 @@ rust-version = { workspace = true }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features] [features]
# These feature gates exist only for the tests. Disabling them results in a # These feature gates exist only for the tests. Disabling them results in a

View File

@ -1,6 +0,0 @@
fn main() {
// Prevent unnecessary rerunning of this build script
println!("cargo:rerun-if-changed=build.rs");
// Prevent nightly CI from erroring on docsrs attributes
println!("cargo:rustc-check-cfg=cfg(docsrs)");
}

View File

@ -12,7 +12,6 @@ rust-version = { workspace = true }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features] [features]
canonical-json = ["ruma-common/canonical-json"] canonical-json = ["ruma-common/canonical-json"]

View File

@ -13,7 +13,6 @@ rust-version = { workspace = true }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features] [features]
# Allow some mandatory fields in requests / responses to be missing, defaulting # Allow some mandatory fields in requests / responses to be missing, defaulting

View File

@ -1,6 +0,0 @@
fn main() {
// Prevent unnecessary rerunning of this build script
println!("cargo:rerun-if-changed=build.rs");
// Prevent nightly CI from erroring on docsrs attributes
println!("cargo:rustc-check-cfg=cfg(docsrs)");
}

View File

@ -12,7 +12,6 @@ rust-version = { workspace = true }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features] [features]
matrix = ["dep:ruma-common"] matrix = ["dep:ruma-common"]

View File

@ -1,6 +0,0 @@
fn main() {
// Prevent unnecessary rerunning of this build script
println!("cargo:rerun-if-changed=build.rs");
// Prevent nightly CI from erroring on docsrs attributes
println!("cargo:rustc-check-cfg=cfg(docsrs)");
}

View File

@ -13,7 +13,6 @@ rust-version = { workspace = true }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[dependencies] [dependencies]
headers = "0.4.0" headers = "0.4.0"

View File

@ -13,7 +13,6 @@ rust-version = { workspace = true }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features] [features]
api = ["ruma-common/api"] api = ["ruma-common/api"]

View File

@ -1,6 +0,0 @@
fn main() {
// Prevent unnecessary rerunning of this build script
println!("cargo:rerun-if-changed=build.rs");
// Prevent nightly CI from erroring on docsrs attributes
println!("cargo:rustc-check-cfg=cfg(docsrs)");
}