Skip to content
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: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:
working-directory: lib/v3
- name: cd lib && cargo +nightly doc
env:
RUSTDOCFLAGS: --deny=warnings
RUSTDOCFLAGS: --deny=warnings --cfg=docsrs
run: cargo +nightly doc
working-directory: lib
- name: cd lib/v3 && cargo +nightly miri test --test=lib
Expand Down
4 changes: 4 additions & 0 deletions lib/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
- Document maximum input length for `Encoding::{decode,encode}_len()` (fixes #145)
- Add `Encoding::encode_align()` to decide where to split long inputs

### Patch

- Use `doc_cfg` instead of `doc_auto_cfg`

## 2.9.0

### Minor
Expand Down
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ documentation = "https://docs.rs/data-encoding"
description = "Efficient and customizable data-encoding functions like base64, base32, and hex"
include = ["Cargo.toml", "LICENSE", "README.md", "src/lib.rs"]

# TODO: Remove this once doc_auto_cfg is in the MSRV.
# TODO: Remove this (and its lib and xtask counterpart) once doc_cfg is in the MSRV.
[package.metadata.docs.rs]
rustdoc-args = ["--cfg=docsrs"]

Expand Down
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
//! [wrapping]: struct.Specification.html#structfield.wrap

#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[cfg(feature = "alloc")]
extern crate alloc;
Expand Down
3 changes: 3 additions & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ impl Action {
&[&["--no-default-features", "--features=alloc"], &["--no-default-features"]];
}
}
if self.dir == Dir::Lib && self.task == Task::Doc {
instructions.0[0].env[0].1.push_str(" --cfg=docsrs");
}
if self.dir == Dir::Nostd && self.task == Task::Test {
instructions = Instructions::default();
instructions += Instruction {
Expand Down