From 131d2ab2f94a20e88f2dbbddf1dfab4ea8899e57 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 13 Jun 2022 14:10:54 +0200 Subject: [PATCH] Enable rustdoc-map nightly feature via .cargo/config.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … instead of using -Z on the command line. --- .cargo/config.toml | 1 + .github/workflows/docs.yml | 2 +- xtask/src/main.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 222cbe1dc8d..53c737cc89f 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -37,4 +37,5 @@ rustflags = [ # activate the target-applies-to-host feature. # Required for `target-applies-to-host` at the top to take effect. [unstable] +rustdoc-map = true target-applies-to-host = true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 70fb50a39c3..d754d586722 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,7 +34,7 @@ jobs: RUSTDOCFLAGS: "--enable-index-page -Zunstable-options --cfg docsrs -Dwarnings" with: command: doc - args: --no-deps --workspace --exclude matrix-sdk-crypto-js --exclude matrix-sdk-crypto-nodejs --features docsrs -Zrustdoc-map + args: --no-deps --workspace --exclude matrix-sdk-crypto-js --exclude matrix-sdk-crypto-nodejs --features docsrs - name: Deploy docs if: github.event_name == 'push' && github.ref == 'refs/heads/main' diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 313f84181c3..79658ec260d 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -51,7 +51,7 @@ fn build_docs( } // Keep in sync with .github/workflows/docs.yml - cmd!("rustup run nightly cargo doc --no-deps --workspace --features docsrs -Zrustdoc-map") + cmd!("rustup run nightly cargo doc --no-deps --workspace --features docsrs") // Work around https://github.com/rust-lang/cargo/issues/10744 .env("CARGO_TARGET_APPLIES_TO_HOST", "true") .env("RUSTDOCFLAGS", rustdocflags)