docs: remove workarounds for `#[doc = concat!(...)]` following msrv bump
This commit is contained in:
parent
d3bd82c6f2
commit
46942b9a14
|
@ -75,9 +75,7 @@
|
|||
//! crate-type = ["cdylib"]
|
||||
//!
|
||||
//! [dependencies.pyo3-ffi]
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("version = \"", env!("CARGO_PKG_VERSION"), "\"")))]
|
||||
#![cfg_attr(not(docsrs), doc = "version = \"*\"")]
|
||||
#![doc = concat!("version = \"", env!("CARGO_PKG_VERSION"), "\"")]
|
||||
//! features = ["extension-module"]
|
||||
//! ```
|
||||
//!
|
||||
|
|
|
@ -212,7 +212,7 @@ pub trait ToPyObject {
|
|||
/// # }
|
||||
/// ```
|
||||
/// Python code will see this as any of the `int`, `string` or `None` objects.
|
||||
#[cfg_attr(docsrs, doc(alias = "IntoPyCallbackOutput"))]
|
||||
#[doc(alias = "IntoPyCallbackOutput")]
|
||||
pub trait IntoPy<T>: Sized {
|
||||
/// Performs the conversion.
|
||||
fn into_py(self, py: Python<'_>) -> T;
|
||||
|
|
|
@ -25,12 +25,7 @@
|
|||
//! [dependencies]
|
||||
//! ## change * to the version you want to use, ideally the latest.
|
||||
//! anyhow = "*"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"anyhow\"] }")))]
|
||||
#![cfg_attr(
|
||||
not(docsrs),
|
||||
doc = "pyo3 = { version = \"*\", features = [\"anyhow\"] }"
|
||||
)]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"anyhow\"] }")]
|
||||
//! ```
|
||||
//!
|
||||
//! Note that you must use compatible versions of anyhow and PyO3.
|
||||
|
|
|
@ -14,12 +14,7 @@
|
|||
//! # change * to the latest versions
|
||||
//! pyo3 = { version = "*", features = ["chrono"] }
|
||||
//! chrono = "0.4"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"chrono\"] }")))]
|
||||
#![cfg_attr(
|
||||
not(docsrs),
|
||||
doc = "pyo3 = { version = \"*\", features = [\"chrono\"] }"
|
||||
)]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"chrono\"] }")]
|
||||
//! ```
|
||||
//!
|
||||
//! Note that you must use compatible versions of chrono and PyO3.
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
//! [dependencies]
|
||||
//! ## change * to the version you want to use, ideally the latest.
|
||||
//! eyre = "*"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"eyre\"] }")))]
|
||||
#![cfg_attr(not(docsrs), doc = "pyo3 = { version = \"*\", features = [\"eyre\"] }")]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"eyre\"] }")]
|
||||
//! ```
|
||||
//!
|
||||
//! Note that you must use compatible versions of eyre and PyO3.
|
||||
|
|
|
@ -11,12 +11,7 @@
|
|||
//! [dependencies]
|
||||
//! # change * to the latest versions
|
||||
//! hashbrown = "*"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"hashbrown\"] }")))]
|
||||
#![cfg_attr(
|
||||
not(docsrs),
|
||||
doc = "pyo3 = { version = \"*\", features = [\"hashbrown\"] }"
|
||||
)]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"hashbrown\"] }")]
|
||||
//! ```
|
||||
//!
|
||||
//! Note that you must use compatible versions of hashbrown and PyO3.
|
||||
|
|
|
@ -18,12 +18,7 @@
|
|||
//! [dependencies]
|
||||
//! # change * to the latest versions
|
||||
//! indexmap = "*"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"indexmap\"] }")))]
|
||||
#![cfg_attr(
|
||||
not(docsrs),
|
||||
doc = "pyo3 = { version = \"*\", features = [\"indexmap\"] }"
|
||||
)]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"indexmap\"] }")]
|
||||
//! ```
|
||||
//!
|
||||
//! Note that you must use compatible versions of indexmap and PyO3.
|
||||
|
|
|
@ -10,12 +10,7 @@
|
|||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! num-bigint = "*"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"num-bigint\"] }")))]
|
||||
#![cfg_attr(
|
||||
not(docsrs),
|
||||
doc = "pyo3 = { version = \"*\", features = [\"num-bigint\"] }"
|
||||
)]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"num-bigint\"] }")]
|
||||
//! ```
|
||||
//!
|
||||
//! Note that you must use compatible versions of num-bigint and PyO3.
|
||||
|
|
|
@ -14,12 +14,7 @@
|
|||
//! [dependencies]
|
||||
//! # change * to the latest versions
|
||||
//! num-complex = "*"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"num-complex\"] }")))]
|
||||
#![cfg_attr(
|
||||
not(docsrs),
|
||||
doc = "pyo3 = { version = \"*\", features = [\"num-complex\"] }"
|
||||
)]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"num-complex\"] }")]
|
||||
//! ```
|
||||
//!
|
||||
//! Note that you must use compatible versions of num-complex and PyO3.
|
||||
|
|
|
@ -9,13 +9,8 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"rust_decimal\"] }")]
|
||||
//! rust_decimal = "1.0"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"rust_decimal\"] }")))]
|
||||
#![cfg_attr(
|
||||
not(docsrs),
|
||||
doc = "pyo3 = { version = ..., features = [\"rust_decimal\"] }"
|
||||
)]
|
||||
//! ```
|
||||
//!
|
||||
//! Note that you must use a compatible version of rust_decimal and PyO3.
|
||||
|
|
|
@ -8,13 +8,8 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
#![doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"serde\"] }")]
|
||||
//! serde = "1.0"
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"serde\"] }")))]
|
||||
#![cfg_attr(
|
||||
not(docsrs),
|
||||
doc = "pyo3 = { version = \"*\", features = [\"serde\"] }"
|
||||
)]
|
||||
//! ```
|
||||
|
||||
use crate::{Py, PyAny, PyClass, Python};
|
||||
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -151,9 +151,7 @@
|
|||
//! crate-type = ["cdylib"]
|
||||
//!
|
||||
//! [dependencies.pyo3]
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("version = \"", env!("CARGO_PKG_VERSION"), "\"")))]
|
||||
#![cfg_attr(not(docsrs), doc = "version = \"*\"")]
|
||||
#![doc = concat!("version = \"", env!("CARGO_PKG_VERSION"), "\"")]
|
||||
//! features = ["extension-module"]
|
||||
//! ```
|
||||
//!
|
||||
|
@ -214,9 +212,7 @@
|
|||
//! Start a new project with `cargo new` and add `pyo3` to the `Cargo.toml` like this:
|
||||
//! ```toml
|
||||
//! [dependencies.pyo3]
|
||||
// workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
|
||||
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("version = \"", env!("CARGO_PKG_VERSION"), "\"")))]
|
||||
#![cfg_attr(not(docsrs), doc = "version = \"*\"")]
|
||||
#![doc = concat!("version = \"", env!("CARGO_PKG_VERSION"), "\"")]
|
||||
//! # this is necessary to automatically initialize the Python interpreter
|
||||
//! features = ["auto-initialize"]
|
||||
//! ```
|
||||
|
@ -439,7 +435,7 @@ pub use pyo3_macros::{pyfunction, pymethods, pymodule, FromPyObject};
|
|||
|
||||
/// A proc macro used to expose Rust structs and fieldless enums as Python objects.
|
||||
///
|
||||
#[cfg_attr(docsrs, cfg_attr(docsrs, doc = include_str!("../guide/pyclass_parameters.md")))]
|
||||
#[doc = include_str!("../guide/pyclass_parameters.md")]
|
||||
///
|
||||
/// For more on creating Python classes,
|
||||
/// see the [class section of the guide][1].
|
||||
|
|
Loading…
Reference in New Issue