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 doc_auto_cfg to relevant sdk crates #3121

Merged
merged 4 commits into from
Oct 12, 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
2 changes: 2 additions & 0 deletions sdk/account-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ bincode = ["dep:bincode", "dep:serde"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]
2 changes: 1 addition & 1 deletion sdk/account-info/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Account information.

#![cfg_attr(docsrs, feature(doc_auto_cfg))]
use {
solana_program_error::ProgramError,
solana_program_memory::sol_memset,
Expand Down
2 changes: 2 additions & 0 deletions sdk/account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ serde = ["dep:serde", "dep:serde_bytes", "dep:serde_derive"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]
1 change: 1 addition & 0 deletions sdk/account/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
//! The Solana [`Account`] type.

#[cfg(feature = "dev-context-only-utils")]
Expand Down
2 changes: 2 additions & 0 deletions sdk/hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ edition = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[dependencies]
borsh = { workspace = true, optional = true }
Expand Down
1 change: 1 addition & 0 deletions sdk/hash/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add the change to sdk/hash/Cargo.toml for all-features and rustdoc-args?

#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#[cfg(feature = "borsh")]
use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
Expand Down
2 changes: 2 additions & 0 deletions sdk/instruction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ std = []

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[lints]
workspace = true
1 change: 1 addition & 0 deletions sdk/instruction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//! while executing a given instruction is also included in `Instruction`, as
//! [`AccountMeta`] values. The runtime uses this information to efficiently
//! schedule execution of transactions.
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![allow(clippy::arithmetic_side_effects)]
#![no_std]
Expand Down
2 changes: 2 additions & 0 deletions sdk/program-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ serde = ["dep:serde", "dep:serde_derive"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]
1 change: 1 addition & 0 deletions sdk/program-error/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! The [`ProgramError`] type and related definitions.

#![allow(clippy::arithmetic_side_effects)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#[cfg(feature = "borsh")]
use borsh::io::Error as BorshIoError;
#[cfg(feature = "serde")]
Expand Down
2 changes: 2 additions & 0 deletions sdk/pubkey/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ std = []

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[lints]
workspace = true
1 change: 1 addition & 0 deletions sdk/pubkey/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Solana account addresses.
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![allow(clippy::arithmetic_side_effects)]

Expand Down
2 changes: 2 additions & 0 deletions sdk/signature/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ verify = ["dep:ed25519-dalek"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[lints]
workspace = true
1 change: 1 addition & 0 deletions sdk/signature/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! 64-byte signature type.
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the appropriate flags to sdk/signature/Cargo.toml?

#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#[cfg(any(test, feature = "verify"))]
use core::convert::TryInto;
Expand Down
Loading