rust
rust copied to clipboard
Suppress unused_mut if unused_variables is reported
Fix #97074.
r? @nagisa
(rust-highfive has picked a reviewer for you, use r? to override)
The job x86_64-gnu-llvm-13
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Compiling tempfile v3.2.0
Compiling serde_json v1.0.85
Compiling lint-docs v0.1.0 (/checkout/src/tools/lint-docs)
Finished release [optimized] target(s) in 6.51s
warning: the code example in lint `unused_mut` in /checkout/compiler/rustc_lint_defs/src/builtin.rs failed to generate the expected output: did not find lint `unused_mut` in output of example, got:
warning: unused variable: `x`
--> lint_example.rs:2:9
|
2 | let mut x = 5;
---
doc tests for: /checkout/src/doc/rustc/src/tests/index.md
doc tests for: /checkout/src/doc/rustc/src/what-is-rustc.md
finished in 1.830 seconds
Generating lint docs (x86_64-unknown-linux-gnu)
error: failed to test example in lint docs for `unused_mut` in /checkout/compiler/rustc_lint_defs/src/builtin.rs:1553: did not find lint `unused_mut` in output of example, got:
warning: unused variable: `x`
--> lint_example.rs:2:9
|
Build completed unsuccessfully in 0:34:42
---
warning: 1 warning emitted
This error was generated by the lint-docs tool.
This tool extracts documentation for lints from the source code and places
them in the rustc book. See the declare_lint! documentation
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/macro.declare_lint.html
To re-run these tests, run: ./x.py test --keep-stage=0 src/tools/lint-docs
The --keep-stage flag should be used if you have already built the compiler
@bors try @rust-timer queue
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
:hourglass: Trying commit 50f8558f7254057e2c7ea95fdf17491a911e66b9 with merge b3d31c22c20e7390b577ec096a8c97ea87df12fa...
:sunny: Try build successful - checks-actions
Build commit: b3d31c22c20e7390b577ec096a8c97ea87df12fa (b3d31c22c20e7390b577ec096a8c97ea87df12fa
)
Queued b3d31c22c20e7390b577ec096a8c97ea87df12fa with parent 11bb80a92b4f46fa7dfa9148d0bdfc185a7621bd, future comparison URL.
Finished benchmarking commit (b3d31c22c20e7390b577ec096a8c97ea87df12fa): comparison URL.
Overall result: no relevant changes - no action needed
Benchmarking 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.
@bors rollup=never @rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression
Instruction count
This benchmark run did not return any relevant results for this metric.
Max RSS (memory usage)
Results
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.
mean[^1] | range | count[^2] | |
---|---|---|---|
Regressions ❌ (primary) |
1.9% | [1.8%, 2.1%] | 3 |
Regressions ❌ (secondary) |
3.0% | [1.0%, 5.2%] | 5 |
Improvements ✅ (primary) |
- | - | 0 |
Improvements ✅ (secondary) |
- | - | 0 |
All ❌✅ (primary) | 1.9% | [1.8%, 2.1%] | 3 |
Cycles
Results
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.
mean[^1] | range | count[^2] | |
---|---|---|---|
Regressions ❌ (primary) |
2.4% | [2.4%, 2.5%] | 2 |
Regressions ❌ (secondary) |
3.3% | [3.3%, 3.3%] | 1 |
Improvements ✅ (primary) |
- | - | 0 |
Improvements ✅ (secondary) |
- | - | 0 |
All ❌✅ (primary) | 2.4% | [2.4%, 2.5%] | 2 |
[^1]: the arithmetic mean of the percent change [^2]: number of relevant changes
@cjgillot you want to keep reviewing this to the end or should I take a look at this still?
I can take it you don't want to keep it. r? @cjgillot
:umbrella: The latest upstream changes (presumably #101986) made this pull request unmergeable. Please resolve the merge conflicts.