Skip to content

Commit 1cd6d38

Browse files
committed
Auto merge of #11568 - jofas:fix_for_11555, r=weihanglo
Fix for #11555 Fix for #11555. I more or less blindly followed the instructions given by `@weihanglo` in the description of the issue: 1. I replaced every link from `doc.crates.io/contrib/apidoc/cargo` with `doc.rust-lang.org/nightly/nightly-rustc/cargo` 2. Added redirection rule to `src/doc/contrib/book.toml` that should redirect the `/apidoc/cargo/` endpoint to `https://doc.rust-lang.org/nightly/nightly-rustc/cargo` 3. Reverted the changes made to the CI workflow in ba3d2e9 and 1c82d9c (building the api docs as part of the contribution guide)
2 parents abc6abe + 9fec8d6 commit 1cd6d38

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

.github/workflows/contrib.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ jobs:
2121
mkdir mdbook
2222
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.9/mdbook-v0.4.9-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
2323
echo `pwd`/mdbook >> $GITHUB_PATH
24-
- name: Update toolchain
25-
run: rustup update --no-self-update stable && rustup default stable
26-
- name: Build API doc
27-
run: |
28-
cargo doc --document-private-items --no-deps
2924
- name: Deploy docs
3025
run: |
3126
cd src/doc/contrib
@@ -38,8 +33,6 @@ jobs:
3833
git update-ref -d refs/heads/gh-pages
3934
rm -rf contrib
4035
mv ../book contrib
41-
# Move rustdoc under contrib/
42-
mv ../../../../target/doc contrib/apidoc
4336
git add contrib
4437
git commit -m "Deploy $GITHUB_SHA to gh-pages"
4538
git push --force

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
- External subcommands can now inherit jobserver file descriptors from Cargo.
236236
[#10511](https://github.com/rust-lang/cargo/pull/10511)
237237
- Added an API documentation for private items in cargo-the-library. See
238-
<https://doc.crates.io/contrib/apidoc/cargo>.
238+
<https://doc.rust-lang.org/nightly/nightly-rustc/cargo>.
239239
[#11019](https://github.com/rust-lang/cargo/pull/11019)
240240

241241
### Changed

src/cargo/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! There are two places you can find API documentation of cargo-the-library,
1515
//!
1616
//! - <https://docs.rs/cargo> and
17-
//! - <https://doc.crates.io/contrib/apidoc/cargo>.
17+
//! - <https://doc.rust-lang.org/nightly/nightly-rustc/cargo>.
1818
//!
1919
//! Each of them targets on a slightly different audience.
2020
//!
@@ -33,7 +33,7 @@
3333
//!
3434
//! ## For Cargo contributors
3535
//!
36-
//! The documentation on <https://doc.crates.io/contrib/apidoc/cargo> contains all items in Cargo.
36+
//! The documentation on <https://doc.rust-lang.org/nightly/nightly-rustc/cargo> contains all items in Cargo.
3737
//! Contributors of Cargo may find it useful as a reference of Cargo's implementation details.
3838
//! It's built with `--document-private-items` rustdoc flag,
3939
//! so you might expect to see some noise and strange items here.

src/doc/contrib/book.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ authors = ["Eric Huss"]
44

55
[output.html]
66
git-repository-url = "https://github.com/rust-lang/cargo/tree/master/src/doc/contrib/src"
7+
8+
[output.html.redirect]
9+
"/apidoc/cargo/index.html" = "https://doc.rust-lang.org/nightly/nightly-rustc/cargo/"

0 commit comments

Comments
 (0)