Skip to content

Commit 98c9557

Browse files
fix: use nightly Rust for deploy-docs job to support doc_cfg feature
The deploy-docs job sets RUSTDOCFLAGS='--cfg docsrs' which activates `#![cfg_attr(docsrs, feature(doc_cfg))]` in lib.rs. Since feature(doc_cfg) is a nightly-only feature, the build fails with stable Rust 1.90: error[E0554]: `#![feature]` may not be used on the stable release channel Switch the deploy-docs job to use nightly Rust, which is the standard practice for documentation builds (docs.rs also uses nightly). The separate 'docs' CI check job remains on stable since it doesn't set the docsrs cfg. Co-authored-by: Greg Nazario <greg@gnazar.io>
1 parent b80ae9c commit 98c9557

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,8 @@ jobs:
171171
steps:
172172
- uses: actions/checkout@v6
173173

174-
- name: Install Rust
175-
uses: dtolnay/rust-toolchain@master
176-
with:
177-
toolchain: "1.90"
174+
- name: Install Rust nightly (required for doc_cfg feature)
175+
uses: dtolnay/rust-toolchain@nightly
178176

179177
- name: Cache cargo
180178
uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)