internal: Ensure rustdoc GitHub action runs on PRs

We want to complain on PRs that generate rustdoc warnings, but only
deploy the generate HTML on the master branch.

Also fix the existing rustdoc warning.

AI disclosure: Some Claude Opus usage.
This commit is contained in:
Wilfred Hughes
2026-04-13 15:09:42 +01:00
parent 2233282dc4
commit b198955c90
2 changed files with 4 additions and 1 deletions
@@ -3,6 +3,8 @@ on:
push:
branches:
- master
pull_request:
merge_group:
env:
CARGO_INCREMENTAL: 0
@@ -28,6 +30,7 @@ jobs:
run: cargo doc --all --no-deps --document-private-items
- name: Deploy Docs
if: github.event_name == 'push' && github.repository == 'rust-lang/rust-analyzer' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -92,7 +92,7 @@ fn value_string(&self) -> Option<SmolStr> {
}
/// The callback is passed the attribute and the outermost `ast::Attr`.
/// Note that one node may map to multiple [`Meta`]s due to `cfg_attr`.
/// Note that one node may map to multiple [`ast::Meta`]s due to `cfg_attr`.
///
/// `unsafe(attr)` are passed the inner attribute for now.
#[inline]