-
Notifications
You must be signed in to change notification settings - Fork 13.7k
rustdoc: Also run lint unused_doc_comments #141000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: Also run lint unused_doc_comments #141000
Conversation
65f0ae4
to
73996f3
Compare
@bors try @rust-timer queue
This comment has been minimized.
This comment has been minimized.
...DOC_COMMENTS, r=<try> rustdoc: Also run lint unused_doc_comments
The job x86_64-gnu-llvm-19
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
#19 exporting to docker image format
#19 sending tarball 22.3s done
#19 DONE 28.2s
##[endgroup]
Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-19]
[CI_JOB_NAME=x86_64-gnu-llvm-19]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure:
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-19', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--set', 'gcc.download-ci-gcc=true', '--enable-new-symbol-mangling']
configure: build.build := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-19/bin/llvm-config
configure: llvm.link-shared := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
[RUSTC-TIMING] proc_macro test:false 5.650
[RUSTC-TIMING] test test:false 9.588
Finished `release` profile [optimized] target(s) in 1m 19s
##[endgroup]
[TIMING] core::build_steps::compile::Std { target: x86_64-unknown-linux-gnu, compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: true }, crates: [], force_recompile: false, extra_rust_args: ["-Csymbol-mangling-version=v0", "-Cpanic=abort"], is_for_mir_opt_tests: false } -- 79.549
Testing GCC stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Downloading crates ...
Downloaded boml v0.3.1
Compiling boml v0.3.1
[RUSTC-TIMING] boml test:false 0.782
Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
[RUSTC-TIMING] y test:false 2.990
Finished `release` profile [optimized] target(s) in 4.21s
Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-backend gcc --gcc-path /checkout/obj/build/x86_64-unknown-linux-gnu/ci-gcc/lib --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --mini-tests --std-tests`
`--gcc-path` was provided, ignoring config file. Using `/checkout/obj/build/x86_64-unknown-linux-gnu/ci-gcc/lib` as path for libgccjit
[BUILD] mini_core
[RUSTC-TIMING] mini_core test:false 0.203
[BUILD] example
[AOT] mini_core_hello_world
[RUSTC-TIMING] mini_core_hello_world test:false 0.180
---
+ |
+ = help: use `//` for a plain comment
+ = note: `#[warn(unused_doc_comments)]` on by default
+
1 error: `#[doc(alias = "...")]` isn't allowed on foreign module
2 --> $DIR/check-doc-alias-attr-location.rs:7:7
3 |
22 LL | #[doc(alias = "assoc")]
23 | ^^^^^^^^^^^^^^^
24
- error: aborting due to 4 previous errors
+ error: aborting due to 4 previous errors; 1 warning emitted
26
27
Note: some mismatched output was normalized before being compared
- --> /checkout/tests/rustdoc-ui/check-doc-alias-attr-location.rs:7:1
- LL | #[doc(alias = "foo")] //~ ERROR
+ warning: unused doc comment
+ --> $DIR/check-doc-alias-attr-location.rs:7:1
+ |
+ LL | #[doc(alias = "foo")]
+ | ^^^^^^^^^^^^^^^^^^^^^
+ LL | extern "C" {}
---
To only update this specific test, also pass `--test-args check-doc-alias-attr-location.rs`
error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/tests/rustdoc-ui/check-doc-alias-attr-location.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/check-doc-alias-attr-location" "-A" "internal_features" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
warning: unused doc comment
##[warning] --> /checkout/tests/rustdoc-ui/check-doc-alias-attr-location.rs:7:1
|
LL | #[doc(alias = "foo")] //~ ERROR
| ^^^^^^^^^^^^^^^^^^^^^
LL | extern "C" {}
| ------------- rustdoc does not generate documentation for extern blocks
|
= help: use `//` for a plain comment
= note: `#[warn(unused_doc_comments)]` on by default
error: `#[doc(alias = "...")]` isn't allowed on foreign module
##[error] --> /checkout/tests/rustdoc-ui/check-doc-alias-attr-location.rs:7:7
|
LL | #[doc(alias = "foo")] //~ ERROR
| ^^^^^^^^^^^^^
error: `#[doc(alias = "...")]` isn't allowed on implementation block
##[error] --> /checkout/tests/rustdoc-ui/check-doc-alias-attr-location.rs:10:7
|
LL | #[doc(alias = "bar")] //~ ERROR
| ^^^^^^^^^^^^^
error: `#[doc(alias = "...")]` isn't allowed on implementation block
##[error] --> /checkout/tests/rustdoc-ui/check-doc-alias-attr-location.rs:16:7
|
LL | #[doc(alias = "foobar")] //~ ERROR
| ^^^^^^^^^^^^^^^^
error: `#[doc(alias = "...")]` isn't allowed on type alias in implementation block
##[error] --> /checkout/tests/rustdoc-ui/check-doc-alias-attr-location.rs:18:11
|
LL | #[doc(alias = "assoc")] //~ ERROR
| ^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors; 1 warning emitted
------------------------------------------
☀️ Try build successful - checks-actions
Build commit: 3e1dfde (3e1dfde5951b3652538061ac25069965116aaa89
)
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (3e1dfde): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -0.8%, secondary -7.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 773.561s -> 773.672s (0.01%) |
r? @notriddle
rustbot has assigned @notriddle.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r?
to explicitly pick a reviewer
Oops, I did not mean to mark as ready.
No description provided.