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

Add the docsrs autocfg attr to all crates #3295

Merged
merged 2 commits into from
Dec 8, 2023
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
12 changes: 12 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ references = ["aws-sdk-rust#990"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client" }
author = "declanvk"

[[smithy-rs]]
message = "All generated docs now include docsrs labels when features are required"
references = ["smithy-rs#3121", "smithy-rs#3295"]
meta = { "breaking" = false, "tada" = true, "bug" = false, "target" = "all" }
author = "rcoh"

[[aws-sdk-rust]]
message = "All generated docs now include docsrs labels when features are required"
references = ["smithy-rs#3121", "smithy-rs#3295"]
meta = { "breaking" = false, "tada" = true, "bug" = false }
author = "rcoh"

[[smithy-rs]]
message = "[`Number`](https://docs.rs/aws-smithy-types/latest/aws_smithy_types/enum.Number.html) `TryInto` implementations now succesfully convert from `f64` to numeric types when no precision is lost. This fixes some deserialization issues where numbers like `25.0` were sent when `Byte` fields were expected."
references = ["smithy-rs#3294"]
Expand Down
4 changes: 3 additions & 1 deletion aws/rust-runtime/aws-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![warn(
missing_debug_implementations,
Expand All @@ -11,7 +14,6 @@
rustdoc::missing_crate_level_docs,
unreachable_pub
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

//! `aws-config` provides implementations of region and credential resolution.
//!
Expand Down
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-credential-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! `aws-credential-types` provides types concerned with AWS SDK credentials including:
//! * Traits for credentials providers and for credentials caching
//! * An opaque struct representing credentials
Expand Down
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-endpoint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! This crate is no longer used by the AWS SDK and is deprecated.
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! AWS-specific middleware implementations and HTTP-related features.
#![allow(clippy::derive_partial_eq_without_eq)]
Expand Down
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-hyper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![deprecated(
since = "0.3.0",
note = "The functionality of this crate is included in individual AWS services."
Expand Down
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-inlineable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! Collection of modules that get conditionally included directly into the code generated
//! SDK service crates. For example, when generating S3, the `s3_errors` module will get copied
//! into the generated S3 crate to support the code generator.
Expand Down
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-runtime-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! Runtime support code for the AWS SDK. This crate isn't intended to be used directly.
#![warn(
Expand Down
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! Runtime support code for the AWS SDK. This crate isn't intended to be used directly.
#![warn(
Expand Down
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-sig-auth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! This crate is no longer used by the AWS SDK and is deprecated.
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-sigv4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! Provides functions for calculating Sigv4 signing keys, signatures, and
//! optional utilities for signing HTTP requests and Event Stream messages.
Expand Down
3 changes: 3 additions & 0 deletions aws/rust-runtime/aws-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! Cross-service types for the AWS SDK.
#![allow(clippy::derive_partial_eq_without_eq)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.Writable
import software.amazon.smithy.rust.codegen.core.rustlang.containerDocs
import software.amazon.smithy.rust.codegen.core.rustlang.escape
import software.amazon.smithy.rust.codegen.core.rustlang.isNotEmpty
import software.amazon.smithy.rust.codegen.core.rustlang.rawRust
import software.amazon.smithy.rust.codegen.core.rustlang.rust
import software.amazon.smithy.rust.codegen.core.smithy.CoreRustSettings
import software.amazon.smithy.rust.codegen.core.smithy.customize.NamedCustomization
Expand Down Expand Up @@ -50,6 +51,7 @@ class LibRsGenerator(
if (requireDocs) {
rust("##![warn(missing_docs)]")
}
rawRust("#![cfg_attr(docsrs, feature(doc_auto_cfg))]")

// Allow for overriding the default service docs via customization
val defaultServiceDocs = settings.getService(model).getTrait<DocumentationTrait>()?.value
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-async/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![warn(
missing_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-checksums/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![warn(
// missing_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! This crate is no longer used by smithy-rs and is deprecated.
#![warn(
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-eventstream/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![warn(
// missing_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-http-auth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![warn(
missing_docs,
rustdoc::missing_crate_level_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-http-server-python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![cfg_attr(docsrs, feature(doc_cfg))]

Expand Down
4 changes: 4 additions & 0 deletions rust-runtime/aws-smithy-http-server-typescript/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-http-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![cfg_attr(docsrs, feature(doc_cfg))]

Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-http-tower/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! This crate is no longer used by smithy-rs and is deprecated.
#![warn(
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![warn(
missing_docs,
rustdoc::missing_crate_level_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![warn(
// missing_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-protocol-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![warn(
// missing_docs,
// rustdoc::missing_crate_level_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-query/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![warn(
// missing_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-runtime-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![warn(
missing_docs,
rustdoc::missing_crate_level_docs,
Expand Down
4 changes: 3 additions & 1 deletion rust-runtime/aws-smithy-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! Runtime support logic and types for smithy-rs generated code.
//!
//! # Crate Features
Expand All @@ -17,7 +20,6 @@
unreachable_pub,
rust_2018_idioms
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

/// Runtime support logic for generated clients.
#[cfg(feature = "client")]
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-types-convert/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! Conversions between `aws-smithy-types` and the types of frequently used Rust libraries.
#![allow(clippy::derive_partial_eq_without_eq)]
Expand Down
5 changes: 4 additions & 1 deletion rust-runtime/aws-smithy-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
//! Protocol-agnostic types for smithy-rs.
#![allow(clippy::derive_partial_eq_without_eq)]
Expand All @@ -13,7 +16,7 @@
rust_2018_idioms,
unreachable_pub
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

pub mod base64;
pub mod body;
pub mod byte_stream;
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/aws-smithy-xml/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#![allow(clippy::derive_partial_eq_without_eq)]
#![warn(
// missing_docs,
Expand Down
3 changes: 3 additions & 0 deletions rust-runtime/inlineable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* Automatically managed default lints */
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
/* End of automatically managed default lints */
#[allow(dead_code)]
mod aws_query_compatible_errors;
#[allow(unused)]
Expand Down
Loading